glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.6 */
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  "-fomit-frame-pointer",
19  "-O2",
20  "-Wall",
21  "-D_FORTIFY_SOURCE=2",
22  "-fstack-protector-strong",
23  "-funwind-tables",
24  "-fasynchronous-unwind-tables",
25  "-fstack-clash-protection",
26  "-g",
27  "-finline-limit=4000",
28  "--param",
29  "inline-unit-growth=200",
30  "-funroll-loops",
31  "-fvariable-expansion-in-unroller",
32  "-DNDEBUG",
33  "-DHAVE_BITS_WORDSIZE_H",
34  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
35  "-D_GLUCAT_USE_DENSE_MATRICES",
36  "-D_GLUCAT_CHECK_ISNAN",
37  "-Wno-unused-local-typedefs",
38  "-Wno-misleading-indentation",
39  "-fno-check-new",
40  "-fexceptions"
41  ],
42  "include_dirs": [
43  ".",
44  ".."
45  ],
46  "language": "c++",
47  "name": "PyClical",
48  "sources": [
49  "PyClical.pyx"
50  ]
51  },
52  "module_name": "PyClical"
53 }
54 END: Cython Metadata */
55 
56 #define PY_SSIZE_T_CLEAN
57 #include "Python.h"
58 #ifndef Py_PYTHON_H
59  #error Python headers needed to compile C extensions, please install development version of Python.
60 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
61  #error Cython requires Python 2.6+ or Python 3.3+.
62 #else
63 #define CYTHON_ABI "0_29_6"
64 #define CYTHON_HEX_VERSION 0x001D06F0
65 #define CYTHON_FUTURE_DIVISION 0
66 #include <stddef.h>
67 #ifndef offsetof
68  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
69 #endif
70 #if !defined(WIN32) && !defined(MS_WINDOWS)
71  #ifndef __stdcall
72  #define __stdcall
73  #endif
74  #ifndef __cdecl
75  #define __cdecl
76  #endif
77  #ifndef __fastcall
78  #define __fastcall
79  #endif
80 #endif
81 #ifndef DL_IMPORT
82  #define DL_IMPORT(t) t
83 #endif
84 #ifndef DL_EXPORT
85  #define DL_EXPORT(t) t
86 #endif
87 #define __PYX_COMMA ,
88 #ifndef HAVE_LONG_LONG
89  #if PY_VERSION_HEX >= 0x02070000
90  #define HAVE_LONG_LONG
91  #endif
92 #endif
93 #ifndef PY_LONG_LONG
94  #define PY_LONG_LONG LONG_LONG
95 #endif
96 #ifndef Py_HUGE_VAL
97  #define Py_HUGE_VAL HUGE_VAL
98 #endif
99 #ifdef PYPY_VERSION
100  #define CYTHON_COMPILING_IN_PYPY 1
101  #define CYTHON_COMPILING_IN_PYSTON 0
102  #define CYTHON_COMPILING_IN_CPYTHON 0
103  #undef CYTHON_USE_TYPE_SLOTS
104  #define CYTHON_USE_TYPE_SLOTS 0
105  #undef CYTHON_USE_PYTYPE_LOOKUP
106  #define CYTHON_USE_PYTYPE_LOOKUP 0
107  #if PY_VERSION_HEX < 0x03050000
108  #undef CYTHON_USE_ASYNC_SLOTS
109  #define CYTHON_USE_ASYNC_SLOTS 0
110  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
111  #define CYTHON_USE_ASYNC_SLOTS 1
112  #endif
113  #undef CYTHON_USE_PYLIST_INTERNALS
114  #define CYTHON_USE_PYLIST_INTERNALS 0
115  #undef CYTHON_USE_UNICODE_INTERNALS
116  #define CYTHON_USE_UNICODE_INTERNALS 0
117  #undef CYTHON_USE_UNICODE_WRITER
118  #define CYTHON_USE_UNICODE_WRITER 0
119  #undef CYTHON_USE_PYLONG_INTERNALS
120  #define CYTHON_USE_PYLONG_INTERNALS 0
121  #undef CYTHON_AVOID_BORROWED_REFS
122  #define CYTHON_AVOID_BORROWED_REFS 1
123  #undef CYTHON_ASSUME_SAFE_MACROS
124  #define CYTHON_ASSUME_SAFE_MACROS 0
125  #undef CYTHON_UNPACK_METHODS
126  #define CYTHON_UNPACK_METHODS 0
127  #undef CYTHON_FAST_THREAD_STATE
128  #define CYTHON_FAST_THREAD_STATE 0
129  #undef CYTHON_FAST_PYCALL
130  #define CYTHON_FAST_PYCALL 0
131  #undef CYTHON_PEP489_MULTI_PHASE_INIT
132  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
133  #undef CYTHON_USE_TP_FINALIZE
134  #define CYTHON_USE_TP_FINALIZE 0
135  #undef CYTHON_USE_DICT_VERSIONS
136  #define CYTHON_USE_DICT_VERSIONS 0
137  #undef CYTHON_USE_EXC_INFO_STACK
138  #define CYTHON_USE_EXC_INFO_STACK 0
139 #elif defined(PYSTON_VERSION)
140  #define CYTHON_COMPILING_IN_PYPY 0
141  #define CYTHON_COMPILING_IN_PYSTON 1
142  #define CYTHON_COMPILING_IN_CPYTHON 0
143  #ifndef CYTHON_USE_TYPE_SLOTS
144  #define CYTHON_USE_TYPE_SLOTS 1
145  #endif
146  #undef CYTHON_USE_PYTYPE_LOOKUP
147  #define CYTHON_USE_PYTYPE_LOOKUP 0
148  #undef CYTHON_USE_ASYNC_SLOTS
149  #define CYTHON_USE_ASYNC_SLOTS 0
150  #undef CYTHON_USE_PYLIST_INTERNALS
151  #define CYTHON_USE_PYLIST_INTERNALS 0
152  #ifndef CYTHON_USE_UNICODE_INTERNALS
153  #define CYTHON_USE_UNICODE_INTERNALS 1
154  #endif
155  #undef CYTHON_USE_UNICODE_WRITER
156  #define CYTHON_USE_UNICODE_WRITER 0
157  #undef CYTHON_USE_PYLONG_INTERNALS
158  #define CYTHON_USE_PYLONG_INTERNALS 0
159  #ifndef CYTHON_AVOID_BORROWED_REFS
160  #define CYTHON_AVOID_BORROWED_REFS 0
161  #endif
162  #ifndef CYTHON_ASSUME_SAFE_MACROS
163  #define CYTHON_ASSUME_SAFE_MACROS 1
164  #endif
165  #ifndef CYTHON_UNPACK_METHODS
166  #define CYTHON_UNPACK_METHODS 1
167  #endif
168  #undef CYTHON_FAST_THREAD_STATE
169  #define CYTHON_FAST_THREAD_STATE 0
170  #undef CYTHON_FAST_PYCALL
171  #define CYTHON_FAST_PYCALL 0
172  #undef CYTHON_PEP489_MULTI_PHASE_INIT
173  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
174  #undef CYTHON_USE_TP_FINALIZE
175  #define CYTHON_USE_TP_FINALIZE 0
176  #undef CYTHON_USE_DICT_VERSIONS
177  #define CYTHON_USE_DICT_VERSIONS 0
178  #undef CYTHON_USE_EXC_INFO_STACK
179  #define CYTHON_USE_EXC_INFO_STACK 0
180 #else
181  #define CYTHON_COMPILING_IN_PYPY 0
182  #define CYTHON_COMPILING_IN_PYSTON 0
183  #define CYTHON_COMPILING_IN_CPYTHON 1
184  #ifndef CYTHON_USE_TYPE_SLOTS
185  #define CYTHON_USE_TYPE_SLOTS 1
186  #endif
187  #if PY_VERSION_HEX < 0x02070000
188  #undef CYTHON_USE_PYTYPE_LOOKUP
189  #define CYTHON_USE_PYTYPE_LOOKUP 0
190  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
191  #define CYTHON_USE_PYTYPE_LOOKUP 1
192  #endif
193  #if PY_MAJOR_VERSION < 3
194  #undef CYTHON_USE_ASYNC_SLOTS
195  #define CYTHON_USE_ASYNC_SLOTS 0
196  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
197  #define CYTHON_USE_ASYNC_SLOTS 1
198  #endif
199  #if PY_VERSION_HEX < 0x02070000
200  #undef CYTHON_USE_PYLONG_INTERNALS
201  #define CYTHON_USE_PYLONG_INTERNALS 0
202  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
203  #define CYTHON_USE_PYLONG_INTERNALS 1
204  #endif
205  #ifndef CYTHON_USE_PYLIST_INTERNALS
206  #define CYTHON_USE_PYLIST_INTERNALS 1
207  #endif
208  #ifndef CYTHON_USE_UNICODE_INTERNALS
209  #define CYTHON_USE_UNICODE_INTERNALS 1
210  #endif
211  #if PY_VERSION_HEX < 0x030300F0
212  #undef CYTHON_USE_UNICODE_WRITER
213  #define CYTHON_USE_UNICODE_WRITER 0
214  #elif !defined(CYTHON_USE_UNICODE_WRITER)
215  #define CYTHON_USE_UNICODE_WRITER 1
216  #endif
217  #ifndef CYTHON_AVOID_BORROWED_REFS
218  #define CYTHON_AVOID_BORROWED_REFS 0
219  #endif
220  #ifndef CYTHON_ASSUME_SAFE_MACROS
221  #define CYTHON_ASSUME_SAFE_MACROS 1
222  #endif
223  #ifndef CYTHON_UNPACK_METHODS
224  #define CYTHON_UNPACK_METHODS 1
225  #endif
226  #ifndef CYTHON_FAST_THREAD_STATE
227  #define CYTHON_FAST_THREAD_STATE 1
228  #endif
229  #ifndef CYTHON_FAST_PYCALL
230  #define CYTHON_FAST_PYCALL 1
231  #endif
232  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
233  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
234  #endif
235  #ifndef CYTHON_USE_TP_FINALIZE
236  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
237  #endif
238  #ifndef CYTHON_USE_DICT_VERSIONS
239  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
240  #endif
241  #ifndef CYTHON_USE_EXC_INFO_STACK
242  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
243  #endif
244 #endif
245 #if !defined(CYTHON_FAST_PYCCALL)
246 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
247 #endif
248 #if CYTHON_USE_PYLONG_INTERNALS
249  #include "longintrepr.h"
250  #undef SHIFT
251  #undef BASE
252  #undef MASK
253  #ifdef SIZEOF_VOID_P
254  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
255  #endif
256 #endif
257 #ifndef __has_attribute
258  #define __has_attribute(x) 0
259 #endif
260 #ifndef __has_cpp_attribute
261  #define __has_cpp_attribute(x) 0
262 #endif
263 #ifndef CYTHON_RESTRICT
264  #if defined(__GNUC__)
265  #define CYTHON_RESTRICT __restrict__
266  #elif defined(_MSC_VER) && _MSC_VER >= 1400
267  #define CYTHON_RESTRICT __restrict
268  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
269  #define CYTHON_RESTRICT restrict
270  #else
271  #define CYTHON_RESTRICT
272  #endif
273 #endif
274 #ifndef CYTHON_UNUSED
275 # if defined(__GNUC__)
276 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
277 # define CYTHON_UNUSED __attribute__ ((__unused__))
278 # else
279 # define CYTHON_UNUSED
280 # endif
281 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
282 # define CYTHON_UNUSED __attribute__ ((__unused__))
283 # else
284 # define CYTHON_UNUSED
285 # endif
286 #endif
287 #ifndef CYTHON_MAYBE_UNUSED_VAR
288 # if defined(__cplusplus)
289  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
290 # else
291 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
292 # endif
293 #endif
294 #ifndef CYTHON_NCP_UNUSED
295 # if CYTHON_COMPILING_IN_CPYTHON
296 # define CYTHON_NCP_UNUSED
297 # else
298 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
299 # endif
300 #endif
301 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
302 #ifdef _MSC_VER
303  #ifndef _MSC_STDINT_H_
304  #if _MSC_VER < 1300
305  typedef unsigned char uint8_t;
306  typedef unsigned int uint32_t;
307  #else
308  typedef unsigned __int8 uint8_t;
309  typedef unsigned __int32 uint32_t;
310  #endif
311  #endif
312 #else
313  #include <stdint.h>
314 #endif
315 #ifndef CYTHON_FALLTHROUGH
316  #if defined(__cplusplus) && __cplusplus >= 201103L
317  #if __has_cpp_attribute(fallthrough)
318  #define CYTHON_FALLTHROUGH [[fallthrough]]
319  #elif __has_cpp_attribute(clang::fallthrough)
320  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
321  #elif __has_cpp_attribute(gnu::fallthrough)
322  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
323  #endif
324  #endif
325  #ifndef CYTHON_FALLTHROUGH
326  #if __has_attribute(fallthrough)
327  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
328  #else
329  #define CYTHON_FALLTHROUGH
330  #endif
331  #endif
332  #if defined(__clang__ ) && defined(__apple_build_version__)
333  #if __apple_build_version__ < 7000000
334  #undef CYTHON_FALLTHROUGH
335  #define CYTHON_FALLTHROUGH
336  #endif
337  #endif
338 #endif
339 
340 #ifndef __cplusplus
341  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
342 #endif
343 #ifndef CYTHON_INLINE
344  #if defined(__clang__)
345  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
346  #else
347  #define CYTHON_INLINE inline
348  #endif
349 #endif
350 template<typename T>
351 void __Pyx_call_destructor(T& x) {
352  x.~T();
353 }
354 template<typename T>
355 class __Pyx_FakeReference {
356  public:
357  __Pyx_FakeReference() : ptr(NULL) { }
358  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
359  T *operator->() { return ptr; }
360  T *operator&() { return ptr; }
361  operator T&() { return *ptr; }
362  template<typename U> bool operator ==(U other) { return *ptr == other; }
363  template<typename U> bool operator !=(U other) { return *ptr != other; }
364  private:
365  T *ptr;
366 };
367 
368 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
369  #define Py_OptimizeFlag 0
370 #endif
371 #define __PYX_BUILD_PY_SSIZE_T "n"
372 #define CYTHON_FORMAT_SSIZE_T "z"
373 #if PY_MAJOR_VERSION < 3
374  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
375  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
376  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
377  #define __Pyx_DefaultClassType PyClass_Type
378 #else
379  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
380  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
381  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
382  #define __Pyx_DefaultClassType PyType_Type
383 #endif
384 #ifndef Py_TPFLAGS_CHECKTYPES
385  #define Py_TPFLAGS_CHECKTYPES 0
386 #endif
387 #ifndef Py_TPFLAGS_HAVE_INDEX
388  #define Py_TPFLAGS_HAVE_INDEX 0
389 #endif
390 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
391  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
392 #endif
393 #ifndef Py_TPFLAGS_HAVE_FINALIZE
394  #define Py_TPFLAGS_HAVE_FINALIZE 0
395 #endif
396 #ifndef METH_STACKLESS
397  #define METH_STACKLESS 0
398 #endif
399 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
400  #ifndef METH_FASTCALL
401  #define METH_FASTCALL 0x80
402  #endif
403  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
404  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
405  Py_ssize_t nargs, PyObject *kwnames);
406 #else
407  #define __Pyx_PyCFunctionFast _PyCFunctionFast
408  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
409 #endif
410 #if CYTHON_FAST_PYCCALL
411 #define __Pyx_PyFastCFunction_Check(func)\
412  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
413 #else
414 #define __Pyx_PyFastCFunction_Check(func) 0
415 #endif
416 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
417  #define PyObject_Malloc(s) PyMem_Malloc(s)
418  #define PyObject_Free(p) PyMem_Free(p)
419  #define PyObject_Realloc(p) PyMem_Realloc(p)
420 #endif
421 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
422  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
423  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
424  #define PyMem_RawFree(p) PyMem_Free(p)
425 #endif
426 #if CYTHON_COMPILING_IN_PYSTON
427  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
428  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
429 #else
430  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
431  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
432 #endif
433 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
434  #define __Pyx_PyThreadState_Current PyThreadState_GET()
435 #elif PY_VERSION_HEX >= 0x03060000
436  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
437 #elif PY_VERSION_HEX >= 0x03000000
438  #define __Pyx_PyThreadState_Current PyThreadState_GET()
439 #else
440  #define __Pyx_PyThreadState_Current _PyThreadState_Current
441 #endif
442 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
443 #include "pythread.h"
444 #define Py_tss_NEEDS_INIT 0
445 typedef int Py_tss_t;
446 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
447  *key = PyThread_create_key();
448  return 0;
449 }
450 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
451  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
452  *key = Py_tss_NEEDS_INIT;
453  return key;
454 }
455 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
456  PyObject_Free(key);
457 }
458 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
459  return *key != Py_tss_NEEDS_INIT;
460 }
461 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
462  PyThread_delete_key(*key);
463  *key = Py_tss_NEEDS_INIT;
464 }
465 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
466  return PyThread_set_key_value(*key, value);
467 }
468 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
469  return PyThread_get_key_value(*key);
470 }
471 #endif
472 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
473 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
474 #else
475 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
476 #endif
477 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
478  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
479  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
480 #else
481  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
482  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
483 #endif
484 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
485 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
486 #else
487 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
488 #endif
489 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
490  #define CYTHON_PEP393_ENABLED 1
491  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
492  0 : _PyUnicode_Ready((PyObject *)(op)))
493  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
494  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
495  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
496  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
497  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
498  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
499  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
500  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
501 #else
502  #define CYTHON_PEP393_ENABLED 0
503  #define PyUnicode_1BYTE_KIND 1
504  #define PyUnicode_2BYTE_KIND 2
505  #define PyUnicode_4BYTE_KIND 4
506  #define __Pyx_PyUnicode_READY(op) (0)
507  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
508  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
509  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
510  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
511  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
512  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
513  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
514  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
515 #endif
516 #if CYTHON_COMPILING_IN_PYPY
517  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
518  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
519 #else
520  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
521  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
522  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
523 #endif
524 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
525  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
526 #endif
527 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
528  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
529 #endif
530 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
531  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
532 #endif
533 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
534 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
535 #if PY_MAJOR_VERSION >= 3
536  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
537 #else
538  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
539 #endif
540 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
541  #define PyObject_ASCII(o) PyObject_Repr(o)
542 #endif
543 #if PY_MAJOR_VERSION >= 3
544  #define PyBaseString_Type PyUnicode_Type
545  #define PyStringObject PyUnicodeObject
546  #define PyString_Type PyUnicode_Type
547  #define PyString_Check PyUnicode_Check
548  #define PyString_CheckExact PyUnicode_CheckExact
549  #define PyObject_Unicode PyObject_Str
550 #endif
551 #if PY_MAJOR_VERSION >= 3
552  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
553  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
554 #else
555  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
556  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
557 #endif
558 #ifndef PySet_CheckExact
559  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
560 #endif
561 #if CYTHON_ASSUME_SAFE_MACROS
562  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
563 #else
564  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
565 #endif
566 #if PY_MAJOR_VERSION >= 3
567  #define PyIntObject PyLongObject
568  #define PyInt_Type PyLong_Type
569  #define PyInt_Check(op) PyLong_Check(op)
570  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
571  #define PyInt_FromString PyLong_FromString
572  #define PyInt_FromUnicode PyLong_FromUnicode
573  #define PyInt_FromLong PyLong_FromLong
574  #define PyInt_FromSize_t PyLong_FromSize_t
575  #define PyInt_FromSsize_t PyLong_FromSsize_t
576  #define PyInt_AsLong PyLong_AsLong
577  #define PyInt_AS_LONG PyLong_AS_LONG
578  #define PyInt_AsSsize_t PyLong_AsSsize_t
579  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
580  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
581  #define PyNumber_Int PyNumber_Long
582 #endif
583 #if PY_MAJOR_VERSION >= 3
584  #define PyBoolObject PyLongObject
585 #endif
586 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
587  #ifndef PyUnicode_InternFromString
588  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
589  #endif
590 #endif
591 #if PY_VERSION_HEX < 0x030200A4
592  typedef long Py_hash_t;
593  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
594  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
595 #else
596  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
597  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
598 #endif
599 #if PY_MAJOR_VERSION >= 3
600  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
601 #else
602  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
603 #endif
604 #if CYTHON_USE_ASYNC_SLOTS
605  #if PY_VERSION_HEX >= 0x030500B1
606  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
607  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
608  #else
609  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
610  #endif
611 #else
612  #define __Pyx_PyType_AsAsync(obj) NULL
613 #endif
614 #ifndef __Pyx_PyAsyncMethodsStruct
615  typedef struct {
616  unaryfunc am_await;
617  unaryfunc am_aiter;
618  unaryfunc am_anext;
619  } __Pyx_PyAsyncMethodsStruct;
620 #endif
621 
622 #if defined(WIN32) || defined(MS_WINDOWS)
623  #define _USE_MATH_DEFINES
624 #endif
625 #include <math.h>
626 #ifdef NAN
627 #define __PYX_NAN() ((float) NAN)
628 #else
629 static CYTHON_INLINE float __PYX_NAN() {
630  float value;
631  memset(&value, 0xFF, sizeof(value));
632  return value;
633 }
634 #endif
635 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
636 #define __Pyx_truncl trunc
637 #else
638 #define __Pyx_truncl truncl
639 #endif
640 
641 
642 #define __PYX_ERR(f_index, lineno, Ln_error) \
643 { \
644  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
645 }
646 
647 #ifndef __PYX_EXTERN_C
648  #ifdef __cplusplus
649  #define __PYX_EXTERN_C extern "C"
650  #else
651  #define __PYX_EXTERN_C extern
652  #endif
653 #endif
654 
655 #define __PYX_HAVE__PyClical
656 #define __PYX_HAVE_API__PyClical
657 /* Early includes */
658 #include "ios"
659 #include "new"
660 #include "stdexcept"
661 #include "typeinfo"
662 #include <vector>
663 #include "PyClical.h"
664 #ifdef _OPENMP
665 #include <omp.h>
666 #endif /* _OPENMP */
667 
668 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
669 #define CYTHON_WITHOUT_ASSERTIONS
670 #endif
671 
672 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
673  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
674 
675 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
676 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
677 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
678 #define __PYX_DEFAULT_STRING_ENCODING ""
679 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
680 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
681 #define __Pyx_uchar_cast(c) ((unsigned char)c)
682 #define __Pyx_long_cast(x) ((long)x)
683 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
684  (sizeof(type) < sizeof(Py_ssize_t)) ||\
685  (sizeof(type) > sizeof(Py_ssize_t) &&\
686  likely(v < (type)PY_SSIZE_T_MAX ||\
687  v == (type)PY_SSIZE_T_MAX) &&\
688  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
689  v == (type)PY_SSIZE_T_MIN))) ||\
690  (sizeof(type) == sizeof(Py_ssize_t) &&\
691  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
692  v == (type)PY_SSIZE_T_MAX))) )
693 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
694  return (size_t) i < (size_t) limit;
695 }
696 #if defined (__cplusplus) && __cplusplus >= 201103L
697  #include <cstdlib>
698  #define __Pyx_sst_abs(value) std::abs(value)
699 #elif SIZEOF_INT >= SIZEOF_SIZE_T
700  #define __Pyx_sst_abs(value) abs(value)
701 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
702  #define __Pyx_sst_abs(value) labs(value)
703 #elif defined (_MSC_VER)
704  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
705 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
706  #define __Pyx_sst_abs(value) llabs(value)
707 #elif defined (__GNUC__)
708  #define __Pyx_sst_abs(value) __builtin_llabs(value)
709 #else
710  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
711 #endif
712 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
713 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
714 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
715 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
716 #define __Pyx_PyBytes_FromString PyBytes_FromString
717 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
718 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
719 #if PY_MAJOR_VERSION < 3
720  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
721  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
722 #else
723  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
724  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
725 #endif
726 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
727 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
728 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
729 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
730 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
731 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
732 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
733 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
734 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
735 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
736 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
737 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
738 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
739 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
740 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
741 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
742 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
743  const Py_UNICODE *u_end = u;
744  while (*u_end++) ;
745  return (size_t)(u_end - u - 1);
746 }
747 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
748 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
749 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
750 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
751 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
752 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
753 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
754 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
755 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
756 #define __Pyx_PySequence_Tuple(obj)\
757  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
758 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
759 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
760 #if CYTHON_ASSUME_SAFE_MACROS
761 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
762 #else
763 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
764 #endif
765 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
766 #if PY_MAJOR_VERSION >= 3
767 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
768 #else
769 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
770 #endif
771 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
772 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
773 static int __Pyx_sys_getdefaultencoding_not_ascii;
774 static int __Pyx_init_sys_getdefaultencoding_params(void) {
775  PyObject* sys;
776  PyObject* default_encoding = NULL;
777  PyObject* ascii_chars_u = NULL;
778  PyObject* ascii_chars_b = NULL;
779  const char* default_encoding_c;
780  sys = PyImport_ImportModule("sys");
781  if (!sys) goto bad;
782  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
783  Py_DECREF(sys);
784  if (!default_encoding) goto bad;
785  default_encoding_c = PyBytes_AsString(default_encoding);
786  if (!default_encoding_c) goto bad;
787  if (strcmp(default_encoding_c, "ascii") == 0) {
788  __Pyx_sys_getdefaultencoding_not_ascii = 0;
789  } else {
790  char ascii_chars[128];
791  int c;
792  for (c = 0; c < 128; c++) {
793  ascii_chars[c] = c;
794  }
795  __Pyx_sys_getdefaultencoding_not_ascii = 1;
796  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
797  if (!ascii_chars_u) goto bad;
798  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
799  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
800  PyErr_Format(
801  PyExc_ValueError,
802  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
803  default_encoding_c);
804  goto bad;
805  }
806  Py_DECREF(ascii_chars_u);
807  Py_DECREF(ascii_chars_b);
808  }
809  Py_DECREF(default_encoding);
810  return 0;
811 bad:
812  Py_XDECREF(default_encoding);
813  Py_XDECREF(ascii_chars_u);
814  Py_XDECREF(ascii_chars_b);
815  return -1;
816 }
817 #endif
818 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
819 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
820 #else
821 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
822 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
823 static char* __PYX_DEFAULT_STRING_ENCODING;
824 static int __Pyx_init_sys_getdefaultencoding_params(void) {
825  PyObject* sys;
826  PyObject* default_encoding = NULL;
827  char* default_encoding_c;
828  sys = PyImport_ImportModule("sys");
829  if (!sys) goto bad;
830  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
831  Py_DECREF(sys);
832  if (!default_encoding) goto bad;
833  default_encoding_c = PyBytes_AsString(default_encoding);
834  if (!default_encoding_c) goto bad;
835  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
836  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
837  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
838  Py_DECREF(default_encoding);
839  return 0;
840 bad:
841  Py_XDECREF(default_encoding);
842  return -1;
843 }
844 #endif
845 #endif
846 
847 
848 /* Test for GCC > 2.95 */
849 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
850  #define likely(x) __builtin_expect(!!(x), 1)
851  #define unlikely(x) __builtin_expect(!!(x), 0)
852 #else /* !__GNUC__ or GCC < 2.95 */
853  #define likely(x) (x)
854  #define unlikely(x) (x)
855 #endif /* __GNUC__ */
856 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
857 
858 static PyObject *__pyx_m = NULL;
859 static PyObject *__pyx_d;
860 static PyObject *__pyx_b;
861 static PyObject *__pyx_cython_runtime = NULL;
862 static PyObject *__pyx_empty_tuple;
863 static PyObject *__pyx_empty_bytes;
864 static PyObject *__pyx_empty_unicode;
865 static int __pyx_lineno;
866 static int __pyx_clineno = 0;
867 static const char * __pyx_cfilenm= __FILE__;
868 static const char *__pyx_filename;
869 
870 
871 static const char *__pyx_f[] = {
872  "PyClical.pyx",
873  "stringsource",
874 };
875 
876 /*--- Type declarations ---*/
877 struct __pyx_obj_8PyClical_index_set;
878 struct __pyx_obj_8PyClical_clifford;
879 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
880 struct __pyx_opt_args_8PyClical_sqrt;
881 struct __pyx_opt_args_8PyClical_log;
882 struct __pyx_opt_args_8PyClical_cos;
883 struct __pyx_opt_args_8PyClical_acos;
884 struct __pyx_opt_args_8PyClical_acosh;
885 struct __pyx_opt_args_8PyClical_sin;
886 struct __pyx_opt_args_8PyClical_asin;
887 struct __pyx_opt_args_8PyClical_asinh;
888 struct __pyx_opt_args_8PyClical_tan;
889 struct __pyx_opt_args_8PyClical_atan;
890 struct __pyx_opt_args_8PyClical_atanh;
891 struct __pyx_opt_args_8PyClical_random_clifford;
892 
893 /* "PyClical.pyx":1542
894  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
895  *
896  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
897  * """
898  * Square root of multivector with optional complexifier.
899  */
900 struct __pyx_opt_args_8PyClical_sqrt {
901  int __pyx_n;
902  PyObject *i;
903 };
904 
905 /* "PyClical.pyx":1579
906  * return clifford().wrap( glucat.exp(toClifford(obj)) )
907  *
908  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
909  * """
910  * Natural logarithm of multivector with optional complexifier.
911  */
912 struct __pyx_opt_args_8PyClical_log {
913  int __pyx_n;
914  PyObject *i;
915 };
916 
917 /* "PyClical.pyx":1602
918  * return clifford().wrap( glucat.log(toClifford(obj)) )
919  *
920  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
921  * """
922  * Cosine of multivector with optional complexifier.
923  */
924 struct __pyx_opt_args_8PyClical_cos {
925  int __pyx_n;
926  PyObject *i;
927 };
928 
929 /* "PyClical.pyx":1619
930  * return clifford().wrap( glucat.cos(toClifford(obj)) )
931  *
932  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
933  * """
934  * Inverse cosine of multivector with optional complexifier.
935  */
936 struct __pyx_opt_args_8PyClical_acos {
937  int __pyx_n;
938  PyObject *i;
939 };
940 
941 /* "PyClical.pyx":1656
942  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
943  *
944  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
945  * """
946  * Inverse hyperbolic cosine of multivector with optional complexifier.
947  */
948 struct __pyx_opt_args_8PyClical_acosh {
949  int __pyx_n;
950  PyObject *i;
951 };
952 
953 /* "PyClical.pyx":1679
954  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
955  *
956  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
957  * """
958  * Sine of multivector with optional complexifier.
959  */
960 struct __pyx_opt_args_8PyClical_sin {
961  int __pyx_n;
962  PyObject *i;
963 };
964 
965 /* "PyClical.pyx":1698
966  * return clifford().wrap( glucat.sin(toClifford(obj)) )
967  *
968  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
969  * """
970  * Inverse sine of multivector with optional complexifier.
971  */
972 struct __pyx_opt_args_8PyClical_asin {
973  int __pyx_n;
974  PyObject *i;
975 };
976 
977 /* "PyClical.pyx":1733
978  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
979  *
980  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
981  * """
982  * Inverse hyperbolic sine of multivector with optional complexifier.
983  */
984 struct __pyx_opt_args_8PyClical_asinh {
985  int __pyx_n;
986  PyObject *i;
987 };
988 
989 /* "PyClical.pyx":1752
990  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
991  *
992  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
993  * """
994  * Tangent of multivector with optional complexifier.
995  */
996 struct __pyx_opt_args_8PyClical_tan {
997  int __pyx_n;
998  PyObject *i;
999 };
1000 
1001 /* "PyClical.pyx":1769
1002  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1003  *
1004  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1005  * """
1006  * Inverse tangent of multivector with optional complexifier.
1007  */
1008 struct __pyx_opt_args_8PyClical_atan {
1009  int __pyx_n;
1010  PyObject *i;
1011 };
1012 
1013 /* "PyClical.pyx":1798
1014  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1015  *
1016  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1017  * """
1018  * Inverse hyperbolic tangent of multivector with optional complexifier.
1019  */
1020 struct __pyx_opt_args_8PyClical_atanh {
1021  int __pyx_n;
1022  PyObject *i;
1023 };
1024 
1025 /* "PyClical.pyx":1815
1026  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1027  *
1028  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1029  * """
1030  * Random multivector within a frame.
1031  */
1032 struct __pyx_opt_args_8PyClical_random_clifford {
1033  int __pyx_n;
1034  PyObject *fill;
1035 };
1036 
1037 /* "PyClical.pyx":37
1038  *
1039  * # Forward reference
1040  * cdef class index_set # <<<<<<<<<<<<<<
1041  *
1042  * cdef inline IndexSet toIndexSet(obj):
1043  */
1044 struct __pyx_obj_8PyClical_index_set {
1045  PyObject_HEAD
1046  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1047  IndexSet *instance;
1048 };
1049 
1050 
1051 /* "PyClical.pyx":530
1052  *
1053  * # Forward reference.
1054  * cdef class clifford # <<<<<<<<<<<<<<
1055  *
1056  * cdef inline Clifford toClifford(obj):
1057  */
1058 struct __pyx_obj_8PyClical_clifford {
1059  PyObject_HEAD
1060  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1061  Clifford *instance;
1062 };
1063 
1064 
1065 /* "PyClical.pyx":227
1066  * return self.instance.getitem(idx)
1067  *
1068  * def __iter__(self): # <<<<<<<<<<<<<<
1069  * """
1070  * Iterate over the indices of an index_set.
1071  */
1072 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1073  PyObject_HEAD
1074  PyObject *__pyx_v_idx;
1075  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1076  PyObject *__pyx_t_0;
1077  Py_ssize_t __pyx_t_1;
1078  PyObject *(*__pyx_t_2)(PyObject *);
1079 };
1080 
1081 
1082 
1083 /* "PyClical.pyx":45
1084  * return index_set(obj).instance[0]
1085  *
1086  * cdef class index_set: # <<<<<<<<<<<<<<
1087  * """
1088  * Python class index_set wraps C++ class IndexSet.
1089  */
1090 
1091 struct __pyx_vtabstruct_8PyClical_index_set {
1092  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1093  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1094  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1095 };
1096 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1097 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1098 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1099 
1100 
1101 /* "PyClical.pyx":535
1102  * return clifford(obj).instance[0]
1103  *
1104  * cdef class clifford: # <<<<<<<<<<<<<<
1105  * """
1106  * Python class clifford wraps C++ class Clifford.
1107  */
1108 
1109 struct __pyx_vtabstruct_8PyClical_clifford {
1110  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1111  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1112  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1113 };
1114 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1115 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1116 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1117 
1118 /* --- Runtime support code (head) --- */
1119 /* Refnanny.proto */
1120 #ifndef CYTHON_REFNANNY
1121  #define CYTHON_REFNANNY 0
1122 #endif
1123 #if CYTHON_REFNANNY
1124  typedef struct {
1125  void (*INCREF)(void*, PyObject*, int);
1126  void (*DECREF)(void*, PyObject*, int);
1127  void (*GOTREF)(void*, PyObject*, int);
1128  void (*GIVEREF)(void*, PyObject*, int);
1129  void* (*SetupContext)(const char*, int, const char*);
1130  void (*FinishContext)(void**);
1131  } __Pyx_RefNannyAPIStruct;
1132  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1133  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1134  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1135 #ifdef WITH_THREAD
1136  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1137  if (acquire_gil) {\
1138  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1139  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1140  PyGILState_Release(__pyx_gilstate_save);\
1141  } else {\
1142  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1143  }
1144 #else
1145  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1146  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1147 #endif
1148  #define __Pyx_RefNannyFinishContext()\
1149  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1150  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1151  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1152  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1153  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1154  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1155  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1156  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1157  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1158 #else
1159  #define __Pyx_RefNannyDeclarations
1160  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1161  #define __Pyx_RefNannyFinishContext()
1162  #define __Pyx_INCREF(r) Py_INCREF(r)
1163  #define __Pyx_DECREF(r) Py_DECREF(r)
1164  #define __Pyx_GOTREF(r)
1165  #define __Pyx_GIVEREF(r)
1166  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1167  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1168  #define __Pyx_XGOTREF(r)
1169  #define __Pyx_XGIVEREF(r)
1170 #endif
1171 #define __Pyx_XDECREF_SET(r, v) do {\
1172  PyObject *tmp = (PyObject *) r;\
1173  r = v; __Pyx_XDECREF(tmp);\
1174  } while (0)
1175 #define __Pyx_DECREF_SET(r, v) do {\
1176  PyObject *tmp = (PyObject *) r;\
1177  r = v; __Pyx_DECREF(tmp);\
1178  } while (0)
1179 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1180 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1181 
1182 /* PyObjectGetAttrStr.proto */
1183 #if CYTHON_USE_TYPE_SLOTS
1184 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1185 #else
1186 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1187 #endif
1188 
1189 /* GetBuiltinName.proto */
1190 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1191 
1192 /* PyCFunctionFastCall.proto */
1193 #if CYTHON_FAST_PYCCALL
1194 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1195 #else
1196 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1197 #endif
1198 
1199 /* PyFunctionFastCall.proto */
1200 #if CYTHON_FAST_PYCALL
1201 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1202  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1203 #if 1 || PY_VERSION_HEX < 0x030600B1
1204 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1205 #else
1206 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1207 #endif
1208 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1209  (sizeof(char [1 - 2*!(cond)]) - 1)
1210 #ifndef Py_MEMBER_SIZE
1211 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1212 #endif
1213  static size_t __pyx_pyframe_localsplus_offset = 0;
1214  #include "frameobject.h"
1215  #define __Pxy_PyFrame_Initialize_Offsets()\
1216  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1217  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1218  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1219  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1220 #endif
1221 
1222 /* PyObjectCall.proto */
1223 #if CYTHON_COMPILING_IN_CPYTHON
1224 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1225 #else
1226 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1227 #endif
1228 
1229 /* PyObjectCallMethO.proto */
1230 #if CYTHON_COMPILING_IN_CPYTHON
1231 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1232 #endif
1233 
1234 /* PyObjectCallOneArg.proto */
1235 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1236 
1237 /* PyThreadStateGet.proto */
1238 #if CYTHON_FAST_THREAD_STATE
1239 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1240 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1241 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1242 #else
1243 #define __Pyx_PyThreadState_declare
1244 #define __Pyx_PyThreadState_assign
1245 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1246 #endif
1247 
1248 /* PyErrFetchRestore.proto */
1249 #if CYTHON_FAST_THREAD_STATE
1250 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1251 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1252 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1253 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1254 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1255 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1256 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1257 #if CYTHON_COMPILING_IN_CPYTHON
1258 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1259 #else
1260 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1261 #endif
1262 #else
1263 #define __Pyx_PyErr_Clear() PyErr_Clear()
1264 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1265 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1266 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1267 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1268 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1269 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1270 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1271 #endif
1272 
1273 /* WriteUnraisableException.proto */
1274 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1275  int lineno, const char *filename,
1276  int full_traceback, int nogil);
1277 
1278 /* PyDictVersioning.proto */
1279 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1280 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1281 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1282 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1283  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1284  (cache_var) = (value);
1285 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1286  static PY_UINT64_T __pyx_dict_version = 0;\
1287  static PyObject *__pyx_dict_cached_value = NULL;\
1288  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1289  (VAR) = __pyx_dict_cached_value;\
1290  } else {\
1291  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1292  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1293  }\
1294 }
1295 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1296 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1297 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1298 #else
1299 #define __PYX_GET_DICT_VERSION(dict) (0)
1300 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1301 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1302 #endif
1303 
1304 /* PyObjectCallNoArg.proto */
1305 #if CYTHON_COMPILING_IN_CPYTHON
1306 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1307 #else
1308 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1309 #endif
1310 
1311 /* RaiseDoubleKeywords.proto */
1312 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1313 
1314 /* ParseKeywords.proto */
1315 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1316  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1317  const char* function_name);
1318 
1319 /* RaiseArgTupleInvalid.proto */
1320 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1321  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1322 
1323 /* GetModuleGlobalName.proto */
1324 #if CYTHON_USE_DICT_VERSIONS
1325 #define __Pyx_GetModuleGlobalName(var, name) {\
1326  static PY_UINT64_T __pyx_dict_version = 0;\
1327  static PyObject *__pyx_dict_cached_value = NULL;\
1328  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1329  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1330  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1331 }
1332 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1333  PY_UINT64_T __pyx_dict_version;\
1334  PyObject *__pyx_dict_cached_value;\
1335  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1336 }
1337 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1338 #else
1339 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1340 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1341 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1342 #endif
1343 
1344 /* GetTopmostException.proto */
1345 #if CYTHON_USE_EXC_INFO_STACK
1346 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1347 #endif
1348 
1349 /* SaveResetException.proto */
1350 #if CYTHON_FAST_THREAD_STATE
1351 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1352 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1353 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1354 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1355 #else
1356 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1357 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1358 #endif
1359 
1360 /* PyErrExceptionMatches.proto */
1361 #if CYTHON_FAST_THREAD_STATE
1362 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1363 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1364 #else
1365 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1366 #endif
1367 
1368 /* GetException.proto */
1369 #if CYTHON_FAST_THREAD_STATE
1370 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1371 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1372 #else
1373 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1374 #endif
1375 
1376 /* RaiseException.proto */
1377 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1378 
1379 /* PyIntBinop.proto */
1380 #if !CYTHON_COMPILING_IN_PYPY
1381 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1382 #else
1383 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1384  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1385 #endif
1386 
1387 /* PySequenceContains.proto */
1388 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1389  int result = PySequence_Contains(seq, item);
1390  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1391 }
1392 
1393 /* SetItemInt.proto */
1394 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1395  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1396  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1397  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1398  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1399 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1400 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1401  int is_list, int wraparound, int boundscheck);
1402 
1403 /* PyObjectCall2Args.proto */
1404 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1405 
1406 /* ArgTypeTest.proto */
1407 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1408  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1409  __Pyx__ArgTypeTest(obj, type, name, exact))
1410 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1411 
1412 /* Import.proto */
1413 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1414 
1415 /* IncludeStringH.proto */
1416 #include <string.h>
1417 
1418 /* PyObject_GenericGetAttrNoDict.proto */
1419 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1420 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1421 #else
1422 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1423 #endif
1424 
1425 /* PyObject_GenericGetAttr.proto */
1426 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1427 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1428 #else
1429 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1430 #endif
1431 
1432 /* SetVTable.proto */
1433 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1434 
1435 /* SetupReduce.proto */
1436 static int __Pyx_setup_reduce(PyObject* type_obj);
1437 
1438 /* PyFloatBinop.proto */
1439 #if !CYTHON_COMPILING_IN_PYPY
1440 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1441 #else
1442 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1443  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1444  #endif
1445 
1446 /* BytesEquals.proto */
1447 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1448 
1449 /* UnicodeEquals.proto */
1450 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1451 
1452 /* StrEquals.proto */
1453 #if PY_MAJOR_VERSION >= 3
1454 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1455 #else
1456 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1457 #endif
1458 
1459 /* CLineInTraceback.proto */
1460 #ifdef CYTHON_CLINE_IN_TRACEBACK
1461 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1462 #else
1463 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1464 #endif
1465 
1466 /* CodeObjectCache.proto */
1467 typedef struct {
1468  PyCodeObject* code_object;
1469  int code_line;
1470 } __Pyx_CodeObjectCacheEntry;
1471 struct __Pyx_CodeObjectCache {
1472  int count;
1473  int max_count;
1474  __Pyx_CodeObjectCacheEntry* entries;
1475 };
1476 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1477 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1478 static PyCodeObject *__pyx_find_code_object(int code_line);
1479 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1480 
1481 /* AddTraceback.proto */
1482 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1483  int py_line, const char *filename);
1484 
1485 /* CppExceptionConversion.proto */
1486 #ifndef __Pyx_CppExn2PyErr
1487 #include <new>
1488 #include <typeinfo>
1489 #include <stdexcept>
1490 #include <ios>
1491 static void __Pyx_CppExn2PyErr() {
1492  try {
1493  if (PyErr_Occurred())
1494  ; // let the latest Python exn pass through and ignore the current one
1495  else
1496  throw;
1497  } catch (const std::bad_alloc& exn) {
1498  PyErr_SetString(PyExc_MemoryError, exn.what());
1499  } catch (const std::bad_cast& exn) {
1500  PyErr_SetString(PyExc_TypeError, exn.what());
1501  } catch (const std::bad_typeid& exn) {
1502  PyErr_SetString(PyExc_TypeError, exn.what());
1503  } catch (const std::domain_error& exn) {
1504  PyErr_SetString(PyExc_ValueError, exn.what());
1505  } catch (const std::invalid_argument& exn) {
1506  PyErr_SetString(PyExc_ValueError, exn.what());
1507  } catch (const std::ios_base::failure& exn) {
1508  PyErr_SetString(PyExc_IOError, exn.what());
1509  } catch (const std::out_of_range& exn) {
1510  PyErr_SetString(PyExc_IndexError, exn.what());
1511  } catch (const std::overflow_error& exn) {
1512  PyErr_SetString(PyExc_OverflowError, exn.what());
1513  } catch (const std::range_error& exn) {
1514  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1515  } catch (const std::underflow_error& exn) {
1516  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1517  } catch (const std::exception& exn) {
1518  PyErr_SetString(PyExc_RuntimeError, exn.what());
1519  }
1520  catch (...)
1521  {
1522  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1523  }
1524 }
1525 #endif
1526 
1527 /* CIntToPy.proto */
1528 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1529 
1530 /* CIntFromPy.proto */
1531 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1532 
1533 /* CIntToPy.proto */
1534 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1535 
1536 /* CIntFromPy.proto */
1537 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1538 
1539 /* FastTypeChecks.proto */
1540 #if CYTHON_COMPILING_IN_CPYTHON
1541 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1542 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1543 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1544 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1545 #else
1546 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1547 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1548 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1549 #endif
1550 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1551 
1552 /* FetchCommonType.proto */
1553 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1554 
1555 /* SwapException.proto */
1556 #if CYTHON_FAST_THREAD_STATE
1557 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1558 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1559 #else
1560 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1561 #endif
1562 
1563 /* PyObjectGetMethod.proto */
1564 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1565 
1566 /* PyObjectCallMethod1.proto */
1567 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1568 
1569 /* CoroutineBase.proto */
1570 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1571 #if CYTHON_USE_EXC_INFO_STACK
1572 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1573 #else
1574 typedef struct {
1575  PyObject *exc_type;
1576  PyObject *exc_value;
1577  PyObject *exc_traceback;
1578 } __Pyx_ExcInfoStruct;
1579 #endif
1580 typedef struct {
1581  PyObject_HEAD
1582  __pyx_coroutine_body_t body;
1583  PyObject *closure;
1584  __Pyx_ExcInfoStruct gi_exc_state;
1585  PyObject *gi_weakreflist;
1586  PyObject *classobj;
1587  PyObject *yieldfrom;
1588  PyObject *gi_name;
1589  PyObject *gi_qualname;
1590  PyObject *gi_modulename;
1591  PyObject *gi_code;
1592  int resume_label;
1593  char is_running;
1594 } __pyx_CoroutineObject;
1595 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1596  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1597  PyObject *name, PyObject *qualname, PyObject *module_name);
1598 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1599  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1600  PyObject *name, PyObject *qualname, PyObject *module_name);
1601 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1602 static int __Pyx_Coroutine_clear(PyObject *self);
1603 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1604 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1605 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1606 #if CYTHON_USE_EXC_INFO_STACK
1607 #define __Pyx_Coroutine_SwapException(self)
1608 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1609 #else
1610 #define __Pyx_Coroutine_SwapException(self) {\
1611  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1612  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1613  }
1614 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1615  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1616  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1617  }
1618 #endif
1619 #if CYTHON_FAST_THREAD_STATE
1620 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1621  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1622 #else
1623 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1624  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1625 #endif
1626 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1627 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1628 
1629 /* PatchModuleWithCoroutine.proto */
1630 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1631 
1632 /* PatchGeneratorABC.proto */
1633 static int __Pyx_patch_abc(void);
1634 
1635 /* Generator.proto */
1636 #define __Pyx_Generator_USED
1637 static PyTypeObject *__pyx_GeneratorType = 0;
1638 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1639 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1640  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1641 static PyObject *__Pyx_Generator_Next(PyObject *self);
1642 static int __pyx_Generator_init(void);
1643 
1644 /* CheckBinaryVersion.proto */
1645 static int __Pyx_check_binary_version(void);
1646 
1647 /* InitStrings.proto */
1648 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1649 
1650 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1651 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1652 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1653 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1654 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1655 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1656 
1657 /* Module declarations from 'libcpp.vector' */
1658 
1659 /* Module declarations from 'glucat' */
1660 
1661 /* Module declarations from 'PyClical' */
1662 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1663 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1664 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1665 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1666 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1667 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1668 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1669 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1670 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1671 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1672 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1673 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1674 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1675 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1676 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1677 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1678 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1679 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1680 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1681 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1682 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1683 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1685 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1686 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1687 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1690 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1691 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1692 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1693 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1694 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1695 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1696 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1697 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1698 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1699 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1700 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1702 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1703 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*/
1704 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1705 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1706 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1707 #define __Pyx_MODULE_NAME "PyClical"
1708 extern int __pyx_module_is_main_PyClical;
1709 int __pyx_module_is_main_PyClical = 0;
1710 
1711 /* Implementation of 'PyClical' */
1712 static PyObject *__pyx_builtin_IndexError;
1713 static PyObject *__pyx_builtin_RuntimeError;
1714 static PyObject *__pyx_builtin_TypeError;
1715 static PyObject *__pyx_builtin_ValueError;
1716 static PyObject *__pyx_builtin_NotImplemented;
1717 static PyObject *__pyx_builtin_range;
1718 static PyObject *__pyx_builtin_xrange;
1719 static const char __pyx_k_[] = ".";
1720 static const char __pyx_k_e[] = "e";
1721 static const char __pyx_k_i[] = "i";
1722 static const char __pyx_k_m[] = "m";
1723 static const char __pyx_k_p[] = "p";
1724 static const char __pyx_k_q[] = "q";
1725 static const char __pyx_k__2[] = " ";
1726 static const char __pyx_k__5[] = ":";
1727 static const char __pyx_k__6[] = "\n\t";
1728 static const char __pyx_k__7[] = " (";
1729 static const char __pyx_k__8[] = ", ";
1730 static const char __pyx_k__9[] = ").";
1731 static const char __pyx_k_cl[] = "cl";
1732 static const char __pyx_k_pi[] = "pi";
1733 static const char __pyx_k_cos[] = "cos";
1734 static const char __pyx_k_exp[] = "exp";
1735 static const char __pyx_k_frm[] = "frm";
1736 static const char __pyx_k_inv[] = "inv";
1737 static const char __pyx_k_ist[] = "ist";
1738 static const char __pyx_k_ixt[] = "ixt";
1739 static const char __pyx_k_lhs[] = "lhs";
1740 static const char __pyx_k_log[] = "log";
1741 static const char __pyx_k_max[] = "max";
1742 static const char __pyx_k_min[] = "min";
1743 static const char __pyx_k_obj[] = "obj";
1744 static const char __pyx_k_odd[] = "odd";
1745 static const char __pyx_k_pow[] = "pow";
1746 static const char __pyx_k_rhs[] = "rhs";
1747 static const char __pyx_k_sin[] = "sin";
1748 static const char __pyx_k_tan[] = "tan";
1749 static const char __pyx_k_tau[] = "tau";
1750 static const char __pyx_k_Real[] = "Real";
1751 static const char __pyx_k_acos[] = "acos";
1752 static const char __pyx_k_args[] = "args";
1753 static const char __pyx_k_asin[] = "asin";
1754 static const char __pyx_k_atan[] = "atan";
1755 static const char __pyx_k_conj[] = "conj";
1756 static const char __pyx_k_copy[] = "copy";
1757 static const char __pyx_k_cosh[] = "cosh";
1758 static const char __pyx_k_even[] = "even";
1759 static const char __pyx_k_fill[] = "fill";
1760 static const char __pyx_k_from[] = " from ";
1761 static const char __pyx_k_iter[] = "__iter__";
1762 static const char __pyx_k_main[] = "__main__";
1763 static const char __pyx_k_math[] = "math";
1764 static const char __pyx_k_name[] = "__name__";
1765 static const char __pyx_k_norm[] = "norm";
1766 static const char __pyx_k_pure[] = "pure";
1767 static const char __pyx_k_quad[] = "quad";
1768 static const char __pyx_k_send[] = "send";
1769 static const char __pyx_k_sinh[] = "sinh";
1770 static const char __pyx_k_sqrt[] = "sqrt";
1771 static const char __pyx_k_tanh[] = "tanh";
1772 static const char __pyx_k_test[] = "_test";
1773 static const char __pyx_k_0_8_2[] = "0.8.2";
1774 static const char __pyx_k_acosh[] = "acosh";
1775 static const char __pyx_k_asinh[] = "asinh";
1776 static const char __pyx_k_atanh[] = "atanh";
1777 static const char __pyx_k_close[] = "close";
1778 static const char __pyx_k_grade[] = "grade";
1779 static const char __pyx_k_istpq[] = "istpq";
1780 static const char __pyx_k_nbar3[] = "nbar3";
1781 static const char __pyx_k_ninf3[] = "ninf3";
1782 static const char __pyx_k_other[] = "other";
1783 static const char __pyx_k_range[] = "range";
1784 static const char __pyx_k_throw[] = "throw";
1785 static const char __pyx_k_using[] = " using (";
1786 static const char __pyx_k_value[] = " value ";
1787 static const char __pyx_k_import[] = "__import__";
1788 static const char __pyx_k_reduce[] = "__reduce__";
1789 static const char __pyx_k_scalar[] = "scalar";
1790 static const char __pyx_k_test_2[] = "__test__";
1791 static const char __pyx_k_xrange[] = "xrange";
1792 static const char __pyx_k_doctest[] = "doctest";
1793 static const char __pyx_k_invalid[] = " invalid ";
1794 static const char __pyx_k_numbers[] = "numbers";
1795 static const char __pyx_k_reverse[] = "reverse";
1796 static const char __pyx_k_testmod[] = "testmod";
1797 static const char __pyx_k_version[] = "__version__";
1798 static const char __pyx_k_Integral[] = "Integral";
1799 static const char __pyx_k_PyClical[] = "PyClical";
1800 static const char __pyx_k_Sequence[] = "Sequence";
1801 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1802 static const char __pyx_k_clifford[] = "clifford";
1803 static const char __pyx_k_getstate[] = "__getstate__";
1804 static const char __pyx_k_involute[] = "involute";
1805 static const char __pyx_k_setstate[] = "__setstate__";
1806 static const char __pyx_k_to_frame[] = " to frame ";
1807 static const char __pyx_k_TypeError[] = "TypeError";
1808 static const char __pyx_k_index_set[] = "index_set";
1809 static const char __pyx_k_outer_pow[] = "outer_pow";
1810 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1811 static const char __pyx_k_IndexError[] = "IndexError";
1812 static const char __pyx_k_ValueError[] = "ValueError";
1813 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1814 static const char __pyx_k_collections[] = "collections";
1815 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1816 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1817 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1818 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1819 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1820 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1821 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1822 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1823 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1824 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1825 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1826 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1827 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1828 static const char __pyx_k_using_invalid[] = " using invalid ";
1829 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1830 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1831 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1832 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1833 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1834 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1835 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1836 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1837 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1838 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1839 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1840 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1841 static const char __pyx_k_invalid_string[] = " invalid string ";
1842 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1843 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1844 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1845 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1846 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1847 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1848 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1849 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1850 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1851 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1852 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1853 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1854 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1855 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1856 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1857 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1858 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1859 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1860 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1861 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1862 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1863 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1864 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1865 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1866 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1867 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1868 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1869 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1870 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1871 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1872 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1873 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1874 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1875 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1876 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1877 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1878 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1879 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1880 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1881 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1882 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1883 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1884 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1885 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1886 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1887 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1888 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1889 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1890 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1891 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1892 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1893 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1894 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1895 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1896 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1897 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1898 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1899 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1900 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1901 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1902 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1903 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1904 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1905 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1906 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1907 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1908 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1909 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1910 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1911 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1912 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1913 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1914 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1915 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1916 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1917 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1918 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1919 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1920 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1921 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1922 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1923 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1924 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1925 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1926 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1927 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1928 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1929 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1930 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1931 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 ";
1932 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 ";
1933 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 ";
1934 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 ";
1935 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 ";
1936 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 ";
1937 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 ";
1938 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 ";
1939 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 ";
1940 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 ";
1941 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 ";
1942 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 ";
1943 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 ";
1944 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 ";
1945 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 ";
1946 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 ";
1947 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 ";
1948 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 ";
1949 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 ";
1950 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 ";
1951 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 ";
1952 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1953 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1954 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1955 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 ";
1956 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 ";
1957 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 ";
1958 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 ";
1959 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 ";
1960 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 ";
1961 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 ";
1962 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 ";
1963 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 ";
1964 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 ";
1965 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 ";
1966 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 ";
1967 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 ";
1968 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 ";
1969 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 ";
1970 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 ";
1971 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 ";
1972 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 ";
1973 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 ";
1974 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 ";
1975 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 ";
1976 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 ";
1977 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 ";
1978 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 ";
1979 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 ";
1980 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 ";
1981 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 ";
1982 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 ";
1983 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 ";
1984 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 ";
1985 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 ";
1986 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 ";
1987 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 ";
1988 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 ";
1989 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 ";
1990 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 ";
1991 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 ";
1992 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 ";
1993 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 ";
1994 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 ";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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 ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 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 ";
2016 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 ";
2017 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 ";
2018 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 ";
2019 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 ";
2020 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 ";
2021 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 ";
2022 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 ";
2023  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 ";
2024  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 ";
2025  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2026  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 ";
2027  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
2028  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 ";
2029  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2030  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2031  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 ";
2032  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 ";
2033  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 ";
2034  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 ";
2035  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 ";
2036  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
2037  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
2038  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
2039  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2040  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 ";
2041  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 ";
2042  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 ";
2043  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 ";
2044  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 ";
2045  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 ";
2046  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 ";
2047  static PyObject *__pyx_kp_s_;
2048  static PyObject *__pyx_kp_s_0_8_2;
2049  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2050  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2051  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2052  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2053  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
2054  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
2055  static PyObject *__pyx_kp_s_Cannot_reframe;
2056  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
2057  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2058  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2059  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2060  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2061  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2062  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2063  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2064  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2065  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2066  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2067  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2068  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2069  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2070  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2071  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2072  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2073  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2074  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2075  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2076  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2077  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2078  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2079  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2080  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2081  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2082  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2083  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2084  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2085  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2086  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2087  static PyObject *__pyx_n_s_IndexError;
2088  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2089  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2090  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2091  static PyObject *__pyx_n_s_Integral;
2092  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2093  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2094  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2095  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2096  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2097  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2098  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2099  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2100  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2101  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2102  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2103  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2104  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2105  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2106  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2107  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2108  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2109  static PyObject *__pyx_n_s_NotImplemented;
2110  static PyObject *__pyx_kp_s_Not_applicable;
2111  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2112  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2113  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2114  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2115  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2116  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2117  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2118  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2119  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2120  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2121  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2122  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2123  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2124  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2125  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2126  static PyObject *__pyx_n_s_PyClical;
2127  static PyObject *__pyx_kp_s_PyClical_pyx;
2128  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2129  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2130  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2131  static PyObject *__pyx_n_s_Real;
2132  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2133  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2134  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2135  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2136  static PyObject *__pyx_n_s_RuntimeError;
2137  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2138  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2139  static PyObject *__pyx_n_s_Sequence;
2140  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2141  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2142  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2143  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2144  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2145  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2146  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2147  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2148  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2149  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2150  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2151  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2152  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2153  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2154  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2155  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2156  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2157  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2158  static PyObject *__pyx_kp_u_The_informal_string_representat;
2159  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2160  static PyObject *__pyx_kp_u_The_official_string_representat;
2161  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2162  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2163  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2164  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2165  static PyObject *__pyx_n_s_TypeError;
2166  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2167  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2168  static PyObject *__pyx_n_s_ValueError;
2169  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2170  static PyObject *__pyx_kp_s__2;
2171  static PyObject *__pyx_kp_s__5;
2172  static PyObject *__pyx_kp_s__6;
2173  static PyObject *__pyx_kp_s__7;
2174  static PyObject *__pyx_kp_s__8;
2175  static PyObject *__pyx_kp_s__9;
2176  static PyObject *__pyx_kp_u_abs_line_1473;
2177  static PyObject *__pyx_n_s_acos;
2178  static PyObject *__pyx_kp_u_acos_line_1619;
2179  static PyObject *__pyx_n_s_acosh;
2180  static PyObject *__pyx_kp_u_acosh_line_1656;
2181  static PyObject *__pyx_kp_u_agc3_line_1844;
2182  static PyObject *__pyx_n_s_args;
2183  static PyObject *__pyx_kp_s_as_frame;
2184  static PyObject *__pyx_n_s_asin;
2185  static PyObject *__pyx_kp_u_asin_line_1698;
2186  static PyObject *__pyx_n_s_asinh;
2187  static PyObject *__pyx_kp_u_asinh_line_1733;
2188  static PyObject *__pyx_n_s_atan;
2189  static PyObject *__pyx_kp_u_atan_line_1769;
2190  static PyObject *__pyx_n_s_atanh;
2191  static PyObject *__pyx_kp_u_atanh_line_1798;
2192  static PyObject *__pyx_kp_u_cga3_line_1824;
2193  static PyObject *__pyx_kp_u_cga3std_line_1833;
2194  static PyObject *__pyx_n_s_cl;
2195  static PyObject *__pyx_n_s_clifford;
2196  static PyObject *__pyx_kp_u_clifford___add___line_739;
2197  static PyObject *__pyx_kp_u_clifford___and___line_835;
2198  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2199  static PyObject *__pyx_kp_u_clifford___div___line_895;
2200  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2201  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2202  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2203  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2204  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2205  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2206  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2207  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2208  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2209  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2210  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2211  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2212  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2213  static PyObject *__pyx_kp_u_clifford___or___line_938;
2214  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2215  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2216  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2217  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2218  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2219  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2220  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2221  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2222  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2223  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2224  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2225  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2226  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2227  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2228  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2229  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2230  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2231  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2232  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2233  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2234  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2235  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2236  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2237  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2238  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2239  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2240  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2241  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2242  static PyObject *__pyx_n_s_cline_in_traceback;
2243  static PyObject *__pyx_n_s_close;
2244  static PyObject *__pyx_n_s_collections;
2245  static PyObject *__pyx_kp_u_compare_line_490;
2246  static PyObject *__pyx_kp_u_complexifier_line_1527;
2247  static PyObject *__pyx_n_s_conj;
2248  static PyObject *__pyx_kp_u_conj_line_1436;
2249  static PyObject *__pyx_n_s_copy;
2250  static PyObject *__pyx_n_s_cos;
2251  static PyObject *__pyx_kp_u_cos_line_1602;
2252  static PyObject *__pyx_n_s_cosh;
2253  static PyObject *__pyx_kp_u_cosh_line_1640;
2254  static PyObject *__pyx_n_s_doctest;
2255  static PyObject *__pyx_n_s_e;
2256  static PyObject *__pyx_kp_u_e_line_1887;
2257  static PyObject *__pyx_n_s_even;
2258  static PyObject *__pyx_kp_u_even_line_1388;
2259  static PyObject *__pyx_n_s_exp;
2260  static PyObject *__pyx_kp_u_exp_line_1565;
2261  static PyObject *__pyx_n_s_fill;
2262  static PyObject *__pyx_n_s_frm;
2263  static PyObject *__pyx_kp_s_from;
2264  static PyObject *__pyx_n_s_getstate;
2265  static PyObject *__pyx_n_s_grade;
2266  static PyObject *__pyx_n_s_i;
2267  static PyObject *__pyx_kp_u_imag_line_1366;
2268  static PyObject *__pyx_n_s_import;
2269  static PyObject *__pyx_n_s_index_set;
2270  static PyObject *__pyx_kp_u_index_set___and___line_269;
2271  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2272  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2273  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2274  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2275  static PyObject *__pyx_n_s_index_set___iter;
2276  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2277  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2278  static PyObject *__pyx_kp_u_index_set___or___line_291;
2279  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2280  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2281  static PyObject *__pyx_kp_u_index_set___str___line_393;
2282  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2283  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2284  static PyObject *__pyx_kp_u_index_set_count_line_313;
2285  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2286  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2287  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2288  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2289  static PyObject *__pyx_kp_u_index_set_max_line_349;
2290  static PyObject *__pyx_kp_u_index_set_min_line_340;
2291  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2292  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2293  static PyObject *__pyx_n_s_inv;
2294  static PyObject *__pyx_kp_u_inv_line_1329;
2295  static PyObject *__pyx_kp_s_invalid;
2296  static PyObject *__pyx_kp_s_invalid_string;
2297  static PyObject *__pyx_n_s_involute;
2298  static PyObject *__pyx_kp_u_involute_line_1406;
2299  static PyObject *__pyx_n_s_ist;
2300  static PyObject *__pyx_n_s_istpq;
2301  static PyObject *__pyx_kp_u_istpq_line_1900;
2302  static PyObject *__pyx_n_s_iter;
2303  static PyObject *__pyx_n_s_ixt;
2304  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2305  static PyObject *__pyx_n_s_lhs;
2306  static PyObject *__pyx_n_s_log;
2307  static PyObject *__pyx_kp_u_log_line_1579;
2308  static PyObject *__pyx_n_s_m;
2309  static PyObject *__pyx_n_s_main;
2310  static PyObject *__pyx_n_s_math;
2311  static PyObject *__pyx_n_s_max;
2312  static PyObject *__pyx_kp_u_max_abs_line_1482;
2313  static PyObject *__pyx_kp_u_max_pos_line_511;
2314  static PyObject *__pyx_n_s_min;
2315  static PyObject *__pyx_kp_u_min_neg_line_502;
2316  static PyObject *__pyx_n_s_name;
2317  static PyObject *__pyx_n_s_nbar3;
2318  static PyObject *__pyx_n_s_ninf3;
2319  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2320  static PyObject *__pyx_n_s_norm;
2321  static PyObject *__pyx_kp_u_norm_line_1462;
2322  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2323  static PyObject *__pyx_n_s_numbers;
2324  static PyObject *__pyx_n_s_obj;
2325  static PyObject *__pyx_n_s_odd;
2326  static PyObject *__pyx_kp_u_odd_line_1397;
2327  static PyObject *__pyx_n_s_other;
2328  static PyObject *__pyx_n_s_outer_pow;
2329  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2330  static PyObject *__pyx_n_s_p;
2331  static PyObject *__pyx_n_s_pi;
2332  static PyObject *__pyx_n_s_pow;
2333  static PyObject *__pyx_kp_u_pow_line_1494;
2334  static PyObject *__pyx_n_s_pure;
2335  static PyObject *__pyx_kp_u_pure_line_1377;
2336  static PyObject *__pyx_n_s_pyx_vtable;
2337  static PyObject *__pyx_n_s_q;
2338  static PyObject *__pyx_n_s_quad;
2339  static PyObject *__pyx_kp_u_quad_line_1451;
2340  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2341  static PyObject *__pyx_n_s_range;
2342  static PyObject *__pyx_kp_u_real_line_1355;
2343  static PyObject *__pyx_n_s_reduce;
2344  static PyObject *__pyx_n_s_reduce_cython;
2345  static PyObject *__pyx_n_s_reduce_ex;
2346  static PyObject *__pyx_n_s_reverse;
2347  static PyObject *__pyx_kp_u_reverse_line_1421;
2348  static PyObject *__pyx_n_s_rhs;
2349  static PyObject *__pyx_n_s_scalar;
2350  static PyObject *__pyx_kp_u_scalar_line_1344;
2351  static PyObject *__pyx_n_s_send;
2352  static PyObject *__pyx_n_s_setstate;
2353  static PyObject *__pyx_n_s_setstate_cython;
2354  static PyObject *__pyx_n_s_sin;
2355  static PyObject *__pyx_kp_u_sin_line_1679;
2356  static PyObject *__pyx_n_s_sinh;
2357  static PyObject *__pyx_kp_u_sinh_line_1719;
2358  static PyObject *__pyx_n_s_sqrt;
2359  static PyObject *__pyx_kp_u_sqrt_line_1542;
2360  static PyObject *__pyx_n_s_tan;
2361  static PyObject *__pyx_kp_u_tan_line_1752;
2362  static PyObject *__pyx_n_s_tanh;
2363  static PyObject *__pyx_kp_u_tanh_line_1786;
2364  static PyObject *__pyx_n_s_tau;
2365  static PyObject *__pyx_n_s_test;
2366  static PyObject *__pyx_n_s_test_2;
2367  static PyObject *__pyx_n_s_testmod;
2368  static PyObject *__pyx_n_s_throw;
2369  static PyObject *__pyx_kp_s_to_frame;
2370  static PyObject *__pyx_kp_s_using;
2371  static PyObject *__pyx_kp_s_using_invalid;
2372  static PyObject *__pyx_kp_s_value;
2373  static PyObject *__pyx_n_s_version;
2374  static PyObject *__pyx_n_s_xrange;
2375 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2376 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2377 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2378 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 */
2379 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 */
2380 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2381 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2382 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2383 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2384 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2385 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2386 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2387 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2388 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2389 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2390 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2391 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2392 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2393 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2394 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2395 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2396 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2397 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2398 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2399 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2400 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2401 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 */
2402 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2403 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2404 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2405 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2406 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2407 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 */
2408 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2409 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 */
2410 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2411 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2412 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 */
2413 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2414 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2415 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2416 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2417 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2418 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2419 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2420 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2421 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2422 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2423 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2424 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2425 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2426 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2427 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2428 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2429 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2430 #endif
2431 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2432 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2433 #endif
2434 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2435 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2436 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2437 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2438 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2439 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2440 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2441 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2442 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2443 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2444 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2445 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2446 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2447 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2448 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2449 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2459 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 */
2460 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2461 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2464 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2465 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2470 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2476 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2477 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2478 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2481 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2482 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2493 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 */
2494 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2497 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2498 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2499 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2500 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2501 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2502 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2503 static PyObject *__pyx_float_0_0;
2504 static PyObject *__pyx_float_1_0;
2505 static PyObject *__pyx_float_2_0;
2506 static PyObject *__pyx_float_8_0;
2507 static PyObject *__pyx_int_0;
2508 static PyObject *__pyx_int_1;
2509 static PyObject *__pyx_int_4;
2510 static PyObject *__pyx_int_neg_1;
2511 static PyObject *__pyx_tuple__3;
2512 static PyObject *__pyx_tuple__4;
2513 static PyObject *__pyx_tuple__10;
2514 static PyObject *__pyx_tuple__11;
2515 static PyObject *__pyx_tuple__12;
2516 static PyObject *__pyx_tuple__15;
2517 static PyObject *__pyx_tuple__16;
2518 static PyObject *__pyx_tuple__18;
2519 static PyObject *__pyx_tuple__20;
2520 static PyObject *__pyx_tuple__21;
2521 static PyObject *__pyx_tuple__22;
2522 static PyObject *__pyx_codeobj__13;
2523 static PyObject *__pyx_codeobj__14;
2524 static PyObject *__pyx_codeobj__17;
2525 static PyObject *__pyx_codeobj__19;
2526 static PyObject *__pyx_codeobj__23;
2527 /* Late includes */
2528 
2529 /* "PyClical.pyx":39
2530  * cdef class index_set
2531  *
2532  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2533  * """
2534  * Return the C++ IndexSet instance wrapped by index_set(obj).
2535  */
2536 
2537 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2538  IndexSet __pyx_r;
2539  __Pyx_RefNannyDeclarations
2540  PyObject *__pyx_t_1 = NULL;
2541  __Pyx_RefNannySetupContext("toIndexSet", 0);
2542 
2543  /* "PyClical.pyx":43
2544  * Return the C++ IndexSet instance wrapped by index_set(obj).
2545  * """
2546  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2547  *
2548  * cdef class index_set:
2549  */
2550  __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)
2551  __Pyx_GOTREF(__pyx_t_1);
2552  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2553  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2554  goto __pyx_L0;
2555 
2556  /* "PyClical.pyx":39
2557  * cdef class index_set
2558  *
2559  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2560  * """
2561  * Return the C++ IndexSet instance wrapped by index_set(obj).
2562  */
2563 
2564  /* function exit code */
2565  __pyx_L1_error:;
2566  __Pyx_XDECREF(__pyx_t_1);
2567  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2568  __Pyx_pretend_to_initialize(&__pyx_r);
2569  __pyx_L0:;
2570  __Pyx_RefNannyFinishContext();
2571  return __pyx_r;
2572 }
2573 
2574 /* "PyClical.pyx":51
2575  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2576  *
2577  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2578  * """
2579  * Wrap an instance of the C++ class IndexSet.
2580  */
2581 
2582 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2583  PyObject *__pyx_r = NULL;
2584  __Pyx_RefNannyDeclarations
2585  __Pyx_RefNannySetupContext("wrap", 0);
2586 
2587  /* "PyClical.pyx":55
2588  * Wrap an instance of the C++ class IndexSet.
2589  * """
2590  * self.instance[0] = other # <<<<<<<<<<<<<<
2591  * return self
2592  *
2593  */
2594  (__pyx_v_self->instance[0]) = __pyx_v_other;
2595 
2596  /* "PyClical.pyx":56
2597  * """
2598  * self.instance[0] = other
2599  * return self # <<<<<<<<<<<<<<
2600  *
2601  * cdef inline IndexSet unwrap(index_set self):
2602  */
2603  __Pyx_XDECREF(__pyx_r);
2604  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2605  __pyx_r = ((PyObject *)__pyx_v_self);
2606  goto __pyx_L0;
2607 
2608  /* "PyClical.pyx":51
2609  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2610  *
2611  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2612  * """
2613  * Wrap an instance of the C++ class IndexSet.
2614  */
2615 
2616  /* function exit code */
2617  __pyx_L0:;
2618  __Pyx_XGIVEREF(__pyx_r);
2619  __Pyx_RefNannyFinishContext();
2620  return __pyx_r;
2621 }
2622 
2623 /* "PyClical.pyx":58
2624  * return self
2625  *
2626  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2627  * """
2628  * Return the wrapped C++ IndexSet instance.
2629  */
2630 
2631 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2632  IndexSet __pyx_r;
2633  __Pyx_RefNannyDeclarations
2634  __Pyx_RefNannySetupContext("unwrap", 0);
2635 
2636  /* "PyClical.pyx":62
2637  * Return the wrapped C++ IndexSet instance.
2638  * """
2639  * return self.instance[0] # <<<<<<<<<<<<<<
2640  *
2641  * cpdef copy(index_set self):
2642  */
2643  __pyx_r = (__pyx_v_self->instance[0]);
2644  goto __pyx_L0;
2645 
2646  /* "PyClical.pyx":58
2647  * return self
2648  *
2649  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2650  * """
2651  * Return the wrapped C++ IndexSet instance.
2652  */
2653 
2654  /* function exit code */
2655  __pyx_L0:;
2656  __Pyx_RefNannyFinishContext();
2657  return __pyx_r;
2658 }
2659 
2660 /* "PyClical.pyx":64
2661  * return self.instance[0]
2662  *
2663  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2664  * """
2665  * Copy this index_set object.
2666  */
2667 
2668 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2669 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2670  PyObject *__pyx_r = NULL;
2671  __Pyx_RefNannyDeclarations
2672  PyObject *__pyx_t_1 = NULL;
2673  PyObject *__pyx_t_2 = NULL;
2674  PyObject *__pyx_t_3 = NULL;
2675  PyObject *__pyx_t_4 = NULL;
2676  __Pyx_RefNannySetupContext("copy", 0);
2677  /* Check if called by wrapper */
2678  if (unlikely(__pyx_skip_dispatch)) ;
2679  /* Check if overridden in Python */
2680  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
2681  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2682  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2683  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2684  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2685  #endif
2686  __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)
2687  __Pyx_GOTREF(__pyx_t_1);
2688  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2689  __Pyx_XDECREF(__pyx_r);
2690  __Pyx_INCREF(__pyx_t_1);
2691  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2692  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2693  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2694  if (likely(__pyx_t_4)) {
2695  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2696  __Pyx_INCREF(__pyx_t_4);
2697  __Pyx_INCREF(function);
2698  __Pyx_DECREF_SET(__pyx_t_3, function);
2699  }
2700  }
2701  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2702  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2703  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2704  __Pyx_GOTREF(__pyx_t_2);
2705  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2706  __pyx_r = __pyx_t_2;
2707  __pyx_t_2 = 0;
2708  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2709  goto __pyx_L0;
2710  }
2711  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2712  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2713  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2714  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2715  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2716  }
2717  #endif
2718  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2719  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2720  }
2721  #endif
2722  }
2723 
2724  /* "PyClical.pyx":71
2725  * {1}
2726  * """
2727  * return index_set(self) # <<<<<<<<<<<<<<
2728  *
2729  * def __cinit__(self, other = 0):
2730  */
2731  __Pyx_XDECREF(__pyx_r);
2732  __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)
2733  __Pyx_GOTREF(__pyx_t_1);
2734  __pyx_r = __pyx_t_1;
2735  __pyx_t_1 = 0;
2736  goto __pyx_L0;
2737 
2738  /* "PyClical.pyx":64
2739  * return self.instance[0]
2740  *
2741  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2742  * """
2743  * Copy this index_set object.
2744  */
2745 
2746  /* function exit code */
2747  __pyx_L1_error:;
2748  __Pyx_XDECREF(__pyx_t_1);
2749  __Pyx_XDECREF(__pyx_t_2);
2750  __Pyx_XDECREF(__pyx_t_3);
2751  __Pyx_XDECREF(__pyx_t_4);
2752  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2753  __pyx_r = 0;
2754  __pyx_L0:;
2755  __Pyx_XGIVEREF(__pyx_r);
2756  __Pyx_RefNannyFinishContext();
2757  return __pyx_r;
2758 }
2759 
2760 /* Python wrapper */
2761 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2762 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 ";
2763 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2764  PyObject *__pyx_r = 0;
2765  __Pyx_RefNannyDeclarations
2766  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2767  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2768 
2769  /* function exit code */
2770  __Pyx_RefNannyFinishContext();
2771  return __pyx_r;
2772 }
2773 
2774 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2775  PyObject *__pyx_r = NULL;
2776  __Pyx_RefNannyDeclarations
2777  PyObject *__pyx_t_1 = NULL;
2778  __Pyx_RefNannySetupContext("copy", 0);
2779  __Pyx_XDECREF(__pyx_r);
2780  __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)
2781  __Pyx_GOTREF(__pyx_t_1);
2782  __pyx_r = __pyx_t_1;
2783  __pyx_t_1 = 0;
2784  goto __pyx_L0;
2785 
2786  /* function exit code */
2787  __pyx_L1_error:;
2788  __Pyx_XDECREF(__pyx_t_1);
2789  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2790  __pyx_r = NULL;
2791  __pyx_L0:;
2792  __Pyx_XGIVEREF(__pyx_r);
2793  __Pyx_RefNannyFinishContext();
2794  return __pyx_r;
2795 }
2796 
2797 /* "PyClical.pyx":73
2798  * return index_set(self)
2799  *
2800  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2801  * """
2802  * Construct an object of type index_set.
2803  */
2804 
2805 /* Python wrapper */
2806 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2807 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2808  PyObject *__pyx_v_other = 0;
2809  int __pyx_r;
2810  __Pyx_RefNannyDeclarations
2811  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2812  {
2813  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2814  PyObject* values[1] = {0};
2815  values[0] = ((PyObject *)__pyx_int_0);
2816  if (unlikely(__pyx_kwds)) {
2817  Py_ssize_t kw_args;
2818  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2819  switch (pos_args) {
2820  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2821  CYTHON_FALLTHROUGH;
2822  case 0: break;
2823  default: goto __pyx_L5_argtuple_error;
2824  }
2825  kw_args = PyDict_Size(__pyx_kwds);
2826  switch (pos_args) {
2827  case 0:
2828  if (kw_args > 0) {
2829  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2830  if (value) { values[0] = value; kw_args--; }
2831  }
2832  }
2833  if (unlikely(kw_args > 0)) {
2834  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2835  }
2836  } else {
2837  switch (PyTuple_GET_SIZE(__pyx_args)) {
2838  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2839  CYTHON_FALLTHROUGH;
2840  case 0: break;
2841  default: goto __pyx_L5_argtuple_error;
2842  }
2843  }
2844  __pyx_v_other = values[0];
2845  }
2846  goto __pyx_L4_argument_unpacking_done;
2847  __pyx_L5_argtuple_error:;
2848  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2849  __pyx_L3_error:;
2850  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2851  __Pyx_RefNannyFinishContext();
2852  return -1;
2853  __pyx_L4_argument_unpacking_done:;
2854  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2855 
2856  /* function exit code */
2857  __Pyx_RefNannyFinishContext();
2858  return __pyx_r;
2859 }
2860 
2861 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2862  PyObject *__pyx_v_error_msg_prefix = NULL;
2863  PyObject *__pyx_v_idx = NULL;
2864  int __pyx_r;
2865  __Pyx_RefNannyDeclarations
2866  int __pyx_t_1;
2867  int __pyx_t_2;
2868  IndexSet *__pyx_t_3;
2869  PyObject *__pyx_t_4 = NULL;
2870  PyObject *__pyx_t_5 = NULL;
2871  int __pyx_t_6;
2872  int __pyx_t_7;
2873  PyObject *__pyx_t_8 = NULL;
2874  PyObject *__pyx_t_9 = NULL;
2875  PyObject *__pyx_t_10 = NULL;
2876  Py_ssize_t __pyx_t_11;
2877  PyObject *(*__pyx_t_12)(PyObject *);
2878  PyObject *__pyx_t_13 = NULL;
2879  PyObject *__pyx_t_14 = NULL;
2880  PyObject *__pyx_t_15 = NULL;
2881  PyObject *__pyx_t_16 = NULL;
2882  char *__pyx_t_17;
2883  __Pyx_RefNannySetupContext("__cinit__", 0);
2884 
2885  /* "PyClical.pyx":92
2886  * {}
2887  * """
2888  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2889  * if isinstance(other, index_set):
2890  * self.instance = new IndexSet((<index_set>other).unwrap())
2891  */
2892  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2893  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2894 
2895  /* "PyClical.pyx":93
2896  * """
2897  * error_msg_prefix = "Cannot initialize index_set object from"
2898  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2899  * self.instance = new IndexSet((<index_set>other).unwrap())
2900  * elif isinstance(other, numbers.Integral):
2901  */
2902  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2903  __pyx_t_2 = (__pyx_t_1 != 0);
2904  if (__pyx_t_2) {
2905 
2906  /* "PyClical.pyx":94
2907  * error_msg_prefix = "Cannot initialize index_set object from"
2908  * if isinstance(other, index_set):
2909  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2910  * elif isinstance(other, numbers.Integral):
2911  * self.instance = new IndexSet(<int>other)
2912  */
2913  try {
2914  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2915  } catch(...) {
2916  __Pyx_CppExn2PyErr();
2917  __PYX_ERR(0, 94, __pyx_L1_error)
2918  }
2919  __pyx_v_self->instance = __pyx_t_3;
2920 
2921  /* "PyClical.pyx":93
2922  * """
2923  * error_msg_prefix = "Cannot initialize index_set object from"
2924  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2925  * self.instance = new IndexSet((<index_set>other).unwrap())
2926  * elif isinstance(other, numbers.Integral):
2927  */
2928  goto __pyx_L3;
2929  }
2930 
2931  /* "PyClical.pyx":95
2932  * if isinstance(other, index_set):
2933  * self.instance = new IndexSet((<index_set>other).unwrap())
2934  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2935  * self.instance = new IndexSet(<int>other)
2936  * elif isinstance(other, (set, frozenset)):
2937  */
2938  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2939  __Pyx_GOTREF(__pyx_t_4);
2940  __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)
2941  __Pyx_GOTREF(__pyx_t_5);
2942  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2943  __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)
2944  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2945  __pyx_t_1 = (__pyx_t_2 != 0);
2946  if (__pyx_t_1) {
2947 
2948  /* "PyClical.pyx":96
2949  * self.instance = new IndexSet((<index_set>other).unwrap())
2950  * elif isinstance(other, numbers.Integral):
2951  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2952  * elif isinstance(other, (set, frozenset)):
2953  * try:
2954  */
2955  __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)
2956  try {
2957  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2958  } catch(...) {
2959  __Pyx_CppExn2PyErr();
2960  __PYX_ERR(0, 96, __pyx_L1_error)
2961  }
2962  __pyx_v_self->instance = __pyx_t_3;
2963 
2964  /* "PyClical.pyx":95
2965  * if isinstance(other, index_set):
2966  * self.instance = new IndexSet((<index_set>other).unwrap())
2967  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2968  * self.instance = new IndexSet(<int>other)
2969  * elif isinstance(other, (set, frozenset)):
2970  */
2971  goto __pyx_L3;
2972  }
2973 
2974  /* "PyClical.pyx":97
2975  * elif isinstance(other, numbers.Integral):
2976  * self.instance = new IndexSet(<int>other)
2977  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2978  * try:
2979  * self.instance = new IndexSet()
2980  */
2981  __pyx_t_2 = PySet_Check(__pyx_v_other);
2982  __pyx_t_7 = (__pyx_t_2 != 0);
2983  if (!__pyx_t_7) {
2984  } else {
2985  __pyx_t_1 = __pyx_t_7;
2986  goto __pyx_L4_bool_binop_done;
2987  }
2988  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2989  __pyx_t_2 = (__pyx_t_7 != 0);
2990  __pyx_t_1 = __pyx_t_2;
2991  __pyx_L4_bool_binop_done:;
2992  __pyx_t_2 = (__pyx_t_1 != 0);
2993  if (__pyx_t_2) {
2994 
2995  /* "PyClical.pyx":98
2996  * self.instance = new IndexSet(<int>other)
2997  * elif isinstance(other, (set, frozenset)):
2998  * try: # <<<<<<<<<<<<<<
2999  * self.instance = new IndexSet()
3000  * for idx in other:
3001  */
3002  {
3003  __Pyx_PyThreadState_declare
3004  __Pyx_PyThreadState_assign
3005  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3006  __Pyx_XGOTREF(__pyx_t_8);
3007  __Pyx_XGOTREF(__pyx_t_9);
3008  __Pyx_XGOTREF(__pyx_t_10);
3009  /*try:*/ {
3010 
3011  /* "PyClical.pyx":99
3012  * elif isinstance(other, (set, frozenset)):
3013  * try:
3014  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3015  * for idx in other:
3016  * self[idx] = True
3017  */
3018  __pyx_t_3 = new IndexSet();
3019  __pyx_v_self->instance = __pyx_t_3;
3020 
3021  /* "PyClical.pyx":100
3022  * try:
3023  * self.instance = new IndexSet()
3024  * for idx in other: # <<<<<<<<<<<<<<
3025  * self[idx] = True
3026  * except IndexError:
3027  */
3028  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3029  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3030  __pyx_t_12 = NULL;
3031  } else {
3032  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
3033  __Pyx_GOTREF(__pyx_t_5);
3034  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
3035  }
3036  for (;;) {
3037  if (likely(!__pyx_t_12)) {
3038  if (likely(PyList_CheckExact(__pyx_t_5))) {
3039  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3040  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3041  __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)
3042  #else
3043  __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)
3044  __Pyx_GOTREF(__pyx_t_4);
3045  #endif
3046  } else {
3047  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3048  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3049  __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)
3050  #else
3051  __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)
3052  __Pyx_GOTREF(__pyx_t_4);
3053  #endif
3054  }
3055  } else {
3056  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3057  if (unlikely(!__pyx_t_4)) {
3058  PyObject* exc_type = PyErr_Occurred();
3059  if (exc_type) {
3060  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3061  else __PYX_ERR(0, 100, __pyx_L6_error)
3062  }
3063  break;
3064  }
3065  __Pyx_GOTREF(__pyx_t_4);
3066  }
3067  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3068  __pyx_t_4 = 0;
3069 
3070  /* "PyClical.pyx":101
3071  * self.instance = new IndexSet()
3072  * for idx in other:
3073  * self[idx] = True # <<<<<<<<<<<<<<
3074  * except IndexError:
3075  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3076  */
3077  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
3078 
3079  /* "PyClical.pyx":100
3080  * try:
3081  * self.instance = new IndexSet()
3082  * for idx in other: # <<<<<<<<<<<<<<
3083  * self[idx] = True
3084  * except IndexError:
3085  */
3086  }
3087  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3088 
3089  /* "PyClical.pyx":98
3090  * self.instance = new IndexSet(<int>other)
3091  * elif isinstance(other, (set, frozenset)):
3092  * try: # <<<<<<<<<<<<<<
3093  * self.instance = new IndexSet()
3094  * for idx in other:
3095  */
3096  }
3097  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3098  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3099  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3100  goto __pyx_L11_try_end;
3101  __pyx_L6_error:;
3102  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3103  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3104 
3105  /* "PyClical.pyx":102
3106  * for idx in other:
3107  * self[idx] = True
3108  * except IndexError: # <<<<<<<<<<<<<<
3109  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3110  * except (RuntimeError, TypeError):
3111  */
3112  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3113  if (__pyx_t_6) {
3114  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3115  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
3116  __Pyx_GOTREF(__pyx_t_5);
3117  __Pyx_GOTREF(__pyx_t_4);
3118  __Pyx_GOTREF(__pyx_t_13);
3119 
3120  /* "PyClical.pyx":103
3121  * self[idx] = True
3122  * except IndexError:
3123  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3124  * except (RuntimeError, TypeError):
3125  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3126  */
3127  __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)
3128  __Pyx_GOTREF(__pyx_t_14);
3129  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3130  __Pyx_GOTREF(__pyx_t_15);
3131  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3132  __Pyx_GOTREF(__pyx_t_16);
3133  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3134  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3135  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3136  __Pyx_GOTREF(__pyx_t_15);
3137  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3138  __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)
3139  __Pyx_GOTREF(__pyx_t_16);
3140  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3141  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3142  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3143  __PYX_ERR(0, 103, __pyx_L8_except_error)
3144  }
3145 
3146  /* "PyClical.pyx":104
3147  * except IndexError:
3148  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3149  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3150  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3151  * elif isinstance(other, str):
3152  */
3153  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3154  if (__pyx_t_6) {
3155  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3156  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3157  __Pyx_GOTREF(__pyx_t_13);
3158  __Pyx_GOTREF(__pyx_t_4);
3159  __Pyx_GOTREF(__pyx_t_5);
3160 
3161  /* "PyClical.pyx":105
3162  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3163  * except (RuntimeError, TypeError):
3164  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3165  * elif isinstance(other, str):
3166  * try:
3167  */
3168  __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)
3169  __Pyx_GOTREF(__pyx_t_16);
3170  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3171  __Pyx_GOTREF(__pyx_t_15);
3172  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3173  __Pyx_GOTREF(__pyx_t_14);
3174  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3175  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3176  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3177  __Pyx_GOTREF(__pyx_t_15);
3178  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3179  __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)
3180  __Pyx_GOTREF(__pyx_t_14);
3181  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3182  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3183  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3184  __PYX_ERR(0, 105, __pyx_L8_except_error)
3185  }
3186  goto __pyx_L8_except_error;
3187  __pyx_L8_except_error:;
3188 
3189  /* "PyClical.pyx":98
3190  * self.instance = new IndexSet(<int>other)
3191  * elif isinstance(other, (set, frozenset)):
3192  * try: # <<<<<<<<<<<<<<
3193  * self.instance = new IndexSet()
3194  * for idx in other:
3195  */
3196  __Pyx_XGIVEREF(__pyx_t_8);
3197  __Pyx_XGIVEREF(__pyx_t_9);
3198  __Pyx_XGIVEREF(__pyx_t_10);
3199  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3200  goto __pyx_L1_error;
3201  __pyx_L11_try_end:;
3202  }
3203 
3204  /* "PyClical.pyx":97
3205  * elif isinstance(other, numbers.Integral):
3206  * self.instance = new IndexSet(<int>other)
3207  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3208  * try:
3209  * self.instance = new IndexSet()
3210  */
3211  goto __pyx_L3;
3212  }
3213 
3214  /* "PyClical.pyx":106
3215  * except (RuntimeError, TypeError):
3216  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3217  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3218  * try:
3219  * self.instance = new IndexSet(<char *>other)
3220  */
3221  __pyx_t_2 = PyString_Check(__pyx_v_other);
3222  __pyx_t_1 = (__pyx_t_2 != 0);
3223  if (likely(__pyx_t_1)) {
3224 
3225  /* "PyClical.pyx":107
3226  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3227  * elif isinstance(other, str):
3228  * try: # <<<<<<<<<<<<<<
3229  * self.instance = new IndexSet(<char *>other)
3230  * except RuntimeError:
3231  */
3232  {
3233  __Pyx_PyThreadState_declare
3234  __Pyx_PyThreadState_assign
3235  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3236  __Pyx_XGOTREF(__pyx_t_10);
3237  __Pyx_XGOTREF(__pyx_t_9);
3238  __Pyx_XGOTREF(__pyx_t_8);
3239  /*try:*/ {
3240 
3241  /* "PyClical.pyx":108
3242  * elif isinstance(other, str):
3243  * try:
3244  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3245  * except RuntimeError:
3246  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3247  */
3248  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3249  try {
3250  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3251  } catch(...) {
3252  __Pyx_CppExn2PyErr();
3253  __PYX_ERR(0, 108, __pyx_L18_error)
3254  }
3255  __pyx_v_self->instance = __pyx_t_3;
3256 
3257  /* "PyClical.pyx":107
3258  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3259  * elif isinstance(other, str):
3260  * try: # <<<<<<<<<<<<<<
3261  * self.instance = new IndexSet(<char *>other)
3262  * except RuntimeError:
3263  */
3264  }
3265  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3266  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3267  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3268  goto __pyx_L23_try_end;
3269  __pyx_L18_error:;
3270  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3271  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3272  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3273  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3274  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3275  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3276 
3277  /* "PyClical.pyx":109
3278  * try:
3279  * self.instance = new IndexSet(<char *>other)
3280  * except RuntimeError: # <<<<<<<<<<<<<<
3281  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3282  * else:
3283  */
3284  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3285  if (__pyx_t_6) {
3286  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3287  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3288  __Pyx_GOTREF(__pyx_t_5);
3289  __Pyx_GOTREF(__pyx_t_4);
3290  __Pyx_GOTREF(__pyx_t_13);
3291 
3292  /* "PyClical.pyx":110
3293  * self.instance = new IndexSet(<char *>other)
3294  * except RuntimeError:
3295  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3296  * else:
3297  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3298  */
3299  __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)
3300  __Pyx_GOTREF(__pyx_t_14);
3301  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3302  __Pyx_GOTREF(__pyx_t_15);
3303  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3304  __Pyx_GOTREF(__pyx_t_16);
3305  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3306  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3307  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3308  __Pyx_GOTREF(__pyx_t_15);
3309  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3310  __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)
3311  __Pyx_GOTREF(__pyx_t_16);
3312  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3313  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3314  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3315  __PYX_ERR(0, 110, __pyx_L20_except_error)
3316  }
3317  goto __pyx_L20_except_error;
3318  __pyx_L20_except_error:;
3319 
3320  /* "PyClical.pyx":107
3321  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3322  * elif isinstance(other, str):
3323  * try: # <<<<<<<<<<<<<<
3324  * self.instance = new IndexSet(<char *>other)
3325  * except RuntimeError:
3326  */
3327  __Pyx_XGIVEREF(__pyx_t_10);
3328  __Pyx_XGIVEREF(__pyx_t_9);
3329  __Pyx_XGIVEREF(__pyx_t_8);
3330  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3331  goto __pyx_L1_error;
3332  __pyx_L23_try_end:;
3333  }
3334 
3335  /* "PyClical.pyx":106
3336  * except (RuntimeError, TypeError):
3337  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3338  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3339  * try:
3340  * self.instance = new IndexSet(<char *>other)
3341  */
3342  goto __pyx_L3;
3343  }
3344 
3345  /* "PyClical.pyx":112
3346  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3347  * else:
3348  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3349  *
3350  * def __dealloc__(self):
3351  */
3352  /*else*/ {
3353  __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)
3354  __Pyx_GOTREF(__pyx_t_13);
3355  __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)
3356  __Pyx_GOTREF(__pyx_t_4);
3357  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3358  __Pyx_GOTREF(__pyx_t_5);
3359  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3360  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3361  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3362  __Pyx_GOTREF(__pyx_t_4);
3363  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3364  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3365  __Pyx_GOTREF(__pyx_t_5);
3366  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3367  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3368  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3369  __PYX_ERR(0, 112, __pyx_L1_error)
3370  }
3371  __pyx_L3:;
3372 
3373  /* "PyClical.pyx":73
3374  * return index_set(self)
3375  *
3376  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3377  * """
3378  * Construct an object of type index_set.
3379  */
3380 
3381  /* function exit code */
3382  __pyx_r = 0;
3383  goto __pyx_L0;
3384  __pyx_L1_error:;
3385  __Pyx_XDECREF(__pyx_t_4);
3386  __Pyx_XDECREF(__pyx_t_5);
3387  __Pyx_XDECREF(__pyx_t_13);
3388  __Pyx_XDECREF(__pyx_t_14);
3389  __Pyx_XDECREF(__pyx_t_15);
3390  __Pyx_XDECREF(__pyx_t_16);
3391  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3392  __pyx_r = -1;
3393  __pyx_L0:;
3394  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3395  __Pyx_XDECREF(__pyx_v_idx);
3396  __Pyx_RefNannyFinishContext();
3397  return __pyx_r;
3398 }
3399 
3400 /* "PyClical.pyx":114
3401  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3402  *
3403  * def __dealloc__(self): # <<<<<<<<<<<<<<
3404  * """
3405  * Clean up by deallocating the instance of C++ class IndexSet.
3406  */
3407 
3408 /* Python wrapper */
3409 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3410 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3411  __Pyx_RefNannyDeclarations
3412  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3413  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3414 
3415  /* function exit code */
3416  __Pyx_RefNannyFinishContext();
3417 }
3418 
3419 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3420  __Pyx_RefNannyDeclarations
3421  __Pyx_RefNannySetupContext("__dealloc__", 0);
3422 
3423  /* "PyClical.pyx":118
3424  * Clean up by deallocating the instance of C++ class IndexSet.
3425  * """
3426  * del self.instance # <<<<<<<<<<<<<<
3427  *
3428  * def __richcmp__(lhs, rhs, int op):
3429  */
3430  delete __pyx_v_self->instance;
3431 
3432  /* "PyClical.pyx":114
3433  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3434  *
3435  * def __dealloc__(self): # <<<<<<<<<<<<<<
3436  * """
3437  * Clean up by deallocating the instance of C++ class IndexSet.
3438  */
3439 
3440  /* function exit code */
3441  __Pyx_RefNannyFinishContext();
3442 }
3443 
3444 /* "PyClical.pyx":120
3445  * del self.instance
3446  *
3447  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3448  * """
3449  * Compare two objects of class index_set.
3450  */
3451 
3452 /* Python wrapper */
3453 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3454 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3455  PyObject *__pyx_r = 0;
3456  __Pyx_RefNannyDeclarations
3457  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3458  __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));
3459 
3460  /* function exit code */
3461  __Pyx_RefNannyFinishContext();
3462  return __pyx_r;
3463 }
3464 
3465 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) {
3466  PyObject *__pyx_v_eq = NULL;
3467  PyObject *__pyx_v_lt = NULL;
3468  PyObject *__pyx_r = NULL;
3469  __Pyx_RefNannyDeclarations
3470  int __pyx_t_1;
3471  int __pyx_t_2;
3472  int __pyx_t_3;
3473  PyObject *__pyx_t_4 = NULL;
3474  __Pyx_RefNannySetupContext("__richcmp__", 0);
3475 
3476  /* "PyClical.pyx":141
3477  * False
3478  * """
3479  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3480  * eq = bool(lhs is rhs)
3481  * if op == 2: # ==
3482  */
3483  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3484  __pyx_t_3 = (__pyx_t_2 != 0);
3485  if (!__pyx_t_3) {
3486  } else {
3487  __pyx_t_1 = __pyx_t_3;
3488  goto __pyx_L4_bool_binop_done;
3489  }
3490  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3491  __pyx_t_2 = (__pyx_t_3 != 0);
3492  __pyx_t_1 = __pyx_t_2;
3493  __pyx_L4_bool_binop_done:;
3494  if (__pyx_t_1) {
3495 
3496  /* "PyClical.pyx":142
3497  * """
3498  * if (lhs is None) or (rhs is None):
3499  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3500  * if op == 2: # ==
3501  * return eq
3502  */
3503  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3504  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3505  __Pyx_GOTREF(__pyx_t_4);
3506  __pyx_v_eq = __pyx_t_4;
3507  __pyx_t_4 = 0;
3508 
3509  /* "PyClical.pyx":143
3510  * if (lhs is None) or (rhs is None):
3511  * eq = bool(lhs is rhs)
3512  * if op == 2: # == # <<<<<<<<<<<<<<
3513  * return eq
3514  * elif op == 3: # !=
3515  */
3516  switch (__pyx_v_op) {
3517  case 2:
3518 
3519  /* "PyClical.pyx":144
3520  * eq = bool(lhs is rhs)
3521  * if op == 2: # ==
3522  * return eq # <<<<<<<<<<<<<<
3523  * elif op == 3: # !=
3524  * return not eq
3525  */
3526  __Pyx_XDECREF(__pyx_r);
3527  __Pyx_INCREF(__pyx_v_eq);
3528  __pyx_r = __pyx_v_eq;
3529  goto __pyx_L0;
3530 
3531  /* "PyClical.pyx":143
3532  * if (lhs is None) or (rhs is None):
3533  * eq = bool(lhs is rhs)
3534  * if op == 2: # == # <<<<<<<<<<<<<<
3535  * return eq
3536  * elif op == 3: # !=
3537  */
3538  break;
3539  case 3:
3540 
3541  /* "PyClical.pyx":146
3542  * return eq
3543  * elif op == 3: # !=
3544  * return not eq # <<<<<<<<<<<<<<
3545  * else:
3546  * if op == 0: # <
3547  */
3548  __Pyx_XDECREF(__pyx_r);
3549  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3550  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3551  __Pyx_GOTREF(__pyx_t_4);
3552  __pyx_r = __pyx_t_4;
3553  __pyx_t_4 = 0;
3554  goto __pyx_L0;
3555 
3556  /* "PyClical.pyx":145
3557  * if op == 2: # ==
3558  * return eq
3559  * elif op == 3: # != # <<<<<<<<<<<<<<
3560  * return not eq
3561  * else:
3562  */
3563  break;
3564  default:
3565 
3566  /* "PyClical.pyx":148
3567  * return not eq
3568  * else:
3569  * if op == 0: # < # <<<<<<<<<<<<<<
3570  * return False
3571  * elif op == 1: # <=
3572  */
3573  switch (__pyx_v_op) {
3574  case 0:
3575 
3576  /* "PyClical.pyx":149
3577  * else:
3578  * if op == 0: # <
3579  * return False # <<<<<<<<<<<<<<
3580  * elif op == 1: # <=
3581  * return eq
3582  */
3583  __Pyx_XDECREF(__pyx_r);
3584  __Pyx_INCREF(Py_False);
3585  __pyx_r = Py_False;
3586  goto __pyx_L0;
3587 
3588  /* "PyClical.pyx":148
3589  * return not eq
3590  * else:
3591  * if op == 0: # < # <<<<<<<<<<<<<<
3592  * return False
3593  * elif op == 1: # <=
3594  */
3595  break;
3596  case 1:
3597 
3598  /* "PyClical.pyx":151
3599  * return False
3600  * elif op == 1: # <=
3601  * return eq # <<<<<<<<<<<<<<
3602  * elif op == 4: # >
3603  * return False
3604  */
3605  __Pyx_XDECREF(__pyx_r);
3606  __Pyx_INCREF(__pyx_v_eq);
3607  __pyx_r = __pyx_v_eq;
3608  goto __pyx_L0;
3609 
3610  /* "PyClical.pyx":150
3611  * if op == 0: # <
3612  * return False
3613  * elif op == 1: # <= # <<<<<<<<<<<<<<
3614  * return eq
3615  * elif op == 4: # >
3616  */
3617  break;
3618  case 4:
3619 
3620  /* "PyClical.pyx":153
3621  * return eq
3622  * elif op == 4: # >
3623  * return False # <<<<<<<<<<<<<<
3624  * elif op == 5: # >=
3625  * return eq
3626  */
3627  __Pyx_XDECREF(__pyx_r);
3628  __Pyx_INCREF(Py_False);
3629  __pyx_r = Py_False;
3630  goto __pyx_L0;
3631 
3632  /* "PyClical.pyx":152
3633  * elif op == 1: # <=
3634  * return eq
3635  * elif op == 4: # > # <<<<<<<<<<<<<<
3636  * return False
3637  * elif op == 5: # >=
3638  */
3639  break;
3640  case 5:
3641 
3642  /* "PyClical.pyx":155
3643  * return False
3644  * elif op == 5: # >=
3645  * return eq # <<<<<<<<<<<<<<
3646  * else:
3647  * return NotImplemented
3648  */
3649  __Pyx_XDECREF(__pyx_r);
3650  __Pyx_INCREF(__pyx_v_eq);
3651  __pyx_r = __pyx_v_eq;
3652  goto __pyx_L0;
3653 
3654  /* "PyClical.pyx":154
3655  * elif op == 4: # >
3656  * return False
3657  * elif op == 5: # >= # <<<<<<<<<<<<<<
3658  * return eq
3659  * else:
3660  */
3661  break;
3662  default:
3663 
3664  /* "PyClical.pyx":157
3665  * return eq
3666  * else:
3667  * return NotImplemented # <<<<<<<<<<<<<<
3668  * else:
3669  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3670  */
3671  __Pyx_XDECREF(__pyx_r);
3672  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3673  __pyx_r = __pyx_builtin_NotImplemented;
3674  goto __pyx_L0;
3675  break;
3676  }
3677  break;
3678  }
3679 
3680  /* "PyClical.pyx":141
3681  * False
3682  * """
3683  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3684  * eq = bool(lhs is rhs)
3685  * if op == 2: # ==
3686  */
3687  }
3688 
3689  /* "PyClical.pyx":159
3690  * return NotImplemented
3691  * else:
3692  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3693  * if op == 2: # ==
3694  * return eq
3695  */
3696  /*else*/ {
3697  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3698  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3699  __Pyx_GOTREF(__pyx_t_4);
3700  __pyx_v_eq = __pyx_t_4;
3701  __pyx_t_4 = 0;
3702 
3703  /* "PyClical.pyx":160
3704  * else:
3705  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3706  * if op == 2: # == # <<<<<<<<<<<<<<
3707  * return eq
3708  * elif op == 3: # !=
3709  */
3710  switch (__pyx_v_op) {
3711  case 2:
3712 
3713  /* "PyClical.pyx":161
3714  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3715  * if op == 2: # ==
3716  * return eq # <<<<<<<<<<<<<<
3717  * elif op == 3: # !=
3718  * return not eq
3719  */
3720  __Pyx_XDECREF(__pyx_r);
3721  __Pyx_INCREF(__pyx_v_eq);
3722  __pyx_r = __pyx_v_eq;
3723  goto __pyx_L0;
3724 
3725  /* "PyClical.pyx":160
3726  * else:
3727  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3728  * if op == 2: # == # <<<<<<<<<<<<<<
3729  * return eq
3730  * elif op == 3: # !=
3731  */
3732  break;
3733  case 3:
3734 
3735  /* "PyClical.pyx":163
3736  * return eq
3737  * elif op == 3: # !=
3738  * return not eq # <<<<<<<<<<<<<<
3739  * else:
3740  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3741  */
3742  __Pyx_XDECREF(__pyx_r);
3743  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3744  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3745  __Pyx_GOTREF(__pyx_t_4);
3746  __pyx_r = __pyx_t_4;
3747  __pyx_t_4 = 0;
3748  goto __pyx_L0;
3749 
3750  /* "PyClical.pyx":162
3751  * if op == 2: # ==
3752  * return eq
3753  * elif op == 3: # != # <<<<<<<<<<<<<<
3754  * return not eq
3755  * else:
3756  */
3757  break;
3758  default:
3759 
3760  /* "PyClical.pyx":165
3761  * return not eq
3762  * else:
3763  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3764  * if op == 0: # <
3765  * return lt
3766  */
3767  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3768  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3769  __Pyx_GOTREF(__pyx_t_4);
3770  __pyx_v_lt = __pyx_t_4;
3771  __pyx_t_4 = 0;
3772 
3773  /* "PyClical.pyx":166
3774  * else:
3775  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3776  * if op == 0: # < # <<<<<<<<<<<<<<
3777  * return lt
3778  * elif op == 1: # <=
3779  */
3780  switch (__pyx_v_op) {
3781  case 0:
3782 
3783  /* "PyClical.pyx":167
3784  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3785  * if op == 0: # <
3786  * return lt # <<<<<<<<<<<<<<
3787  * elif op == 1: # <=
3788  * return lt or eq
3789  */
3790  __Pyx_XDECREF(__pyx_r);
3791  __Pyx_INCREF(__pyx_v_lt);
3792  __pyx_r = __pyx_v_lt;
3793  goto __pyx_L0;
3794 
3795  /* "PyClical.pyx":166
3796  * else:
3797  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3798  * if op == 0: # < # <<<<<<<<<<<<<<
3799  * return lt
3800  * elif op == 1: # <=
3801  */
3802  break;
3803  case 1:
3804 
3805  /* "PyClical.pyx":169
3806  * return lt
3807  * elif op == 1: # <=
3808  * return lt or eq # <<<<<<<<<<<<<<
3809  * elif op == 4: # >
3810  * return not (lt or eq)
3811  */
3812  __Pyx_XDECREF(__pyx_r);
3813  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3814  if (!__pyx_t_1) {
3815  } else {
3816  __Pyx_INCREF(__pyx_v_lt);
3817  __pyx_t_4 = __pyx_v_lt;
3818  goto __pyx_L6_bool_binop_done;
3819  }
3820  __Pyx_INCREF(__pyx_v_eq);
3821  __pyx_t_4 = __pyx_v_eq;
3822  __pyx_L6_bool_binop_done:;
3823  __pyx_r = __pyx_t_4;
3824  __pyx_t_4 = 0;
3825  goto __pyx_L0;
3826 
3827  /* "PyClical.pyx":168
3828  * if op == 0: # <
3829  * return lt
3830  * elif op == 1: # <= # <<<<<<<<<<<<<<
3831  * return lt or eq
3832  * elif op == 4: # >
3833  */
3834  break;
3835  case 4:
3836 
3837  /* "PyClical.pyx":171
3838  * return lt or eq
3839  * elif op == 4: # >
3840  * return not (lt or eq) # <<<<<<<<<<<<<<
3841  * elif op == 5: # >=
3842  * return not lt
3843  */
3844  __Pyx_XDECREF(__pyx_r);
3845  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3846  if (!__pyx_t_2) {
3847  } else {
3848  __pyx_t_1 = __pyx_t_2;
3849  goto __pyx_L8_bool_binop_done;
3850  }
3851  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3852  __pyx_t_1 = __pyx_t_2;
3853  __pyx_L8_bool_binop_done:;
3854  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3855  __Pyx_GOTREF(__pyx_t_4);
3856  __pyx_r = __pyx_t_4;
3857  __pyx_t_4 = 0;
3858  goto __pyx_L0;
3859 
3860  /* "PyClical.pyx":170
3861  * elif op == 1: # <=
3862  * return lt or eq
3863  * elif op == 4: # > # <<<<<<<<<<<<<<
3864  * return not (lt or eq)
3865  * elif op == 5: # >=
3866  */
3867  break;
3868  case 5:
3869 
3870  /* "PyClical.pyx":173
3871  * return not (lt or eq)
3872  * elif op == 5: # >=
3873  * return not lt # <<<<<<<<<<<<<<
3874  * else:
3875  * return NotImplemented
3876  */
3877  __Pyx_XDECREF(__pyx_r);
3878  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3879  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3880  __Pyx_GOTREF(__pyx_t_4);
3881  __pyx_r = __pyx_t_4;
3882  __pyx_t_4 = 0;
3883  goto __pyx_L0;
3884 
3885  /* "PyClical.pyx":172
3886  * elif op == 4: # >
3887  * return not (lt or eq)
3888  * elif op == 5: # >= # <<<<<<<<<<<<<<
3889  * return not lt
3890  * else:
3891  */
3892  break;
3893  default:
3894 
3895  /* "PyClical.pyx":175
3896  * return not lt
3897  * else:
3898  * return NotImplemented # <<<<<<<<<<<<<<
3899  *
3900  * def __setitem__(self, idx, val):
3901  */
3902  __Pyx_XDECREF(__pyx_r);
3903  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3904  __pyx_r = __pyx_builtin_NotImplemented;
3905  goto __pyx_L0;
3906  break;
3907  }
3908  break;
3909  }
3910  }
3911 
3912  /* "PyClical.pyx":120
3913  * del self.instance
3914  *
3915  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3916  * """
3917  * Compare two objects of class index_set.
3918  */
3919 
3920  /* function exit code */
3921  __pyx_L1_error:;
3922  __Pyx_XDECREF(__pyx_t_4);
3923  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3924  __pyx_r = NULL;
3925  __pyx_L0:;
3926  __Pyx_XDECREF(__pyx_v_eq);
3927  __Pyx_XDECREF(__pyx_v_lt);
3928  __Pyx_XGIVEREF(__pyx_r);
3929  __Pyx_RefNannyFinishContext();
3930  return __pyx_r;
3931 }
3932 
3933 /* "PyClical.pyx":177
3934  * return NotImplemented
3935  *
3936  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3937  * """
3938  * Set the value of an index_set object at index idx to value val.
3939  */
3940 
3941 /* Python wrapper */
3942 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3943 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 ";
3944 #if CYTHON_COMPILING_IN_CPYTHON
3945 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3946 #endif
3947 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3948  int __pyx_r;
3949  __Pyx_RefNannyDeclarations
3950  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3951  __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));
3952 
3953  /* function exit code */
3954  __Pyx_RefNannyFinishContext();
3955  return __pyx_r;
3956 }
3957 
3958 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) {
3959  int __pyx_r;
3960  __Pyx_RefNannyDeclarations
3961  int __pyx_t_1;
3962  int __pyx_t_2;
3963  __Pyx_RefNannySetupContext("__setitem__", 0);
3964 
3965  /* "PyClical.pyx":186
3966  * {2}
3967  * """
3968  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3969  * return
3970  *
3971  */
3972  __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)
3973  __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)
3974  try {
3975  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3976  } catch(...) {
3977  __Pyx_CppExn2PyErr();
3978  __PYX_ERR(0, 186, __pyx_L1_error)
3979  }
3980 
3981  /* "PyClical.pyx":187
3982  * """
3983  * self.instance.set(idx, val)
3984  * return # <<<<<<<<<<<<<<
3985  *
3986  * def __getitem__(self, idx):
3987  */
3988  __pyx_r = 0;
3989  goto __pyx_L0;
3990 
3991  /* "PyClical.pyx":177
3992  * return NotImplemented
3993  *
3994  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3995  * """
3996  * Set the value of an index_set object at index idx to value val.
3997  */
3998 
3999  /* function exit code */
4000  __pyx_L1_error:;
4001  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4002  __pyx_r = -1;
4003  __pyx_L0:;
4004  __Pyx_RefNannyFinishContext();
4005  return __pyx_r;
4006 }
4007 
4008 /* "PyClical.pyx":189
4009  * return
4010  *
4011  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4012  * """
4013  * Get the value of an index_set object at an index.
4014  */
4015 
4016 /* Python wrapper */
4017 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4018 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 ";
4019 #if CYTHON_COMPILING_IN_CPYTHON
4020 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4021 #endif
4022 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4023  PyObject *__pyx_r = 0;
4024  __Pyx_RefNannyDeclarations
4025  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4026  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4027 
4028  /* function exit code */
4029  __Pyx_RefNannyFinishContext();
4030  return __pyx_r;
4031 }
4032 
4033 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4034  PyObject *__pyx_r = NULL;
4035  __Pyx_RefNannyDeclarations
4036  int __pyx_t_1;
4037  PyObject *__pyx_t_2 = NULL;
4038  __Pyx_RefNannySetupContext("__getitem__", 0);
4039 
4040  /* "PyClical.pyx":206
4041  * False
4042  * """
4043  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4044  *
4045  * def __contains__(self, idx):
4046  */
4047  __Pyx_XDECREF(__pyx_r);
4048  __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)
4049  __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)
4050  __Pyx_GOTREF(__pyx_t_2);
4051  __pyx_r = __pyx_t_2;
4052  __pyx_t_2 = 0;
4053  goto __pyx_L0;
4054 
4055  /* "PyClical.pyx":189
4056  * return
4057  *
4058  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4059  * """
4060  * Get the value of an index_set object at an index.
4061  */
4062 
4063  /* function exit code */
4064  __pyx_L1_error:;
4065  __Pyx_XDECREF(__pyx_t_2);
4066  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4067  __pyx_r = NULL;
4068  __pyx_L0:;
4069  __Pyx_XGIVEREF(__pyx_r);
4070  __Pyx_RefNannyFinishContext();
4071  return __pyx_r;
4072 }
4073 
4074 /* "PyClical.pyx":208
4075  * return self.instance.getitem(idx)
4076  *
4077  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4078  * """
4079  * Check that an index_set object contains the index idx: idx in self.
4080  */
4081 
4082 /* Python wrapper */
4083 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4084 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 ";
4085 #if CYTHON_COMPILING_IN_CPYTHON
4086 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4087 #endif
4088 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4089  int __pyx_r;
4090  __Pyx_RefNannyDeclarations
4091  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4092  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4093 
4094  /* function exit code */
4095  __Pyx_RefNannyFinishContext();
4096  return __pyx_r;
4097 }
4098 
4099 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4100  int __pyx_r;
4101  __Pyx_RefNannyDeclarations
4102  int __pyx_t_1;
4103  __Pyx_RefNannySetupContext("__contains__", 0);
4104 
4105  /* "PyClical.pyx":225
4106  * False
4107  * """
4108  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4109  *
4110  * def __iter__(self):
4111  */
4112  __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)
4113  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4114  goto __pyx_L0;
4115 
4116  /* "PyClical.pyx":208
4117  * return self.instance.getitem(idx)
4118  *
4119  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4120  * """
4121  * Check that an index_set object contains the index idx: idx in self.
4122  */
4123 
4124  /* function exit code */
4125  __pyx_L1_error:;
4126  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4127  __pyx_r = -1;
4128  __pyx_L0:;
4129  __Pyx_RefNannyFinishContext();
4130  return __pyx_r;
4131 }
4132 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4133 
4134 /* "PyClical.pyx":227
4135  * return self.instance.getitem(idx)
4136  *
4137  * def __iter__(self): # <<<<<<<<<<<<<<
4138  * """
4139  * Iterate over the indices of an index_set.
4140  */
4141 
4142 /* Python wrapper */
4143 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4144 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 ";
4145 #if CYTHON_COMPILING_IN_CPYTHON
4146 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4147 #endif
4148 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4149  PyObject *__pyx_r = 0;
4150  __Pyx_RefNannyDeclarations
4151  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4152  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4153 
4154  /* function exit code */
4155  __Pyx_RefNannyFinishContext();
4156  return __pyx_r;
4157 }
4158 
4159 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4160  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4161  PyObject *__pyx_r = NULL;
4162  __Pyx_RefNannyDeclarations
4163  __Pyx_RefNannySetupContext("__iter__", 0);
4164  __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);
4165  if (unlikely(!__pyx_cur_scope)) {
4166  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4167  __Pyx_INCREF(Py_None);
4168  __PYX_ERR(0, 227, __pyx_L1_error)
4169  } else {
4170  __Pyx_GOTREF(__pyx_cur_scope);
4171  }
4172  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4173  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4174  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4175  {
4176  __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)
4177  __Pyx_DECREF(__pyx_cur_scope);
4178  __Pyx_RefNannyFinishContext();
4179  return (PyObject *) gen;
4180  }
4181 
4182  /* function exit code */
4183  __pyx_L1_error:;
4184  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4185  __pyx_r = NULL;
4186  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4187  __Pyx_XGIVEREF(__pyx_r);
4188  __Pyx_RefNannyFinishContext();
4189  return __pyx_r;
4190 }
4191 
4192 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4193 {
4194  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4195  PyObject *__pyx_r = NULL;
4196  PyObject *__pyx_t_1 = NULL;
4197  PyObject *__pyx_t_2 = NULL;
4198  PyObject *__pyx_t_3 = NULL;
4199  PyObject *__pyx_t_4 = NULL;
4200  Py_ssize_t __pyx_t_5;
4201  PyObject *(*__pyx_t_6)(PyObject *);
4202  int __pyx_t_7;
4203  int __pyx_t_8;
4204  __Pyx_RefNannyDeclarations
4205  __Pyx_RefNannySetupContext("__iter__", 0);
4206  switch (__pyx_generator->resume_label) {
4207  case 0: goto __pyx_L3_first_run;
4208  case 1: goto __pyx_L7_resume_from_yield;
4209  default: /* CPython raises the right error here */
4210  __Pyx_RefNannyFinishContext();
4211  return NULL;
4212  }
4213  __pyx_L3_first_run:;
4214  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4215 
4216  /* "PyClical.pyx":234
4217  * -3 4 7
4218  * """
4219  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4220  * if idx in self:
4221  * yield idx
4222  */
4223  __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)
4224  __Pyx_GOTREF(__pyx_t_2);
4225  __pyx_t_3 = NULL;
4226  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4227  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4228  if (likely(__pyx_t_3)) {
4229  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4230  __Pyx_INCREF(__pyx_t_3);
4231  __Pyx_INCREF(function);
4232  __Pyx_DECREF_SET(__pyx_t_2, function);
4233  }
4234  }
4235  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4236  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4237  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4238  __Pyx_GOTREF(__pyx_t_1);
4239  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4240  __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)
4241  __Pyx_GOTREF(__pyx_t_3);
4242  __pyx_t_4 = NULL;
4243  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4244  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4245  if (likely(__pyx_t_4)) {
4246  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4247  __Pyx_INCREF(__pyx_t_4);
4248  __Pyx_INCREF(function);
4249  __Pyx_DECREF_SET(__pyx_t_3, function);
4250  }
4251  }
4252  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4253  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4254  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4255  __Pyx_GOTREF(__pyx_t_2);
4256  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4257  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4258  __Pyx_GOTREF(__pyx_t_3);
4259  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4260  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4261  __Pyx_GOTREF(__pyx_t_2);
4262  __Pyx_GIVEREF(__pyx_t_1);
4263  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4264  __Pyx_GIVEREF(__pyx_t_3);
4265  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4266  __pyx_t_1 = 0;
4267  __pyx_t_3 = 0;
4268  __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)
4269  __Pyx_GOTREF(__pyx_t_3);
4270  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4271  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4272  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4273  __pyx_t_6 = NULL;
4274  } else {
4275  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4276  __Pyx_GOTREF(__pyx_t_2);
4277  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4278  }
4279  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4280  for (;;) {
4281  if (likely(!__pyx_t_6)) {
4282  if (likely(PyList_CheckExact(__pyx_t_2))) {
4283  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4284  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4285  __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)
4286  #else
4287  __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)
4288  __Pyx_GOTREF(__pyx_t_3);
4289  #endif
4290  } else {
4291  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4292  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4293  __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)
4294  #else
4295  __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)
4296  __Pyx_GOTREF(__pyx_t_3);
4297  #endif
4298  }
4299  } else {
4300  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4301  if (unlikely(!__pyx_t_3)) {
4302  PyObject* exc_type = PyErr_Occurred();
4303  if (exc_type) {
4304  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4305  else __PYX_ERR(0, 234, __pyx_L1_error)
4306  }
4307  break;
4308  }
4309  __Pyx_GOTREF(__pyx_t_3);
4310  }
4311  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4312  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4313  __Pyx_GIVEREF(__pyx_t_3);
4314  __pyx_t_3 = 0;
4315 
4316  /* "PyClical.pyx":235
4317  * """
4318  * for idx in range(self.min(), self.max()+1):
4319  * if idx in self: # <<<<<<<<<<<<<<
4320  * yield idx
4321  *
4322  */
4323  __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)
4324  __pyx_t_8 = (__pyx_t_7 != 0);
4325  if (__pyx_t_8) {
4326 
4327  /* "PyClical.pyx":236
4328  * for idx in range(self.min(), self.max()+1):
4329  * if idx in self:
4330  * yield idx # <<<<<<<<<<<<<<
4331  *
4332  * def __invert__(self):
4333  */
4334  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4335  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4336  __Pyx_XGIVEREF(__pyx_t_2);
4337  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4338  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4339  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4340  __Pyx_XGIVEREF(__pyx_r);
4341  __Pyx_RefNannyFinishContext();
4342  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4343  /* return from generator, yielding value */
4344  __pyx_generator->resume_label = 1;
4345  return __pyx_r;
4346  __pyx_L7_resume_from_yield:;
4347  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4348  __pyx_cur_scope->__pyx_t_0 = 0;
4349  __Pyx_XGOTREF(__pyx_t_2);
4350  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4351  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4352  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4353 
4354  /* "PyClical.pyx":235
4355  * """
4356  * for idx in range(self.min(), self.max()+1):
4357  * if idx in self: # <<<<<<<<<<<<<<
4358  * yield idx
4359  *
4360  */
4361  }
4362 
4363  /* "PyClical.pyx":234
4364  * -3 4 7
4365  * """
4366  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4367  * if idx in self:
4368  * yield idx
4369  */
4370  }
4371  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4372  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4373 
4374  /* "PyClical.pyx":227
4375  * return self.instance.getitem(idx)
4376  *
4377  * def __iter__(self): # <<<<<<<<<<<<<<
4378  * """
4379  * Iterate over the indices of an index_set.
4380  */
4381 
4382  /* function exit code */
4383  PyErr_SetNone(PyExc_StopIteration);
4384  goto __pyx_L0;
4385  __pyx_L1_error:;
4386  __Pyx_XDECREF(__pyx_t_1);
4387  __Pyx_XDECREF(__pyx_t_2);
4388  __Pyx_XDECREF(__pyx_t_3);
4389  __Pyx_XDECREF(__pyx_t_4);
4390  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4391  __pyx_L0:;
4392  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4393  #if !CYTHON_USE_EXC_INFO_STACK
4394  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4395  #endif
4396  __pyx_generator->resume_label = -1;
4397  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4398  __Pyx_RefNannyFinishContext();
4399  return __pyx_r;
4400 }
4401 
4402 /* "PyClical.pyx":238
4403  * yield idx
4404  *
4405  * def __invert__(self): # <<<<<<<<<<<<<<
4406  * """
4407  * Set complement: not.
4408  */
4409 
4410 /* Python wrapper */
4411 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4412 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 ";
4413 #if CYTHON_COMPILING_IN_CPYTHON
4414 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4415 #endif
4416 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4417  PyObject *__pyx_r = 0;
4418  __Pyx_RefNannyDeclarations
4419  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4420  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4421 
4422  /* function exit code */
4423  __Pyx_RefNannyFinishContext();
4424  return __pyx_r;
4425 }
4426 
4427 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4428  PyObject *__pyx_r = NULL;
4429  __Pyx_RefNannyDeclarations
4430  PyObject *__pyx_t_1 = NULL;
4431  PyObject *__pyx_t_2 = NULL;
4432  __Pyx_RefNannySetupContext("__invert__", 0);
4433 
4434  /* "PyClical.pyx":245
4435  * {-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}
4436  * """
4437  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4438  *
4439  * def __xor__(lhs, rhs):
4440  */
4441  __Pyx_XDECREF(__pyx_r);
4442  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4443  __Pyx_GOTREF(__pyx_t_1);
4444  __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)
4445  __Pyx_GOTREF(__pyx_t_2);
4446  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4447  __pyx_r = __pyx_t_2;
4448  __pyx_t_2 = 0;
4449  goto __pyx_L0;
4450 
4451  /* "PyClical.pyx":238
4452  * yield idx
4453  *
4454  * def __invert__(self): # <<<<<<<<<<<<<<
4455  * """
4456  * Set complement: not.
4457  */
4458 
4459  /* function exit code */
4460  __pyx_L1_error:;
4461  __Pyx_XDECREF(__pyx_t_1);
4462  __Pyx_XDECREF(__pyx_t_2);
4463  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4464  __pyx_r = NULL;
4465  __pyx_L0:;
4466  __Pyx_XGIVEREF(__pyx_r);
4467  __Pyx_RefNannyFinishContext();
4468  return __pyx_r;
4469 }
4470 
4471 /* "PyClical.pyx":247
4472  * return index_set().wrap( self.instance.invert() )
4473  *
4474  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4475  * """
4476  * Symmetric set difference: exclusive or.
4477  */
4478 
4479 /* Python wrapper */
4480 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4481 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 ";
4482 #if CYTHON_COMPILING_IN_CPYTHON
4483 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4484 #endif
4485 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4486  PyObject *__pyx_r = 0;
4487  __Pyx_RefNannyDeclarations
4488  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4489  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4490 
4491  /* function exit code */
4492  __Pyx_RefNannyFinishContext();
4493  return __pyx_r;
4494 }
4495 
4496 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4497  PyObject *__pyx_r = NULL;
4498  __Pyx_RefNannyDeclarations
4499  PyObject *__pyx_t_1 = NULL;
4500  PyObject *__pyx_t_2 = NULL;
4501  __Pyx_RefNannySetupContext("__xor__", 0);
4502 
4503  /* "PyClical.pyx":256
4504  * {1}
4505  * """
4506  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4507  *
4508  * def __ixor__(self, rhs):
4509  */
4510  __Pyx_XDECREF(__pyx_r);
4511  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4512  __Pyx_GOTREF(__pyx_t_1);
4513  __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)
4514  __Pyx_GOTREF(__pyx_t_2);
4515  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4516  __pyx_r = __pyx_t_2;
4517  __pyx_t_2 = 0;
4518  goto __pyx_L0;
4519 
4520  /* "PyClical.pyx":247
4521  * return index_set().wrap( self.instance.invert() )
4522  *
4523  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4524  * """
4525  * Symmetric set difference: exclusive or.
4526  */
4527 
4528  /* function exit code */
4529  __pyx_L1_error:;
4530  __Pyx_XDECREF(__pyx_t_1);
4531  __Pyx_XDECREF(__pyx_t_2);
4532  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4533  __pyx_r = NULL;
4534  __pyx_L0:;
4535  __Pyx_XGIVEREF(__pyx_r);
4536  __Pyx_RefNannyFinishContext();
4537  return __pyx_r;
4538 }
4539 
4540 /* "PyClical.pyx":258
4541  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4542  *
4543  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4544  * """
4545  * Symmetric set difference: exclusive or.
4546  */
4547 
4548 /* Python wrapper */
4549 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4550 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 ";
4551 #if CYTHON_COMPILING_IN_CPYTHON
4552 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4553 #endif
4554 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4555  PyObject *__pyx_r = 0;
4556  __Pyx_RefNannyDeclarations
4557  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4558  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4559 
4560  /* function exit code */
4561  __Pyx_RefNannyFinishContext();
4562  return __pyx_r;
4563 }
4564 
4565 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4566  PyObject *__pyx_r = NULL;
4567  __Pyx_RefNannyDeclarations
4568  PyObject *__pyx_t_1 = NULL;
4569  __Pyx_RefNannySetupContext("__ixor__", 0);
4570 
4571  /* "PyClical.pyx":267
4572  * {1}
4573  * """
4574  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4575  *
4576  * def __and__(lhs, rhs):
4577  */
4578  __Pyx_XDECREF(__pyx_r);
4579  __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)
4580  __Pyx_GOTREF(__pyx_t_1);
4581  __pyx_r = __pyx_t_1;
4582  __pyx_t_1 = 0;
4583  goto __pyx_L0;
4584 
4585  /* "PyClical.pyx":258
4586  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4587  *
4588  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4589  * """
4590  * Symmetric set difference: exclusive or.
4591  */
4592 
4593  /* function exit code */
4594  __pyx_L1_error:;
4595  __Pyx_XDECREF(__pyx_t_1);
4596  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4597  __pyx_r = NULL;
4598  __pyx_L0:;
4599  __Pyx_XGIVEREF(__pyx_r);
4600  __Pyx_RefNannyFinishContext();
4601  return __pyx_r;
4602 }
4603 
4604 /* "PyClical.pyx":269
4605  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4606  *
4607  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4608  * """
4609  * Set intersection: and.
4610  */
4611 
4612 /* Python wrapper */
4613 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4614 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 ";
4615 #if CYTHON_COMPILING_IN_CPYTHON
4616 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4617 #endif
4618 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4619  PyObject *__pyx_r = 0;
4620  __Pyx_RefNannyDeclarations
4621  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4622  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4623 
4624  /* function exit code */
4625  __Pyx_RefNannyFinishContext();
4626  return __pyx_r;
4627 }
4628 
4629 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4630  PyObject *__pyx_r = NULL;
4631  __Pyx_RefNannyDeclarations
4632  PyObject *__pyx_t_1 = NULL;
4633  PyObject *__pyx_t_2 = NULL;
4634  __Pyx_RefNannySetupContext("__and__", 0);
4635 
4636  /* "PyClical.pyx":278
4637  * {2}
4638  * """
4639  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4640  *
4641  * def __iand__(self, rhs):
4642  */
4643  __Pyx_XDECREF(__pyx_r);
4644  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4645  __Pyx_GOTREF(__pyx_t_1);
4646  __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)
4647  __Pyx_GOTREF(__pyx_t_2);
4648  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4649  __pyx_r = __pyx_t_2;
4650  __pyx_t_2 = 0;
4651  goto __pyx_L0;
4652 
4653  /* "PyClical.pyx":269
4654  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4655  *
4656  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4657  * """
4658  * Set intersection: and.
4659  */
4660 
4661  /* function exit code */
4662  __pyx_L1_error:;
4663  __Pyx_XDECREF(__pyx_t_1);
4664  __Pyx_XDECREF(__pyx_t_2);
4665  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4666  __pyx_r = NULL;
4667  __pyx_L0:;
4668  __Pyx_XGIVEREF(__pyx_r);
4669  __Pyx_RefNannyFinishContext();
4670  return __pyx_r;
4671 }
4672 
4673 /* "PyClical.pyx":280
4674  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4675  *
4676  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4677  * """
4678  * Set intersection: and.
4679  */
4680 
4681 /* Python wrapper */
4682 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4683 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 ";
4684 #if CYTHON_COMPILING_IN_CPYTHON
4685 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4686 #endif
4687 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4688  PyObject *__pyx_r = 0;
4689  __Pyx_RefNannyDeclarations
4690  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4691  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4692 
4693  /* function exit code */
4694  __Pyx_RefNannyFinishContext();
4695  return __pyx_r;
4696 }
4697 
4698 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4699  PyObject *__pyx_r = NULL;
4700  __Pyx_RefNannyDeclarations
4701  PyObject *__pyx_t_1 = NULL;
4702  __Pyx_RefNannySetupContext("__iand__", 0);
4703 
4704  /* "PyClical.pyx":289
4705  * {2}
4706  * """
4707  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4708  *
4709  * def __or__(lhs, rhs):
4710  */
4711  __Pyx_XDECREF(__pyx_r);
4712  __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)
4713  __Pyx_GOTREF(__pyx_t_1);
4714  __pyx_r = __pyx_t_1;
4715  __pyx_t_1 = 0;
4716  goto __pyx_L0;
4717 
4718  /* "PyClical.pyx":280
4719  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4720  *
4721  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4722  * """
4723  * Set intersection: and.
4724  */
4725 
4726  /* function exit code */
4727  __pyx_L1_error:;
4728  __Pyx_XDECREF(__pyx_t_1);
4729  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4730  __pyx_r = NULL;
4731  __pyx_L0:;
4732  __Pyx_XGIVEREF(__pyx_r);
4733  __Pyx_RefNannyFinishContext();
4734  return __pyx_r;
4735 }
4736 
4737 /* "PyClical.pyx":291
4738  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4739  *
4740  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4741  * """
4742  * Set union: or.
4743  */
4744 
4745 /* Python wrapper */
4746 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4747 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 ";
4748 #if CYTHON_COMPILING_IN_CPYTHON
4749 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4750 #endif
4751 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4752  PyObject *__pyx_r = 0;
4753  __Pyx_RefNannyDeclarations
4754  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4755  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4756 
4757  /* function exit code */
4758  __Pyx_RefNannyFinishContext();
4759  return __pyx_r;
4760 }
4761 
4762 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4763  PyObject *__pyx_r = NULL;
4764  __Pyx_RefNannyDeclarations
4765  PyObject *__pyx_t_1 = NULL;
4766  PyObject *__pyx_t_2 = NULL;
4767  __Pyx_RefNannySetupContext("__or__", 0);
4768 
4769  /* "PyClical.pyx":300
4770  * {1,2}
4771  * """
4772  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4773  *
4774  * def __ior__(self, rhs):
4775  */
4776  __Pyx_XDECREF(__pyx_r);
4777  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4778  __Pyx_GOTREF(__pyx_t_1);
4779  __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)
4780  __Pyx_GOTREF(__pyx_t_2);
4781  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4782  __pyx_r = __pyx_t_2;
4783  __pyx_t_2 = 0;
4784  goto __pyx_L0;
4785 
4786  /* "PyClical.pyx":291
4787  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4788  *
4789  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4790  * """
4791  * Set union: or.
4792  */
4793 
4794  /* function exit code */
4795  __pyx_L1_error:;
4796  __Pyx_XDECREF(__pyx_t_1);
4797  __Pyx_XDECREF(__pyx_t_2);
4798  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4799  __pyx_r = NULL;
4800  __pyx_L0:;
4801  __Pyx_XGIVEREF(__pyx_r);
4802  __Pyx_RefNannyFinishContext();
4803  return __pyx_r;
4804 }
4805 
4806 /* "PyClical.pyx":302
4807  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4808  *
4809  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4810  * """
4811  * Set union: or.
4812  */
4813 
4814 /* Python wrapper */
4815 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4816 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 ";
4817 #if CYTHON_COMPILING_IN_CPYTHON
4818 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4819 #endif
4820 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4821  PyObject *__pyx_r = 0;
4822  __Pyx_RefNannyDeclarations
4823  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4824  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4825 
4826  /* function exit code */
4827  __Pyx_RefNannyFinishContext();
4828  return __pyx_r;
4829 }
4830 
4831 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4832  PyObject *__pyx_r = NULL;
4833  __Pyx_RefNannyDeclarations
4834  PyObject *__pyx_t_1 = NULL;
4835  __Pyx_RefNannySetupContext("__ior__", 0);
4836 
4837  /* "PyClical.pyx":311
4838  * {1,2}
4839  * """
4840  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4841  *
4842  * def count(self):
4843  */
4844  __Pyx_XDECREF(__pyx_r);
4845  __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)
4846  __Pyx_GOTREF(__pyx_t_1);
4847  __pyx_r = __pyx_t_1;
4848  __pyx_t_1 = 0;
4849  goto __pyx_L0;
4850 
4851  /* "PyClical.pyx":302
4852  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4853  *
4854  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4855  * """
4856  * Set union: or.
4857  */
4858 
4859  /* function exit code */
4860  __pyx_L1_error:;
4861  __Pyx_XDECREF(__pyx_t_1);
4862  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4863  __pyx_r = NULL;
4864  __pyx_L0:;
4865  __Pyx_XGIVEREF(__pyx_r);
4866  __Pyx_RefNannyFinishContext();
4867  return __pyx_r;
4868 }
4869 
4870 /* "PyClical.pyx":313
4871  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4872  *
4873  * def count(self): # <<<<<<<<<<<<<<
4874  * """
4875  * Cardinality: Number of indices included in set.
4876  */
4877 
4878 /* Python wrapper */
4879 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4880 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 ";
4881 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4882  PyObject *__pyx_r = 0;
4883  __Pyx_RefNannyDeclarations
4884  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4885  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4886 
4887  /* function exit code */
4888  __Pyx_RefNannyFinishContext();
4889  return __pyx_r;
4890 }
4891 
4892 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4893  PyObject *__pyx_r = NULL;
4894  __Pyx_RefNannyDeclarations
4895  PyObject *__pyx_t_1 = NULL;
4896  __Pyx_RefNannySetupContext("count", 0);
4897 
4898  /* "PyClical.pyx":320
4899  * 3
4900  * """
4901  * return self.instance.count() # <<<<<<<<<<<<<<
4902  *
4903  * def count_neg(self):
4904  */
4905  __Pyx_XDECREF(__pyx_r);
4906  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4907  __Pyx_GOTREF(__pyx_t_1);
4908  __pyx_r = __pyx_t_1;
4909  __pyx_t_1 = 0;
4910  goto __pyx_L0;
4911 
4912  /* "PyClical.pyx":313
4913  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4914  *
4915  * def count(self): # <<<<<<<<<<<<<<
4916  * """
4917  * Cardinality: Number of indices included in set.
4918  */
4919 
4920  /* function exit code */
4921  __pyx_L1_error:;
4922  __Pyx_XDECREF(__pyx_t_1);
4923  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4924  __pyx_r = NULL;
4925  __pyx_L0:;
4926  __Pyx_XGIVEREF(__pyx_r);
4927  __Pyx_RefNannyFinishContext();
4928  return __pyx_r;
4929 }
4930 
4931 /* "PyClical.pyx":322
4932  * return self.instance.count()
4933  *
4934  * def count_neg(self): # <<<<<<<<<<<<<<
4935  * """
4936  * Number of negative indices included in set.
4937  */
4938 
4939 /* Python wrapper */
4940 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4941 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 ";
4942 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4943  PyObject *__pyx_r = 0;
4944  __Pyx_RefNannyDeclarations
4945  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4946  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4947 
4948  /* function exit code */
4949  __Pyx_RefNannyFinishContext();
4950  return __pyx_r;
4951 }
4952 
4953 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4954  PyObject *__pyx_r = NULL;
4955  __Pyx_RefNannyDeclarations
4956  PyObject *__pyx_t_1 = NULL;
4957  __Pyx_RefNannySetupContext("count_neg", 0);
4958 
4959  /* "PyClical.pyx":329
4960  * 1
4961  * """
4962  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4963  *
4964  * def count_pos(self):
4965  */
4966  __Pyx_XDECREF(__pyx_r);
4967  __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)
4968  __Pyx_GOTREF(__pyx_t_1);
4969  __pyx_r = __pyx_t_1;
4970  __pyx_t_1 = 0;
4971  goto __pyx_L0;
4972 
4973  /* "PyClical.pyx":322
4974  * return self.instance.count()
4975  *
4976  * def count_neg(self): # <<<<<<<<<<<<<<
4977  * """
4978  * Number of negative indices included in set.
4979  */
4980 
4981  /* function exit code */
4982  __pyx_L1_error:;
4983  __Pyx_XDECREF(__pyx_t_1);
4984  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4985  __pyx_r = NULL;
4986  __pyx_L0:;
4987  __Pyx_XGIVEREF(__pyx_r);
4988  __Pyx_RefNannyFinishContext();
4989  return __pyx_r;
4990 }
4991 
4992 /* "PyClical.pyx":331
4993  * return self.instance.count_neg()
4994  *
4995  * def count_pos(self): # <<<<<<<<<<<<<<
4996  * """
4997  * Number of positive indices included in set.
4998  */
4999 
5000 /* Python wrapper */
5001 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5002 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 ";
5003 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5004  PyObject *__pyx_r = 0;
5005  __Pyx_RefNannyDeclarations
5006  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5007  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5008 
5009  /* function exit code */
5010  __Pyx_RefNannyFinishContext();
5011  return __pyx_r;
5012 }
5013 
5014 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5015  PyObject *__pyx_r = NULL;
5016  __Pyx_RefNannyDeclarations
5017  PyObject *__pyx_t_1 = NULL;
5018  __Pyx_RefNannySetupContext("count_pos", 0);
5019 
5020  /* "PyClical.pyx":338
5021  * 2
5022  * """
5023  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5024  *
5025  * def min(self):
5026  */
5027  __Pyx_XDECREF(__pyx_r);
5028  __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)
5029  __Pyx_GOTREF(__pyx_t_1);
5030  __pyx_r = __pyx_t_1;
5031  __pyx_t_1 = 0;
5032  goto __pyx_L0;
5033 
5034  /* "PyClical.pyx":331
5035  * return self.instance.count_neg()
5036  *
5037  * def count_pos(self): # <<<<<<<<<<<<<<
5038  * """
5039  * Number of positive indices included in set.
5040  */
5041 
5042  /* function exit code */
5043  __pyx_L1_error:;
5044  __Pyx_XDECREF(__pyx_t_1);
5045  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5046  __pyx_r = NULL;
5047  __pyx_L0:;
5048  __Pyx_XGIVEREF(__pyx_r);
5049  __Pyx_RefNannyFinishContext();
5050  return __pyx_r;
5051 }
5052 
5053 /* "PyClical.pyx":340
5054  * return self.instance.count_pos()
5055  *
5056  * def min(self): # <<<<<<<<<<<<<<
5057  * """
5058  * Minimum member.
5059  */
5060 
5061 /* Python wrapper */
5062 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5063 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5064 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5065  PyObject *__pyx_r = 0;
5066  __Pyx_RefNannyDeclarations
5067  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5068  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5069 
5070  /* function exit code */
5071  __Pyx_RefNannyFinishContext();
5072  return __pyx_r;
5073 }
5074 
5075 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5076  PyObject *__pyx_r = NULL;
5077  __Pyx_RefNannyDeclarations
5078  PyObject *__pyx_t_1 = NULL;
5079  __Pyx_RefNannySetupContext("min", 0);
5080 
5081  /* "PyClical.pyx":347
5082  * -1
5083  * """
5084  * return self.instance.min() # <<<<<<<<<<<<<<
5085  *
5086  * def max(self):
5087  */
5088  __Pyx_XDECREF(__pyx_r);
5089  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5090  __Pyx_GOTREF(__pyx_t_1);
5091  __pyx_r = __pyx_t_1;
5092  __pyx_t_1 = 0;
5093  goto __pyx_L0;
5094 
5095  /* "PyClical.pyx":340
5096  * return self.instance.count_pos()
5097  *
5098  * def min(self): # <<<<<<<<<<<<<<
5099  * """
5100  * Minimum member.
5101  */
5102 
5103  /* function exit code */
5104  __pyx_L1_error:;
5105  __Pyx_XDECREF(__pyx_t_1);
5106  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5107  __pyx_r = NULL;
5108  __pyx_L0:;
5109  __Pyx_XGIVEREF(__pyx_r);
5110  __Pyx_RefNannyFinishContext();
5111  return __pyx_r;
5112 }
5113 
5114 /* "PyClical.pyx":349
5115  * return self.instance.min()
5116  *
5117  * def max(self): # <<<<<<<<<<<<<<
5118  * """
5119  * Maximum member.
5120  */
5121 
5122 /* Python wrapper */
5123 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5124 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5125 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5126  PyObject *__pyx_r = 0;
5127  __Pyx_RefNannyDeclarations
5128  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5129  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5130 
5131  /* function exit code */
5132  __Pyx_RefNannyFinishContext();
5133  return __pyx_r;
5134 }
5135 
5136 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5137  PyObject *__pyx_r = NULL;
5138  __Pyx_RefNannyDeclarations
5139  PyObject *__pyx_t_1 = NULL;
5140  __Pyx_RefNannySetupContext("max", 0);
5141 
5142  /* "PyClical.pyx":356
5143  * 2
5144  * """
5145  * return self.instance.max() # <<<<<<<<<<<<<<
5146  *
5147  * def hash_fn(self):
5148  */
5149  __Pyx_XDECREF(__pyx_r);
5150  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5151  __Pyx_GOTREF(__pyx_t_1);
5152  __pyx_r = __pyx_t_1;
5153  __pyx_t_1 = 0;
5154  goto __pyx_L0;
5155 
5156  /* "PyClical.pyx":349
5157  * return self.instance.min()
5158  *
5159  * def max(self): # <<<<<<<<<<<<<<
5160  * """
5161  * Maximum member.
5162  */
5163 
5164  /* function exit code */
5165  __pyx_L1_error:;
5166  __Pyx_XDECREF(__pyx_t_1);
5167  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5168  __pyx_r = NULL;
5169  __pyx_L0:;
5170  __Pyx_XGIVEREF(__pyx_r);
5171  __Pyx_RefNannyFinishContext();
5172  return __pyx_r;
5173 }
5174 
5175 /* "PyClical.pyx":358
5176  * return self.instance.max()
5177  *
5178  * def hash_fn(self): # <<<<<<<<<<<<<<
5179  * """
5180  * Hash function.
5181  */
5182 
5183 /* Python wrapper */
5184 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5185 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5186 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5187  PyObject *__pyx_r = 0;
5188  __Pyx_RefNannyDeclarations
5189  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5190  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5191 
5192  /* function exit code */
5193  __Pyx_RefNannyFinishContext();
5194  return __pyx_r;
5195 }
5196 
5197 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5198  PyObject *__pyx_r = NULL;
5199  __Pyx_RefNannyDeclarations
5200  PyObject *__pyx_t_1 = NULL;
5201  __Pyx_RefNannySetupContext("hash_fn", 0);
5202 
5203  /* "PyClical.pyx":362
5204  * Hash function.
5205  * """
5206  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5207  *
5208  * def sign_of_mult(self, rhs):
5209  */
5210  __Pyx_XDECREF(__pyx_r);
5211  __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)
5212  __Pyx_GOTREF(__pyx_t_1);
5213  __pyx_r = __pyx_t_1;
5214  __pyx_t_1 = 0;
5215  goto __pyx_L0;
5216 
5217  /* "PyClical.pyx":358
5218  * return self.instance.max()
5219  *
5220  * def hash_fn(self): # <<<<<<<<<<<<<<
5221  * """
5222  * Hash function.
5223  */
5224 
5225  /* function exit code */
5226  __pyx_L1_error:;
5227  __Pyx_XDECREF(__pyx_t_1);
5228  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5229  __pyx_r = NULL;
5230  __pyx_L0:;
5231  __Pyx_XGIVEREF(__pyx_r);
5232  __Pyx_RefNannyFinishContext();
5233  return __pyx_r;
5234 }
5235 
5236 /* "PyClical.pyx":364
5237  * return self.instance.hash_fn()
5238  *
5239  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5240  * """
5241  * Sign of geometric product of two Clifford basis elements.
5242  */
5243 
5244 /* Python wrapper */
5245 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5246 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 ";
5247 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5248  PyObject *__pyx_r = 0;
5249  __Pyx_RefNannyDeclarations
5250  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5251  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5252 
5253  /* function exit code */
5254  __Pyx_RefNannyFinishContext();
5255  return __pyx_r;
5256 }
5257 
5258 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5259  PyObject *__pyx_r = NULL;
5260  __Pyx_RefNannyDeclarations
5261  PyObject *__pyx_t_1 = NULL;
5262  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5263 
5264  /* "PyClical.pyx":371
5265  * 1
5266  * """
5267  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5268  *
5269  * def sign_of_square(self):
5270  */
5271  __Pyx_XDECREF(__pyx_r);
5272  __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)
5273  __Pyx_GOTREF(__pyx_t_1);
5274  __pyx_r = __pyx_t_1;
5275  __pyx_t_1 = 0;
5276  goto __pyx_L0;
5277 
5278  /* "PyClical.pyx":364
5279  * return self.instance.hash_fn()
5280  *
5281  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5282  * """
5283  * Sign of geometric product of two Clifford basis elements.
5284  */
5285 
5286  /* function exit code */
5287  __pyx_L1_error:;
5288  __Pyx_XDECREF(__pyx_t_1);
5289  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5290  __pyx_r = NULL;
5291  __pyx_L0:;
5292  __Pyx_XGIVEREF(__pyx_r);
5293  __Pyx_RefNannyFinishContext();
5294  return __pyx_r;
5295 }
5296 
5297 /* "PyClical.pyx":373
5298  * return self.instance.sign_of_mult(toIndexSet(rhs))
5299  *
5300  * def sign_of_square(self): # <<<<<<<<<<<<<<
5301  * """
5302  * Sign of geometric square of a Clifford basis element.
5303  */
5304 
5305 /* Python wrapper */
5306 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5307 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 ";
5308 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5309  PyObject *__pyx_r = 0;
5310  __Pyx_RefNannyDeclarations
5311  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5312  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5313 
5314  /* function exit code */
5315  __Pyx_RefNannyFinishContext();
5316  return __pyx_r;
5317 }
5318 
5319 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5320  PyObject *__pyx_r = NULL;
5321  __Pyx_RefNannyDeclarations
5322  PyObject *__pyx_t_1 = NULL;
5323  __Pyx_RefNannySetupContext("sign_of_square", 0);
5324 
5325  /* "PyClical.pyx":380
5326  * -1
5327  * """
5328  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5329  *
5330  * def __repr__(self):
5331  */
5332  __Pyx_XDECREF(__pyx_r);
5333  __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)
5334  __Pyx_GOTREF(__pyx_t_1);
5335  __pyx_r = __pyx_t_1;
5336  __pyx_t_1 = 0;
5337  goto __pyx_L0;
5338 
5339  /* "PyClical.pyx":373
5340  * return self.instance.sign_of_mult(toIndexSet(rhs))
5341  *
5342  * def sign_of_square(self): # <<<<<<<<<<<<<<
5343  * """
5344  * Sign of geometric square of a Clifford basis element.
5345  */
5346 
5347  /* function exit code */
5348  __pyx_L1_error:;
5349  __Pyx_XDECREF(__pyx_t_1);
5350  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5351  __pyx_r = NULL;
5352  __pyx_L0:;
5353  __Pyx_XGIVEREF(__pyx_r);
5354  __Pyx_RefNannyFinishContext();
5355  return __pyx_r;
5356 }
5357 
5358 /* "PyClical.pyx":382
5359  * return self.instance.sign_of_square()
5360  *
5361  * def __repr__(self): # <<<<<<<<<<<<<<
5362  * """
5363  * The official string representation of self.
5364  */
5365 
5366 /* Python wrapper */
5367 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5368 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 ";
5369 #if CYTHON_COMPILING_IN_CPYTHON
5370 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5371 #endif
5372 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5373  PyObject *__pyx_r = 0;
5374  __Pyx_RefNannyDeclarations
5375  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5376  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5377 
5378  /* function exit code */
5379  __Pyx_RefNannyFinishContext();
5380  return __pyx_r;
5381 }
5382 
5383 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5384  PyObject *__pyx_r = NULL;
5385  __Pyx_RefNannyDeclarations
5386  PyObject *__pyx_t_1 = NULL;
5387  __Pyx_RefNannySetupContext("__repr__", 0);
5388 
5389  /* "PyClical.pyx":391
5390  * 'index_set({1,2})'
5391  * """
5392  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5393  *
5394  * def __str__(self):
5395  */
5396  __Pyx_XDECREF(__pyx_r);
5397  __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)
5398  __Pyx_GOTREF(__pyx_t_1);
5399  __pyx_r = __pyx_t_1;
5400  __pyx_t_1 = 0;
5401  goto __pyx_L0;
5402 
5403  /* "PyClical.pyx":382
5404  * return self.instance.sign_of_square()
5405  *
5406  * def __repr__(self): # <<<<<<<<<<<<<<
5407  * """
5408  * The official string representation of self.
5409  */
5410 
5411  /* function exit code */
5412  __pyx_L1_error:;
5413  __Pyx_XDECREF(__pyx_t_1);
5414  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5415  __pyx_r = NULL;
5416  __pyx_L0:;
5417  __Pyx_XGIVEREF(__pyx_r);
5418  __Pyx_RefNannyFinishContext();
5419  return __pyx_r;
5420 }
5421 
5422 /* "PyClical.pyx":393
5423  * return index_set_to_repr( self.unwrap() ).c_str()
5424  *
5425  * def __str__(self): # <<<<<<<<<<<<<<
5426  * """
5427  * The informal string representation of self.
5428  */
5429 
5430 /* Python wrapper */
5431 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5432 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 ";
5433 #if CYTHON_COMPILING_IN_CPYTHON
5434 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5435 #endif
5436 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5437  PyObject *__pyx_r = 0;
5438  __Pyx_RefNannyDeclarations
5439  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5440  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5441 
5442  /* function exit code */
5443  __Pyx_RefNannyFinishContext();
5444  return __pyx_r;
5445 }
5446 
5447 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5448  PyObject *__pyx_r = NULL;
5449  __Pyx_RefNannyDeclarations
5450  PyObject *__pyx_t_1 = NULL;
5451  __Pyx_RefNannySetupContext("__str__", 0);
5452 
5453  /* "PyClical.pyx":402
5454  * '{1,2}'
5455  * """
5456  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5457  *
5458  * def index_set_hidden_doctests():
5459  */
5460  __Pyx_XDECREF(__pyx_r);
5461  __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)
5462  __Pyx_GOTREF(__pyx_t_1);
5463  __pyx_r = __pyx_t_1;
5464  __pyx_t_1 = 0;
5465  goto __pyx_L0;
5466 
5467  /* "PyClical.pyx":393
5468  * return index_set_to_repr( self.unwrap() ).c_str()
5469  *
5470  * def __str__(self): # <<<<<<<<<<<<<<
5471  * """
5472  * The informal string representation of self.
5473  */
5474 
5475  /* function exit code */
5476  __pyx_L1_error:;
5477  __Pyx_XDECREF(__pyx_t_1);
5478  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5479  __pyx_r = NULL;
5480  __pyx_L0:;
5481  __Pyx_XGIVEREF(__pyx_r);
5482  __Pyx_RefNannyFinishContext();
5483  return __pyx_r;
5484 }
5485 
5486 /* "(tree fragment)":1
5487  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5488  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5489  * def __setstate_cython__(self, __pyx_state):
5490  */
5491 
5492 /* Python wrapper */
5493 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5494 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5495  PyObject *__pyx_r = 0;
5496  __Pyx_RefNannyDeclarations
5497  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5498  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5499 
5500  /* function exit code */
5501  __Pyx_RefNannyFinishContext();
5502  return __pyx_r;
5503 }
5504 
5505 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5506  PyObject *__pyx_r = NULL;
5507  __Pyx_RefNannyDeclarations
5508  PyObject *__pyx_t_1 = NULL;
5509  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5510 
5511  /* "(tree fragment)":2
5512  * def __reduce_cython__(self):
5513  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5514  * def __setstate_cython__(self, __pyx_state):
5515  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5516  */
5517  __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)
5518  __Pyx_GOTREF(__pyx_t_1);
5519  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5520  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5521  __PYX_ERR(1, 2, __pyx_L1_error)
5522 
5523  /* "(tree fragment)":1
5524  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5525  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5526  * def __setstate_cython__(self, __pyx_state):
5527  */
5528 
5529  /* function exit code */
5530  __pyx_L1_error:;
5531  __Pyx_XDECREF(__pyx_t_1);
5532  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5533  __pyx_r = NULL;
5534  __Pyx_XGIVEREF(__pyx_r);
5535  __Pyx_RefNannyFinishContext();
5536  return __pyx_r;
5537 }
5538 
5539 /* "(tree fragment)":3
5540  * def __reduce_cython__(self):
5541  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5542  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5543  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5544  */
5545 
5546 /* Python wrapper */
5547 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5548 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5549  PyObject *__pyx_r = 0;
5550  __Pyx_RefNannyDeclarations
5551  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5552  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5553 
5554  /* function exit code */
5555  __Pyx_RefNannyFinishContext();
5556  return __pyx_r;
5557 }
5558 
5559 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) {
5560  PyObject *__pyx_r = NULL;
5561  __Pyx_RefNannyDeclarations
5562  PyObject *__pyx_t_1 = NULL;
5563  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5564 
5565  /* "(tree fragment)":4
5566  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5567  * def __setstate_cython__(self, __pyx_state):
5568  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5569  */
5570  __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)
5571  __Pyx_GOTREF(__pyx_t_1);
5572  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5573  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5574  __PYX_ERR(1, 4, __pyx_L1_error)
5575 
5576  /* "(tree fragment)":3
5577  * def __reduce_cython__(self):
5578  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5579  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5580  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5581  */
5582 
5583  /* function exit code */
5584  __pyx_L1_error:;
5585  __Pyx_XDECREF(__pyx_t_1);
5586  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5587  __pyx_r = NULL;
5588  __Pyx_XGIVEREF(__pyx_r);
5589  __Pyx_RefNannyFinishContext();
5590  return __pyx_r;
5591 }
5592 
5593 /* "PyClical.pyx":404
5594  * return index_set_to_str( self.unwrap() ).c_str()
5595  *
5596  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5597  * """
5598  * Tests for functions that Doctest cannot see.
5599  */
5600 
5601 /* Python wrapper */
5602 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5603 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 ";
5604  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};
5605  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5606  PyObject *__pyx_r = 0;
5607  __Pyx_RefNannyDeclarations
5608  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5609  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5610 
5611  /* function exit code */
5612  __Pyx_RefNannyFinishContext();
5613  return __pyx_r;
5614  }
5615 
5616  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5617  PyObject *__pyx_r = NULL;
5618  __Pyx_RefNannyDeclarations
5619  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5620 
5621  /* "PyClical.pyx":488
5622  * False
5623  * """
5624  * return # <<<<<<<<<<<<<<
5625  *
5626  * cpdef inline compare(lhs,rhs):
5627  */
5628  __Pyx_XDECREF(__pyx_r);
5629  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5630  goto __pyx_L0;
5631 
5632  /* "PyClical.pyx":404
5633  * return index_set_to_str( self.unwrap() ).c_str()
5634  *
5635  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5636  * """
5637  * Tests for functions that Doctest cannot see.
5638  */
5639 
5640  /* function exit code */
5641  __pyx_L0:;
5642  __Pyx_XGIVEREF(__pyx_r);
5643  __Pyx_RefNannyFinishContext();
5644  return __pyx_r;
5645  }
5646 
5647  /* "PyClical.pyx":490
5648  * return
5649  *
5650  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5651  * """
5652  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5653  */
5654 
5655  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5656  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5657  PyObject *__pyx_r = NULL;
5658  __Pyx_RefNannyDeclarations
5659  PyObject *__pyx_t_1 = NULL;
5660  __Pyx_RefNannySetupContext("compare", 0);
5661 
5662  /* "PyClical.pyx":500
5663  * 1
5664  * """
5665  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5666  *
5667  * cpdef inline min_neg(obj):
5668  */
5669  __Pyx_XDECREF(__pyx_r);
5670  __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)
5671  __Pyx_GOTREF(__pyx_t_1);
5672  __pyx_r = __pyx_t_1;
5673  __pyx_t_1 = 0;
5674  goto __pyx_L0;
5675 
5676  /* "PyClical.pyx":490
5677  * return
5678  *
5679  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5680  * """
5681  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5682  */
5683 
5684  /* function exit code */
5685  __pyx_L1_error:;
5686  __Pyx_XDECREF(__pyx_t_1);
5687  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5688  __pyx_r = 0;
5689  __pyx_L0:;
5690  __Pyx_XGIVEREF(__pyx_r);
5691  __Pyx_RefNannyFinishContext();
5692  return __pyx_r;
5693  }
5694 
5695  /* Python wrapper */
5696  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5697  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 ";
5698  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5699  PyObject *__pyx_v_lhs = 0;
5700  PyObject *__pyx_v_rhs = 0;
5701  PyObject *__pyx_r = 0;
5702  __Pyx_RefNannyDeclarations
5703  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5704  {
5705  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5706  PyObject* values[2] = {0,0};
5707  if (unlikely(__pyx_kwds)) {
5708  Py_ssize_t kw_args;
5709  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5710  switch (pos_args) {
5711  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5712  CYTHON_FALLTHROUGH;
5713  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5714  CYTHON_FALLTHROUGH;
5715  case 0: break;
5716  default: goto __pyx_L5_argtuple_error;
5717  }
5718  kw_args = PyDict_Size(__pyx_kwds);
5719  switch (pos_args) {
5720  case 0:
5721  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5722  else goto __pyx_L5_argtuple_error;
5723  CYTHON_FALLTHROUGH;
5724  case 1:
5725  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5726  else {
5727  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5728  }
5729  }
5730  if (unlikely(kw_args > 0)) {
5731  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5732  }
5733  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5734  goto __pyx_L5_argtuple_error;
5735  } else {
5736  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5737  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5738  }
5739  __pyx_v_lhs = values[0];
5740  __pyx_v_rhs = values[1];
5741  }
5742  goto __pyx_L4_argument_unpacking_done;
5743  __pyx_L5_argtuple_error:;
5744  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5745  __pyx_L3_error:;
5746  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5747  __Pyx_RefNannyFinishContext();
5748  return NULL;
5749  __pyx_L4_argument_unpacking_done:;
5750  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5751 
5752  /* function exit code */
5753  __Pyx_RefNannyFinishContext();
5754  return __pyx_r;
5755  }
5756 
5757  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5758  PyObject *__pyx_r = NULL;
5759  __Pyx_RefNannyDeclarations
5760  PyObject *__pyx_t_1 = NULL;
5761  __Pyx_RefNannySetupContext("compare", 0);
5762  __Pyx_XDECREF(__pyx_r);
5763  __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)
5764  __Pyx_GOTREF(__pyx_t_1);
5765  __pyx_r = __pyx_t_1;
5766  __pyx_t_1 = 0;
5767  goto __pyx_L0;
5768 
5769  /* function exit code */
5770  __pyx_L1_error:;
5771  __Pyx_XDECREF(__pyx_t_1);
5772  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5773  __pyx_r = NULL;
5774  __pyx_L0:;
5775  __Pyx_XGIVEREF(__pyx_r);
5776  __Pyx_RefNannyFinishContext();
5777  return __pyx_r;
5778  }
5779 
5780  /* "PyClical.pyx":502
5781  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5782  *
5783  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5784  * """
5785  * Minimum negative index, or 0 if none.
5786  */
5787 
5788  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5789  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5790  PyObject *__pyx_r = NULL;
5791  __Pyx_RefNannyDeclarations
5792  PyObject *__pyx_t_1 = NULL;
5793  __Pyx_RefNannySetupContext("min_neg", 0);
5794 
5795  /* "PyClical.pyx":509
5796  * 0
5797  * """
5798  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5799  *
5800  * cpdef inline max_pos(obj):
5801  */
5802  __Pyx_XDECREF(__pyx_r);
5803  __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)
5804  __Pyx_GOTREF(__pyx_t_1);
5805  __pyx_r = __pyx_t_1;
5806  __pyx_t_1 = 0;
5807  goto __pyx_L0;
5808 
5809  /* "PyClical.pyx":502
5810  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5811  *
5812  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5813  * """
5814  * Minimum negative index, or 0 if none.
5815  */
5816 
5817  /* function exit code */
5818  __pyx_L1_error:;
5819  __Pyx_XDECREF(__pyx_t_1);
5820  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5821  __pyx_r = 0;
5822  __pyx_L0:;
5823  __Pyx_XGIVEREF(__pyx_r);
5824  __Pyx_RefNannyFinishContext();
5825  return __pyx_r;
5826  }
5827 
5828  /* Python wrapper */
5829  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5830  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 ";
5831  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5832  PyObject *__pyx_r = 0;
5833  __Pyx_RefNannyDeclarations
5834  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5835  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5836 
5837  /* function exit code */
5838  __Pyx_RefNannyFinishContext();
5839  return __pyx_r;
5840  }
5841 
5842  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5843  PyObject *__pyx_r = NULL;
5844  __Pyx_RefNannyDeclarations
5845  PyObject *__pyx_t_1 = NULL;
5846  __Pyx_RefNannySetupContext("min_neg", 0);
5847  __Pyx_XDECREF(__pyx_r);
5848  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5849  __Pyx_GOTREF(__pyx_t_1);
5850  __pyx_r = __pyx_t_1;
5851  __pyx_t_1 = 0;
5852  goto __pyx_L0;
5853 
5854  /* function exit code */
5855  __pyx_L1_error:;
5856  __Pyx_XDECREF(__pyx_t_1);
5857  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5858  __pyx_r = NULL;
5859  __pyx_L0:;
5860  __Pyx_XGIVEREF(__pyx_r);
5861  __Pyx_RefNannyFinishContext();
5862  return __pyx_r;
5863  }
5864 
5865  /* "PyClical.pyx":511
5866  * return glucat.min_neg( toIndexSet(obj) )
5867  *
5868  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5869  * """
5870  * Maximum positive index, or 0 if none.
5871  */
5872 
5873  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5874  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5875  PyObject *__pyx_r = NULL;
5876  __Pyx_RefNannyDeclarations
5877  PyObject *__pyx_t_1 = NULL;
5878  __Pyx_RefNannySetupContext("max_pos", 0);
5879 
5880  /* "PyClical.pyx":518
5881  * 2
5882  * """
5883  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5884  *
5885  * cdef inline vector[scalar_t] list_to_vector(lst):
5886  */
5887  __Pyx_XDECREF(__pyx_r);
5888  __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)
5889  __Pyx_GOTREF(__pyx_t_1);
5890  __pyx_r = __pyx_t_1;
5891  __pyx_t_1 = 0;
5892  goto __pyx_L0;
5893 
5894  /* "PyClical.pyx":511
5895  * return glucat.min_neg( toIndexSet(obj) )
5896  *
5897  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5898  * """
5899  * Maximum positive index, or 0 if none.
5900  */
5901 
5902  /* function exit code */
5903  __pyx_L1_error:;
5904  __Pyx_XDECREF(__pyx_t_1);
5905  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5906  __pyx_r = 0;
5907  __pyx_L0:;
5908  __Pyx_XGIVEREF(__pyx_r);
5909  __Pyx_RefNannyFinishContext();
5910  return __pyx_r;
5911  }
5912 
5913  /* Python wrapper */
5914  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5915  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 ";
5916  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5917  PyObject *__pyx_r = 0;
5918  __Pyx_RefNannyDeclarations
5919  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5920  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5921 
5922  /* function exit code */
5923  __Pyx_RefNannyFinishContext();
5924  return __pyx_r;
5925  }
5926 
5927  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5928  PyObject *__pyx_r = NULL;
5929  __Pyx_RefNannyDeclarations
5930  PyObject *__pyx_t_1 = NULL;
5931  __Pyx_RefNannySetupContext("max_pos", 0);
5932  __Pyx_XDECREF(__pyx_r);
5933  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5934  __Pyx_GOTREF(__pyx_t_1);
5935  __pyx_r = __pyx_t_1;
5936  __pyx_t_1 = 0;
5937  goto __pyx_L0;
5938 
5939  /* function exit code */
5940  __pyx_L1_error:;
5941  __Pyx_XDECREF(__pyx_t_1);
5942  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5943  __pyx_r = NULL;
5944  __pyx_L0:;
5945  __Pyx_XGIVEREF(__pyx_r);
5946  __Pyx_RefNannyFinishContext();
5947  return __pyx_r;
5948  }
5949 
5950  /* "PyClical.pyx":520
5951  * return glucat.max_pos( toIndexSet(obj) )
5952  *
5953  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5954  * """
5955  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5956  */
5957 
5958  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5959  std::vector<scalar_t> __pyx_v_v;
5960  PyObject *__pyx_v_s = NULL;
5961  std::vector<scalar_t> __pyx_r;
5962  __Pyx_RefNannyDeclarations
5963  PyObject *__pyx_t_1 = NULL;
5964  Py_ssize_t __pyx_t_2;
5965  PyObject *(*__pyx_t_3)(PyObject *);
5966  PyObject *__pyx_t_4 = NULL;
5967  scalar_t __pyx_t_5;
5968  __Pyx_RefNannySetupContext("list_to_vector", 0);
5969 
5970  /* "PyClical.pyx":525
5971  * """
5972  * cdef vector[scalar_t] v
5973  * for s in lst: # <<<<<<<<<<<<<<
5974  * v.push_back(<scalar_t>s)
5975  * return v
5976  */
5977  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5978  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5979  __pyx_t_3 = NULL;
5980  } else {
5981  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5982  __Pyx_GOTREF(__pyx_t_1);
5983  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5984  }
5985  for (;;) {
5986  if (likely(!__pyx_t_3)) {
5987  if (likely(PyList_CheckExact(__pyx_t_1))) {
5988  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5989  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5990  __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)
5991  #else
5992  __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)
5993  __Pyx_GOTREF(__pyx_t_4);
5994  #endif
5995  } else {
5996  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5997  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5998  __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)
5999  #else
6000  __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)
6001  __Pyx_GOTREF(__pyx_t_4);
6002  #endif
6003  }
6004  } else {
6005  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6006  if (unlikely(!__pyx_t_4)) {
6007  PyObject* exc_type = PyErr_Occurred();
6008  if (exc_type) {
6009  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6010  else __PYX_ERR(0, 525, __pyx_L1_error)
6011  }
6012  break;
6013  }
6014  __Pyx_GOTREF(__pyx_t_4);
6015  }
6016  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6017  __pyx_t_4 = 0;
6018 
6019  /* "PyClical.pyx":526
6020  * cdef vector[scalar_t] v
6021  * for s in lst:
6022  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6023  * return v
6024  *
6025  */
6026  __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)
6027  try {
6028  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6029  } catch(...) {
6030  __Pyx_CppExn2PyErr();
6031  __PYX_ERR(0, 526, __pyx_L1_error)
6032  }
6033 
6034  /* "PyClical.pyx":525
6035  * """
6036  * cdef vector[scalar_t] v
6037  * for s in lst: # <<<<<<<<<<<<<<
6038  * v.push_back(<scalar_t>s)
6039  * return v
6040  */
6041  }
6042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6043 
6044  /* "PyClical.pyx":527
6045  * for s in lst:
6046  * v.push_back(<scalar_t>s)
6047  * return v # <<<<<<<<<<<<<<
6048  *
6049  * # Forward reference.
6050  */
6051  __pyx_r = __pyx_v_v;
6052  goto __pyx_L0;
6053 
6054  /* "PyClical.pyx":520
6055  * return glucat.max_pos( toIndexSet(obj) )
6056  *
6057  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6058  * """
6059  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6060  */
6061 
6062  /* function exit code */
6063  __pyx_L1_error:;
6064  __Pyx_XDECREF(__pyx_t_1);
6065  __Pyx_XDECREF(__pyx_t_4);
6066  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6067  __Pyx_pretend_to_initialize(&__pyx_r);
6068  __pyx_L0:;
6069  __Pyx_XDECREF(__pyx_v_s);
6070  __Pyx_RefNannyFinishContext();
6071  return __pyx_r;
6072  }
6073 
6074  /* "PyClical.pyx":532
6075  * cdef class clifford
6076  *
6077  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6078  * return clifford(obj).instance[0]
6079  *
6080  */
6081 
6082  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6083  Clifford __pyx_r;
6084  __Pyx_RefNannyDeclarations
6085  PyObject *__pyx_t_1 = NULL;
6086  __Pyx_RefNannySetupContext("toClifford", 0);
6087 
6088  /* "PyClical.pyx":533
6089  *
6090  * cdef inline Clifford toClifford(obj):
6091  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6092  *
6093  * cdef class clifford:
6094  */
6095  __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)
6096  __Pyx_GOTREF(__pyx_t_1);
6097  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6098  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6099  goto __pyx_L0;
6100 
6101  /* "PyClical.pyx":532
6102  * cdef class clifford
6103  *
6104  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6105  * return clifford(obj).instance[0]
6106  *
6107  */
6108 
6109  /* function exit code */
6110  __pyx_L1_error:;
6111  __Pyx_XDECREF(__pyx_t_1);
6112  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6113  __Pyx_pretend_to_initialize(&__pyx_r);
6114  __pyx_L0:;
6115  __Pyx_RefNannyFinishContext();
6116  return __pyx_r;
6117  }
6118 
6119  /* "PyClical.pyx":541
6120  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6121  *
6122  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6123  * """
6124  * Wrap an instance of the C++ class Clifford.
6125  */
6126 
6127  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6128  PyObject *__pyx_r = NULL;
6129  __Pyx_RefNannyDeclarations
6130  __Pyx_RefNannySetupContext("wrap", 0);
6131 
6132  /* "PyClical.pyx":545
6133  * Wrap an instance of the C++ class Clifford.
6134  * """
6135  * self.instance[0] = other # <<<<<<<<<<<<<<
6136  * return self
6137  *
6138  */
6139  (__pyx_v_self->instance[0]) = __pyx_v_other;
6140 
6141  /* "PyClical.pyx":546
6142  * """
6143  * self.instance[0] = other
6144  * return self # <<<<<<<<<<<<<<
6145  *
6146  * cdef inline Clifford unwrap(clifford self):
6147  */
6148  __Pyx_XDECREF(__pyx_r);
6149  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6150  __pyx_r = ((PyObject *)__pyx_v_self);
6151  goto __pyx_L0;
6152 
6153  /* "PyClical.pyx":541
6154  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6155  *
6156  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6157  * """
6158  * Wrap an instance of the C++ class Clifford.
6159  */
6160 
6161  /* function exit code */
6162  __pyx_L0:;
6163  __Pyx_XGIVEREF(__pyx_r);
6164  __Pyx_RefNannyFinishContext();
6165  return __pyx_r;
6166  }
6167 
6168  /* "PyClical.pyx":548
6169  * return self
6170  *
6171  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6172  * """
6173  * Return the wrapped C++ Clifford instance.
6174  */
6175 
6176  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6177  Clifford __pyx_r;
6178  __Pyx_RefNannyDeclarations
6179  __Pyx_RefNannySetupContext("unwrap", 0);
6180 
6181  /* "PyClical.pyx":552
6182  * Return the wrapped C++ Clifford instance.
6183  * """
6184  * return self.instance[0] # <<<<<<<<<<<<<<
6185  *
6186  * cpdef copy(clifford self):
6187  */
6188  __pyx_r = (__pyx_v_self->instance[0]);
6189  goto __pyx_L0;
6190 
6191  /* "PyClical.pyx":548
6192  * return self
6193  *
6194  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6195  * """
6196  * Return the wrapped C++ Clifford instance.
6197  */
6198 
6199  /* function exit code */
6200  __pyx_L0:;
6201  __Pyx_RefNannyFinishContext();
6202  return __pyx_r;
6203  }
6204 
6205  /* "PyClical.pyx":554
6206  * return self.instance[0]
6207  *
6208  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6209  * """
6210  * Copy this clifford object.
6211  */
6212 
6213  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6214  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6215  PyObject *__pyx_r = NULL;
6216  __Pyx_RefNannyDeclarations
6217  PyObject *__pyx_t_1 = NULL;
6218  PyObject *__pyx_t_2 = NULL;
6219  PyObject *__pyx_t_3 = NULL;
6220  PyObject *__pyx_t_4 = NULL;
6221  __Pyx_RefNannySetupContext("copy", 0);
6222  /* Check if called by wrapper */
6223  if (unlikely(__pyx_skip_dispatch)) ;
6224  /* Check if overridden in Python */
6225  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
6226  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6227  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6228  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6229  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6230  #endif
6231  __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)
6232  __Pyx_GOTREF(__pyx_t_1);
6233  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6234  __Pyx_XDECREF(__pyx_r);
6235  __Pyx_INCREF(__pyx_t_1);
6236  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6237  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6238  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6239  if (likely(__pyx_t_4)) {
6240  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6241  __Pyx_INCREF(__pyx_t_4);
6242  __Pyx_INCREF(function);
6243  __Pyx_DECREF_SET(__pyx_t_3, function);
6244  }
6245  }
6246  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6247  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6248  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6249  __Pyx_GOTREF(__pyx_t_2);
6250  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6251  __pyx_r = __pyx_t_2;
6252  __pyx_t_2 = 0;
6253  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6254  goto __pyx_L0;
6255  }
6256  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6257  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6258  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6259  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6260  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6261  }
6262  #endif
6263  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6264  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6265  }
6266  #endif
6267  }
6268 
6269  /* "PyClical.pyx":561
6270  * {2}
6271  * """
6272  * return clifford(self) # <<<<<<<<<<<<<<
6273  *
6274  * def __cinit__(self, other = 0, ixt = None):
6275  */
6276  __Pyx_XDECREF(__pyx_r);
6277  __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)
6278  __Pyx_GOTREF(__pyx_t_1);
6279  __pyx_r = __pyx_t_1;
6280  __pyx_t_1 = 0;
6281  goto __pyx_L0;
6282 
6283  /* "PyClical.pyx":554
6284  * return self.instance[0]
6285  *
6286  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6287  * """
6288  * Copy this clifford object.
6289  */
6290 
6291  /* function exit code */
6292  __pyx_L1_error:;
6293  __Pyx_XDECREF(__pyx_t_1);
6294  __Pyx_XDECREF(__pyx_t_2);
6295  __Pyx_XDECREF(__pyx_t_3);
6296  __Pyx_XDECREF(__pyx_t_4);
6297  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6298  __pyx_r = 0;
6299  __pyx_L0:;
6300  __Pyx_XGIVEREF(__pyx_r);
6301  __Pyx_RefNannyFinishContext();
6302  return __pyx_r;
6303  }
6304 
6305  /* Python wrapper */
6306  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6307  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 ";
6308  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6309  PyObject *__pyx_r = 0;
6310  __Pyx_RefNannyDeclarations
6311  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6312  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6313 
6314  /* function exit code */
6315  __Pyx_RefNannyFinishContext();
6316  return __pyx_r;
6317  }
6318 
6319  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6320  PyObject *__pyx_r = NULL;
6321  __Pyx_RefNannyDeclarations
6322  PyObject *__pyx_t_1 = NULL;
6323  __Pyx_RefNannySetupContext("copy", 0);
6324  __Pyx_XDECREF(__pyx_r);
6325  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6326  __Pyx_GOTREF(__pyx_t_1);
6327  __pyx_r = __pyx_t_1;
6328  __pyx_t_1 = 0;
6329  goto __pyx_L0;
6330 
6331  /* function exit code */
6332  __pyx_L1_error:;
6333  __Pyx_XDECREF(__pyx_t_1);
6334  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6335  __pyx_r = NULL;
6336  __pyx_L0:;
6337  __Pyx_XGIVEREF(__pyx_r);
6338  __Pyx_RefNannyFinishContext();
6339  return __pyx_r;
6340  }
6341 
6342  /* "PyClical.pyx":563
6343  * return clifford(self)
6344  *
6345  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6346  * """
6347  * Construct an object of type clifford.
6348  */
6349 
6350  /* Python wrapper */
6351  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6352  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6353  PyObject *__pyx_v_other = 0;
6354  PyObject *__pyx_v_ixt = 0;
6355  int __pyx_r;
6356  __Pyx_RefNannyDeclarations
6357  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6358  {
6359  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6360  PyObject* values[2] = {0,0};
6361  values[0] = ((PyObject *)__pyx_int_0);
6362  values[1] = ((PyObject *)Py_None);
6363  if (unlikely(__pyx_kwds)) {
6364  Py_ssize_t kw_args;
6365  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6366  switch (pos_args) {
6367  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6368  CYTHON_FALLTHROUGH;
6369  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6370  CYTHON_FALLTHROUGH;
6371  case 0: break;
6372  default: goto __pyx_L5_argtuple_error;
6373  }
6374  kw_args = PyDict_Size(__pyx_kwds);
6375  switch (pos_args) {
6376  case 0:
6377  if (kw_args > 0) {
6378  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6379  if (value) { values[0] = value; kw_args--; }
6380  }
6381  CYTHON_FALLTHROUGH;
6382  case 1:
6383  if (kw_args > 0) {
6384  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6385  if (value) { values[1] = value; kw_args--; }
6386  }
6387  }
6388  if (unlikely(kw_args > 0)) {
6389  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6390  }
6391  } else {
6392  switch (PyTuple_GET_SIZE(__pyx_args)) {
6393  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6394  CYTHON_FALLTHROUGH;
6395  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6396  CYTHON_FALLTHROUGH;
6397  case 0: break;
6398  default: goto __pyx_L5_argtuple_error;
6399  }
6400  }
6401  __pyx_v_other = values[0];
6402  __pyx_v_ixt = values[1];
6403  }
6404  goto __pyx_L4_argument_unpacking_done;
6405  __pyx_L5_argtuple_error:;
6406  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6407  __pyx_L3_error:;
6408  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6409  __Pyx_RefNannyFinishContext();
6410  return -1;
6411  __pyx_L4_argument_unpacking_done:;
6412  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6413 
6414  /* function exit code */
6415  __Pyx_RefNannyFinishContext();
6416  return __pyx_r;
6417  }
6418 
6419  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6420  PyObject *__pyx_v_error_msg_prefix = NULL;
6421  PyObject *__pyx_v_err = NULL;
6422  int __pyx_r;
6423  __Pyx_RefNannyDeclarations
6424  int __pyx_t_1;
6425  int __pyx_t_2;
6426  PyObject *__pyx_t_3 = NULL;
6427  PyObject *__pyx_t_4 = NULL;
6428  PyObject *__pyx_t_5 = NULL;
6429  Clifford *__pyx_t_6;
6430  PyObject *__pyx_t_7 = NULL;
6431  PyObject *__pyx_t_8 = NULL;
6432  scalar_t __pyx_t_9;
6433  PyObject *__pyx_t_10 = NULL;
6434  PyObject *__pyx_t_11 = NULL;
6435  PyObject *__pyx_t_12 = NULL;
6436  char *__pyx_t_13;
6437  int __pyx_t_14;
6438  PyObject *__pyx_t_15 = NULL;
6439  PyObject *__pyx_t_16 = NULL;
6440  PyObject *__pyx_t_17 = NULL;
6441  PyObject *__pyx_t_18 = NULL;
6442  __Pyx_RefNannySetupContext("__cinit__", 0);
6443 
6444  /* "PyClical.pyx":588
6445  * 2{1}+3{2}
6446  * """
6447  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6448  * if ixt is None:
6449  * try:
6450  */
6451  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6452  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6453 
6454  /* "PyClical.pyx":589
6455  * """
6456  * error_msg_prefix = "Cannot initialize clifford object from"
6457  * if ixt is None: # <<<<<<<<<<<<<<
6458  * try:
6459  * if isinstance(other, clifford):
6460  */
6461  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6462  __pyx_t_2 = (__pyx_t_1 != 0);
6463  if (__pyx_t_2) {
6464 
6465  /* "PyClical.pyx":590
6466  * error_msg_prefix = "Cannot initialize clifford object from"
6467  * if ixt is None:
6468  * try: # <<<<<<<<<<<<<<
6469  * if isinstance(other, clifford):
6470  * self.instance = new Clifford((<clifford>other).unwrap())
6471  */
6472  {
6473  __Pyx_PyThreadState_declare
6474  __Pyx_PyThreadState_assign
6475  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6476  __Pyx_XGOTREF(__pyx_t_3);
6477  __Pyx_XGOTREF(__pyx_t_4);
6478  __Pyx_XGOTREF(__pyx_t_5);
6479  /*try:*/ {
6480 
6481  /* "PyClical.pyx":591
6482  * if ixt is None:
6483  * try:
6484  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6485  * self.instance = new Clifford((<clifford>other).unwrap())
6486  * elif isinstance(other, index_set):
6487  */
6488  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6489  __pyx_t_1 = (__pyx_t_2 != 0);
6490  if (__pyx_t_1) {
6491 
6492  /* "PyClical.pyx":592
6493  * try:
6494  * if isinstance(other, clifford):
6495  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6496  * elif isinstance(other, index_set):
6497  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6498  */
6499  try {
6500  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6501  } catch(...) {
6502  __Pyx_CppExn2PyErr();
6503  __PYX_ERR(0, 592, __pyx_L4_error)
6504  }
6505  __pyx_v_self->instance = __pyx_t_6;
6506 
6507  /* "PyClical.pyx":591
6508  * if ixt is None:
6509  * try:
6510  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6511  * self.instance = new Clifford((<clifford>other).unwrap())
6512  * elif isinstance(other, index_set):
6513  */
6514  goto __pyx_L10;
6515  }
6516 
6517  /* "PyClical.pyx":593
6518  * if isinstance(other, clifford):
6519  * self.instance = new Clifford((<clifford>other).unwrap())
6520  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6521  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6522  * elif isinstance(other, numbers.Real):
6523  */
6524  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6525  __pyx_t_2 = (__pyx_t_1 != 0);
6526  if (__pyx_t_2) {
6527 
6528  /* "PyClical.pyx":594
6529  * self.instance = new Clifford((<clifford>other).unwrap())
6530  * elif isinstance(other, index_set):
6531  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6532  * elif isinstance(other, numbers.Real):
6533  * self.instance = new Clifford(<scalar_t>other)
6534  */
6535  try {
6536  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6537  } catch(...) {
6538  __Pyx_CppExn2PyErr();
6539  __PYX_ERR(0, 594, __pyx_L4_error)
6540  }
6541  __pyx_v_self->instance = __pyx_t_6;
6542 
6543  /* "PyClical.pyx":593
6544  * if isinstance(other, clifford):
6545  * self.instance = new Clifford((<clifford>other).unwrap())
6546  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6547  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6548  * elif isinstance(other, numbers.Real):
6549  */
6550  goto __pyx_L10;
6551  }
6552 
6553  /* "PyClical.pyx":595
6554  * elif isinstance(other, index_set):
6555  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6556  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6557  * self.instance = new Clifford(<scalar_t>other)
6558  * elif isinstance(other, str):
6559  */
6560  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6561  __Pyx_GOTREF(__pyx_t_7);
6562  __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)
6563  __Pyx_GOTREF(__pyx_t_8);
6564  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6565  __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)
6566  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6567  __pyx_t_1 = (__pyx_t_2 != 0);
6568  if (__pyx_t_1) {
6569 
6570  /* "PyClical.pyx":596
6571  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6572  * elif isinstance(other, numbers.Real):
6573  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6574  * elif isinstance(other, str):
6575  * try:
6576  */
6577  __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)
6578  try {
6579  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6580  } catch(...) {
6581  __Pyx_CppExn2PyErr();
6582  __PYX_ERR(0, 596, __pyx_L4_error)
6583  }
6584  __pyx_v_self->instance = __pyx_t_6;
6585 
6586  /* "PyClical.pyx":595
6587  * elif isinstance(other, index_set):
6588  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6589  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6590  * self.instance = new Clifford(<scalar_t>other)
6591  * elif isinstance(other, str):
6592  */
6593  goto __pyx_L10;
6594  }
6595 
6596  /* "PyClical.pyx":597
6597  * elif isinstance(other, numbers.Real):
6598  * self.instance = new Clifford(<scalar_t>other)
6599  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6600  * try:
6601  * self.instance = new Clifford(<char *>other)
6602  */
6603  __pyx_t_1 = PyString_Check(__pyx_v_other);
6604  __pyx_t_2 = (__pyx_t_1 != 0);
6605  if (likely(__pyx_t_2)) {
6606 
6607  /* "PyClical.pyx":598
6608  * self.instance = new Clifford(<scalar_t>other)
6609  * elif isinstance(other, str):
6610  * try: # <<<<<<<<<<<<<<
6611  * self.instance = new Clifford(<char *>other)
6612  * except RuntimeError:
6613  */
6614  {
6615  __Pyx_PyThreadState_declare
6616  __Pyx_PyThreadState_assign
6617  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6618  __Pyx_XGOTREF(__pyx_t_10);
6619  __Pyx_XGOTREF(__pyx_t_11);
6620  __Pyx_XGOTREF(__pyx_t_12);
6621  /*try:*/ {
6622 
6623  /* "PyClical.pyx":599
6624  * elif isinstance(other, str):
6625  * try:
6626  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6627  * except RuntimeError:
6628  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6629  */
6630  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6631  try {
6632  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6633  } catch(...) {
6634  __Pyx_CppExn2PyErr();
6635  __PYX_ERR(0, 599, __pyx_L11_error)
6636  }
6637  __pyx_v_self->instance = __pyx_t_6;
6638 
6639  /* "PyClical.pyx":598
6640  * self.instance = new Clifford(<scalar_t>other)
6641  * elif isinstance(other, str):
6642  * try: # <<<<<<<<<<<<<<
6643  * self.instance = new Clifford(<char *>other)
6644  * except RuntimeError:
6645  */
6646  }
6647  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6648  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6649  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6650  goto __pyx_L16_try_end;
6651  __pyx_L11_error:;
6652  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6653  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6654 
6655  /* "PyClical.pyx":600
6656  * try:
6657  * self.instance = new Clifford(<char *>other)
6658  * except RuntimeError: # <<<<<<<<<<<<<<
6659  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6660  * else:
6661  */
6662  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6663  if (__pyx_t_14) {
6664  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6665  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6666  __Pyx_GOTREF(__pyx_t_8);
6667  __Pyx_GOTREF(__pyx_t_7);
6668  __Pyx_GOTREF(__pyx_t_15);
6669 
6670  /* "PyClical.pyx":601
6671  * self.instance = new Clifford(<char *>other)
6672  * except RuntimeError:
6673  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6674  * else:
6675  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6676  */
6677  __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)
6678  __Pyx_GOTREF(__pyx_t_16);
6679  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6680  __Pyx_GOTREF(__pyx_t_17);
6681  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6682  __Pyx_GOTREF(__pyx_t_18);
6683  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6684  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6685  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6686  __Pyx_GOTREF(__pyx_t_17);
6687  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6688  __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)
6689  __Pyx_GOTREF(__pyx_t_18);
6690  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6691  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6692  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6693  __PYX_ERR(0, 601, __pyx_L13_except_error)
6694  }
6695  goto __pyx_L13_except_error;
6696  __pyx_L13_except_error:;
6697 
6698  /* "PyClical.pyx":598
6699  * self.instance = new Clifford(<scalar_t>other)
6700  * elif isinstance(other, str):
6701  * try: # <<<<<<<<<<<<<<
6702  * self.instance = new Clifford(<char *>other)
6703  * except RuntimeError:
6704  */
6705  __Pyx_XGIVEREF(__pyx_t_10);
6706  __Pyx_XGIVEREF(__pyx_t_11);
6707  __Pyx_XGIVEREF(__pyx_t_12);
6708  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6709  goto __pyx_L4_error;
6710  __pyx_L16_try_end:;
6711  }
6712 
6713  /* "PyClical.pyx":597
6714  * elif isinstance(other, numbers.Real):
6715  * self.instance = new Clifford(<scalar_t>other)
6716  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6717  * try:
6718  * self.instance = new Clifford(<char *>other)
6719  */
6720  goto __pyx_L10;
6721  }
6722 
6723  /* "PyClical.pyx":603
6724  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6725  * else:
6726  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6727  * except RuntimeError as err:
6728  * raise ValueError(error_msg_prefix + " " + str(type(other))
6729  */
6730  /*else*/ {
6731  __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)
6732  __Pyx_GOTREF(__pyx_t_15);
6733  __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)
6734  __Pyx_GOTREF(__pyx_t_7);
6735  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6736  __Pyx_GOTREF(__pyx_t_8);
6737  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6738  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6739  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6740  __Pyx_GOTREF(__pyx_t_7);
6741  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6742  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6743  __Pyx_GOTREF(__pyx_t_8);
6744  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6745  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6746  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6747  __PYX_ERR(0, 603, __pyx_L4_error)
6748  }
6749  __pyx_L10:;
6750 
6751  /* "PyClical.pyx":590
6752  * error_msg_prefix = "Cannot initialize clifford object from"
6753  * if ixt is None:
6754  * try: # <<<<<<<<<<<<<<
6755  * if isinstance(other, clifford):
6756  * self.instance = new Clifford((<clifford>other).unwrap())
6757  */
6758  }
6759  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6760  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6761  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6762  goto __pyx_L9_try_end;
6763  __pyx_L4_error:;
6764  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6765  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6766  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6767  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6768  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6769  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6770 
6771  /* "PyClical.pyx":604
6772  * else:
6773  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6774  * except RuntimeError as err: # <<<<<<<<<<<<<<
6775  * raise ValueError(error_msg_prefix + " " + str(type(other))
6776  * + " value " + repr(other) + ":"
6777  */
6778  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6779  if (__pyx_t_14) {
6780  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6781  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6782  __Pyx_GOTREF(__pyx_t_8);
6783  __Pyx_GOTREF(__pyx_t_7);
6784  __Pyx_GOTREF(__pyx_t_15);
6785  __Pyx_INCREF(__pyx_t_7);
6786  __pyx_v_err = __pyx_t_7;
6787 
6788  /* "PyClical.pyx":605
6789  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6790  * except RuntimeError as err:
6791  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6792  * + " value " + repr(other) + ":"
6793  * + "\n\t" + str(err))
6794  */
6795  __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)
6796  __Pyx_GOTREF(__pyx_t_18);
6797  __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)
6798  __Pyx_GOTREF(__pyx_t_17);
6799  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6800  __Pyx_GOTREF(__pyx_t_16);
6801  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6802  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6803 
6804  /* "PyClical.pyx":606
6805  * except RuntimeError as err:
6806  * raise ValueError(error_msg_prefix + " " + str(type(other))
6807  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6808  * + "\n\t" + str(err))
6809  * elif isinstance(ixt, index_set):
6810  */
6811  __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)
6812  __Pyx_GOTREF(__pyx_t_17);
6813  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6814  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6815  __Pyx_GOTREF(__pyx_t_16);
6816  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6817  __Pyx_GOTREF(__pyx_t_18);
6818  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6819  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6820  __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)
6821  __Pyx_GOTREF(__pyx_t_16);
6822  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6823 
6824  /* "PyClical.pyx":607
6825  * raise ValueError(error_msg_prefix + " " + str(type(other))
6826  * + " value " + repr(other) + ":"
6827  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6828  * elif isinstance(ixt, index_set):
6829  * if isinstance(other, numbers.Real):
6830  */
6831  __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)
6832  __Pyx_GOTREF(__pyx_t_18);
6833  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6834  __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)
6835  __Pyx_GOTREF(__pyx_t_16);
6836  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6837  __Pyx_GOTREF(__pyx_t_17);
6838  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6839  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6840 
6841  /* "PyClical.pyx":605
6842  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6843  * except RuntimeError as err:
6844  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6845  * + " value " + repr(other) + ":"
6846  * + "\n\t" + str(err))
6847  */
6848  __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)
6849  __Pyx_GOTREF(__pyx_t_16);
6850  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6851  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6852  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6853  __PYX_ERR(0, 605, __pyx_L6_except_error)
6854  }
6855  goto __pyx_L6_except_error;
6856  __pyx_L6_except_error:;
6857 
6858  /* "PyClical.pyx":590
6859  * error_msg_prefix = "Cannot initialize clifford object from"
6860  * if ixt is None:
6861  * try: # <<<<<<<<<<<<<<
6862  * if isinstance(other, clifford):
6863  * self.instance = new Clifford((<clifford>other).unwrap())
6864  */
6865  __Pyx_XGIVEREF(__pyx_t_3);
6866  __Pyx_XGIVEREF(__pyx_t_4);
6867  __Pyx_XGIVEREF(__pyx_t_5);
6868  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6869  goto __pyx_L1_error;
6870  __pyx_L9_try_end:;
6871  }
6872 
6873  /* "PyClical.pyx":589
6874  * """
6875  * error_msg_prefix = "Cannot initialize clifford object from"
6876  * if ixt is None: # <<<<<<<<<<<<<<
6877  * try:
6878  * if isinstance(other, clifford):
6879  */
6880  goto __pyx_L3;
6881  }
6882 
6883  /* "PyClical.pyx":608
6884  * + " value " + repr(other) + ":"
6885  * + "\n\t" + str(err))
6886  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6887  * if isinstance(other, numbers.Real):
6888  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6889  */
6890  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6891  __pyx_t_1 = (__pyx_t_2 != 0);
6892  if (likely(__pyx_t_1)) {
6893 
6894  /* "PyClical.pyx":609
6895  * + "\n\t" + str(err))
6896  * elif isinstance(ixt, index_set):
6897  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6898  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6899  * elif isinstance(other, collections.Sequence):
6900  */
6901  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6902  __Pyx_GOTREF(__pyx_t_15);
6903  __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)
6904  __Pyx_GOTREF(__pyx_t_7);
6905  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6906  __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)
6907  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6908  __pyx_t_2 = (__pyx_t_1 != 0);
6909  if (__pyx_t_2) {
6910 
6911  /* "PyClical.pyx":610
6912  * elif isinstance(ixt, index_set):
6913  * if isinstance(other, numbers.Real):
6914  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6915  * elif isinstance(other, collections.Sequence):
6916  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6917  */
6918  __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)
6919  try {
6920  __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));
6921  } catch(...) {
6922  __Pyx_CppExn2PyErr();
6923  __PYX_ERR(0, 610, __pyx_L1_error)
6924  }
6925  __pyx_v_self->instance = __pyx_t_6;
6926 
6927  /* "PyClical.pyx":609
6928  * + "\n\t" + str(err))
6929  * elif isinstance(ixt, index_set):
6930  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6931  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6932  * elif isinstance(other, collections.Sequence):
6933  */
6934  goto __pyx_L21;
6935  }
6936 
6937  /* "PyClical.pyx":611
6938  * if isinstance(other, numbers.Real):
6939  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6940  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6941  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6942  * else:
6943  */
6944  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6945  __Pyx_GOTREF(__pyx_t_7);
6946  __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)
6947  __Pyx_GOTREF(__pyx_t_15);
6948  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6949  __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)
6950  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6951  __pyx_t_1 = (__pyx_t_2 != 0);
6952  if (likely(__pyx_t_1)) {
6953 
6954  /* "PyClical.pyx":612
6955  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6956  * elif isinstance(other, collections.Sequence):
6957  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6958  * else:
6959  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6960  */
6961  try {
6962  __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)));
6963  } catch(...) {
6964  __Pyx_CppExn2PyErr();
6965  __PYX_ERR(0, 612, __pyx_L1_error)
6966  }
6967  __pyx_v_self->instance = __pyx_t_6;
6968 
6969  /* "PyClical.pyx":611
6970  * if isinstance(other, numbers.Real):
6971  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6972  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6973  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6974  * else:
6975  */
6976  goto __pyx_L21;
6977  }
6978 
6979  /* "PyClical.pyx":614
6980  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6981  * else:
6982  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6983  * + ", " + repr(ixt) + ").")
6984  * else:
6985  */
6986  /*else*/ {
6987  __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)
6988  __Pyx_GOTREF(__pyx_t_15);
6989  __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)
6990  __Pyx_GOTREF(__pyx_t_7);
6991  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6992  __Pyx_GOTREF(__pyx_t_8);
6993  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6994  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6995 
6996  /* "PyClical.pyx":615
6997  * else:
6998  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6999  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7000  * else:
7001  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7002  */
7003  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7004  __Pyx_GOTREF(__pyx_t_7);
7005  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7006  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7007  __Pyx_GOTREF(__pyx_t_8);
7008  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
7009  __Pyx_GOTREF(__pyx_t_15);
7010  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7011  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7012  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7013  __Pyx_GOTREF(__pyx_t_8);
7014  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7015 
7016  /* "PyClical.pyx":614
7017  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7018  * else:
7019  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7020  * + ", " + repr(ixt) + ").")
7021  * else:
7022  */
7023  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7024  __Pyx_GOTREF(__pyx_t_15);
7025  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7026  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7027  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7028  __PYX_ERR(0, 614, __pyx_L1_error)
7029  }
7030  __pyx_L21:;
7031 
7032  /* "PyClical.pyx":608
7033  * + " value " + repr(other) + ":"
7034  * + "\n\t" + str(err))
7035  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7036  * if isinstance(other, numbers.Real):
7037  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7038  */
7039  goto __pyx_L3;
7040  }
7041 
7042  /* "PyClical.pyx":617
7043  * + ", " + repr(ixt) + ").")
7044  * else:
7045  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7046  * + ", " + str(type(ixt)) + ").")
7047  *
7048  */
7049  /*else*/ {
7050  __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)
7051  __Pyx_GOTREF(__pyx_t_15);
7052  __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)
7053  __Pyx_GOTREF(__pyx_t_8);
7054  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7055  __Pyx_GOTREF(__pyx_t_7);
7056  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7057  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7058 
7059  /* "PyClical.pyx":618
7060  * else:
7061  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7062  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7063  *
7064  * def __dealloc__(self):
7065  */
7066  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7067  __Pyx_GOTREF(__pyx_t_8);
7068  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7069  __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)
7070  __Pyx_GOTREF(__pyx_t_7);
7071  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7072  __Pyx_GOTREF(__pyx_t_15);
7073  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7074  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7075  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7076  __Pyx_GOTREF(__pyx_t_7);
7077  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7078 
7079  /* "PyClical.pyx":617
7080  * + ", " + repr(ixt) + ").")
7081  * else:
7082  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7083  * + ", " + str(type(ixt)) + ").")
7084  *
7085  */
7086  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7087  __Pyx_GOTREF(__pyx_t_15);
7088  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7089  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7090  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7091  __PYX_ERR(0, 617, __pyx_L1_error)
7092  }
7093  __pyx_L3:;
7094 
7095  /* "PyClical.pyx":563
7096  * return clifford(self)
7097  *
7098  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7099  * """
7100  * Construct an object of type clifford.
7101  */
7102 
7103  /* function exit code */
7104  __pyx_r = 0;
7105  goto __pyx_L0;
7106  __pyx_L1_error:;
7107  __Pyx_XDECREF(__pyx_t_7);
7108  __Pyx_XDECREF(__pyx_t_8);
7109  __Pyx_XDECREF(__pyx_t_15);
7110  __Pyx_XDECREF(__pyx_t_16);
7111  __Pyx_XDECREF(__pyx_t_17);
7112  __Pyx_XDECREF(__pyx_t_18);
7113  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7114  __pyx_r = -1;
7115  __pyx_L0:;
7116  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7117  __Pyx_XDECREF(__pyx_v_err);
7118  __Pyx_RefNannyFinishContext();
7119  return __pyx_r;
7120  }
7121 
7122  /* "PyClical.pyx":620
7123  * + ", " + str(type(ixt)) + ").")
7124  *
7125  * def __dealloc__(self): # <<<<<<<<<<<<<<
7126  * """
7127  * Clean up by deallocating the instance of C++ class Clifford.
7128  */
7129 
7130  /* Python wrapper */
7131  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7132  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7133  __Pyx_RefNannyDeclarations
7134  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7135  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7136 
7137  /* function exit code */
7138  __Pyx_RefNannyFinishContext();
7139  }
7140 
7141  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7142  __Pyx_RefNannyDeclarations
7143  __Pyx_RefNannySetupContext("__dealloc__", 0);
7144 
7145  /* "PyClical.pyx":624
7146  * Clean up by deallocating the instance of C++ class Clifford.
7147  * """
7148  * del self.instance # <<<<<<<<<<<<<<
7149  *
7150  * def __contains__(self, x):
7151  */
7152  delete __pyx_v_self->instance;
7153 
7154  /* "PyClical.pyx":620
7155  * + ", " + str(type(ixt)) + ").")
7156  *
7157  * def __dealloc__(self): # <<<<<<<<<<<<<<
7158  * """
7159  * Clean up by deallocating the instance of C++ class Clifford.
7160  */
7161 
7162  /* function exit code */
7163  __Pyx_RefNannyFinishContext();
7164  }
7165 
7166  /* "PyClical.pyx":626
7167  * del self.instance
7168  *
7169  * def __contains__(self, x): # <<<<<<<<<<<<<<
7170  * """
7171  * Not applicable.
7172  */
7173 
7174  /* Python wrapper */
7175  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7176  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 ";
7177  #if CYTHON_COMPILING_IN_CPYTHON
7178  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7179  #endif
7180  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7181  int __pyx_r;
7182  __Pyx_RefNannyDeclarations
7183  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7184  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7185 
7186  /* function exit code */
7187  __Pyx_RefNannyFinishContext();
7188  return __pyx_r;
7189  }
7190 
7191  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7192  int __pyx_r;
7193  __Pyx_RefNannyDeclarations
7194  PyObject *__pyx_t_1 = NULL;
7195  __Pyx_RefNannySetupContext("__contains__", 0);
7196 
7197  /* "PyClical.pyx":635
7198  * TypeError: Not applicable.
7199  * """
7200  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7201  *
7202  * def __iter__(self):
7203  */
7204  __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)
7205  __Pyx_GOTREF(__pyx_t_1);
7206  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7207  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7208  __PYX_ERR(0, 635, __pyx_L1_error)
7209 
7210  /* "PyClical.pyx":626
7211  * del self.instance
7212  *
7213  * def __contains__(self, x): # <<<<<<<<<<<<<<
7214  * """
7215  * Not applicable.
7216  */
7217 
7218  /* function exit code */
7219  __pyx_L1_error:;
7220  __Pyx_XDECREF(__pyx_t_1);
7221  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7222  __pyx_r = -1;
7223  __Pyx_RefNannyFinishContext();
7224  return __pyx_r;
7225  }
7226 
7227  /* "PyClical.pyx":637
7228  * raise TypeError("Not applicable.")
7229  *
7230  * def __iter__(self): # <<<<<<<<<<<<<<
7231  * """
7232  * Not applicable.
7233  */
7234 
7235  /* Python wrapper */
7236  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7237  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 ";
7238  #if CYTHON_COMPILING_IN_CPYTHON
7239  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7240  #endif
7241  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7242  PyObject *__pyx_r = 0;
7243  __Pyx_RefNannyDeclarations
7244  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7245  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7246 
7247  /* function exit code */
7248  __Pyx_RefNannyFinishContext();
7249  return __pyx_r;
7250  }
7251 
7252  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7253  PyObject *__pyx_r = NULL;
7254  __Pyx_RefNannyDeclarations
7255  PyObject *__pyx_t_1 = NULL;
7256  __Pyx_RefNannySetupContext("__iter__", 0);
7257 
7258  /* "PyClical.pyx":646
7259  * TypeError: Not applicable.
7260  * """
7261  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7262  *
7263  * def reframe(self, ixt):
7264  */
7265  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
7266  __Pyx_GOTREF(__pyx_t_1);
7267  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7268  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7269  __PYX_ERR(0, 646, __pyx_L1_error)
7270 
7271  /* "PyClical.pyx":637
7272  * raise TypeError("Not applicable.")
7273  *
7274  * def __iter__(self): # <<<<<<<<<<<<<<
7275  * """
7276  * Not applicable.
7277  */
7278 
7279  /* function exit code */
7280  __pyx_L1_error:;
7281  __Pyx_XDECREF(__pyx_t_1);
7282  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7283  __pyx_r = NULL;
7284  __Pyx_XGIVEREF(__pyx_r);
7285  __Pyx_RefNannyFinishContext();
7286  return __pyx_r;
7287  }
7288 
7289  /* "PyClical.pyx":648
7290  * raise TypeError("Not applicable.")
7291  *
7292  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7293  * """
7294  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7295  */
7296 
7297  /* Python wrapper */
7298  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7299  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 ";
7300  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7301  PyObject *__pyx_r = 0;
7302  __Pyx_RefNannyDeclarations
7303  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7304  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7305 
7306  /* function exit code */
7307  __Pyx_RefNannyFinishContext();
7308  return __pyx_r;
7309  }
7310 
7311  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7312  PyObject *__pyx_v_error_msg_prefix = NULL;
7313  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7314  PyObject *__pyx_v_err = NULL;
7315  PyObject *__pyx_r = NULL;
7316  __Pyx_RefNannyDeclarations
7317  int __pyx_t_1;
7318  int __pyx_t_2;
7319  PyObject *__pyx_t_3 = NULL;
7320  PyObject *__pyx_t_4 = NULL;
7321  PyObject *__pyx_t_5 = NULL;
7322  PyObject *__pyx_t_6 = NULL;
7323  Clifford *__pyx_t_7;
7324  int __pyx_t_8;
7325  PyObject *__pyx_t_9 = NULL;
7326  PyObject *__pyx_t_10 = NULL;
7327  PyObject *__pyx_t_11 = NULL;
7328  PyObject *__pyx_t_12 = NULL;
7329  PyObject *__pyx_t_13 = NULL;
7330  __Pyx_RefNannySetupContext("reframe", 0);
7331 
7332  /* "PyClical.pyx":658
7333  * True
7334  * """
7335  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7336  * if isinstance(ixt, index_set):
7337  * try:
7338  */
7339  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7340  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7341 
7342  /* "PyClical.pyx":659
7343  * """
7344  * error_msg_prefix = "Cannot reframe"
7345  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7346  * try:
7347  * result = clifford()
7348  */
7349  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7350  __pyx_t_2 = (__pyx_t_1 != 0);
7351  if (likely(__pyx_t_2)) {
7352 
7353  /* "PyClical.pyx":660
7354  * error_msg_prefix = "Cannot reframe"
7355  * if isinstance(ixt, index_set):
7356  * try: # <<<<<<<<<<<<<<
7357  * result = clifford()
7358  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7359  */
7360  {
7361  __Pyx_PyThreadState_declare
7362  __Pyx_PyThreadState_assign
7363  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7364  __Pyx_XGOTREF(__pyx_t_3);
7365  __Pyx_XGOTREF(__pyx_t_4);
7366  __Pyx_XGOTREF(__pyx_t_5);
7367  /*try:*/ {
7368 
7369  /* "PyClical.pyx":661
7370  * if isinstance(ixt, index_set):
7371  * try:
7372  * result = clifford() # <<<<<<<<<<<<<<
7373  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7374  * except RuntimeError as err:
7375  */
7376  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7377  __Pyx_GOTREF(__pyx_t_6);
7378  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7379  __pyx_t_6 = 0;
7380 
7381  /* "PyClical.pyx":662
7382  * try:
7383  * result = clifford()
7384  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7385  * except RuntimeError as err:
7386  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7387  */
7388  try {
7389  __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)));
7390  } catch(...) {
7391  __Pyx_CppExn2PyErr();
7392  __PYX_ERR(0, 662, __pyx_L4_error)
7393  }
7394  __pyx_v_result->instance = __pyx_t_7;
7395 
7396  /* "PyClical.pyx":660
7397  * error_msg_prefix = "Cannot reframe"
7398  * if isinstance(ixt, index_set):
7399  * try: # <<<<<<<<<<<<<<
7400  * result = clifford()
7401  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7402  */
7403  }
7404  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7405  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7406  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7407  goto __pyx_L9_try_end;
7408  __pyx_L4_error:;
7409  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7410 
7411  /* "PyClical.pyx":663
7412  * result = clifford()
7413  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7414  * except RuntimeError as err: # <<<<<<<<<<<<<<
7415  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7416  * + str(ixt) + ":"
7417  */
7418  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7419  if (__pyx_t_8) {
7420  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7421  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7422  __Pyx_GOTREF(__pyx_t_6);
7423  __Pyx_GOTREF(__pyx_t_9);
7424  __Pyx_GOTREF(__pyx_t_10);
7425  __Pyx_INCREF(__pyx_t_9);
7426  __pyx_v_err = __pyx_t_9;
7427 
7428  /* "PyClical.pyx":664
7429  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7430  * except RuntimeError as err:
7431  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7432  * + str(ixt) + ":"
7433  * + "\n\t" + str(err))
7434  */
7435  __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)
7436  __Pyx_GOTREF(__pyx_t_11);
7437  __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)
7438  __Pyx_GOTREF(__pyx_t_12);
7439  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7440  __Pyx_GOTREF(__pyx_t_13);
7441  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7442  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7443  __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)
7444  __Pyx_GOTREF(__pyx_t_12);
7445  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7446 
7447  /* "PyClical.pyx":665
7448  * except RuntimeError as err:
7449  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7450  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7451  * + "\n\t" + str(err))
7452  * else:
7453  */
7454  __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)
7455  __Pyx_GOTREF(__pyx_t_13);
7456  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7457  __Pyx_GOTREF(__pyx_t_11);
7458  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7459  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7460  __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)
7461  __Pyx_GOTREF(__pyx_t_13);
7462  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7463 
7464  /* "PyClical.pyx":666
7465  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7466  * + str(ixt) + ":"
7467  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7468  * else:
7469  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7470  */
7471  __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)
7472  __Pyx_GOTREF(__pyx_t_11);
7473  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7474  __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)
7475  __Pyx_GOTREF(__pyx_t_13);
7476  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7477  __Pyx_GOTREF(__pyx_t_12);
7478  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7479  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7480 
7481  /* "PyClical.pyx":664
7482  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7483  * except RuntimeError as err:
7484  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7485  * + str(ixt) + ":"
7486  * + "\n\t" + str(err))
7487  */
7488  __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)
7489  __Pyx_GOTREF(__pyx_t_13);
7490  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7491  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7492  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7493  __PYX_ERR(0, 664, __pyx_L6_except_error)
7494  }
7495  goto __pyx_L6_except_error;
7496  __pyx_L6_except_error:;
7497 
7498  /* "PyClical.pyx":660
7499  * error_msg_prefix = "Cannot reframe"
7500  * if isinstance(ixt, index_set):
7501  * try: # <<<<<<<<<<<<<<
7502  * result = clifford()
7503  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7504  */
7505  __Pyx_XGIVEREF(__pyx_t_3);
7506  __Pyx_XGIVEREF(__pyx_t_4);
7507  __Pyx_XGIVEREF(__pyx_t_5);
7508  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7509  goto __pyx_L1_error;
7510  __pyx_L9_try_end:;
7511  }
7512 
7513  /* "PyClical.pyx":659
7514  * """
7515  * error_msg_prefix = "Cannot reframe"
7516  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7517  * try:
7518  * result = clifford()
7519  */
7520  goto __pyx_L3;
7521  }
7522 
7523  /* "PyClical.pyx":668
7524  * + "\n\t" + str(err))
7525  * else:
7526  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7527  * return result
7528  *
7529  */
7530  /*else*/ {
7531  __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)
7532  __Pyx_GOTREF(__pyx_t_10);
7533  __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)
7534  __Pyx_GOTREF(__pyx_t_9);
7535  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7536  __Pyx_GOTREF(__pyx_t_6);
7537  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7538  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7539  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7540  __Pyx_GOTREF(__pyx_t_9);
7541  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7542  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7543  __Pyx_GOTREF(__pyx_t_6);
7544  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7545  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7546  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7547  __PYX_ERR(0, 668, __pyx_L1_error)
7548  }
7549  __pyx_L3:;
7550 
7551  /* "PyClical.pyx":669
7552  * else:
7553  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7554  * return result # <<<<<<<<<<<<<<
7555  *
7556  * def __richcmp__(lhs, rhs, int op):
7557  */
7558  __Pyx_XDECREF(__pyx_r);
7559  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7560  __pyx_r = ((PyObject *)__pyx_v_result);
7561  goto __pyx_L0;
7562 
7563  /* "PyClical.pyx":648
7564  * raise TypeError("Not applicable.")
7565  *
7566  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7567  * """
7568  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7569  */
7570 
7571  /* function exit code */
7572  __pyx_L1_error:;
7573  __Pyx_XDECREF(__pyx_t_6);
7574  __Pyx_XDECREF(__pyx_t_9);
7575  __Pyx_XDECREF(__pyx_t_10);
7576  __Pyx_XDECREF(__pyx_t_11);
7577  __Pyx_XDECREF(__pyx_t_12);
7578  __Pyx_XDECREF(__pyx_t_13);
7579  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7580  __pyx_r = NULL;
7581  __pyx_L0:;
7582  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7583  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7584  __Pyx_XDECREF(__pyx_v_err);
7585  __Pyx_XGIVEREF(__pyx_r);
7586  __Pyx_RefNannyFinishContext();
7587  return __pyx_r;
7588  }
7589 
7590  /* "PyClical.pyx":671
7591  * return result
7592  *
7593  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7594  * """
7595  * Compare objects of type clifford.
7596  */
7597 
7598  /* Python wrapper */
7599  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7600  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7601  PyObject *__pyx_r = 0;
7602  __Pyx_RefNannyDeclarations
7603  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7604  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7605 
7606  /* function exit code */
7607  __Pyx_RefNannyFinishContext();
7608  return __pyx_r;
7609  }
7610 
7611  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7612  PyObject *__pyx_r = NULL;
7613  __Pyx_RefNannyDeclarations
7614  int __pyx_t_1;
7615  int __pyx_t_2;
7616  int __pyx_t_3;
7617  PyObject *__pyx_t_4 = NULL;
7618  PyObject *__pyx_t_5 = NULL;
7619  PyObject *__pyx_t_6 = NULL;
7620  __Pyx_RefNannySetupContext("__richcmp__", 0);
7621 
7622  /* "PyClical.pyx":690
7623  * True
7624  * """
7625  * if op == 2: # == # <<<<<<<<<<<<<<
7626  * if (lhs is None) or (rhs is None):
7627  * return bool(lhs is rhs)
7628  */
7629  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7630  if (__pyx_t_1) {
7631 
7632  /* "PyClical.pyx":691
7633  * """
7634  * if op == 2: # ==
7635  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7636  * return bool(lhs is rhs)
7637  * else:
7638  */
7639  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7640  __pyx_t_3 = (__pyx_t_2 != 0);
7641  if (!__pyx_t_3) {
7642  } else {
7643  __pyx_t_1 = __pyx_t_3;
7644  goto __pyx_L5_bool_binop_done;
7645  }
7646  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7647  __pyx_t_2 = (__pyx_t_3 != 0);
7648  __pyx_t_1 = __pyx_t_2;
7649  __pyx_L5_bool_binop_done:;
7650  if (__pyx_t_1) {
7651 
7652  /* "PyClical.pyx":692
7653  * if op == 2: # ==
7654  * if (lhs is None) or (rhs is None):
7655  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7656  * else:
7657  * return bool( toClifford(lhs) == toClifford(rhs) )
7658  */
7659  __Pyx_XDECREF(__pyx_r);
7660  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7661  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7662  __Pyx_GOTREF(__pyx_t_4);
7663  __pyx_r = __pyx_t_4;
7664  __pyx_t_4 = 0;
7665  goto __pyx_L0;
7666 
7667  /* "PyClical.pyx":691
7668  * """
7669  * if op == 2: # ==
7670  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7671  * return bool(lhs is rhs)
7672  * else:
7673  */
7674  }
7675 
7676  /* "PyClical.pyx":694
7677  * return bool(lhs is rhs)
7678  * else:
7679  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7680  * elif op == 3: # !=
7681  * if (lhs is None) or (rhs is None):
7682  */
7683  /*else*/ {
7684  __Pyx_XDECREF(__pyx_r);
7685  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7686  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7687  __Pyx_GOTREF(__pyx_t_4);
7688  __pyx_r = __pyx_t_4;
7689  __pyx_t_4 = 0;
7690  goto __pyx_L0;
7691  }
7692 
7693  /* "PyClical.pyx":690
7694  * True
7695  * """
7696  * if op == 2: # == # <<<<<<<<<<<<<<
7697  * if (lhs is None) or (rhs is None):
7698  * return bool(lhs is rhs)
7699  */
7700  }
7701 
7702  /* "PyClical.pyx":695
7703  * else:
7704  * return bool( toClifford(lhs) == toClifford(rhs) )
7705  * elif op == 3: # != # <<<<<<<<<<<<<<
7706  * if (lhs is None) or (rhs is None):
7707  * return not bool(lhs is rhs)
7708  */
7709  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7710  if (__pyx_t_1) {
7711 
7712  /* "PyClical.pyx":696
7713  * return bool( toClifford(lhs) == toClifford(rhs) )
7714  * elif op == 3: # !=
7715  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7716  * return not bool(lhs is rhs)
7717  * else:
7718  */
7719  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7720  __pyx_t_3 = (__pyx_t_2 != 0);
7721  if (!__pyx_t_3) {
7722  } else {
7723  __pyx_t_1 = __pyx_t_3;
7724  goto __pyx_L8_bool_binop_done;
7725  }
7726  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7727  __pyx_t_2 = (__pyx_t_3 != 0);
7728  __pyx_t_1 = __pyx_t_2;
7729  __pyx_L8_bool_binop_done:;
7730  if (__pyx_t_1) {
7731 
7732  /* "PyClical.pyx":697
7733  * elif op == 3: # !=
7734  * if (lhs is None) or (rhs is None):
7735  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7736  * else:
7737  * return bool( toClifford(lhs) != toClifford(rhs) )
7738  */
7739  __Pyx_XDECREF(__pyx_r);
7740  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7741  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7742  __Pyx_GOTREF(__pyx_t_4);
7743  __pyx_r = __pyx_t_4;
7744  __pyx_t_4 = 0;
7745  goto __pyx_L0;
7746 
7747  /* "PyClical.pyx":696
7748  * return bool( toClifford(lhs) == toClifford(rhs) )
7749  * elif op == 3: # !=
7750  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7751  * return not bool(lhs is rhs)
7752  * else:
7753  */
7754  }
7755 
7756  /* "PyClical.pyx":699
7757  * return not bool(lhs is rhs)
7758  * else:
7759  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7760  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7761  * raise TypeError("This comparison operator is not implemented for "
7762  */
7763  /*else*/ {
7764  __Pyx_XDECREF(__pyx_r);
7765  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7766  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7767  __Pyx_GOTREF(__pyx_t_4);
7768  __pyx_r = __pyx_t_4;
7769  __pyx_t_4 = 0;
7770  goto __pyx_L0;
7771  }
7772 
7773  /* "PyClical.pyx":695
7774  * else:
7775  * return bool( toClifford(lhs) == toClifford(rhs) )
7776  * elif op == 3: # != # <<<<<<<<<<<<<<
7777  * if (lhs is None) or (rhs is None):
7778  * return not bool(lhs is rhs)
7779  */
7780  }
7781 
7782  /* "PyClical.pyx":700
7783  * else:
7784  * return bool( toClifford(lhs) != toClifford(rhs) )
7785  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7786  * raise TypeError("This comparison operator is not implemented for "
7787  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7788  */
7789  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7790  __pyx_t_3 = (__pyx_t_2 != 0);
7791  if (!__pyx_t_3) {
7792  } else {
7793  __pyx_t_1 = __pyx_t_3;
7794  goto __pyx_L10_bool_binop_done;
7795  }
7796  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7797  __pyx_t_2 = (__pyx_t_3 != 0);
7798  __pyx_t_1 = __pyx_t_2;
7799  __pyx_L10_bool_binop_done:;
7800  if (unlikely(__pyx_t_1)) {
7801 
7802  /* "PyClical.pyx":702
7803  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7804  * raise TypeError("This comparison operator is not implemented for "
7805  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7806  * else:
7807  * return NotImplemented
7808  */
7809  __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)
7810  __Pyx_GOTREF(__pyx_t_4);
7811  __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)
7812  __Pyx_GOTREF(__pyx_t_5);
7813  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7814  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7815  __Pyx_GOTREF(__pyx_t_4);
7816  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7817  __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)
7818  __Pyx_GOTREF(__pyx_t_5);
7819  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7820  __Pyx_GOTREF(__pyx_t_6);
7821  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7822  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7823  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7824  __Pyx_GOTREF(__pyx_t_5);
7825  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7826 
7827  /* "PyClical.pyx":701
7828  * return bool( toClifford(lhs) != toClifford(rhs) )
7829  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7830  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7831  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7832  * else:
7833  */
7834  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7835  __Pyx_GOTREF(__pyx_t_6);
7836  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7837  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7838  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7839  __PYX_ERR(0, 701, __pyx_L1_error)
7840 
7841  /* "PyClical.pyx":700
7842  * else:
7843  * return bool( toClifford(lhs) != toClifford(rhs) )
7844  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7845  * raise TypeError("This comparison operator is not implemented for "
7846  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7847  */
7848  }
7849 
7850  /* "PyClical.pyx":704
7851  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7852  * else:
7853  * return NotImplemented # <<<<<<<<<<<<<<
7854  *
7855  * def __getitem__(self, ixt):
7856  */
7857  /*else*/ {
7858  __Pyx_XDECREF(__pyx_r);
7859  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7860  __pyx_r = __pyx_builtin_NotImplemented;
7861  goto __pyx_L0;
7862  }
7863 
7864  /* "PyClical.pyx":671
7865  * return result
7866  *
7867  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7868  * """
7869  * Compare objects of type clifford.
7870  */
7871 
7872  /* function exit code */
7873  __pyx_L1_error:;
7874  __Pyx_XDECREF(__pyx_t_4);
7875  __Pyx_XDECREF(__pyx_t_5);
7876  __Pyx_XDECREF(__pyx_t_6);
7877  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7878  __pyx_r = NULL;
7879  __pyx_L0:;
7880  __Pyx_XGIVEREF(__pyx_r);
7881  __Pyx_RefNannyFinishContext();
7882  return __pyx_r;
7883  }
7884 
7885  /* "PyClical.pyx":706
7886  * return NotImplemented
7887  *
7888  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7889  * """
7890  * Subscripting: map from index set to scalar coordinate.
7891  */
7892 
7893  /* Python wrapper */
7894  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7895  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 ";
7896  #if CYTHON_COMPILING_IN_CPYTHON
7897  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7898  #endif
7899  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7900  PyObject *__pyx_r = 0;
7901  __Pyx_RefNannyDeclarations
7902  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7903  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7904 
7905  /* function exit code */
7906  __Pyx_RefNannyFinishContext();
7907  return __pyx_r;
7908  }
7909 
7910  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7911  PyObject *__pyx_r = NULL;
7912  __Pyx_RefNannyDeclarations
7913  PyObject *__pyx_t_1 = NULL;
7914  __Pyx_RefNannySetupContext("__getitem__", 0);
7915 
7916  /* "PyClical.pyx":719
7917  * 2.0
7918  * """
7919  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7920  *
7921  * def __neg__(self):
7922  */
7923  __Pyx_XDECREF(__pyx_r);
7924  __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)
7925  __Pyx_GOTREF(__pyx_t_1);
7926  __pyx_r = __pyx_t_1;
7927  __pyx_t_1 = 0;
7928  goto __pyx_L0;
7929 
7930  /* "PyClical.pyx":706
7931  * return NotImplemented
7932  *
7933  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7934  * """
7935  * Subscripting: map from index set to scalar coordinate.
7936  */
7937 
7938  /* function exit code */
7939  __pyx_L1_error:;
7940  __Pyx_XDECREF(__pyx_t_1);
7941  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7942  __pyx_r = NULL;
7943  __pyx_L0:;
7944  __Pyx_XGIVEREF(__pyx_r);
7945  __Pyx_RefNannyFinishContext();
7946  return __pyx_r;
7947  }
7948 
7949  /* "PyClical.pyx":721
7950  * return self.instance.getitem(toIndexSet(ixt))
7951  *
7952  * def __neg__(self): # <<<<<<<<<<<<<<
7953  * """
7954  * Unary -.
7955  */
7956 
7957  /* Python wrapper */
7958  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7959  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7960  #if CYTHON_COMPILING_IN_CPYTHON
7961  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7962  #endif
7963  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7964  PyObject *__pyx_r = 0;
7965  __Pyx_RefNannyDeclarations
7966  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7967  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7968 
7969  /* function exit code */
7970  __Pyx_RefNannyFinishContext();
7971  return __pyx_r;
7972  }
7973 
7974  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7975  PyObject *__pyx_r = NULL;
7976  __Pyx_RefNannyDeclarations
7977  PyObject *__pyx_t_1 = NULL;
7978  PyObject *__pyx_t_2 = NULL;
7979  __Pyx_RefNannySetupContext("__neg__", 0);
7980 
7981  /* "PyClical.pyx":728
7982  * -{1}
7983  * """
7984  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7985  *
7986  * def __pos__(self):
7987  */
7988  __Pyx_XDECREF(__pyx_r);
7989  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7990  __Pyx_GOTREF(__pyx_t_1);
7991  __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)
7992  __Pyx_GOTREF(__pyx_t_2);
7993  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7994  __pyx_r = __pyx_t_2;
7995  __pyx_t_2 = 0;
7996  goto __pyx_L0;
7997 
7998  /* "PyClical.pyx":721
7999  * return self.instance.getitem(toIndexSet(ixt))
8000  *
8001  * def __neg__(self): # <<<<<<<<<<<<<<
8002  * """
8003  * Unary -.
8004  */
8005 
8006  /* function exit code */
8007  __pyx_L1_error:;
8008  __Pyx_XDECREF(__pyx_t_1);
8009  __Pyx_XDECREF(__pyx_t_2);
8010  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8011  __pyx_r = NULL;
8012  __pyx_L0:;
8013  __Pyx_XGIVEREF(__pyx_r);
8014  __Pyx_RefNannyFinishContext();
8015  return __pyx_r;
8016  }
8017 
8018  /* "PyClical.pyx":730
8019  * return clifford().wrap( self.instance.neg() )
8020  *
8021  * def __pos__(self): # <<<<<<<<<<<<<<
8022  * """
8023  * Unary +.
8024  */
8025 
8026  /* Python wrapper */
8027  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8028  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8029  #if CYTHON_COMPILING_IN_CPYTHON
8030  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8031  #endif
8032  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8033  PyObject *__pyx_r = 0;
8034  __Pyx_RefNannyDeclarations
8035  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8036  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8037 
8038  /* function exit code */
8039  __Pyx_RefNannyFinishContext();
8040  return __pyx_r;
8041  }
8042 
8043  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8044  PyObject *__pyx_r = NULL;
8045  __Pyx_RefNannyDeclarations
8046  PyObject *__pyx_t_1 = NULL;
8047  __Pyx_RefNannySetupContext("__pos__", 0);
8048 
8049  /* "PyClical.pyx":737
8050  * {1}
8051  * """
8052  * return clifford(self) # <<<<<<<<<<<<<<
8053  *
8054  * def __add__(lhs, rhs):
8055  */
8056  __Pyx_XDECREF(__pyx_r);
8057  __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)
8058  __Pyx_GOTREF(__pyx_t_1);
8059  __pyx_r = __pyx_t_1;
8060  __pyx_t_1 = 0;
8061  goto __pyx_L0;
8062 
8063  /* "PyClical.pyx":730
8064  * return clifford().wrap( self.instance.neg() )
8065  *
8066  * def __pos__(self): # <<<<<<<<<<<<<<
8067  * """
8068  * Unary +.
8069  */
8070 
8071  /* function exit code */
8072  __pyx_L1_error:;
8073  __Pyx_XDECREF(__pyx_t_1);
8074  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8075  __pyx_r = NULL;
8076  __pyx_L0:;
8077  __Pyx_XGIVEREF(__pyx_r);
8078  __Pyx_RefNannyFinishContext();
8079  return __pyx_r;
8080  }
8081 
8082  /* "PyClical.pyx":739
8083  * return clifford(self)
8084  *
8085  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8086  * """
8087  * Geometric sum.
8088  */
8089 
8090  /* Python wrapper */
8091  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8092  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 ";
8093  #if CYTHON_COMPILING_IN_CPYTHON
8094  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8095  #endif
8096  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8097  PyObject *__pyx_r = 0;
8098  __Pyx_RefNannyDeclarations
8099  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8100  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8101 
8102  /* function exit code */
8103  __Pyx_RefNannyFinishContext();
8104  return __pyx_r;
8105  }
8106 
8107  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8108  PyObject *__pyx_r = NULL;
8109  __Pyx_RefNannyDeclarations
8110  PyObject *__pyx_t_1 = NULL;
8111  PyObject *__pyx_t_2 = NULL;
8112  __Pyx_RefNannySetupContext("__add__", 0);
8113 
8114  /* "PyClical.pyx":748
8115  * {1}+{2}
8116  * """
8117  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8118  *
8119  * def __iadd__(self, rhs):
8120  */
8121  __Pyx_XDECREF(__pyx_r);
8122  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8123  __Pyx_GOTREF(__pyx_t_1);
8124  __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)
8125  __Pyx_GOTREF(__pyx_t_2);
8126  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8127  __pyx_r = __pyx_t_2;
8128  __pyx_t_2 = 0;
8129  goto __pyx_L0;
8130 
8131  /* "PyClical.pyx":739
8132  * return clifford(self)
8133  *
8134  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8135  * """
8136  * Geometric sum.
8137  */
8138 
8139  /* function exit code */
8140  __pyx_L1_error:;
8141  __Pyx_XDECREF(__pyx_t_1);
8142  __Pyx_XDECREF(__pyx_t_2);
8143  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8144  __pyx_r = NULL;
8145  __pyx_L0:;
8146  __Pyx_XGIVEREF(__pyx_r);
8147  __Pyx_RefNannyFinishContext();
8148  return __pyx_r;
8149  }
8150 
8151  /* "PyClical.pyx":750
8152  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8153  *
8154  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8155  * """
8156  * Geometric sum.
8157  */
8158 
8159  /* Python wrapper */
8160  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8161  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 ";
8162  #if CYTHON_COMPILING_IN_CPYTHON
8163  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8164  #endif
8165  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8166  PyObject *__pyx_r = 0;
8167  __Pyx_RefNannyDeclarations
8168  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8169  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8170 
8171  /* function exit code */
8172  __Pyx_RefNannyFinishContext();
8173  return __pyx_r;
8174  }
8175 
8176  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8177  PyObject *__pyx_r = NULL;
8178  __Pyx_RefNannyDeclarations
8179  PyObject *__pyx_t_1 = NULL;
8180  __Pyx_RefNannySetupContext("__iadd__", 0);
8181 
8182  /* "PyClical.pyx":757
8183  * 1+{2}
8184  * """
8185  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8186  *
8187  * def __sub__(lhs, rhs):
8188  */
8189  __Pyx_XDECREF(__pyx_r);
8190  __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)
8191  __Pyx_GOTREF(__pyx_t_1);
8192  __pyx_r = __pyx_t_1;
8193  __pyx_t_1 = 0;
8194  goto __pyx_L0;
8195 
8196  /* "PyClical.pyx":750
8197  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8198  *
8199  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8200  * """
8201  * Geometric sum.
8202  */
8203 
8204  /* function exit code */
8205  __pyx_L1_error:;
8206  __Pyx_XDECREF(__pyx_t_1);
8207  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8208  __pyx_r = NULL;
8209  __pyx_L0:;
8210  __Pyx_XGIVEREF(__pyx_r);
8211  __Pyx_RefNannyFinishContext();
8212  return __pyx_r;
8213  }
8214 
8215  /* "PyClical.pyx":759
8216  * return self.wrap( self.unwrap() + toClifford(rhs) )
8217  *
8218  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8219  * """
8220  * Geometric difference.
8221  */
8222 
8223  /* Python wrapper */
8224  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8225  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 ";
8226  #if CYTHON_COMPILING_IN_CPYTHON
8227  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8228  #endif
8229  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8230  PyObject *__pyx_r = 0;
8231  __Pyx_RefNannyDeclarations
8232  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8233  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8234 
8235  /* function exit code */
8236  __Pyx_RefNannyFinishContext();
8237  return __pyx_r;
8238  }
8239 
8240  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8241  PyObject *__pyx_r = NULL;
8242  __Pyx_RefNannyDeclarations
8243  PyObject *__pyx_t_1 = NULL;
8244  PyObject *__pyx_t_2 = NULL;
8245  __Pyx_RefNannySetupContext("__sub__", 0);
8246 
8247  /* "PyClical.pyx":768
8248  * {1}-{2}
8249  * """
8250  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8251  *
8252  * def __isub__(self, rhs):
8253  */
8254  __Pyx_XDECREF(__pyx_r);
8255  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8256  __Pyx_GOTREF(__pyx_t_1);
8257  __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)
8258  __Pyx_GOTREF(__pyx_t_2);
8259  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8260  __pyx_r = __pyx_t_2;
8261  __pyx_t_2 = 0;
8262  goto __pyx_L0;
8263 
8264  /* "PyClical.pyx":759
8265  * return self.wrap( self.unwrap() + toClifford(rhs) )
8266  *
8267  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8268  * """
8269  * Geometric difference.
8270  */
8271 
8272  /* function exit code */
8273  __pyx_L1_error:;
8274  __Pyx_XDECREF(__pyx_t_1);
8275  __Pyx_XDECREF(__pyx_t_2);
8276  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8277  __pyx_r = NULL;
8278  __pyx_L0:;
8279  __Pyx_XGIVEREF(__pyx_r);
8280  __Pyx_RefNannyFinishContext();
8281  return __pyx_r;
8282  }
8283 
8284  /* "PyClical.pyx":770
8285  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8286  *
8287  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8288  * """
8289  * Geometric difference.
8290  */
8291 
8292  /* Python wrapper */
8293  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8294  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 ";
8295  #if CYTHON_COMPILING_IN_CPYTHON
8296  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8297  #endif
8298  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8299  PyObject *__pyx_r = 0;
8300  __Pyx_RefNannyDeclarations
8301  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8302  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8303 
8304  /* function exit code */
8305  __Pyx_RefNannyFinishContext();
8306  return __pyx_r;
8307  }
8308 
8309  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8310  PyObject *__pyx_r = NULL;
8311  __Pyx_RefNannyDeclarations
8312  PyObject *__pyx_t_1 = NULL;
8313  __Pyx_RefNannySetupContext("__isub__", 0);
8314 
8315  /* "PyClical.pyx":777
8316  * 1-{2}
8317  * """
8318  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8319  *
8320  * def __mul__(lhs, rhs):
8321  */
8322  __Pyx_XDECREF(__pyx_r);
8323  __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)
8324  __Pyx_GOTREF(__pyx_t_1);
8325  __pyx_r = __pyx_t_1;
8326  __pyx_t_1 = 0;
8327  goto __pyx_L0;
8328 
8329  /* "PyClical.pyx":770
8330  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8331  *
8332  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8333  * """
8334  * Geometric difference.
8335  */
8336 
8337  /* function exit code */
8338  __pyx_L1_error:;
8339  __Pyx_XDECREF(__pyx_t_1);
8340  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8341  __pyx_r = NULL;
8342  __pyx_L0:;
8343  __Pyx_XGIVEREF(__pyx_r);
8344  __Pyx_RefNannyFinishContext();
8345  return __pyx_r;
8346  }
8347 
8348  /* "PyClical.pyx":779
8349  * return self.wrap( self.unwrap() - toClifford(rhs) )
8350  *
8351  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8352  * """
8353  * Geometric product.
8354  */
8355 
8356  /* Python wrapper */
8357  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8358  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 ";
8359  #if CYTHON_COMPILING_IN_CPYTHON
8360  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8361  #endif
8362  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8363  PyObject *__pyx_r = 0;
8364  __Pyx_RefNannyDeclarations
8365  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8366  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8367 
8368  /* function exit code */
8369  __Pyx_RefNannyFinishContext();
8370  return __pyx_r;
8371  }
8372 
8373  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8374  PyObject *__pyx_r = NULL;
8375  __Pyx_RefNannyDeclarations
8376  PyObject *__pyx_t_1 = NULL;
8377  PyObject *__pyx_t_2 = NULL;
8378  __Pyx_RefNannySetupContext("__mul__", 0);
8379 
8380  /* "PyClical.pyx":790
8381  * {2}
8382  * """
8383  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8384  *
8385  * def __imul__(self, rhs):
8386  */
8387  __Pyx_XDECREF(__pyx_r);
8388  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8389  __Pyx_GOTREF(__pyx_t_1);
8390  __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)
8391  __Pyx_GOTREF(__pyx_t_2);
8392  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8393  __pyx_r = __pyx_t_2;
8394  __pyx_t_2 = 0;
8395  goto __pyx_L0;
8396 
8397  /* "PyClical.pyx":779
8398  * return self.wrap( self.unwrap() - toClifford(rhs) )
8399  *
8400  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8401  * """
8402  * Geometric product.
8403  */
8404 
8405  /* function exit code */
8406  __pyx_L1_error:;
8407  __Pyx_XDECREF(__pyx_t_1);
8408  __Pyx_XDECREF(__pyx_t_2);
8409  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8410  __pyx_r = NULL;
8411  __pyx_L0:;
8412  __Pyx_XGIVEREF(__pyx_r);
8413  __Pyx_RefNannyFinishContext();
8414  return __pyx_r;
8415  }
8416 
8417  /* "PyClical.pyx":792
8418  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8419  *
8420  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8421  * """
8422  * Geometric product.
8423  */
8424 
8425  /* Python wrapper */
8426  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8427  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 ";
8428  #if CYTHON_COMPILING_IN_CPYTHON
8429  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8430  #endif
8431  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8432  PyObject *__pyx_r = 0;
8433  __Pyx_RefNannyDeclarations
8434  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8435  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8436 
8437  /* function exit code */
8438  __Pyx_RefNannyFinishContext();
8439  return __pyx_r;
8440  }
8441 
8442  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8443  PyObject *__pyx_r = NULL;
8444  __Pyx_RefNannyDeclarations
8445  PyObject *__pyx_t_1 = NULL;
8446  __Pyx_RefNannySetupContext("__imul__", 0);
8447 
8448  /* "PyClical.pyx":803
8449  * {2}
8450  * """
8451  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8452  *
8453  * def __mod__(lhs, rhs):
8454  */
8455  __Pyx_XDECREF(__pyx_r);
8456  __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)
8457  __Pyx_GOTREF(__pyx_t_1);
8458  __pyx_r = __pyx_t_1;
8459  __pyx_t_1 = 0;
8460  goto __pyx_L0;
8461 
8462  /* "PyClical.pyx":792
8463  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8464  *
8465  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8466  * """
8467  * Geometric product.
8468  */
8469 
8470  /* function exit code */
8471  __pyx_L1_error:;
8472  __Pyx_XDECREF(__pyx_t_1);
8473  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8474  __pyx_r = NULL;
8475  __pyx_L0:;
8476  __Pyx_XGIVEREF(__pyx_r);
8477  __Pyx_RefNannyFinishContext();
8478  return __pyx_r;
8479  }
8480 
8481  /* "PyClical.pyx":805
8482  * return self.wrap( self.unwrap() * toClifford(rhs) )
8483  *
8484  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8485  * """
8486  * Contraction.
8487  */
8488 
8489  /* Python wrapper */
8490  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8491  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 ";
8492  #if CYTHON_COMPILING_IN_CPYTHON
8493  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8494  #endif
8495  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8496  PyObject *__pyx_r = 0;
8497  __Pyx_RefNannyDeclarations
8498  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8499  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8500 
8501  /* function exit code */
8502  __Pyx_RefNannyFinishContext();
8503  return __pyx_r;
8504  }
8505 
8506  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8507  PyObject *__pyx_r = NULL;
8508  __Pyx_RefNannyDeclarations
8509  PyObject *__pyx_t_1 = NULL;
8510  PyObject *__pyx_t_2 = NULL;
8511  __Pyx_RefNannySetupContext("__mod__", 0);
8512 
8513  /* "PyClical.pyx":818
8514  * {2}
8515  * """
8516  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8517  *
8518  * def __imod__(self, rhs):
8519  */
8520  __Pyx_XDECREF(__pyx_r);
8521  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8522  __Pyx_GOTREF(__pyx_t_1);
8523  __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)
8524  __Pyx_GOTREF(__pyx_t_2);
8525  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8526  __pyx_r = __pyx_t_2;
8527  __pyx_t_2 = 0;
8528  goto __pyx_L0;
8529 
8530  /* "PyClical.pyx":805
8531  * return self.wrap( self.unwrap() * toClifford(rhs) )
8532  *
8533  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8534  * """
8535  * Contraction.
8536  */
8537 
8538  /* function exit code */
8539  __pyx_L1_error:;
8540  __Pyx_XDECREF(__pyx_t_1);
8541  __Pyx_XDECREF(__pyx_t_2);
8542  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8543  __pyx_r = NULL;
8544  __pyx_L0:;
8545  __Pyx_XGIVEREF(__pyx_r);
8546  __Pyx_RefNannyFinishContext();
8547  return __pyx_r;
8548  }
8549 
8550  /* "PyClical.pyx":820
8551  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8552  *
8553  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8554  * """
8555  * Contraction.
8556  */
8557 
8558  /* Python wrapper */
8559  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8560  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 ";
8561  #if CYTHON_COMPILING_IN_CPYTHON
8562  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8563  #endif
8564  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8565  PyObject *__pyx_r = 0;
8566  __Pyx_RefNannyDeclarations
8567  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8568  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8569 
8570  /* function exit code */
8571  __Pyx_RefNannyFinishContext();
8572  return __pyx_r;
8573  }
8574 
8575  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8576  PyObject *__pyx_r = NULL;
8577  __Pyx_RefNannyDeclarations
8578  PyObject *__pyx_t_1 = NULL;
8579  __Pyx_RefNannySetupContext("__imod__", 0);
8580 
8581  /* "PyClical.pyx":833
8582  * {2}
8583  * """
8584  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8585  *
8586  * def __and__(lhs, rhs):
8587  */
8588  __Pyx_XDECREF(__pyx_r);
8589  __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)
8590  __Pyx_GOTREF(__pyx_t_1);
8591  __pyx_r = __pyx_t_1;
8592  __pyx_t_1 = 0;
8593  goto __pyx_L0;
8594 
8595  /* "PyClical.pyx":820
8596  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8597  *
8598  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8599  * """
8600  * Contraction.
8601  */
8602 
8603  /* function exit code */
8604  __pyx_L1_error:;
8605  __Pyx_XDECREF(__pyx_t_1);
8606  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8607  __pyx_r = NULL;
8608  __pyx_L0:;
8609  __Pyx_XGIVEREF(__pyx_r);
8610  __Pyx_RefNannyFinishContext();
8611  return __pyx_r;
8612  }
8613 
8614  /* "PyClical.pyx":835
8615  * return self.wrap( self.unwrap() % toClifford(rhs) )
8616  *
8617  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8618  * """
8619  * Inner product.
8620  */
8621 
8622  /* Python wrapper */
8623  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8624  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 ";
8625  #if CYTHON_COMPILING_IN_CPYTHON
8626  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8627  #endif
8628  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8629  PyObject *__pyx_r = 0;
8630  __Pyx_RefNannyDeclarations
8631  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8632  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8633 
8634  /* function exit code */
8635  __Pyx_RefNannyFinishContext();
8636  return __pyx_r;
8637  }
8638 
8639  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8640  PyObject *__pyx_r = NULL;
8641  __Pyx_RefNannyDeclarations
8642  PyObject *__pyx_t_1 = NULL;
8643  PyObject *__pyx_t_2 = NULL;
8644  __Pyx_RefNannySetupContext("__and__", 0);
8645 
8646  /* "PyClical.pyx":848
8647  * {2}
8648  * """
8649  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8650  *
8651  * def __iand__(self, rhs):
8652  */
8653  __Pyx_XDECREF(__pyx_r);
8654  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8655  __Pyx_GOTREF(__pyx_t_1);
8656  __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)
8657  __Pyx_GOTREF(__pyx_t_2);
8658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8659  __pyx_r = __pyx_t_2;
8660  __pyx_t_2 = 0;
8661  goto __pyx_L0;
8662 
8663  /* "PyClical.pyx":835
8664  * return self.wrap( self.unwrap() % toClifford(rhs) )
8665  *
8666  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8667  * """
8668  * Inner product.
8669  */
8670 
8671  /* function exit code */
8672  __pyx_L1_error:;
8673  __Pyx_XDECREF(__pyx_t_1);
8674  __Pyx_XDECREF(__pyx_t_2);
8675  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8676  __pyx_r = NULL;
8677  __pyx_L0:;
8678  __Pyx_XGIVEREF(__pyx_r);
8679  __Pyx_RefNannyFinishContext();
8680  return __pyx_r;
8681  }
8682 
8683  /* "PyClical.pyx":850
8684  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8685  *
8686  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8687  * """
8688  * Inner product.
8689  */
8690 
8691  /* Python wrapper */
8692  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8693  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 ";
8694  #if CYTHON_COMPILING_IN_CPYTHON
8695  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8696  #endif
8697  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8698  PyObject *__pyx_r = 0;
8699  __Pyx_RefNannyDeclarations
8700  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8701  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8702 
8703  /* function exit code */
8704  __Pyx_RefNannyFinishContext();
8705  return __pyx_r;
8706  }
8707 
8708  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8709  PyObject *__pyx_r = NULL;
8710  __Pyx_RefNannyDeclarations
8711  PyObject *__pyx_t_1 = NULL;
8712  __Pyx_RefNannySetupContext("__iand__", 0);
8713 
8714  /* "PyClical.pyx":863
8715  * {2}
8716  * """
8717  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8718  *
8719  * def __xor__(lhs, rhs):
8720  */
8721  __Pyx_XDECREF(__pyx_r);
8722  __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)
8723  __Pyx_GOTREF(__pyx_t_1);
8724  __pyx_r = __pyx_t_1;
8725  __pyx_t_1 = 0;
8726  goto __pyx_L0;
8727 
8728  /* "PyClical.pyx":850
8729  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8730  *
8731  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8732  * """
8733  * Inner product.
8734  */
8735 
8736  /* function exit code */
8737  __pyx_L1_error:;
8738  __Pyx_XDECREF(__pyx_t_1);
8739  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8740  __pyx_r = NULL;
8741  __pyx_L0:;
8742  __Pyx_XGIVEREF(__pyx_r);
8743  __Pyx_RefNannyFinishContext();
8744  return __pyx_r;
8745  }
8746 
8747  /* "PyClical.pyx":865
8748  * return self.wrap( self.unwrap() & toClifford(rhs) )
8749  *
8750  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8751  * """
8752  * Outer product.
8753  */
8754 
8755  /* Python wrapper */
8756  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8757  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 ";
8758  #if CYTHON_COMPILING_IN_CPYTHON
8759  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8760  #endif
8761  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8762  PyObject *__pyx_r = 0;
8763  __Pyx_RefNannyDeclarations
8764  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8765  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8766 
8767  /* function exit code */
8768  __Pyx_RefNannyFinishContext();
8769  return __pyx_r;
8770  }
8771 
8772  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8773  PyObject *__pyx_r = NULL;
8774  __Pyx_RefNannyDeclarations
8775  PyObject *__pyx_t_1 = NULL;
8776  PyObject *__pyx_t_2 = NULL;
8777  __Pyx_RefNannySetupContext("__xor__", 0);
8778 
8779  /* "PyClical.pyx":878
8780  * 0
8781  * """
8782  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8783  *
8784  * def __ixor__(self, rhs):
8785  */
8786  __Pyx_XDECREF(__pyx_r);
8787  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8788  __Pyx_GOTREF(__pyx_t_1);
8789  __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)
8790  __Pyx_GOTREF(__pyx_t_2);
8791  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8792  __pyx_r = __pyx_t_2;
8793  __pyx_t_2 = 0;
8794  goto __pyx_L0;
8795 
8796  /* "PyClical.pyx":865
8797  * return self.wrap( self.unwrap() & toClifford(rhs) )
8798  *
8799  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8800  * """
8801  * Outer product.
8802  */
8803 
8804  /* function exit code */
8805  __pyx_L1_error:;
8806  __Pyx_XDECREF(__pyx_t_1);
8807  __Pyx_XDECREF(__pyx_t_2);
8808  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8809  __pyx_r = NULL;
8810  __pyx_L0:;
8811  __Pyx_XGIVEREF(__pyx_r);
8812  __Pyx_RefNannyFinishContext();
8813  return __pyx_r;
8814  }
8815 
8816  /* "PyClical.pyx":880
8817  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8818  *
8819  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8820  * """
8821  * Outer product.
8822  */
8823 
8824  /* Python wrapper */
8825  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8826  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 ";
8827  #if CYTHON_COMPILING_IN_CPYTHON
8828  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8829  #endif
8830  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8831  PyObject *__pyx_r = 0;
8832  __Pyx_RefNannyDeclarations
8833  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8834  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8835 
8836  /* function exit code */
8837  __Pyx_RefNannyFinishContext();
8838  return __pyx_r;
8839  }
8840 
8841  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8842  PyObject *__pyx_r = NULL;
8843  __Pyx_RefNannyDeclarations
8844  PyObject *__pyx_t_1 = NULL;
8845  __Pyx_RefNannySetupContext("__ixor__", 0);
8846 
8847  /* "PyClical.pyx":893
8848  * 0
8849  * """
8850  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8851  *
8852  * def __div__(lhs, rhs):
8853  */
8854  __Pyx_XDECREF(__pyx_r);
8855  __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)
8856  __Pyx_GOTREF(__pyx_t_1);
8857  __pyx_r = __pyx_t_1;
8858  __pyx_t_1 = 0;
8859  goto __pyx_L0;
8860 
8861  /* "PyClical.pyx":880
8862  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8863  *
8864  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8865  * """
8866  * Outer product.
8867  */
8868 
8869  /* function exit code */
8870  __pyx_L1_error:;
8871  __Pyx_XDECREF(__pyx_t_1);
8872  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8873  __pyx_r = NULL;
8874  __pyx_L0:;
8875  __Pyx_XGIVEREF(__pyx_r);
8876  __Pyx_RefNannyFinishContext();
8877  return __pyx_r;
8878  }
8879 
8880  /* "PyClical.pyx":895
8881  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8882  *
8883  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8884  * """
8885  * Geometric quotient.
8886  */
8887 
8888  /* Python wrapper */
8889  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8890  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8891  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 ";
8892  #if CYTHON_COMPILING_IN_CPYTHON
8893  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8894  #endif
8895  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8896  PyObject *__pyx_r = 0;
8897  __Pyx_RefNannyDeclarations
8898  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8899  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8900 
8901  /* function exit code */
8902  __Pyx_RefNannyFinishContext();
8903  return __pyx_r;
8904  }
8905  #endif
8907  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8908  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8909  PyObject *__pyx_r = NULL;
8910  __Pyx_RefNannyDeclarations
8911  PyObject *__pyx_t_1 = NULL;
8912  PyObject *__pyx_t_2 = NULL;
8913  __Pyx_RefNannySetupContext("__div__", 0);
8914 
8915  /* "PyClical.pyx":908
8916  * -{2}
8917  * """
8918  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8919  *
8920  * def __idiv__(self, rhs):
8921  */
8922  __Pyx_XDECREF(__pyx_r);
8923  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8924  __Pyx_GOTREF(__pyx_t_1);
8925  __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)
8926  __Pyx_GOTREF(__pyx_t_2);
8927  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8928  __pyx_r = __pyx_t_2;
8929  __pyx_t_2 = 0;
8930  goto __pyx_L0;
8931 
8932  /* "PyClical.pyx":895
8933  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8934  *
8935  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8936  * """
8937  * Geometric quotient.
8938  */
8939 
8940  /* function exit code */
8941  __pyx_L1_error:;
8942  __Pyx_XDECREF(__pyx_t_1);
8943  __Pyx_XDECREF(__pyx_t_2);
8944  __Pyx_AddTraceback("PyClical.clifford.__div__", __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":910
8954  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8955  *
8956  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8957  * """
8958  * Geometric quotient.
8959  */
8960 
8961  /* Python wrapper */
8962  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8963  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8964  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 ";
8965  #if CYTHON_COMPILING_IN_CPYTHON
8966  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8967  #endif
8968  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8969  PyObject *__pyx_r = 0;
8970  __Pyx_RefNannyDeclarations
8971  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8972  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8973 
8974  /* function exit code */
8975  __Pyx_RefNannyFinishContext();
8976  return __pyx_r;
8977  }
8978  #endif
8980  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8981  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8982  PyObject *__pyx_r = NULL;
8983  __Pyx_RefNannyDeclarations
8984  PyObject *__pyx_t_1 = NULL;
8985  __Pyx_RefNannySetupContext("__idiv__", 0);
8986 
8987  /* "PyClical.pyx":923
8988  * -{2}
8989  * """
8990  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8991  *
8992  * def inv(self):
8993  */
8994  __Pyx_XDECREF(__pyx_r);
8995  __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)
8996  __Pyx_GOTREF(__pyx_t_1);
8997  __pyx_r = __pyx_t_1;
8998  __pyx_t_1 = 0;
8999  goto __pyx_L0;
9000 
9001  /* "PyClical.pyx":910
9002  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9003  *
9004  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9005  * """
9006  * Geometric quotient.
9007  */
9008 
9009  /* function exit code */
9010  __pyx_L1_error:;
9011  __Pyx_XDECREF(__pyx_t_1);
9012  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9013  __pyx_r = NULL;
9014  __pyx_L0:;
9015  __Pyx_XGIVEREF(__pyx_r);
9016  __Pyx_RefNannyFinishContext();
9017  return __pyx_r;
9018  }
9019  #endif
9021  /* "PyClical.pyx":925
9022  * return self.wrap( self.unwrap() / toClifford(rhs) )
9023  *
9024  * def inv(self): # <<<<<<<<<<<<<<
9025  * """
9026  * Geometric multiplicative inverse.
9027  */
9028 
9029  /* Python wrapper */
9030  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9031  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 ";
9032  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9033  PyObject *__pyx_r = 0;
9034  __Pyx_RefNannyDeclarations
9035  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9036  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9037 
9038  /* function exit code */
9039  __Pyx_RefNannyFinishContext();
9040  return __pyx_r;
9041  }
9042 
9043  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9044  PyObject *__pyx_r = NULL;
9045  __Pyx_RefNannyDeclarations
9046  PyObject *__pyx_t_1 = NULL;
9047  PyObject *__pyx_t_2 = NULL;
9048  __Pyx_RefNannySetupContext("inv", 0);
9049 
9050  /* "PyClical.pyx":936
9051  * -{1,2}
9052  * """
9053  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9054  *
9055  * def __or__(lhs, rhs):
9056  */
9057  __Pyx_XDECREF(__pyx_r);
9058  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
9059  __Pyx_GOTREF(__pyx_t_1);
9060  __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)
9061  __Pyx_GOTREF(__pyx_t_2);
9062  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9063  __pyx_r = __pyx_t_2;
9064  __pyx_t_2 = 0;
9065  goto __pyx_L0;
9066 
9067  /* "PyClical.pyx":925
9068  * return self.wrap( self.unwrap() / toClifford(rhs) )
9069  *
9070  * def inv(self): # <<<<<<<<<<<<<<
9071  * """
9072  * Geometric multiplicative inverse.
9073  */
9074 
9075  /* function exit code */
9076  __pyx_L1_error:;
9077  __Pyx_XDECREF(__pyx_t_1);
9078  __Pyx_XDECREF(__pyx_t_2);
9079  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9080  __pyx_r = NULL;
9081  __pyx_L0:;
9082  __Pyx_XGIVEREF(__pyx_r);
9083  __Pyx_RefNannyFinishContext();
9084  return __pyx_r;
9085  }
9086 
9087  /* "PyClical.pyx":938
9088  * return clifford().wrap( self.instance.inv() )
9089  *
9090  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9091  * """
9092  * Transform left hand side, using right hand side as a transformation.
9093  */
9094 
9095  /* Python wrapper */
9096  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9097  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 ";
9098  #if CYTHON_COMPILING_IN_CPYTHON
9099  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9100  #endif
9101  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9102  PyObject *__pyx_r = 0;
9103  __Pyx_RefNannyDeclarations
9104  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9105  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9106 
9107  /* function exit code */
9108  __Pyx_RefNannyFinishContext();
9109  return __pyx_r;
9110  }
9111 
9112  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9113  PyObject *__pyx_r = NULL;
9114  __Pyx_RefNannyDeclarations
9115  PyObject *__pyx_t_1 = NULL;
9116  PyObject *__pyx_t_2 = NULL;
9117  __Pyx_RefNannySetupContext("__or__", 0);
9118 
9119  /* "PyClical.pyx":947
9120  * -{1}
9121  * """
9122  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9123  *
9124  * def __ior__(self, rhs):
9125  */
9126  __Pyx_XDECREF(__pyx_r);
9127  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9128  __Pyx_GOTREF(__pyx_t_1);
9129  __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)
9130  __Pyx_GOTREF(__pyx_t_2);
9131  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9132  __pyx_r = __pyx_t_2;
9133  __pyx_t_2 = 0;
9134  goto __pyx_L0;
9135 
9136  /* "PyClical.pyx":938
9137  * return clifford().wrap( self.instance.inv() )
9138  *
9139  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9140  * """
9141  * Transform left hand side, using right hand side as a transformation.
9142  */
9143 
9144  /* function exit code */
9145  __pyx_L1_error:;
9146  __Pyx_XDECREF(__pyx_t_1);
9147  __Pyx_XDECREF(__pyx_t_2);
9148  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9149  __pyx_r = NULL;
9150  __pyx_L0:;
9151  __Pyx_XGIVEREF(__pyx_r);
9152  __Pyx_RefNannyFinishContext();
9153  return __pyx_r;
9154  }
9155 
9156  /* "PyClical.pyx":949
9157  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9158  *
9159  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9160  * """
9161  * Transform left hand side, using right hand side as a transformation.
9162  */
9163 
9164  /* Python wrapper */
9165  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9166  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 ";
9167  #if CYTHON_COMPILING_IN_CPYTHON
9168  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9169  #endif
9170  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9171  PyObject *__pyx_r = 0;
9172  __Pyx_RefNannyDeclarations
9173  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9174  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9175 
9176  /* function exit code */
9177  __Pyx_RefNannyFinishContext();
9178  return __pyx_r;
9179  }
9180 
9181  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9182  PyObject *__pyx_r = NULL;
9183  __Pyx_RefNannyDeclarations
9184  PyObject *__pyx_t_1 = NULL;
9185  __Pyx_RefNannySetupContext("__ior__", 0);
9186 
9187  /* "PyClical.pyx":958
9188  * -{1}
9189  * """
9190  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9191  *
9192  * def __pow__(self, m, dummy):
9193  */
9194  __Pyx_XDECREF(__pyx_r);
9195  __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)
9196  __Pyx_GOTREF(__pyx_t_1);
9197  __pyx_r = __pyx_t_1;
9198  __pyx_t_1 = 0;
9199  goto __pyx_L0;
9200 
9201  /* "PyClical.pyx":949
9202  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9203  *
9204  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9205  * """
9206  * Transform left hand side, using right hand side as a transformation.
9207  */
9208 
9209  /* function exit code */
9210  __pyx_L1_error:;
9211  __Pyx_XDECREF(__pyx_t_1);
9212  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9213  __pyx_r = NULL;
9214  __pyx_L0:;
9215  __Pyx_XGIVEREF(__pyx_r);
9216  __Pyx_RefNannyFinishContext();
9217  return __pyx_r;
9218  }
9219 
9220  /* "PyClical.pyx":960
9221  * return self.wrap( self.unwrap() | toClifford(rhs) )
9222  *
9223  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9224  * """
9225  * Power: self to the m.
9226  */
9227 
9228  /* Python wrapper */
9229  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9230  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 ";
9231  #if CYTHON_COMPILING_IN_CPYTHON
9232  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9233  #endif
9234  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9235  PyObject *__pyx_r = 0;
9236  __Pyx_RefNannyDeclarations
9237  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9238  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9239 
9240  /* function exit code */
9241  __Pyx_RefNannyFinishContext();
9242  return __pyx_r;
9243  }
9244 
9245  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9246  PyObject *__pyx_r = NULL;
9247  __Pyx_RefNannyDeclarations
9248  PyObject *__pyx_t_1 = NULL;
9249  __Pyx_RefNannySetupContext("__pow__", 0);
9250 
9251  /* "PyClical.pyx":977
9252  * 1
9253  * """
9254  * return pow(self, m) # <<<<<<<<<<<<<<
9255  *
9256  * def pow(self, m):
9257  */
9258  __Pyx_XDECREF(__pyx_r);
9259  __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)
9260  __Pyx_GOTREF(__pyx_t_1);
9261  __pyx_r = __pyx_t_1;
9262  __pyx_t_1 = 0;
9263  goto __pyx_L0;
9264 
9265  /* "PyClical.pyx":960
9266  * return self.wrap( self.unwrap() | toClifford(rhs) )
9267  *
9268  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9269  * """
9270  * Power: self to the m.
9271  */
9272 
9273  /* function exit code */
9274  __pyx_L1_error:;
9275  __Pyx_XDECREF(__pyx_t_1);
9276  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9277  __pyx_r = NULL;
9278  __pyx_L0:;
9279  __Pyx_XGIVEREF(__pyx_r);
9280  __Pyx_RefNannyFinishContext();
9281  return __pyx_r;
9282  }
9283 
9284  /* "PyClical.pyx":979
9285  * return pow(self, m)
9286  *
9287  * def pow(self, m): # <<<<<<<<<<<<<<
9288  * """
9289  * Power: self to the m.
9290  */
9291 
9292  /* Python wrapper */
9293  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9294  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 ";
9295  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9296  PyObject *__pyx_r = 0;
9297  __Pyx_RefNannyDeclarations
9298  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9299  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9300 
9301  /* function exit code */
9302  __Pyx_RefNannyFinishContext();
9303  return __pyx_r;
9304  }
9305 
9306  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9307  PyObject *__pyx_r = NULL;
9308  __Pyx_RefNannyDeclarations
9309  PyObject *__pyx_t_1 = NULL;
9310  PyObject *__pyx_t_2 = NULL;
9311  int __pyx_t_3;
9312  int __pyx_t_4;
9313  int __pyx_t_5;
9314  __Pyx_RefNannySetupContext("pow", 0);
9315 
9316  /* "PyClical.pyx":998
9317  * 1
9318  * """
9319  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9320  * return clifford().wrap( self.instance.pow(m) )
9321  * else:
9322  */
9323  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9324  __Pyx_GOTREF(__pyx_t_1);
9325  __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)
9326  __Pyx_GOTREF(__pyx_t_2);
9327  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9328  __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)
9329  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9330  __pyx_t_4 = (__pyx_t_3 != 0);
9331  if (__pyx_t_4) {
9332 
9333  /* "PyClical.pyx":999
9334  * """
9335  * if isinstance(m, numbers.Integral):
9336  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9337  * else:
9338  * return exp(m * log(self))
9339  */
9340  __Pyx_XDECREF(__pyx_r);
9341  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9342  __Pyx_GOTREF(__pyx_t_2);
9343  __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)
9344  __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)
9345  __Pyx_GOTREF(__pyx_t_1);
9346  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9347  __pyx_r = __pyx_t_1;
9348  __pyx_t_1 = 0;
9349  goto __pyx_L0;
9350 
9351  /* "PyClical.pyx":998
9352  * 1
9353  * """
9354  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9355  * return clifford().wrap( self.instance.pow(m) )
9356  * else:
9357  */
9358  }
9359 
9360  /* "PyClical.pyx":1001
9361  * return clifford().wrap( self.instance.pow(m) )
9362  * else:
9363  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9364  *
9365  * def outer_pow(self, m):
9366  */
9367  /*else*/ {
9368  __Pyx_XDECREF(__pyx_r);
9369  __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)
9370  __Pyx_GOTREF(__pyx_t_1);
9371  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9372  __Pyx_GOTREF(__pyx_t_2);
9373  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9374  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9375  __Pyx_GOTREF(__pyx_t_1);
9376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9377  __pyx_r = __pyx_t_1;
9378  __pyx_t_1 = 0;
9379  goto __pyx_L0;
9380  }
9381 
9382  /* "PyClical.pyx":979
9383  * return pow(self, m)
9384  *
9385  * def pow(self, m): # <<<<<<<<<<<<<<
9386  * """
9387  * Power: self to the m.
9388  */
9389 
9390  /* function exit code */
9391  __pyx_L1_error:;
9392  __Pyx_XDECREF(__pyx_t_1);
9393  __Pyx_XDECREF(__pyx_t_2);
9394  __Pyx_AddTraceback("PyClical.clifford.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":1003
9403  * return exp(m * log(self))
9404  *
9405  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9406  * """
9407  * Outer product power.
9408  */
9409 
9410  /* Python wrapper */
9411  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9412  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 ";
9413  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9414  PyObject *__pyx_r = 0;
9415  __Pyx_RefNannyDeclarations
9416  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9417  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9418 
9419  /* function exit code */
9420  __Pyx_RefNannyFinishContext();
9421  return __pyx_r;
9422  }
9423 
9424  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9425  PyObject *__pyx_r = NULL;
9426  __Pyx_RefNannyDeclarations
9427  PyObject *__pyx_t_1 = NULL;
9428  int __pyx_t_2;
9429  PyObject *__pyx_t_3 = NULL;
9430  __Pyx_RefNannySetupContext("outer_pow", 0);
9431 
9432  /* "PyClical.pyx":1017
9433  *
9434  * """
9435  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9436  *
9437  * def __call__(self, grade):
9438  */
9439  __Pyx_XDECREF(__pyx_r);
9440  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9441  __Pyx_GOTREF(__pyx_t_1);
9442  __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)
9443  __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)
9444  __Pyx_GOTREF(__pyx_t_3);
9445  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9446  __pyx_r = __pyx_t_3;
9447  __pyx_t_3 = 0;
9448  goto __pyx_L0;
9449 
9450  /* "PyClical.pyx":1003
9451  * return exp(m * log(self))
9452  *
9453  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9454  * """
9455  * Outer product power.
9456  */
9457 
9458  /* function exit code */
9459  __pyx_L1_error:;
9460  __Pyx_XDECREF(__pyx_t_1);
9461  __Pyx_XDECREF(__pyx_t_3);
9462  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9463  __pyx_r = NULL;
9464  __pyx_L0:;
9465  __Pyx_XGIVEREF(__pyx_r);
9466  __Pyx_RefNannyFinishContext();
9467  return __pyx_r;
9468  }
9469 
9470  /* "PyClical.pyx":1019
9471  * return clifford().wrap( self.instance.outer_pow(m) )
9472  *
9473  * def __call__(self, grade): # <<<<<<<<<<<<<<
9474  * """
9475  * Pure grade-vector part.
9476  */
9477 
9478  /* Python wrapper */
9479  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9480  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 ";
9481  #if CYTHON_COMPILING_IN_CPYTHON
9482  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9483  #endif
9484  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9485  PyObject *__pyx_v_grade = 0;
9486  PyObject *__pyx_r = 0;
9487  __Pyx_RefNannyDeclarations
9488  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9489  {
9490  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9491  PyObject* values[1] = {0};
9492  if (unlikely(__pyx_kwds)) {
9493  Py_ssize_t kw_args;
9494  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9495  switch (pos_args) {
9496  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9497  CYTHON_FALLTHROUGH;
9498  case 0: break;
9499  default: goto __pyx_L5_argtuple_error;
9500  }
9501  kw_args = PyDict_Size(__pyx_kwds);
9502  switch (pos_args) {
9503  case 0:
9504  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9505  else goto __pyx_L5_argtuple_error;
9506  }
9507  if (unlikely(kw_args > 0)) {
9508  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9509  }
9510  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9511  goto __pyx_L5_argtuple_error;
9512  } else {
9513  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9514  }
9515  __pyx_v_grade = values[0];
9516  }
9517  goto __pyx_L4_argument_unpacking_done;
9518  __pyx_L5_argtuple_error:;
9519  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9520  __pyx_L3_error:;
9521  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9522  __Pyx_RefNannyFinishContext();
9523  return NULL;
9524  __pyx_L4_argument_unpacking_done:;
9525  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9526 
9527  /* function exit code */
9528  __Pyx_RefNannyFinishContext();
9529  return __pyx_r;
9530  }
9531 
9532  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9533  PyObject *__pyx_r = NULL;
9534  __Pyx_RefNannyDeclarations
9535  PyObject *__pyx_t_1 = NULL;
9536  int __pyx_t_2;
9537  PyObject *__pyx_t_3 = NULL;
9538  __Pyx_RefNannySetupContext("__call__", 0);
9539 
9540  /* "PyClical.pyx":1036
9541  * 0
9542  * """
9543  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9544  *
9545  * def scalar(self):
9546  */
9547  __Pyx_XDECREF(__pyx_r);
9548  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9549  __Pyx_GOTREF(__pyx_t_1);
9550  __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)
9551  __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)
9552  __Pyx_GOTREF(__pyx_t_3);
9553  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9554  __pyx_r = __pyx_t_3;
9555  __pyx_t_3 = 0;
9556  goto __pyx_L0;
9557 
9558  /* "PyClical.pyx":1019
9559  * return clifford().wrap( self.instance.outer_pow(m) )
9560  *
9561  * def __call__(self, grade): # <<<<<<<<<<<<<<
9562  * """
9563  * Pure grade-vector part.
9564  */
9565 
9566  /* function exit code */
9567  __pyx_L1_error:;
9568  __Pyx_XDECREF(__pyx_t_1);
9569  __Pyx_XDECREF(__pyx_t_3);
9570  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9571  __pyx_r = NULL;
9572  __pyx_L0:;
9573  __Pyx_XGIVEREF(__pyx_r);
9574  __Pyx_RefNannyFinishContext();
9575  return __pyx_r;
9576  }
9577 
9578  /* "PyClical.pyx":1038
9579  * return clifford().wrap( self.instance.call(grade) )
9580  *
9581  * def scalar(self): # <<<<<<<<<<<<<<
9582  * """
9583  * Scalar part.
9584  */
9585 
9586  /* Python wrapper */
9587  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9588  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 ";
9589  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9590  PyObject *__pyx_r = 0;
9591  __Pyx_RefNannyDeclarations
9592  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9593  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9594 
9595  /* function exit code */
9596  __Pyx_RefNannyFinishContext();
9597  return __pyx_r;
9598  }
9599 
9600  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9601  PyObject *__pyx_r = NULL;
9602  __Pyx_RefNannyDeclarations
9603  PyObject *__pyx_t_1 = NULL;
9604  __Pyx_RefNannySetupContext("scalar", 0);
9605 
9606  /* "PyClical.pyx":1047
9607  * 0.0
9608  * """
9609  * return self.instance.scalar() # <<<<<<<<<<<<<<
9610  *
9611  * def pure(self):
9612  */
9613  __Pyx_XDECREF(__pyx_r);
9614  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9615  __Pyx_GOTREF(__pyx_t_1);
9616  __pyx_r = __pyx_t_1;
9617  __pyx_t_1 = 0;
9618  goto __pyx_L0;
9619 
9620  /* "PyClical.pyx":1038
9621  * return clifford().wrap( self.instance.call(grade) )
9622  *
9623  * def scalar(self): # <<<<<<<<<<<<<<
9624  * """
9625  * Scalar part.
9626  */
9627 
9628  /* function exit code */
9629  __pyx_L1_error:;
9630  __Pyx_XDECREF(__pyx_t_1);
9631  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9632  __pyx_r = NULL;
9633  __pyx_L0:;
9634  __Pyx_XGIVEREF(__pyx_r);
9635  __Pyx_RefNannyFinishContext();
9636  return __pyx_r;
9637  }
9638 
9639  /* "PyClical.pyx":1049
9640  * return self.instance.scalar()
9641  *
9642  * def pure(self): # <<<<<<<<<<<<<<
9643  * """
9644  * Pure part.
9645  */
9646 
9647  /* Python wrapper */
9648  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9649  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 ";
9650  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9651  PyObject *__pyx_r = 0;
9652  __Pyx_RefNannyDeclarations
9653  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9654  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9655 
9656  /* function exit code */
9657  __Pyx_RefNannyFinishContext();
9658  return __pyx_r;
9659  }
9660 
9661  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9662  PyObject *__pyx_r = NULL;
9663  __Pyx_RefNannyDeclarations
9664  PyObject *__pyx_t_1 = NULL;
9665  PyObject *__pyx_t_2 = NULL;
9666  __Pyx_RefNannySetupContext("pure", 0);
9667 
9668  /* "PyClical.pyx":1058
9669  * {1,2}
9670  * """
9671  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9672  *
9673  * def even(self):
9674  */
9675  __Pyx_XDECREF(__pyx_r);
9676  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9677  __Pyx_GOTREF(__pyx_t_1);
9678  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->pure()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
9679  __Pyx_GOTREF(__pyx_t_2);
9680  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9681  __pyx_r = __pyx_t_2;
9682  __pyx_t_2 = 0;
9683  goto __pyx_L0;
9684 
9685  /* "PyClical.pyx":1049
9686  * return self.instance.scalar()
9687  *
9688  * def pure(self): # <<<<<<<<<<<<<<
9689  * """
9690  * Pure part.
9691  */
9692 
9693  /* function exit code */
9694  __pyx_L1_error:;
9695  __Pyx_XDECREF(__pyx_t_1);
9696  __Pyx_XDECREF(__pyx_t_2);
9697  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9698  __pyx_r = NULL;
9699  __pyx_L0:;
9700  __Pyx_XGIVEREF(__pyx_r);
9701  __Pyx_RefNannyFinishContext();
9702  return __pyx_r;
9703  }
9704 
9705  /* "PyClical.pyx":1060
9706  * return clifford().wrap( self.instance.pure() )
9707  *
9708  * def even(self): # <<<<<<<<<<<<<<
9709  * """
9710  * Even part of multivector, sum of even grade terms.
9711  */
9712 
9713  /* Python wrapper */
9714  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9715  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 ";
9716  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9717  PyObject *__pyx_r = 0;
9718  __Pyx_RefNannyDeclarations
9719  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9720  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9721 
9722  /* function exit code */
9723  __Pyx_RefNannyFinishContext();
9724  return __pyx_r;
9725  }
9726 
9727  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9728  PyObject *__pyx_r = NULL;
9729  __Pyx_RefNannyDeclarations
9730  PyObject *__pyx_t_1 = NULL;
9731  PyObject *__pyx_t_2 = NULL;
9732  __Pyx_RefNannySetupContext("even", 0);
9733 
9734  /* "PyClical.pyx":1067
9735  * 1+{1,2}
9736  * """
9737  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9738  *
9739  * def odd(self):
9740  */
9741  __Pyx_XDECREF(__pyx_r);
9742  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9743  __Pyx_GOTREF(__pyx_t_1);
9744  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->even()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
9745  __Pyx_GOTREF(__pyx_t_2);
9746  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9747  __pyx_r = __pyx_t_2;
9748  __pyx_t_2 = 0;
9749  goto __pyx_L0;
9750 
9751  /* "PyClical.pyx":1060
9752  * return clifford().wrap( self.instance.pure() )
9753  *
9754  * def even(self): # <<<<<<<<<<<<<<
9755  * """
9756  * Even part of multivector, sum of even grade terms.
9757  */
9758 
9759  /* function exit code */
9760  __pyx_L1_error:;
9761  __Pyx_XDECREF(__pyx_t_1);
9762  __Pyx_XDECREF(__pyx_t_2);
9763  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9764  __pyx_r = NULL;
9765  __pyx_L0:;
9766  __Pyx_XGIVEREF(__pyx_r);
9767  __Pyx_RefNannyFinishContext();
9768  return __pyx_r;
9769  }
9770 
9771  /* "PyClical.pyx":1069
9772  * return clifford().wrap( self.instance.even() )
9773  *
9774  * def odd(self): # <<<<<<<<<<<<<<
9775  * """
9776  * Odd part of multivector, sum of odd grade terms.
9777  */
9778 
9779  /* Python wrapper */
9780  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9781  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 ";
9782  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9783  PyObject *__pyx_r = 0;
9784  __Pyx_RefNannyDeclarations
9785  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9786  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9787 
9788  /* function exit code */
9789  __Pyx_RefNannyFinishContext();
9790  return __pyx_r;
9791  }
9792 
9793  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9794  PyObject *__pyx_r = NULL;
9795  __Pyx_RefNannyDeclarations
9796  PyObject *__pyx_t_1 = NULL;
9797  PyObject *__pyx_t_2 = NULL;
9798  __Pyx_RefNannySetupContext("odd", 0);
9799 
9800  /* "PyClical.pyx":1076
9801  * {1}
9802  * """
9803  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9804  *
9805  * def vector_part(self, frm = None):
9806  */
9807  __Pyx_XDECREF(__pyx_r);
9808  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9809  __Pyx_GOTREF(__pyx_t_1);
9810  __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)
9811  __Pyx_GOTREF(__pyx_t_2);
9812  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9813  __pyx_r = __pyx_t_2;
9814  __pyx_t_2 = 0;
9815  goto __pyx_L0;
9816 
9817  /* "PyClical.pyx":1069
9818  * return clifford().wrap( self.instance.even() )
9819  *
9820  * def odd(self): # <<<<<<<<<<<<<<
9821  * """
9822  * Odd part of multivector, sum of odd grade terms.
9823  */
9824 
9825  /* function exit code */
9826  __pyx_L1_error:;
9827  __Pyx_XDECREF(__pyx_t_1);
9828  __Pyx_XDECREF(__pyx_t_2);
9829  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9830  __pyx_r = NULL;
9831  __pyx_L0:;
9832  __Pyx_XGIVEREF(__pyx_r);
9833  __Pyx_RefNannyFinishContext();
9834  return __pyx_r;
9835  }
9836 
9837  /* "PyClical.pyx":1078
9838  * return clifford().wrap( self.instance.odd() )
9839  *
9840  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9841  * """
9842  * Vector part of multivector, as a Python list, with respect to frm.
9843  */
9844 
9845  /* Python wrapper */
9846  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9847  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 ";
9848  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9849  PyObject *__pyx_v_frm = 0;
9850  PyObject *__pyx_r = 0;
9851  __Pyx_RefNannyDeclarations
9852  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9853  {
9854  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9855  PyObject* values[1] = {0};
9856  values[0] = ((PyObject *)Py_None);
9857  if (unlikely(__pyx_kwds)) {
9858  Py_ssize_t kw_args;
9859  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9860  switch (pos_args) {
9861  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9862  CYTHON_FALLTHROUGH;
9863  case 0: break;
9864  default: goto __pyx_L5_argtuple_error;
9865  }
9866  kw_args = PyDict_Size(__pyx_kwds);
9867  switch (pos_args) {
9868  case 0:
9869  if (kw_args > 0) {
9870  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9871  if (value) { values[0] = value; kw_args--; }
9872  }
9873  }
9874  if (unlikely(kw_args > 0)) {
9875  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9876  }
9877  } else {
9878  switch (PyTuple_GET_SIZE(__pyx_args)) {
9879  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9880  CYTHON_FALLTHROUGH;
9881  case 0: break;
9882  default: goto __pyx_L5_argtuple_error;
9883  }
9884  }
9885  __pyx_v_frm = values[0];
9886  }
9887  goto __pyx_L4_argument_unpacking_done;
9888  __pyx_L5_argtuple_error:;
9889  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9890  __pyx_L3_error:;
9891  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9892  __Pyx_RefNannyFinishContext();
9893  return NULL;
9894  __pyx_L4_argument_unpacking_done:;
9895  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9896 
9897  /* function exit code */
9898  __Pyx_RefNannyFinishContext();
9899  return __pyx_r;
9900  }
9901 
9902  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9903  PyObject *__pyx_v_error_msg_prefix = NULL;
9904  std::vector<scalar_t> __pyx_v_vec;
9905  int __pyx_v_n;
9906  int __pyx_v_i;
9907  PyObject *__pyx_v_lst = NULL;
9908  PyObject *__pyx_v_err = NULL;
9909  PyObject *__pyx_r = NULL;
9910  __Pyx_RefNannyDeclarations
9911  PyObject *__pyx_t_1 = NULL;
9912  PyObject *__pyx_t_2 = NULL;
9913  PyObject *__pyx_t_3 = NULL;
9914  int __pyx_t_4;
9915  int __pyx_t_5;
9916  std::vector<scalar_t> __pyx_t_6;
9917  PyObject *__pyx_t_7 = NULL;
9918  int __pyx_t_8;
9919  int __pyx_t_9;
9920  int __pyx_t_10;
9921  PyObject *__pyx_t_11 = NULL;
9922  PyObject *__pyx_t_12 = NULL;
9923  PyObject *__pyx_t_13 = NULL;
9924  PyObject *__pyx_t_14 = NULL;
9925  PyObject *__pyx_t_15 = NULL;
9926  __Pyx_RefNannySetupContext("vector_part", 0);
9927 
9928  /* "PyClical.pyx":1087
9929  * [0.0, 2.0, 3.0]
9930  * """
9931  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9932  * cdef vector[scalar_t] vec
9933  * cdef int n
9934  */
9935  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9936  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9937 
9938  /* "PyClical.pyx":1091
9939  * cdef int n
9940  * cdef int i
9941  * try: # <<<<<<<<<<<<<<
9942  * if frm is None:
9943  * vec = self.instance.vector_part()
9944  */
9945  {
9946  __Pyx_PyThreadState_declare
9947  __Pyx_PyThreadState_assign
9948  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9949  __Pyx_XGOTREF(__pyx_t_1);
9950  __Pyx_XGOTREF(__pyx_t_2);
9951  __Pyx_XGOTREF(__pyx_t_3);
9952  /*try:*/ {
9953 
9954  /* "PyClical.pyx":1092
9955  * cdef int i
9956  * try:
9957  * if frm is None: # <<<<<<<<<<<<<<
9958  * vec = self.instance.vector_part()
9959  * else:
9960  */
9961  __pyx_t_4 = (__pyx_v_frm == Py_None);
9962  __pyx_t_5 = (__pyx_t_4 != 0);
9963  if (__pyx_t_5) {
9964 
9965  /* "PyClical.pyx":1093
9966  * try:
9967  * if frm is None:
9968  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9969  * else:
9970  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9971  */
9972  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9973  __pyx_v_vec = __pyx_t_6;
9974 
9975  /* "PyClical.pyx":1092
9976  * cdef int i
9977  * try:
9978  * if frm is None: # <<<<<<<<<<<<<<
9979  * vec = self.instance.vector_part()
9980  * else:
9981  */
9982  goto __pyx_L9;
9983  }
9984 
9985  /* "PyClical.pyx":1095
9986  * vec = self.instance.vector_part()
9987  * else:
9988  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9989  * n = vec.size()
9990  * lst = [0.0]*n
9991  */
9992  /*else*/ {
9993  try {
9994  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9995  } catch(...) {
9996  __Pyx_CppExn2PyErr();
9997  __PYX_ERR(0, 1095, __pyx_L3_error)
9998  }
9999  __pyx_v_vec = __pyx_t_6;
10000  }
10001  __pyx_L9:;
10002 
10003  /* "PyClical.pyx":1096
10004  * else:
10005  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10006  * n = vec.size() # <<<<<<<<<<<<<<
10007  * lst = [0.0]*n
10008  * for i in xrange(n):
10009  */
10010  __pyx_v_n = __pyx_v_vec.size();
10011 
10012  /* "PyClical.pyx":1097
10013  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10014  * n = vec.size()
10015  * lst = [0.0]*n # <<<<<<<<<<<<<<
10016  * for i in xrange(n):
10017  * lst[i] = vec[i]
10018  */
10019  __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)
10020  __Pyx_GOTREF(__pyx_t_7);
10021  { Py_ssize_t __pyx_temp;
10022  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10023  __Pyx_INCREF(__pyx_float_0_0);
10024  __Pyx_GIVEREF(__pyx_float_0_0);
10025  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10026  }
10027  }
10028  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10029  __pyx_t_7 = 0;
10030 
10031  /* "PyClical.pyx":1098
10032  * n = vec.size()
10033  * lst = [0.0]*n
10034  * for i in xrange(n): # <<<<<<<<<<<<<<
10035  * lst[i] = vec[i]
10036  * return lst
10037  */
10038  __pyx_t_8 = __pyx_v_n;
10039  __pyx_t_9 = __pyx_t_8;
10040  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10041  __pyx_v_i = __pyx_t_10;
10042 
10043  /* "PyClical.pyx":1099
10044  * lst = [0.0]*n
10045  * for i in xrange(n):
10046  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10047  * return lst
10048  * except RuntimeError as err:
10049  */
10050  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10051  __Pyx_GOTREF(__pyx_t_7);
10052  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)
10053  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10054  }
10055 
10056  /* "PyClical.pyx":1100
10057  * for i in xrange(n):
10058  * lst[i] = vec[i]
10059  * return lst # <<<<<<<<<<<<<<
10060  * except RuntimeError as err:
10061  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10062  */
10063  __Pyx_XDECREF(__pyx_r);
10064  __Pyx_INCREF(__pyx_v_lst);
10065  __pyx_r = __pyx_v_lst;
10066  goto __pyx_L7_try_return;
10067 
10068  /* "PyClical.pyx":1091
10069  * cdef int n
10070  * cdef int i
10071  * try: # <<<<<<<<<<<<<<
10072  * if frm is None:
10073  * vec = self.instance.vector_part()
10074  */
10075  }
10076  __pyx_L3_error:;
10077  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10078 
10079  /* "PyClical.pyx":1101
10080  * lst[i] = vec[i]
10081  * return lst
10082  * except RuntimeError as err: # <<<<<<<<<<<<<<
10083  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10084  * + repr(frm) + " as frame:\n\t"
10085  */
10086  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10087  if (__pyx_t_8) {
10088  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10089  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10090  __Pyx_GOTREF(__pyx_t_7);
10091  __Pyx_GOTREF(__pyx_t_11);
10092  __Pyx_GOTREF(__pyx_t_12);
10093  __Pyx_INCREF(__pyx_t_11);
10094  __pyx_v_err = __pyx_t_11;
10095 
10096  /* "PyClical.pyx":1102
10097  * return lst
10098  * except RuntimeError as err:
10099  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10100  * + repr(frm) + " as frame:\n\t"
10101  * + str(err))
10102  */
10103  __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)
10104  __Pyx_GOTREF(__pyx_t_13);
10105  __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)
10106  __Pyx_GOTREF(__pyx_t_14);
10107  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10108  __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)
10109  __Pyx_GOTREF(__pyx_t_13);
10110  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10111 
10112  /* "PyClical.pyx":1103
10113  * except RuntimeError as err:
10114  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10115  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10116  * + str(err))
10117  *
10118  */
10119  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10120  __Pyx_GOTREF(__pyx_t_14);
10121  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10122  __Pyx_GOTREF(__pyx_t_15);
10123  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10124  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10125  __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)
10126  __Pyx_GOTREF(__pyx_t_14);
10127  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10128 
10129  /* "PyClical.pyx":1104
10130  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10131  * + repr(frm) + " as frame:\n\t"
10132  * + str(err)) # <<<<<<<<<<<<<<
10133  *
10134  * def involute(self):
10135  */
10136  __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)
10137  __Pyx_GOTREF(__pyx_t_15);
10138  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10139  __Pyx_GOTREF(__pyx_t_13);
10140  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10141  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10142 
10143  /* "PyClical.pyx":1102
10144  * return lst
10145  * except RuntimeError as err:
10146  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10147  * + repr(frm) + " as frame:\n\t"
10148  * + str(err))
10149  */
10150  __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)
10151  __Pyx_GOTREF(__pyx_t_15);
10152  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10153  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10154  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10155  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10156  }
10157  goto __pyx_L5_except_error;
10158  __pyx_L5_except_error:;
10159 
10160  /* "PyClical.pyx":1091
10161  * cdef int n
10162  * cdef int i
10163  * try: # <<<<<<<<<<<<<<
10164  * if frm is None:
10165  * vec = self.instance.vector_part()
10166  */
10167  __Pyx_XGIVEREF(__pyx_t_1);
10168  __Pyx_XGIVEREF(__pyx_t_2);
10169  __Pyx_XGIVEREF(__pyx_t_3);
10170  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10171  goto __pyx_L1_error;
10172  __pyx_L7_try_return:;
10173  __Pyx_XGIVEREF(__pyx_t_1);
10174  __Pyx_XGIVEREF(__pyx_t_2);
10175  __Pyx_XGIVEREF(__pyx_t_3);
10176  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10177  goto __pyx_L0;
10178  }
10179 
10180  /* "PyClical.pyx":1078
10181  * return clifford().wrap( self.instance.odd() )
10182  *
10183  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10184  * """
10185  * Vector part of multivector, as a Python list, with respect to frm.
10186  */
10187 
10188  /* function exit code */
10189  __pyx_L1_error:;
10190  __Pyx_XDECREF(__pyx_t_7);
10191  __Pyx_XDECREF(__pyx_t_11);
10192  __Pyx_XDECREF(__pyx_t_12);
10193  __Pyx_XDECREF(__pyx_t_13);
10194  __Pyx_XDECREF(__pyx_t_14);
10195  __Pyx_XDECREF(__pyx_t_15);
10196  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10197  __pyx_r = NULL;
10198  __pyx_L0:;
10199  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10200  __Pyx_XDECREF(__pyx_v_lst);
10201  __Pyx_XDECREF(__pyx_v_err);
10202  __Pyx_XGIVEREF(__pyx_r);
10203  __Pyx_RefNannyFinishContext();
10204  return __pyx_r;
10205  }
10206 
10207  /* "PyClical.pyx":1106
10208  * + str(err))
10209  *
10210  * def involute(self): # <<<<<<<<<<<<<<
10211  * """
10212  * Main involution, each {i} is replaced by -{i} in each term,
10213  */
10214 
10215  /* Python wrapper */
10216  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10217  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 ";
10218  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10219  PyObject *__pyx_r = 0;
10220  __Pyx_RefNannyDeclarations
10221  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10222  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10223 
10224  /* function exit code */
10225  __Pyx_RefNannyFinishContext();
10226  return __pyx_r;
10227  }
10228 
10229  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10230  PyObject *__pyx_r = NULL;
10231  __Pyx_RefNannyDeclarations
10232  PyObject *__pyx_t_1 = NULL;
10233  PyObject *__pyx_t_2 = NULL;
10234  __Pyx_RefNannySetupContext("involute", 0);
10235 
10236  /* "PyClical.pyx":1120
10237  * 1-{1}+{1,2}
10238  * """
10239  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10240  *
10241  * def reverse(self):
10242  */
10243  __Pyx_XDECREF(__pyx_r);
10244  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10245  __Pyx_GOTREF(__pyx_t_1);
10246  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->involute()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
10247  __Pyx_GOTREF(__pyx_t_2);
10248  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10249  __pyx_r = __pyx_t_2;
10250  __pyx_t_2 = 0;
10251  goto __pyx_L0;
10252 
10253  /* "PyClical.pyx":1106
10254  * + str(err))
10255  *
10256  * def involute(self): # <<<<<<<<<<<<<<
10257  * """
10258  * Main involution, each {i} is replaced by -{i} in each term,
10259  */
10260 
10261  /* function exit code */
10262  __pyx_L1_error:;
10263  __Pyx_XDECREF(__pyx_t_1);
10264  __Pyx_XDECREF(__pyx_t_2);
10265  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10266  __pyx_r = NULL;
10267  __pyx_L0:;
10268  __Pyx_XGIVEREF(__pyx_r);
10269  __Pyx_RefNannyFinishContext();
10270  return __pyx_r;
10271  }
10272 
10273  /* "PyClical.pyx":1122
10274  * return clifford().wrap( self.instance.involute() )
10275  *
10276  * def reverse(self): # <<<<<<<<<<<<<<
10277  * """
10278  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10279  */
10280 
10281  /* Python wrapper */
10282  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10283  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 ";
10284  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10285  PyObject *__pyx_r = 0;
10286  __Pyx_RefNannyDeclarations
10287  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10288  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10289 
10290  /* function exit code */
10291  __Pyx_RefNannyFinishContext();
10292  return __pyx_r;
10293  }
10294 
10295  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10296  PyObject *__pyx_r = NULL;
10297  __Pyx_RefNannyDeclarations
10298  PyObject *__pyx_t_1 = NULL;
10299  PyObject *__pyx_t_2 = NULL;
10300  __Pyx_RefNannySetupContext("reverse", 0);
10301 
10302  /* "PyClical.pyx":1135
10303  * 1+{1}-{1,2}
10304  * """
10305  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10306  *
10307  * def conj(self):
10308  */
10309  __Pyx_XDECREF(__pyx_r);
10310  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10311  __Pyx_GOTREF(__pyx_t_1);
10312  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->reverse()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
10313  __Pyx_GOTREF(__pyx_t_2);
10314  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10315  __pyx_r = __pyx_t_2;
10316  __pyx_t_2 = 0;
10317  goto __pyx_L0;
10318 
10319  /* "PyClical.pyx":1122
10320  * return clifford().wrap( self.instance.involute() )
10321  *
10322  * def reverse(self): # <<<<<<<<<<<<<<
10323  * """
10324  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10325  */
10326 
10327  /* function exit code */
10328  __pyx_L1_error:;
10329  __Pyx_XDECREF(__pyx_t_1);
10330  __Pyx_XDECREF(__pyx_t_2);
10331  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10332  __pyx_r = NULL;
10333  __pyx_L0:;
10334  __Pyx_XGIVEREF(__pyx_r);
10335  __Pyx_RefNannyFinishContext();
10336  return __pyx_r;
10337  }
10338 
10339  /* "PyClical.pyx":1137
10340  * return clifford().wrap( self.instance.reverse() )
10341  *
10342  * def conj(self): # <<<<<<<<<<<<<<
10343  * """
10344  * Conjugation, reverse o involute == involute o reverse.
10345  */
10346 
10347  /* Python wrapper */
10348  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10349  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 ";
10350  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10351  PyObject *__pyx_r = 0;
10352  __Pyx_RefNannyDeclarations
10353  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10354  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10355 
10356  /* function exit code */
10357  __Pyx_RefNannyFinishContext();
10358  return __pyx_r;
10359  }
10360 
10361  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10362  PyObject *__pyx_r = NULL;
10363  __Pyx_RefNannyDeclarations
10364  PyObject *__pyx_t_1 = NULL;
10365  PyObject *__pyx_t_2 = NULL;
10366  __Pyx_RefNannySetupContext("conj", 0);
10367 
10368  /* "PyClical.pyx":1150
10369  * 1-{1}-{1,2}
10370  * """
10371  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10372  *
10373  * def quad(self):
10374  */
10375  __Pyx_XDECREF(__pyx_r);
10376  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10377  __Pyx_GOTREF(__pyx_t_1);
10378  __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)
10379  __Pyx_GOTREF(__pyx_t_2);
10380  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10381  __pyx_r = __pyx_t_2;
10382  __pyx_t_2 = 0;
10383  goto __pyx_L0;
10384 
10385  /* "PyClical.pyx":1137
10386  * return clifford().wrap( self.instance.reverse() )
10387  *
10388  * def conj(self): # <<<<<<<<<<<<<<
10389  * """
10390  * Conjugation, reverse o involute == involute o reverse.
10391  */
10392 
10393  /* function exit code */
10394  __pyx_L1_error:;
10395  __Pyx_XDECREF(__pyx_t_1);
10396  __Pyx_XDECREF(__pyx_t_2);
10397  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10398  __pyx_r = NULL;
10399  __pyx_L0:;
10400  __Pyx_XGIVEREF(__pyx_r);
10401  __Pyx_RefNannyFinishContext();
10402  return __pyx_r;
10403  }
10404 
10405  /* "PyClical.pyx":1152
10406  * return clifford().wrap( self.instance.conj() )
10407  *
10408  * def quad(self): # <<<<<<<<<<<<<<
10409  * """
10410  * Quadratic form == (rev(x)*x)(0).
10411  */
10412 
10413  /* Python wrapper */
10414  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10415  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 ";
10416  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10417  PyObject *__pyx_r = 0;
10418  __Pyx_RefNannyDeclarations
10419  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10420  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10421 
10422  /* function exit code */
10423  __Pyx_RefNannyFinishContext();
10424  return __pyx_r;
10425  }
10426 
10427  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10428  PyObject *__pyx_r = NULL;
10429  __Pyx_RefNannyDeclarations
10430  PyObject *__pyx_t_1 = NULL;
10431  __Pyx_RefNannySetupContext("quad", 0);
10432 
10433  /* "PyClical.pyx":1161
10434  * 2.0
10435  * """
10436  * return self.instance.quad() # <<<<<<<<<<<<<<
10437  *
10438  * def norm(self):
10439  */
10440  __Pyx_XDECREF(__pyx_r);
10441  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10442  __Pyx_GOTREF(__pyx_t_1);
10443  __pyx_r = __pyx_t_1;
10444  __pyx_t_1 = 0;
10445  goto __pyx_L0;
10446 
10447  /* "PyClical.pyx":1152
10448  * return clifford().wrap( self.instance.conj() )
10449  *
10450  * def quad(self): # <<<<<<<<<<<<<<
10451  * """
10452  * Quadratic form == (rev(x)*x)(0).
10453  */
10454 
10455  /* function exit code */
10456  __pyx_L1_error:;
10457  __Pyx_XDECREF(__pyx_t_1);
10458  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10459  __pyx_r = NULL;
10460  __pyx_L0:;
10461  __Pyx_XGIVEREF(__pyx_r);
10462  __Pyx_RefNannyFinishContext();
10463  return __pyx_r;
10464  }
10465 
10466  /* "PyClical.pyx":1163
10467  * return self.instance.quad()
10468  *
10469  * def norm(self): # <<<<<<<<<<<<<<
10470  * """
10471  * Norm == sum of squares of coordinates.
10472  */
10473 
10474  /* Python wrapper */
10475  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10476  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 ";
10477  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10478  PyObject *__pyx_r = 0;
10479  __Pyx_RefNannyDeclarations
10480  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10481  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10482 
10483  /* function exit code */
10484  __Pyx_RefNannyFinishContext();
10485  return __pyx_r;
10486  }
10487 
10488  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10489  PyObject *__pyx_r = NULL;
10490  __Pyx_RefNannyDeclarations
10491  PyObject *__pyx_t_1 = NULL;
10492  __Pyx_RefNannySetupContext("norm", 0);
10493 
10494  /* "PyClical.pyx":1172
10495  * 4.0
10496  * """
10497  * return self.instance.norm() # <<<<<<<<<<<<<<
10498  *
10499  * def abs(self):
10500  */
10501  __Pyx_XDECREF(__pyx_r);
10502  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10503  __Pyx_GOTREF(__pyx_t_1);
10504  __pyx_r = __pyx_t_1;
10505  __pyx_t_1 = 0;
10506  goto __pyx_L0;
10507 
10508  /* "PyClical.pyx":1163
10509  * return self.instance.quad()
10510  *
10511  * def norm(self): # <<<<<<<<<<<<<<
10512  * """
10513  * Norm == sum of squares of coordinates.
10514  */
10515 
10516  /* function exit code */
10517  __pyx_L1_error:;
10518  __Pyx_XDECREF(__pyx_t_1);
10519  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10520  __pyx_r = NULL;
10521  __pyx_L0:;
10522  __Pyx_XGIVEREF(__pyx_r);
10523  __Pyx_RefNannyFinishContext();
10524  return __pyx_r;
10525  }
10526 
10527  /* "PyClical.pyx":1174
10528  * return self.instance.norm()
10529  *
10530  * def abs(self): # <<<<<<<<<<<<<<
10531  * """
10532  * Absolute value: square root of norm.
10533  */
10534 
10535  /* Python wrapper */
10536  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10537  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 ";
10538  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10539  PyObject *__pyx_r = 0;
10540  __Pyx_RefNannyDeclarations
10541  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10542  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10543 
10544  /* function exit code */
10545  __Pyx_RefNannyFinishContext();
10546  return __pyx_r;
10547  }
10548 
10549  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10550  PyObject *__pyx_r = NULL;
10551  __Pyx_RefNannyDeclarations
10552  PyObject *__pyx_t_1 = NULL;
10553  __Pyx_RefNannySetupContext("abs", 0);
10554 
10555  /* "PyClical.pyx":1181
10556  * 2.0
10557  * """
10558  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10559  *
10560  * def max_abs(self):
10561  */
10562  __Pyx_XDECREF(__pyx_r);
10563  __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)
10564  __Pyx_GOTREF(__pyx_t_1);
10565  __pyx_r = __pyx_t_1;
10566  __pyx_t_1 = 0;
10567  goto __pyx_L0;
10568 
10569  /* "PyClical.pyx":1174
10570  * return self.instance.norm()
10571  *
10572  * def abs(self): # <<<<<<<<<<<<<<
10573  * """
10574  * Absolute value: square root of norm.
10575  */
10576 
10577  /* function exit code */
10578  __pyx_L1_error:;
10579  __Pyx_XDECREF(__pyx_t_1);
10580  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10581  __pyx_r = NULL;
10582  __pyx_L0:;
10583  __Pyx_XGIVEREF(__pyx_r);
10584  __Pyx_RefNannyFinishContext();
10585  return __pyx_r;
10586  }
10587 
10588  /* "PyClical.pyx":1183
10589  * return glucat.abs( self.unwrap() )
10590  *
10591  * def max_abs(self): # <<<<<<<<<<<<<<
10592  * """
10593  * Maximum of absolute values of components of multivector: multivector infinity norm.
10594  */
10595 
10596  /* Python wrapper */
10597  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10598  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 ";
10599  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10600  PyObject *__pyx_r = 0;
10601  __Pyx_RefNannyDeclarations
10602  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10603  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10604 
10605  /* function exit code */
10606  __Pyx_RefNannyFinishContext();
10607  return __pyx_r;
10608  }
10609 
10610  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10611  PyObject *__pyx_r = NULL;
10612  __Pyx_RefNannyDeclarations
10613  PyObject *__pyx_t_1 = NULL;
10614  __Pyx_RefNannySetupContext("max_abs", 0);
10615 
10616  /* "PyClical.pyx":1192
10617  * 3.0
10618  * """
10619  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10620  *
10621  * def truncated(self, limit):
10622  */
10623  __Pyx_XDECREF(__pyx_r);
10624  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10625  __Pyx_GOTREF(__pyx_t_1);
10626  __pyx_r = __pyx_t_1;
10627  __pyx_t_1 = 0;
10628  goto __pyx_L0;
10629 
10630  /* "PyClical.pyx":1183
10631  * return glucat.abs( self.unwrap() )
10632  *
10633  * def max_abs(self): # <<<<<<<<<<<<<<
10634  * """
10635  * Maximum of absolute values of components of multivector: multivector infinity norm.
10636  */
10637 
10638  /* function exit code */
10639  __pyx_L1_error:;
10640  __Pyx_XDECREF(__pyx_t_1);
10641  __Pyx_AddTraceback("PyClical.clifford.max_abs", __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":1194
10650  * return self.instance.max_abs()
10651  *
10652  * def truncated(self, limit): # <<<<<<<<<<<<<<
10653  * """
10654  * Remove all terms of self with relative size smaller than limit.
10655  */
10656 
10657  /* Python wrapper */
10658  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10659  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 ";
10660  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10661  PyObject *__pyx_r = 0;
10662  __Pyx_RefNannyDeclarations
10663  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10664  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10665 
10666  /* function exit code */
10667  __Pyx_RefNannyFinishContext();
10668  return __pyx_r;
10669  }
10670 
10671  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10672  PyObject *__pyx_r = NULL;
10673  __Pyx_RefNannyDeclarations
10674  PyObject *__pyx_t_1 = NULL;
10675  scalar_t __pyx_t_2;
10676  PyObject *__pyx_t_3 = NULL;
10677  __Pyx_RefNannySetupContext("truncated", 0);
10678 
10679  /* "PyClical.pyx":1203
10680  * clifford("10000+{1}")
10681  * """
10682  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10683  *
10684  * def isnan(self):
10685  */
10686  __Pyx_XDECREF(__pyx_r);
10687  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10688  __Pyx_GOTREF(__pyx_t_1);
10689  __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)
10690  __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)
10691  __Pyx_GOTREF(__pyx_t_3);
10692  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10693  __pyx_r = __pyx_t_3;
10694  __pyx_t_3 = 0;
10695  goto __pyx_L0;
10696 
10697  /* "PyClical.pyx":1194
10698  * return self.instance.max_abs()
10699  *
10700  * def truncated(self, limit): # <<<<<<<<<<<<<<
10701  * """
10702  * Remove all terms of self with relative size smaller than limit.
10703  */
10704 
10705  /* function exit code */
10706  __pyx_L1_error:;
10707  __Pyx_XDECREF(__pyx_t_1);
10708  __Pyx_XDECREF(__pyx_t_3);
10709  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10710  __pyx_r = NULL;
10711  __pyx_L0:;
10712  __Pyx_XGIVEREF(__pyx_r);
10713  __Pyx_RefNannyFinishContext();
10714  return __pyx_r;
10715  }
10716 
10717  /* "PyClical.pyx":1205
10718  * return clifford().wrap( self.instance.truncated(limit) )
10719  *
10720  * def isnan(self): # <<<<<<<<<<<<<<
10721  * """
10722  * Check if a multivector contains any IEEE NaN values.
10723  */
10724 
10725  /* Python wrapper */
10726  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10727  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10728  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10729  PyObject *__pyx_r = 0;
10730  __Pyx_RefNannyDeclarations
10731  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10732  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10733 
10734  /* function exit code */
10735  __Pyx_RefNannyFinishContext();
10736  return __pyx_r;
10737  }
10738 
10739  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10740  PyObject *__pyx_r = NULL;
10741  __Pyx_RefNannyDeclarations
10742  PyObject *__pyx_t_1 = NULL;
10743  __Pyx_RefNannySetupContext("isnan", 0);
10744 
10745  /* "PyClical.pyx":1212
10746  * False
10747  * """
10748  * return self.instance.isnan() # <<<<<<<<<<<<<<
10749  *
10750  * def frame(self):
10751  */
10752  __Pyx_XDECREF(__pyx_r);
10753  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10754  __Pyx_GOTREF(__pyx_t_1);
10755  __pyx_r = __pyx_t_1;
10756  __pyx_t_1 = 0;
10757  goto __pyx_L0;
10758 
10759  /* "PyClical.pyx":1205
10760  * return clifford().wrap( self.instance.truncated(limit) )
10761  *
10762  * def isnan(self): # <<<<<<<<<<<<<<
10763  * """
10764  * Check if a multivector contains any IEEE NaN values.
10765  */
10766 
10767  /* function exit code */
10768  __pyx_L1_error:;
10769  __Pyx_XDECREF(__pyx_t_1);
10770  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10771  __pyx_r = NULL;
10772  __pyx_L0:;
10773  __Pyx_XGIVEREF(__pyx_r);
10774  __Pyx_RefNannyFinishContext();
10775  return __pyx_r;
10776  }
10777 
10778  /* "PyClical.pyx":1214
10779  * return self.instance.isnan()
10780  *
10781  * def frame(self): # <<<<<<<<<<<<<<
10782  * """
10783  * Subalgebra generated by all generators of terms of given multivector.
10784  */
10785 
10786  /* Python wrapper */
10787  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10788  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 ";
10789  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10790  PyObject *__pyx_r = 0;
10791  __Pyx_RefNannyDeclarations
10792  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10793  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10794 
10795  /* function exit code */
10796  __Pyx_RefNannyFinishContext();
10797  return __pyx_r;
10798  }
10799 
10800  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10801  PyObject *__pyx_r = NULL;
10802  __Pyx_RefNannyDeclarations
10803  PyObject *__pyx_t_1 = NULL;
10804  PyObject *__pyx_t_2 = NULL;
10805  __Pyx_RefNannySetupContext("frame", 0);
10806 
10807  /* "PyClical.pyx":1223
10808  * <type 'PyClical.index_set'>
10809  * """
10810  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10811  *
10812  * def __repr__(self):
10813  */
10814  __Pyx_XDECREF(__pyx_r);
10815  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10816  __Pyx_GOTREF(__pyx_t_1);
10817  __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)
10818  __Pyx_GOTREF(__pyx_t_2);
10819  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10820  __pyx_r = __pyx_t_2;
10821  __pyx_t_2 = 0;
10822  goto __pyx_L0;
10823 
10824  /* "PyClical.pyx":1214
10825  * return self.instance.isnan()
10826  *
10827  * def frame(self): # <<<<<<<<<<<<<<
10828  * """
10829  * Subalgebra generated by all generators of terms of given multivector.
10830  */
10831 
10832  /* function exit code */
10833  __pyx_L1_error:;
10834  __Pyx_XDECREF(__pyx_t_1);
10835  __Pyx_XDECREF(__pyx_t_2);
10836  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10837  __pyx_r = NULL;
10838  __pyx_L0:;
10839  __Pyx_XGIVEREF(__pyx_r);
10840  __Pyx_RefNannyFinishContext();
10841  return __pyx_r;
10842  }
10843 
10844  /* "PyClical.pyx":1225
10845  * return index_set().wrap( self.instance.frame() )
10846  *
10847  * def __repr__(self): # <<<<<<<<<<<<<<
10848  * """
10849  * The official string representation of self.
10850  */
10851 
10852  /* Python wrapper */
10853  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10854  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 ";
10855  #if CYTHON_COMPILING_IN_CPYTHON
10856  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10857  #endif
10858  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10859  PyObject *__pyx_r = 0;
10860  __Pyx_RefNannyDeclarations
10861  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10862  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10863 
10864  /* function exit code */
10865  __Pyx_RefNannyFinishContext();
10866  return __pyx_r;
10867  }
10868 
10869  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10870  PyObject *__pyx_r = NULL;
10871  __Pyx_RefNannyDeclarations
10872  PyObject *__pyx_t_1 = NULL;
10873  __Pyx_RefNannySetupContext("__repr__", 0);
10874 
10875  /* "PyClical.pyx":1232
10876  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10877  * """
10878  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10879  *
10880  * def __str__(self):
10881  */
10882  __Pyx_XDECREF(__pyx_r);
10883  __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)
10884  __Pyx_GOTREF(__pyx_t_1);
10885  __pyx_r = __pyx_t_1;
10886  __pyx_t_1 = 0;
10887  goto __pyx_L0;
10888 
10889  /* "PyClical.pyx":1225
10890  * return index_set().wrap( self.instance.frame() )
10891  *
10892  * def __repr__(self): # <<<<<<<<<<<<<<
10893  * """
10894  * The official string representation of self.
10895  */
10896 
10897  /* function exit code */
10898  __pyx_L1_error:;
10899  __Pyx_XDECREF(__pyx_t_1);
10900  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10901  __pyx_r = NULL;
10902  __pyx_L0:;
10903  __Pyx_XGIVEREF(__pyx_r);
10904  __Pyx_RefNannyFinishContext();
10905  return __pyx_r;
10906  }
10907 
10908  /* "PyClical.pyx":1234
10909  * return clifford_to_repr( self.unwrap() ).c_str()
10910  *
10911  * def __str__(self): # <<<<<<<<<<<<<<
10912  * """
10913  * The informal string representation of self.
10914  */
10915 
10916  /* Python wrapper */
10917  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10918  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 ";
10919  #if CYTHON_COMPILING_IN_CPYTHON
10920  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10921  #endif
10922  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10923  PyObject *__pyx_r = 0;
10924  __Pyx_RefNannyDeclarations
10925  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10926  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10927 
10928  /* function exit code */
10929  __Pyx_RefNannyFinishContext();
10930  return __pyx_r;
10931  }
10932 
10933  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10934  PyObject *__pyx_r = NULL;
10935  __Pyx_RefNannyDeclarations
10936  PyObject *__pyx_t_1 = NULL;
10937  __Pyx_RefNannySetupContext("__str__", 0);
10938 
10939  /* "PyClical.pyx":1241
10940  * '1+3{-1}+2{1,2}+4{-2,7}'
10941  * """
10942  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10943  *
10944  * def clifford_hidden_doctests():
10945  */
10946  __Pyx_XDECREF(__pyx_r);
10947  __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)
10948  __Pyx_GOTREF(__pyx_t_1);
10949  __pyx_r = __pyx_t_1;
10950  __pyx_t_1 = 0;
10951  goto __pyx_L0;
10952 
10953  /* "PyClical.pyx":1234
10954  * return clifford_to_repr( self.unwrap() ).c_str()
10955  *
10956  * def __str__(self): # <<<<<<<<<<<<<<
10957  * """
10958  * The informal string representation of self.
10959  */
10960 
10961  /* function exit code */
10962  __pyx_L1_error:;
10963  __Pyx_XDECREF(__pyx_t_1);
10964  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10965  __pyx_r = NULL;
10966  __pyx_L0:;
10967  __Pyx_XGIVEREF(__pyx_r);
10968  __Pyx_RefNannyFinishContext();
10969  return __pyx_r;
10970  }
10971 
10972  /* "(tree fragment)":1
10973  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10974  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10975  * def __setstate_cython__(self, __pyx_state):
10976  */
10977 
10978  /* Python wrapper */
10979  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10980  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10981  PyObject *__pyx_r = 0;
10982  __Pyx_RefNannyDeclarations
10983  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10984  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10985 
10986  /* function exit code */
10987  __Pyx_RefNannyFinishContext();
10988  return __pyx_r;
10989  }
10990 
10991  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10992  PyObject *__pyx_r = NULL;
10993  __Pyx_RefNannyDeclarations
10994  PyObject *__pyx_t_1 = NULL;
10995  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10996 
10997  /* "(tree fragment)":2
10998  * def __reduce_cython__(self):
10999  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11000  * def __setstate_cython__(self, __pyx_state):
11001  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11002  */
11003  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
11004  __Pyx_GOTREF(__pyx_t_1);
11005  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11006  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11007  __PYX_ERR(1, 2, __pyx_L1_error)
11008 
11009  /* "(tree fragment)":1
11010  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11011  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11012  * def __setstate_cython__(self, __pyx_state):
11013  */
11014 
11015  /* function exit code */
11016  __pyx_L1_error:;
11017  __Pyx_XDECREF(__pyx_t_1);
11018  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11019  __pyx_r = NULL;
11020  __Pyx_XGIVEREF(__pyx_r);
11021  __Pyx_RefNannyFinishContext();
11022  return __pyx_r;
11023  }
11024 
11025  /* "(tree fragment)":3
11026  * def __reduce_cython__(self):
11027  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11028  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11029  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11030  */
11031 
11032  /* Python wrapper */
11033  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11034  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11035  PyObject *__pyx_r = 0;
11036  __Pyx_RefNannyDeclarations
11037  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11038  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11039 
11040  /* function exit code */
11041  __Pyx_RefNannyFinishContext();
11042  return __pyx_r;
11043  }
11044 
11045  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) {
11046  PyObject *__pyx_r = NULL;
11047  __Pyx_RefNannyDeclarations
11048  PyObject *__pyx_t_1 = NULL;
11049  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11050 
11051  /* "(tree fragment)":4
11052  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11053  * def __setstate_cython__(self, __pyx_state):
11054  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11055  */
11056  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
11057  __Pyx_GOTREF(__pyx_t_1);
11058  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11059  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11060  __PYX_ERR(1, 4, __pyx_L1_error)
11061 
11062  /* "(tree fragment)":3
11063  * def __reduce_cython__(self):
11064  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11065  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11066  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11067  */
11068 
11069  /* function exit code */
11070  __pyx_L1_error:;
11071  __Pyx_XDECREF(__pyx_t_1);
11072  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11073  __pyx_r = NULL;
11074  __Pyx_XGIVEREF(__pyx_r);
11075  __Pyx_RefNannyFinishContext();
11076  return __pyx_r;
11077  }
11078 
11079  /* "PyClical.pyx":1243
11080  * return clifford_to_str( self.unwrap() ).c_str()
11081  *
11082  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11083  * """
11084  * Tests for functions that Doctest cannot see.
11085  */
11086 
11087  /* Python wrapper */
11088  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11089  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 ";
11090  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};
11091  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11092  PyObject *__pyx_r = 0;
11093  __Pyx_RefNannyDeclarations
11094  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11095  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11096 
11097  /* function exit code */
11098  __Pyx_RefNannyFinishContext();
11099  return __pyx_r;
11100  }
11101 
11102  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11103  PyObject *__pyx_r = NULL;
11104  __Pyx_RefNannyDeclarations
11105  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11106 
11107  /* "PyClical.pyx":1327
11108  * True
11109  * """
11110  * return # <<<<<<<<<<<<<<
11111  *
11112  * cpdef inline inv(obj):
11113  */
11114  __Pyx_XDECREF(__pyx_r);
11115  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11116  goto __pyx_L0;
11117 
11118  /* "PyClical.pyx":1243
11119  * return clifford_to_str( self.unwrap() ).c_str()
11120  *
11121  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11122  * """
11123  * Tests for functions that Doctest cannot see.
11124  */
11125 
11126  /* function exit code */
11127  __pyx_L0:;
11128  __Pyx_XGIVEREF(__pyx_r);
11129  __Pyx_RefNannyFinishContext();
11130  return __pyx_r;
11131  }
11132 
11133  /* "PyClical.pyx":1329
11134  * return
11135  *
11136  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11137  * """
11138  * Geometric multiplicative inverse.
11139  */
11140 
11141  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11142  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11143  PyObject *__pyx_r = NULL;
11144  __Pyx_RefNannyDeclarations
11145  PyObject *__pyx_t_1 = NULL;
11146  PyObject *__pyx_t_2 = NULL;
11147  PyObject *__pyx_t_3 = NULL;
11148  __Pyx_RefNannySetupContext("inv", 0);
11149 
11150  /* "PyClical.pyx":1342
11151  * nan
11152  * """
11153  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11154  *
11155  * cpdef inline scalar(obj):
11156  */
11157  __Pyx_XDECREF(__pyx_r);
11158  __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)
11159  __Pyx_GOTREF(__pyx_t_2);
11160  __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)
11161  __Pyx_GOTREF(__pyx_t_3);
11162  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11163  __pyx_t_2 = NULL;
11164  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11165  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11166  if (likely(__pyx_t_2)) {
11167  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11168  __Pyx_INCREF(__pyx_t_2);
11169  __Pyx_INCREF(function);
11170  __Pyx_DECREF_SET(__pyx_t_3, function);
11171  }
11172  }
11173  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11174  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11175  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11176  __Pyx_GOTREF(__pyx_t_1);
11177  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11178  __pyx_r = __pyx_t_1;
11179  __pyx_t_1 = 0;
11180  goto __pyx_L0;
11181 
11182  /* "PyClical.pyx":1329
11183  * return
11184  *
11185  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11186  * """
11187  * Geometric multiplicative inverse.
11188  */
11189 
11190  /* function exit code */
11191  __pyx_L1_error:;
11192  __Pyx_XDECREF(__pyx_t_1);
11193  __Pyx_XDECREF(__pyx_t_2);
11194  __Pyx_XDECREF(__pyx_t_3);
11195  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11196  __pyx_r = 0;
11197  __pyx_L0:;
11198  __Pyx_XGIVEREF(__pyx_r);
11199  __Pyx_RefNannyFinishContext();
11200  return __pyx_r;
11201  }
11202 
11203  /* Python wrapper */
11204  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11205  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 ";
11206  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11207  PyObject *__pyx_r = 0;
11208  __Pyx_RefNannyDeclarations
11209  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11210  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11211 
11212  /* function exit code */
11213  __Pyx_RefNannyFinishContext();
11214  return __pyx_r;
11215  }
11216 
11217  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11218  PyObject *__pyx_r = NULL;
11219  __Pyx_RefNannyDeclarations
11220  PyObject *__pyx_t_1 = NULL;
11221  __Pyx_RefNannySetupContext("inv", 0);
11222  __Pyx_XDECREF(__pyx_r);
11223  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11224  __Pyx_GOTREF(__pyx_t_1);
11225  __pyx_r = __pyx_t_1;
11226  __pyx_t_1 = 0;
11227  goto __pyx_L0;
11228 
11229  /* function exit code */
11230  __pyx_L1_error:;
11231  __Pyx_XDECREF(__pyx_t_1);
11232  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11233  __pyx_r = NULL;
11234  __pyx_L0:;
11235  __Pyx_XGIVEREF(__pyx_r);
11236  __Pyx_RefNannyFinishContext();
11237  return __pyx_r;
11238  }
11239 
11240  /* "PyClical.pyx":1344
11241  * return clifford(obj).inv()
11242  *
11243  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11244  * """
11245  * Scalar part.
11246  */
11247 
11248  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11249  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11250  PyObject *__pyx_r = NULL;
11251  __Pyx_RefNannyDeclarations
11252  PyObject *__pyx_t_1 = NULL;
11253  PyObject *__pyx_t_2 = NULL;
11254  PyObject *__pyx_t_3 = NULL;
11255  __Pyx_RefNannySetupContext("scalar", 0);
11256 
11257  /* "PyClical.pyx":1353
11258  * 0.0
11259  * """
11260  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11261  *
11262  * cpdef inline real(obj):
11263  */
11264  __Pyx_XDECREF(__pyx_r);
11265  __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)
11266  __Pyx_GOTREF(__pyx_t_2);
11267  __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)
11268  __Pyx_GOTREF(__pyx_t_3);
11269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11270  __pyx_t_2 = NULL;
11271  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11272  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11273  if (likely(__pyx_t_2)) {
11274  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11275  __Pyx_INCREF(__pyx_t_2);
11276  __Pyx_INCREF(function);
11277  __Pyx_DECREF_SET(__pyx_t_3, function);
11278  }
11279  }
11280  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11281  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11282  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11283  __Pyx_GOTREF(__pyx_t_1);
11284  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11285  __pyx_r = __pyx_t_1;
11286  __pyx_t_1 = 0;
11287  goto __pyx_L0;
11288 
11289  /* "PyClical.pyx":1344
11290  * return clifford(obj).inv()
11291  *
11292  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11293  * """
11294  * Scalar part.
11295  */
11296 
11297  /* function exit code */
11298  __pyx_L1_error:;
11299  __Pyx_XDECREF(__pyx_t_1);
11300  __Pyx_XDECREF(__pyx_t_2);
11301  __Pyx_XDECREF(__pyx_t_3);
11302  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11303  __pyx_r = 0;
11304  __pyx_L0:;
11305  __Pyx_XGIVEREF(__pyx_r);
11306  __Pyx_RefNannyFinishContext();
11307  return __pyx_r;
11308  }
11309 
11310  /* Python wrapper */
11311  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11312  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 ";
11313  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11314  PyObject *__pyx_r = 0;
11315  __Pyx_RefNannyDeclarations
11316  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11317  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11318 
11319  /* function exit code */
11320  __Pyx_RefNannyFinishContext();
11321  return __pyx_r;
11322  }
11323 
11324  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11325  PyObject *__pyx_r = NULL;
11326  __Pyx_RefNannyDeclarations
11327  PyObject *__pyx_t_1 = NULL;
11328  __Pyx_RefNannySetupContext("scalar", 0);
11329  __Pyx_XDECREF(__pyx_r);
11330  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11331  __Pyx_GOTREF(__pyx_t_1);
11332  __pyx_r = __pyx_t_1;
11333  __pyx_t_1 = 0;
11334  goto __pyx_L0;
11335 
11336  /* function exit code */
11337  __pyx_L1_error:;
11338  __Pyx_XDECREF(__pyx_t_1);
11339  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11340  __pyx_r = NULL;
11341  __pyx_L0:;
11342  __Pyx_XGIVEREF(__pyx_r);
11343  __Pyx_RefNannyFinishContext();
11344  return __pyx_r;
11345  }
11346 
11347  /* "PyClical.pyx":1355
11348  * return clifford(obj).scalar()
11349  *
11350  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11351  * """
11352  * Real part: synonym for scalar part.
11353  */
11354 
11355  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11356  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11357  PyObject *__pyx_r = NULL;
11358  __Pyx_RefNannyDeclarations
11359  PyObject *__pyx_t_1 = NULL;
11360  PyObject *__pyx_t_2 = NULL;
11361  PyObject *__pyx_t_3 = NULL;
11362  __Pyx_RefNannySetupContext("real", 0);
11363 
11364  /* "PyClical.pyx":1364
11365  * 0.0
11366  * """
11367  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11368  *
11369  * cpdef inline imag(obj):
11370  */
11371  __Pyx_XDECREF(__pyx_r);
11372  __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)
11373  __Pyx_GOTREF(__pyx_t_2);
11374  __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)
11375  __Pyx_GOTREF(__pyx_t_3);
11376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11377  __pyx_t_2 = NULL;
11378  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11379  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11380  if (likely(__pyx_t_2)) {
11381  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11382  __Pyx_INCREF(__pyx_t_2);
11383  __Pyx_INCREF(function);
11384  __Pyx_DECREF_SET(__pyx_t_3, function);
11385  }
11386  }
11387  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11388  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11389  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11390  __Pyx_GOTREF(__pyx_t_1);
11391  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11392  __pyx_r = __pyx_t_1;
11393  __pyx_t_1 = 0;
11394  goto __pyx_L0;
11395 
11396  /* "PyClical.pyx":1355
11397  * return clifford(obj).scalar()
11398  *
11399  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11400  * """
11401  * Real part: synonym for scalar part.
11402  */
11403 
11404  /* function exit code */
11405  __pyx_L1_error:;
11406  __Pyx_XDECREF(__pyx_t_1);
11407  __Pyx_XDECREF(__pyx_t_2);
11408  __Pyx_XDECREF(__pyx_t_3);
11409  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11410  __pyx_r = 0;
11411  __pyx_L0:;
11412  __Pyx_XGIVEREF(__pyx_r);
11413  __Pyx_RefNannyFinishContext();
11414  return __pyx_r;
11415  }
11416 
11417  /* Python wrapper */
11418  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11419  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 ";
11420  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11421  PyObject *__pyx_r = 0;
11422  __Pyx_RefNannyDeclarations
11423  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11424  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11425 
11426  /* function exit code */
11427  __Pyx_RefNannyFinishContext();
11428  return __pyx_r;
11429  }
11430 
11431  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11432  PyObject *__pyx_r = NULL;
11433  __Pyx_RefNannyDeclarations
11434  PyObject *__pyx_t_1 = NULL;
11435  __Pyx_RefNannySetupContext("real", 0);
11436  __Pyx_XDECREF(__pyx_r);
11437  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11438  __Pyx_GOTREF(__pyx_t_1);
11439  __pyx_r = __pyx_t_1;
11440  __pyx_t_1 = 0;
11441  goto __pyx_L0;
11442 
11443  /* function exit code */
11444  __pyx_L1_error:;
11445  __Pyx_XDECREF(__pyx_t_1);
11446  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11447  __pyx_r = NULL;
11448  __pyx_L0:;
11449  __Pyx_XGIVEREF(__pyx_r);
11450  __Pyx_RefNannyFinishContext();
11451  return __pyx_r;
11452  }
11453 
11454  /* "PyClical.pyx":1366
11455  * return clifford(obj).scalar()
11456  *
11457  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11458  * """
11459  * Imaginary part: deprecated (always 0).
11460  */
11461 
11462  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11463  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11464  PyObject *__pyx_r = NULL;
11465  __Pyx_RefNannyDeclarations
11466  __Pyx_RefNannySetupContext("imag", 0);
11467 
11468  /* "PyClical.pyx":1375
11469  * 0.0
11470  * """
11471  * return 0.0 # <<<<<<<<<<<<<<
11472  *
11473  * cpdef inline pure(obj):
11474  */
11475  __Pyx_XDECREF(__pyx_r);
11476  __Pyx_INCREF(__pyx_float_0_0);
11477  __pyx_r = __pyx_float_0_0;
11478  goto __pyx_L0;
11479 
11480  /* "PyClical.pyx":1366
11481  * return clifford(obj).scalar()
11482  *
11483  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11484  * """
11485  * Imaginary part: deprecated (always 0).
11486  */
11487 
11488  /* function exit code */
11489  __pyx_L0:;
11490  __Pyx_XGIVEREF(__pyx_r);
11491  __Pyx_RefNannyFinishContext();
11492  return __pyx_r;
11493  }
11494 
11495  /* Python wrapper */
11496  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11497  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 ";
11498  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11499  PyObject *__pyx_r = 0;
11500  __Pyx_RefNannyDeclarations
11501  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11502  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11503 
11504  /* function exit code */
11505  __Pyx_RefNannyFinishContext();
11506  return __pyx_r;
11507  }
11508 
11509  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11510  PyObject *__pyx_r = NULL;
11511  __Pyx_RefNannyDeclarations
11512  PyObject *__pyx_t_1 = NULL;
11513  __Pyx_RefNannySetupContext("imag", 0);
11514  __Pyx_XDECREF(__pyx_r);
11515  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11516  __Pyx_GOTREF(__pyx_t_1);
11517  __pyx_r = __pyx_t_1;
11518  __pyx_t_1 = 0;
11519  goto __pyx_L0;
11520 
11521  /* function exit code */
11522  __pyx_L1_error:;
11523  __Pyx_XDECREF(__pyx_t_1);
11524  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11525  __pyx_r = NULL;
11526  __pyx_L0:;
11527  __Pyx_XGIVEREF(__pyx_r);
11528  __Pyx_RefNannyFinishContext();
11529  return __pyx_r;
11530  }
11531 
11532  /* "PyClical.pyx":1377
11533  * return 0.0
11534  *
11535  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11536  * """
11537  * Pure part
11538  */
11539 
11540  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11541  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11542  PyObject *__pyx_r = NULL;
11543  __Pyx_RefNannyDeclarations
11544  PyObject *__pyx_t_1 = NULL;
11545  PyObject *__pyx_t_2 = NULL;
11546  PyObject *__pyx_t_3 = NULL;
11547  __Pyx_RefNannySetupContext("pure", 0);
11548 
11549  /* "PyClical.pyx":1386
11550  * {1,2}
11551  * """
11552  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11553  *
11554  * cpdef inline even(obj):
11555  */
11556  __Pyx_XDECREF(__pyx_r);
11557  __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)
11558  __Pyx_GOTREF(__pyx_t_2);
11559  __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)
11560  __Pyx_GOTREF(__pyx_t_3);
11561  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11562  __pyx_t_2 = NULL;
11563  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11564  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11565  if (likely(__pyx_t_2)) {
11566  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11567  __Pyx_INCREF(__pyx_t_2);
11568  __Pyx_INCREF(function);
11569  __Pyx_DECREF_SET(__pyx_t_3, function);
11570  }
11571  }
11572  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11573  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11574  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11575  __Pyx_GOTREF(__pyx_t_1);
11576  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11577  __pyx_r = __pyx_t_1;
11578  __pyx_t_1 = 0;
11579  goto __pyx_L0;
11580 
11581  /* "PyClical.pyx":1377
11582  * return 0.0
11583  *
11584  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11585  * """
11586  * Pure part
11587  */
11588 
11589  /* function exit code */
11590  __pyx_L1_error:;
11591  __Pyx_XDECREF(__pyx_t_1);
11592  __Pyx_XDECREF(__pyx_t_2);
11593  __Pyx_XDECREF(__pyx_t_3);
11594  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11595  __pyx_r = 0;
11596  __pyx_L0:;
11597  __Pyx_XGIVEREF(__pyx_r);
11598  __Pyx_RefNannyFinishContext();
11599  return __pyx_r;
11600  }
11601 
11602  /* Python wrapper */
11603  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11604  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 ";
11605  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11606  PyObject *__pyx_r = 0;
11607  __Pyx_RefNannyDeclarations
11608  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11609  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11610 
11611  /* function exit code */
11612  __Pyx_RefNannyFinishContext();
11613  return __pyx_r;
11614  }
11615 
11616  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11617  PyObject *__pyx_r = NULL;
11618  __Pyx_RefNannyDeclarations
11619  PyObject *__pyx_t_1 = NULL;
11620  __Pyx_RefNannySetupContext("pure", 0);
11621  __Pyx_XDECREF(__pyx_r);
11622  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11623  __Pyx_GOTREF(__pyx_t_1);
11624  __pyx_r = __pyx_t_1;
11625  __pyx_t_1 = 0;
11626  goto __pyx_L0;
11627 
11628  /* function exit code */
11629  __pyx_L1_error:;
11630  __Pyx_XDECREF(__pyx_t_1);
11631  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11632  __pyx_r = NULL;
11633  __pyx_L0:;
11634  __Pyx_XGIVEREF(__pyx_r);
11635  __Pyx_RefNannyFinishContext();
11636  return __pyx_r;
11637  }
11638 
11639  /* "PyClical.pyx":1388
11640  * return clifford(obj).pure()
11641  *
11642  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11643  * """
11644  * Even part of multivector, sum of even grade terms.
11645  */
11646 
11647  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11648  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11649  PyObject *__pyx_r = NULL;
11650  __Pyx_RefNannyDeclarations
11651  PyObject *__pyx_t_1 = NULL;
11652  PyObject *__pyx_t_2 = NULL;
11653  PyObject *__pyx_t_3 = NULL;
11654  __Pyx_RefNannySetupContext("even", 0);
11655 
11656  /* "PyClical.pyx":1395
11657  * 1+{1,2}
11658  * """
11659  * return clifford(obj).even() # <<<<<<<<<<<<<<
11660  *
11661  * cpdef inline odd(obj):
11662  */
11663  __Pyx_XDECREF(__pyx_r);
11664  __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)
11665  __Pyx_GOTREF(__pyx_t_2);
11666  __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)
11667  __Pyx_GOTREF(__pyx_t_3);
11668  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11669  __pyx_t_2 = NULL;
11670  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11671  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11672  if (likely(__pyx_t_2)) {
11673  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11674  __Pyx_INCREF(__pyx_t_2);
11675  __Pyx_INCREF(function);
11676  __Pyx_DECREF_SET(__pyx_t_3, function);
11677  }
11678  }
11679  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11680  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11681  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11682  __Pyx_GOTREF(__pyx_t_1);
11683  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11684  __pyx_r = __pyx_t_1;
11685  __pyx_t_1 = 0;
11686  goto __pyx_L0;
11687 
11688  /* "PyClical.pyx":1388
11689  * return clifford(obj).pure()
11690  *
11691  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11692  * """
11693  * Even part of multivector, sum of even grade terms.
11694  */
11695 
11696  /* function exit code */
11697  __pyx_L1_error:;
11698  __Pyx_XDECREF(__pyx_t_1);
11699  __Pyx_XDECREF(__pyx_t_2);
11700  __Pyx_XDECREF(__pyx_t_3);
11701  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11702  __pyx_r = 0;
11703  __pyx_L0:;
11704  __Pyx_XGIVEREF(__pyx_r);
11705  __Pyx_RefNannyFinishContext();
11706  return __pyx_r;
11707  }
11708 
11709  /* Python wrapper */
11710  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11711  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 ";
11712  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11713  PyObject *__pyx_r = 0;
11714  __Pyx_RefNannyDeclarations
11715  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11716  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11717 
11718  /* function exit code */
11719  __Pyx_RefNannyFinishContext();
11720  return __pyx_r;
11721  }
11722 
11723  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11724  PyObject *__pyx_r = NULL;
11725  __Pyx_RefNannyDeclarations
11726  PyObject *__pyx_t_1 = NULL;
11727  __Pyx_RefNannySetupContext("even", 0);
11728  __Pyx_XDECREF(__pyx_r);
11729  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11730  __Pyx_GOTREF(__pyx_t_1);
11731  __pyx_r = __pyx_t_1;
11732  __pyx_t_1 = 0;
11733  goto __pyx_L0;
11734 
11735  /* function exit code */
11736  __pyx_L1_error:;
11737  __Pyx_XDECREF(__pyx_t_1);
11738  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11739  __pyx_r = NULL;
11740  __pyx_L0:;
11741  __Pyx_XGIVEREF(__pyx_r);
11742  __Pyx_RefNannyFinishContext();
11743  return __pyx_r;
11744  }
11745 
11746  /* "PyClical.pyx":1397
11747  * return clifford(obj).even()
11748  *
11749  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11750  * """
11751  * Odd part of multivector, sum of odd grade terms.
11752  */
11753 
11754  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11755  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11756  PyObject *__pyx_r = NULL;
11757  __Pyx_RefNannyDeclarations
11758  PyObject *__pyx_t_1 = NULL;
11759  PyObject *__pyx_t_2 = NULL;
11760  PyObject *__pyx_t_3 = NULL;
11761  __Pyx_RefNannySetupContext("odd", 0);
11762 
11763  /* "PyClical.pyx":1404
11764  * {1}
11765  * """
11766  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11767  *
11768  * cpdef inline involute(obj):
11769  */
11770  __Pyx_XDECREF(__pyx_r);
11771  __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)
11772  __Pyx_GOTREF(__pyx_t_2);
11773  __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)
11774  __Pyx_GOTREF(__pyx_t_3);
11775  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11776  __pyx_t_2 = NULL;
11777  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11778  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11779  if (likely(__pyx_t_2)) {
11780  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11781  __Pyx_INCREF(__pyx_t_2);
11782  __Pyx_INCREF(function);
11783  __Pyx_DECREF_SET(__pyx_t_3, function);
11784  }
11785  }
11786  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11787  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11788  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11789  __Pyx_GOTREF(__pyx_t_1);
11790  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11791  __pyx_r = __pyx_t_1;
11792  __pyx_t_1 = 0;
11793  goto __pyx_L0;
11794 
11795  /* "PyClical.pyx":1397
11796  * return clifford(obj).even()
11797  *
11798  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11799  * """
11800  * Odd part of multivector, sum of odd grade terms.
11801  */
11802 
11803  /* function exit code */
11804  __pyx_L1_error:;
11805  __Pyx_XDECREF(__pyx_t_1);
11806  __Pyx_XDECREF(__pyx_t_2);
11807  __Pyx_XDECREF(__pyx_t_3);
11808  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11809  __pyx_r = 0;
11810  __pyx_L0:;
11811  __Pyx_XGIVEREF(__pyx_r);
11812  __Pyx_RefNannyFinishContext();
11813  return __pyx_r;
11814  }
11815 
11816  /* Python wrapper */
11817  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11818  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 ";
11819  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11820  PyObject *__pyx_r = 0;
11821  __Pyx_RefNannyDeclarations
11822  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11823  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11824 
11825  /* function exit code */
11826  __Pyx_RefNannyFinishContext();
11827  return __pyx_r;
11828  }
11829 
11830  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11831  PyObject *__pyx_r = NULL;
11832  __Pyx_RefNannyDeclarations
11833  PyObject *__pyx_t_1 = NULL;
11834  __Pyx_RefNannySetupContext("odd", 0);
11835  __Pyx_XDECREF(__pyx_r);
11836  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11837  __Pyx_GOTREF(__pyx_t_1);
11838  __pyx_r = __pyx_t_1;
11839  __pyx_t_1 = 0;
11840  goto __pyx_L0;
11841 
11842  /* function exit code */
11843  __pyx_L1_error:;
11844  __Pyx_XDECREF(__pyx_t_1);
11845  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11846  __pyx_r = NULL;
11847  __pyx_L0:;
11848  __Pyx_XGIVEREF(__pyx_r);
11849  __Pyx_RefNannyFinishContext();
11850  return __pyx_r;
11851  }
11852 
11853  /* "PyClical.pyx":1406
11854  * return clifford(obj).odd()
11855  *
11856  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11857  * """
11858  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11859  */
11860 
11861  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11862  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11863  PyObject *__pyx_r = NULL;
11864  __Pyx_RefNannyDeclarations
11865  PyObject *__pyx_t_1 = NULL;
11866  PyObject *__pyx_t_2 = NULL;
11867  PyObject *__pyx_t_3 = NULL;
11868  __Pyx_RefNannySetupContext("involute", 0);
11869 
11870  /* "PyClical.pyx":1419
11871  * 1-{1}+{1,2}
11872  * """
11873  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11874  *
11875  * cpdef inline reverse(obj):
11876  */
11877  __Pyx_XDECREF(__pyx_r);
11878  __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)
11879  __Pyx_GOTREF(__pyx_t_2);
11880  __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)
11881  __Pyx_GOTREF(__pyx_t_3);
11882  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11883  __pyx_t_2 = NULL;
11884  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11885  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11886  if (likely(__pyx_t_2)) {
11887  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11888  __Pyx_INCREF(__pyx_t_2);
11889  __Pyx_INCREF(function);
11890  __Pyx_DECREF_SET(__pyx_t_3, function);
11891  }
11892  }
11893  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11894  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11895  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11896  __Pyx_GOTREF(__pyx_t_1);
11897  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11898  __pyx_r = __pyx_t_1;
11899  __pyx_t_1 = 0;
11900  goto __pyx_L0;
11901 
11902  /* "PyClical.pyx":1406
11903  * return clifford(obj).odd()
11904  *
11905  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11906  * """
11907  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11908  */
11909 
11910  /* function exit code */
11911  __pyx_L1_error:;
11912  __Pyx_XDECREF(__pyx_t_1);
11913  __Pyx_XDECREF(__pyx_t_2);
11914  __Pyx_XDECREF(__pyx_t_3);
11915  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11916  __pyx_r = 0;
11917  __pyx_L0:;
11918  __Pyx_XGIVEREF(__pyx_r);
11919  __Pyx_RefNannyFinishContext();
11920  return __pyx_r;
11921  }
11922 
11923  /* Python wrapper */
11924  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11925  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 ";
11926  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11927  PyObject *__pyx_r = 0;
11928  __Pyx_RefNannyDeclarations
11929  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11930  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11931 
11932  /* function exit code */
11933  __Pyx_RefNannyFinishContext();
11934  return __pyx_r;
11935  }
11936 
11937  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11938  PyObject *__pyx_r = NULL;
11939  __Pyx_RefNannyDeclarations
11940  PyObject *__pyx_t_1 = NULL;
11941  __Pyx_RefNannySetupContext("involute", 0);
11942  __Pyx_XDECREF(__pyx_r);
11943  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11944  __Pyx_GOTREF(__pyx_t_1);
11945  __pyx_r = __pyx_t_1;
11946  __pyx_t_1 = 0;
11947  goto __pyx_L0;
11948 
11949  /* function exit code */
11950  __pyx_L1_error:;
11951  __Pyx_XDECREF(__pyx_t_1);
11952  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11953  __pyx_r = NULL;
11954  __pyx_L0:;
11955  __Pyx_XGIVEREF(__pyx_r);
11956  __Pyx_RefNannyFinishContext();
11957  return __pyx_r;
11958  }
11959 
11960  /* "PyClical.pyx":1421
11961  * return clifford(obj).involute()
11962  *
11963  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11964  * """
11965  * Reversion, eg. {1}*{2} -> {2}*{1}
11966  */
11967 
11968  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11969  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11970  PyObject *__pyx_r = NULL;
11971  __Pyx_RefNannyDeclarations
11972  PyObject *__pyx_t_1 = NULL;
11973  PyObject *__pyx_t_2 = NULL;
11974  PyObject *__pyx_t_3 = NULL;
11975  __Pyx_RefNannySetupContext("reverse", 0);
11976 
11977  /* "PyClical.pyx":1434
11978  * 1+{1}-{1,2}
11979  * """
11980  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11981  *
11982  * cpdef inline conj(obj):
11983  */
11984  __Pyx_XDECREF(__pyx_r);
11985  __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)
11986  __Pyx_GOTREF(__pyx_t_2);
11987  __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)
11988  __Pyx_GOTREF(__pyx_t_3);
11989  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11990  __pyx_t_2 = NULL;
11991  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11992  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11993  if (likely(__pyx_t_2)) {
11994  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11995  __Pyx_INCREF(__pyx_t_2);
11996  __Pyx_INCREF(function);
11997  __Pyx_DECREF_SET(__pyx_t_3, function);
11998  }
11999  }
12000  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12001  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12002  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12003  __Pyx_GOTREF(__pyx_t_1);
12004  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12005  __pyx_r = __pyx_t_1;
12006  __pyx_t_1 = 0;
12007  goto __pyx_L0;
12008 
12009  /* "PyClical.pyx":1421
12010  * return clifford(obj).involute()
12011  *
12012  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12013  * """
12014  * Reversion, eg. {1}*{2} -> {2}*{1}
12015  */
12016 
12017  /* function exit code */
12018  __pyx_L1_error:;
12019  __Pyx_XDECREF(__pyx_t_1);
12020  __Pyx_XDECREF(__pyx_t_2);
12021  __Pyx_XDECREF(__pyx_t_3);
12022  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12023  __pyx_r = 0;
12024  __pyx_L0:;
12025  __Pyx_XGIVEREF(__pyx_r);
12026  __Pyx_RefNannyFinishContext();
12027  return __pyx_r;
12028  }
12029 
12030  /* Python wrapper */
12031  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12032  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 ";
12033  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12034  PyObject *__pyx_r = 0;
12035  __Pyx_RefNannyDeclarations
12036  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12037  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12038 
12039  /* function exit code */
12040  __Pyx_RefNannyFinishContext();
12041  return __pyx_r;
12042  }
12043 
12044  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12045  PyObject *__pyx_r = NULL;
12046  __Pyx_RefNannyDeclarations
12047  PyObject *__pyx_t_1 = NULL;
12048  __Pyx_RefNannySetupContext("reverse", 0);
12049  __Pyx_XDECREF(__pyx_r);
12050  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12051  __Pyx_GOTREF(__pyx_t_1);
12052  __pyx_r = __pyx_t_1;
12053  __pyx_t_1 = 0;
12054  goto __pyx_L0;
12055 
12056  /* function exit code */
12057  __pyx_L1_error:;
12058  __Pyx_XDECREF(__pyx_t_1);
12059  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12060  __pyx_r = NULL;
12061  __pyx_L0:;
12062  __Pyx_XGIVEREF(__pyx_r);
12063  __Pyx_RefNannyFinishContext();
12064  return __pyx_r;
12065  }
12066 
12067  /* "PyClical.pyx":1436
12068  * return clifford(obj).reverse()
12069  *
12070  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12071  * """
12072  * Conjugation, reverse o involute == involute o reverse.
12073  */
12074 
12075  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12076  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12077  PyObject *__pyx_r = NULL;
12078  __Pyx_RefNannyDeclarations
12079  PyObject *__pyx_t_1 = NULL;
12080  PyObject *__pyx_t_2 = NULL;
12081  PyObject *__pyx_t_3 = NULL;
12082  __Pyx_RefNannySetupContext("conj", 0);
12083 
12084  /* "PyClical.pyx":1449
12085  * 1-{1}-{1,2}
12086  * """
12087  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12088  *
12089  * cpdef inline quad(obj):
12090  */
12091  __Pyx_XDECREF(__pyx_r);
12092  __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)
12093  __Pyx_GOTREF(__pyx_t_2);
12094  __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)
12095  __Pyx_GOTREF(__pyx_t_3);
12096  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12097  __pyx_t_2 = NULL;
12098  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12099  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12100  if (likely(__pyx_t_2)) {
12101  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12102  __Pyx_INCREF(__pyx_t_2);
12103  __Pyx_INCREF(function);
12104  __Pyx_DECREF_SET(__pyx_t_3, function);
12105  }
12106  }
12107  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12108  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12109  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12110  __Pyx_GOTREF(__pyx_t_1);
12111  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12112  __pyx_r = __pyx_t_1;
12113  __pyx_t_1 = 0;
12114  goto __pyx_L0;
12115 
12116  /* "PyClical.pyx":1436
12117  * return clifford(obj).reverse()
12118  *
12119  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12120  * """
12121  * Conjugation, reverse o involute == involute o reverse.
12122  */
12123 
12124  /* function exit code */
12125  __pyx_L1_error:;
12126  __Pyx_XDECREF(__pyx_t_1);
12127  __Pyx_XDECREF(__pyx_t_2);
12128  __Pyx_XDECREF(__pyx_t_3);
12129  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12130  __pyx_r = 0;
12131  __pyx_L0:;
12132  __Pyx_XGIVEREF(__pyx_r);
12133  __Pyx_RefNannyFinishContext();
12134  return __pyx_r;
12135  }
12136 
12137  /* Python wrapper */
12138  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12139  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 ";
12140  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12141  PyObject *__pyx_r = 0;
12142  __Pyx_RefNannyDeclarations
12143  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12144  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12145 
12146  /* function exit code */
12147  __Pyx_RefNannyFinishContext();
12148  return __pyx_r;
12149  }
12150 
12151  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12152  PyObject *__pyx_r = NULL;
12153  __Pyx_RefNannyDeclarations
12154  PyObject *__pyx_t_1 = NULL;
12155  __Pyx_RefNannySetupContext("conj", 0);
12156  __Pyx_XDECREF(__pyx_r);
12157  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12158  __Pyx_GOTREF(__pyx_t_1);
12159  __pyx_r = __pyx_t_1;
12160  __pyx_t_1 = 0;
12161  goto __pyx_L0;
12162 
12163  /* function exit code */
12164  __pyx_L1_error:;
12165  __Pyx_XDECREF(__pyx_t_1);
12166  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12167  __pyx_r = NULL;
12168  __pyx_L0:;
12169  __Pyx_XGIVEREF(__pyx_r);
12170  __Pyx_RefNannyFinishContext();
12171  return __pyx_r;
12172  }
12173 
12174  /* "PyClical.pyx":1451
12175  * return clifford(obj).conj()
12176  *
12177  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12178  * """
12179  * Quadratic form == (rev(x)*x)(0).
12180  */
12181 
12182  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12183  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12184  PyObject *__pyx_r = NULL;
12185  __Pyx_RefNannyDeclarations
12186  PyObject *__pyx_t_1 = NULL;
12187  PyObject *__pyx_t_2 = NULL;
12188  PyObject *__pyx_t_3 = NULL;
12189  __Pyx_RefNannySetupContext("quad", 0);
12190 
12191  /* "PyClical.pyx":1460
12192  * 2.0
12193  * """
12194  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12195  *
12196  * cpdef inline norm(obj):
12197  */
12198  __Pyx_XDECREF(__pyx_r);
12199  __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)
12200  __Pyx_GOTREF(__pyx_t_2);
12201  __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)
12202  __Pyx_GOTREF(__pyx_t_3);
12203  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12204  __pyx_t_2 = NULL;
12205  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12206  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12207  if (likely(__pyx_t_2)) {
12208  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12209  __Pyx_INCREF(__pyx_t_2);
12210  __Pyx_INCREF(function);
12211  __Pyx_DECREF_SET(__pyx_t_3, function);
12212  }
12213  }
12214  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12215  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12216  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12217  __Pyx_GOTREF(__pyx_t_1);
12218  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12219  __pyx_r = __pyx_t_1;
12220  __pyx_t_1 = 0;
12221  goto __pyx_L0;
12222 
12223  /* "PyClical.pyx":1451
12224  * return clifford(obj).conj()
12225  *
12226  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12227  * """
12228  * Quadratic form == (rev(x)*x)(0).
12229  */
12230 
12231  /* function exit code */
12232  __pyx_L1_error:;
12233  __Pyx_XDECREF(__pyx_t_1);
12234  __Pyx_XDECREF(__pyx_t_2);
12235  __Pyx_XDECREF(__pyx_t_3);
12236  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12237  __pyx_r = 0;
12238  __pyx_L0:;
12239  __Pyx_XGIVEREF(__pyx_r);
12240  __Pyx_RefNannyFinishContext();
12241  return __pyx_r;
12242  }
12243 
12244  /* Python wrapper */
12245  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12246  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 ";
12247  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12248  PyObject *__pyx_r = 0;
12249  __Pyx_RefNannyDeclarations
12250  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12251  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12252 
12253  /* function exit code */
12254  __Pyx_RefNannyFinishContext();
12255  return __pyx_r;
12256  }
12257 
12258  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12259  PyObject *__pyx_r = NULL;
12260  __Pyx_RefNannyDeclarations
12261  PyObject *__pyx_t_1 = NULL;
12262  __Pyx_RefNannySetupContext("quad", 0);
12263  __Pyx_XDECREF(__pyx_r);
12264  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12265  __Pyx_GOTREF(__pyx_t_1);
12266  __pyx_r = __pyx_t_1;
12267  __pyx_t_1 = 0;
12268  goto __pyx_L0;
12269 
12270  /* function exit code */
12271  __pyx_L1_error:;
12272  __Pyx_XDECREF(__pyx_t_1);
12273  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12274  __pyx_r = NULL;
12275  __pyx_L0:;
12276  __Pyx_XGIVEREF(__pyx_r);
12277  __Pyx_RefNannyFinishContext();
12278  return __pyx_r;
12279  }
12280 
12281  /* "PyClical.pyx":1462
12282  * return clifford(obj).quad()
12283  *
12284  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12285  * """
12286  * norm == sum of squares of coordinates.
12287  */
12288 
12289  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12290  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12291  PyObject *__pyx_r = NULL;
12292  __Pyx_RefNannyDeclarations
12293  PyObject *__pyx_t_1 = NULL;
12294  PyObject *__pyx_t_2 = NULL;
12295  PyObject *__pyx_t_3 = NULL;
12296  __Pyx_RefNannySetupContext("norm", 0);
12297 
12298  /* "PyClical.pyx":1471
12299  * 4.0
12300  * """
12301  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12302  *
12303  * cpdef inline abs(obj):
12304  */
12305  __Pyx_XDECREF(__pyx_r);
12306  __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)
12307  __Pyx_GOTREF(__pyx_t_2);
12308  __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)
12309  __Pyx_GOTREF(__pyx_t_3);
12310  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12311  __pyx_t_2 = NULL;
12312  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12313  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12314  if (likely(__pyx_t_2)) {
12315  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12316  __Pyx_INCREF(__pyx_t_2);
12317  __Pyx_INCREF(function);
12318  __Pyx_DECREF_SET(__pyx_t_3, function);
12319  }
12320  }
12321  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12322  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12323  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12324  __Pyx_GOTREF(__pyx_t_1);
12325  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12326  __pyx_r = __pyx_t_1;
12327  __pyx_t_1 = 0;
12328  goto __pyx_L0;
12329 
12330  /* "PyClical.pyx":1462
12331  * return clifford(obj).quad()
12332  *
12333  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12334  * """
12335  * norm == sum of squares of coordinates.
12336  */
12337 
12338  /* function exit code */
12339  __pyx_L1_error:;
12340  __Pyx_XDECREF(__pyx_t_1);
12341  __Pyx_XDECREF(__pyx_t_2);
12342  __Pyx_XDECREF(__pyx_t_3);
12343  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12344  __pyx_r = 0;
12345  __pyx_L0:;
12346  __Pyx_XGIVEREF(__pyx_r);
12347  __Pyx_RefNannyFinishContext();
12348  return __pyx_r;
12349  }
12350 
12351  /* Python wrapper */
12352  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12353  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 ";
12354  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12355  PyObject *__pyx_r = 0;
12356  __Pyx_RefNannyDeclarations
12357  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12358  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12359 
12360  /* function exit code */
12361  __Pyx_RefNannyFinishContext();
12362  return __pyx_r;
12363  }
12364 
12365  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12366  PyObject *__pyx_r = NULL;
12367  __Pyx_RefNannyDeclarations
12368  PyObject *__pyx_t_1 = NULL;
12369  __Pyx_RefNannySetupContext("norm", 0);
12370  __Pyx_XDECREF(__pyx_r);
12371  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12372  __Pyx_GOTREF(__pyx_t_1);
12373  __pyx_r = __pyx_t_1;
12374  __pyx_t_1 = 0;
12375  goto __pyx_L0;
12376 
12377  /* function exit code */
12378  __pyx_L1_error:;
12379  __Pyx_XDECREF(__pyx_t_1);
12380  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12381  __pyx_r = NULL;
12382  __pyx_L0:;
12383  __Pyx_XGIVEREF(__pyx_r);
12384  __Pyx_RefNannyFinishContext();
12385  return __pyx_r;
12386  }
12387 
12388  /* "PyClical.pyx":1473
12389  * return clifford(obj).norm()
12390  *
12391  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12392  * """
12393  * Absolute value of multivector: multivector 2-norm.
12394  */
12395 
12396  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12397  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12398  PyObject *__pyx_r = NULL;
12399  __Pyx_RefNannyDeclarations
12400  PyObject *__pyx_t_1 = NULL;
12401  __Pyx_RefNannySetupContext("abs", 0);
12402 
12403  /* "PyClical.pyx":1480
12404  * 2.0
12405  * """
12406  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12407  *
12408  * cpdef inline max_abs(obj):
12409  */
12410  __Pyx_XDECREF(__pyx_r);
12411  __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)
12412  __Pyx_GOTREF(__pyx_t_1);
12413  __pyx_r = __pyx_t_1;
12414  __pyx_t_1 = 0;
12415  goto __pyx_L0;
12416 
12417  /* "PyClical.pyx":1473
12418  * return clifford(obj).norm()
12419  *
12420  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12421  * """
12422  * Absolute value of multivector: multivector 2-norm.
12423  */
12424 
12425  /* function exit code */
12426  __pyx_L1_error:;
12427  __Pyx_XDECREF(__pyx_t_1);
12428  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12429  __pyx_r = 0;
12430  __pyx_L0:;
12431  __Pyx_XGIVEREF(__pyx_r);
12432  __Pyx_RefNannyFinishContext();
12433  return __pyx_r;
12434  }
12435 
12436  /* Python wrapper */
12437  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12438  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 ";
12439  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12440  PyObject *__pyx_r = 0;
12441  __Pyx_RefNannyDeclarations
12442  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12443  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12444 
12445  /* function exit code */
12446  __Pyx_RefNannyFinishContext();
12447  return __pyx_r;
12448  }
12449 
12450  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12451  PyObject *__pyx_r = NULL;
12452  __Pyx_RefNannyDeclarations
12453  PyObject *__pyx_t_1 = NULL;
12454  __Pyx_RefNannySetupContext("abs", 0);
12455  __Pyx_XDECREF(__pyx_r);
12456  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12457  __Pyx_GOTREF(__pyx_t_1);
12458  __pyx_r = __pyx_t_1;
12459  __pyx_t_1 = 0;
12460  goto __pyx_L0;
12461 
12462  /* function exit code */
12463  __pyx_L1_error:;
12464  __Pyx_XDECREF(__pyx_t_1);
12465  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12466  __pyx_r = NULL;
12467  __pyx_L0:;
12468  __Pyx_XGIVEREF(__pyx_r);
12469  __Pyx_RefNannyFinishContext();
12470  return __pyx_r;
12471  }
12472 
12473  /* "PyClical.pyx":1482
12474  * return glucat.abs(toClifford(obj))
12475  *
12476  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12477  * """
12478  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12479  */
12480 
12481  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12482  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12483  PyObject *__pyx_r = NULL;
12484  __Pyx_RefNannyDeclarations
12485  PyObject *__pyx_t_1 = NULL;
12486  __Pyx_RefNannySetupContext("max_abs", 0);
12487 
12488  /* "PyClical.pyx":1492
12489  *
12490  * """
12491  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12492  *
12493  * cpdef inline pow(obj, m):
12494  */
12495  __Pyx_XDECREF(__pyx_r);
12496  __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)
12497  __Pyx_GOTREF(__pyx_t_1);
12498  __pyx_r = __pyx_t_1;
12499  __pyx_t_1 = 0;
12500  goto __pyx_L0;
12501 
12502  /* "PyClical.pyx":1482
12503  * return glucat.abs(toClifford(obj))
12504  *
12505  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12506  * """
12507  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12508  */
12509 
12510  /* function exit code */
12511  __pyx_L1_error:;
12512  __Pyx_XDECREF(__pyx_t_1);
12513  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12514  __pyx_r = 0;
12515  __pyx_L0:;
12516  __Pyx_XGIVEREF(__pyx_r);
12517  __Pyx_RefNannyFinishContext();
12518  return __pyx_r;
12519  }
12520 
12521  /* Python wrapper */
12522  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12523  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 ";
12524  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12525  PyObject *__pyx_r = 0;
12526  __Pyx_RefNannyDeclarations
12527  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12528  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12529 
12530  /* function exit code */
12531  __Pyx_RefNannyFinishContext();
12532  return __pyx_r;
12533  }
12534 
12535  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12536  PyObject *__pyx_r = NULL;
12537  __Pyx_RefNannyDeclarations
12538  PyObject *__pyx_t_1 = NULL;
12539  __Pyx_RefNannySetupContext("max_abs", 0);
12540  __Pyx_XDECREF(__pyx_r);
12541  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12542  __Pyx_GOTREF(__pyx_t_1);
12543  __pyx_r = __pyx_t_1;
12544  __pyx_t_1 = 0;
12545  goto __pyx_L0;
12546 
12547  /* function exit code */
12548  __pyx_L1_error:;
12549  __Pyx_XDECREF(__pyx_t_1);
12550  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12551  __pyx_r = NULL;
12552  __pyx_L0:;
12553  __Pyx_XGIVEREF(__pyx_r);
12554  __Pyx_RefNannyFinishContext();
12555  return __pyx_r;
12556  }
12557 
12558  /* "PyClical.pyx":1494
12559  * return glucat.max_abs(toClifford(obj))
12560  *
12561  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12562  * """
12563  * Integer power of multivector: obj to the m.
12564  */
12565 
12566  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12567  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12568  PyObject *__pyx_r = NULL;
12569  __Pyx_RefNannyDeclarations
12570  PyObject *__pyx_t_1 = NULL;
12571  PyObject *__pyx_t_2 = NULL;
12572  PyObject *__pyx_t_3 = NULL;
12573  PyObject *__pyx_t_4 = NULL;
12574  PyObject *__pyx_t_5 = NULL;
12575  PyObject *__pyx_t_6 = NULL;
12576  int __pyx_t_7;
12577  PyObject *__pyx_t_8 = NULL;
12578  PyObject *__pyx_t_9 = NULL;
12579  PyObject *__pyx_t_10 = NULL;
12580  __Pyx_RefNannySetupContext("pow", 0);
12581 
12582  /* "PyClical.pyx":1513
12583  * 1
12584  * """
12585  * try: # <<<<<<<<<<<<<<
12586  * math.pow(obj, m)
12587  * except:
12588  */
12589  {
12590  __Pyx_PyThreadState_declare
12591  __Pyx_PyThreadState_assign
12592  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12593  __Pyx_XGOTREF(__pyx_t_1);
12594  __Pyx_XGOTREF(__pyx_t_2);
12595  __Pyx_XGOTREF(__pyx_t_3);
12596  /*try:*/ {
12597 
12598  /* "PyClical.pyx":1514
12599  * """
12600  * try:
12601  * math.pow(obj, m) # <<<<<<<<<<<<<<
12602  * except:
12603  * return clifford(obj).pow(m)
12604  */
12605  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12606  __Pyx_GOTREF(__pyx_t_5);
12607  __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)
12608  __Pyx_GOTREF(__pyx_t_6);
12609  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12610  __pyx_t_5 = NULL;
12611  __pyx_t_7 = 0;
12612  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12613  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12614  if (likely(__pyx_t_5)) {
12615  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12616  __Pyx_INCREF(__pyx_t_5);
12617  __Pyx_INCREF(function);
12618  __Pyx_DECREF_SET(__pyx_t_6, function);
12619  __pyx_t_7 = 1;
12620  }
12621  }
12622  #if CYTHON_FAST_PYCALL
12623  if (PyFunction_Check(__pyx_t_6)) {
12624  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12625  __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)
12626  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12627  __Pyx_GOTREF(__pyx_t_4);
12628  } else
12629  #endif
12630  #if CYTHON_FAST_PYCCALL
12631  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12632  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12633  __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)
12634  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12635  __Pyx_GOTREF(__pyx_t_4);
12636  } else
12637  #endif
12638  {
12639  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12640  __Pyx_GOTREF(__pyx_t_8);
12641  if (__pyx_t_5) {
12642  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12643  }
12644  __Pyx_INCREF(__pyx_v_obj);
12645  __Pyx_GIVEREF(__pyx_v_obj);
12646  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12647  __Pyx_INCREF(__pyx_v_m);
12648  __Pyx_GIVEREF(__pyx_v_m);
12649  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12650  __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)
12651  __Pyx_GOTREF(__pyx_t_4);
12652  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12653  }
12654  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12655  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12656 
12657  /* "PyClical.pyx":1513
12658  * 1
12659  * """
12660  * try: # <<<<<<<<<<<<<<
12661  * math.pow(obj, m)
12662  * except:
12663  */
12664  }
12665  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12666  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12667  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12668  goto __pyx_L8_try_end;
12669  __pyx_L3_error:;
12670  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12671  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12672  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12673  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12674 
12675  /* "PyClical.pyx":1515
12676  * try:
12677  * math.pow(obj, m)
12678  * except: # <<<<<<<<<<<<<<
12679  * return clifford(obj).pow(m)
12680  *
12681  */
12682  /*except:*/ {
12683  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12684  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12685  __Pyx_GOTREF(__pyx_t_4);
12686  __Pyx_GOTREF(__pyx_t_6);
12687  __Pyx_GOTREF(__pyx_t_8);
12688 
12689  /* "PyClical.pyx":1516
12690  * math.pow(obj, m)
12691  * except:
12692  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12693  *
12694  * cpdef inline outer_pow(obj, m):
12695  */
12696  __Pyx_XDECREF(__pyx_r);
12697  __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)
12698  __Pyx_GOTREF(__pyx_t_9);
12699  __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)
12700  __Pyx_GOTREF(__pyx_t_10);
12701  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12702  __pyx_t_9 = NULL;
12703  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12704  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12705  if (likely(__pyx_t_9)) {
12706  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12707  __Pyx_INCREF(__pyx_t_9);
12708  __Pyx_INCREF(function);
12709  __Pyx_DECREF_SET(__pyx_t_10, function);
12710  }
12711  }
12712  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_v_m) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_m);
12713  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12714  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12715  __Pyx_GOTREF(__pyx_t_5);
12716  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12717  __pyx_r = __pyx_t_5;
12718  __pyx_t_5 = 0;
12719  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12720  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12721  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12722  goto __pyx_L6_except_return;
12723  }
12724  __pyx_L5_except_error:;
12725 
12726  /* "PyClical.pyx":1513
12727  * 1
12728  * """
12729  * try: # <<<<<<<<<<<<<<
12730  * math.pow(obj, m)
12731  * except:
12732  */
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_L1_error;
12738  __pyx_L6_except_return:;
12739  __Pyx_XGIVEREF(__pyx_t_1);
12740  __Pyx_XGIVEREF(__pyx_t_2);
12741  __Pyx_XGIVEREF(__pyx_t_3);
12742  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12743  goto __pyx_L0;
12744  __pyx_L8_try_end:;
12745  }
12746 
12747  /* "PyClical.pyx":1494
12748  * return glucat.max_abs(toClifford(obj))
12749  *
12750  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12751  * """
12752  * Integer power of multivector: obj to the m.
12753  */
12754 
12755  /* function exit code */
12756  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12757  goto __pyx_L0;
12758  __pyx_L1_error:;
12759  __Pyx_XDECREF(__pyx_t_4);
12760  __Pyx_XDECREF(__pyx_t_5);
12761  __Pyx_XDECREF(__pyx_t_6);
12762  __Pyx_XDECREF(__pyx_t_8);
12763  __Pyx_XDECREF(__pyx_t_9);
12764  __Pyx_XDECREF(__pyx_t_10);
12765  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12766  __pyx_r = 0;
12767  __pyx_L0:;
12768  __Pyx_XGIVEREF(__pyx_r);
12769  __Pyx_RefNannyFinishContext();
12770  return __pyx_r;
12771  }
12772 
12773  /* Python wrapper */
12774  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12775  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 ";
12776  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12777  PyObject *__pyx_v_obj = 0;
12778  PyObject *__pyx_v_m = 0;
12779  PyObject *__pyx_r = 0;
12780  __Pyx_RefNannyDeclarations
12781  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12782  {
12783  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12784  PyObject* values[2] = {0,0};
12785  if (unlikely(__pyx_kwds)) {
12786  Py_ssize_t kw_args;
12787  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12788  switch (pos_args) {
12789  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12790  CYTHON_FALLTHROUGH;
12791  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12792  CYTHON_FALLTHROUGH;
12793  case 0: break;
12794  default: goto __pyx_L5_argtuple_error;
12795  }
12796  kw_args = PyDict_Size(__pyx_kwds);
12797  switch (pos_args) {
12798  case 0:
12799  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12800  else goto __pyx_L5_argtuple_error;
12801  CYTHON_FALLTHROUGH;
12802  case 1:
12803  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12804  else {
12805  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12806  }
12807  }
12808  if (unlikely(kw_args > 0)) {
12809  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12810  }
12811  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12812  goto __pyx_L5_argtuple_error;
12813  } else {
12814  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12815  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12816  }
12817  __pyx_v_obj = values[0];
12818  __pyx_v_m = values[1];
12819  }
12820  goto __pyx_L4_argument_unpacking_done;
12821  __pyx_L5_argtuple_error:;
12822  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12823  __pyx_L3_error:;
12824  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12825  __Pyx_RefNannyFinishContext();
12826  return NULL;
12827  __pyx_L4_argument_unpacking_done:;
12828  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12829 
12830  /* function exit code */
12831  __Pyx_RefNannyFinishContext();
12832  return __pyx_r;
12833  }
12834 
12835  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12836  PyObject *__pyx_r = NULL;
12837  __Pyx_RefNannyDeclarations
12838  PyObject *__pyx_t_1 = NULL;
12839  __Pyx_RefNannySetupContext("pow", 0);
12840  __Pyx_XDECREF(__pyx_r);
12841  __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)
12842  __Pyx_GOTREF(__pyx_t_1);
12843  __pyx_r = __pyx_t_1;
12844  __pyx_t_1 = 0;
12845  goto __pyx_L0;
12846 
12847  /* function exit code */
12848  __pyx_L1_error:;
12849  __Pyx_XDECREF(__pyx_t_1);
12850  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12851  __pyx_r = NULL;
12852  __pyx_L0:;
12853  __Pyx_XGIVEREF(__pyx_r);
12854  __Pyx_RefNannyFinishContext();
12855  return __pyx_r;
12856  }
12857 
12858  /* "PyClical.pyx":1518
12859  * return clifford(obj).pow(m)
12860  *
12861  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12862  * """
12863  * Outer product power of multivector.
12864  */
12865 
12866  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12867  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12868  PyObject *__pyx_r = NULL;
12869  __Pyx_RefNannyDeclarations
12870  PyObject *__pyx_t_1 = NULL;
12871  PyObject *__pyx_t_2 = NULL;
12872  PyObject *__pyx_t_3 = NULL;
12873  __Pyx_RefNannySetupContext("outer_pow", 0);
12874 
12875  /* "PyClical.pyx":1525
12876  * 1+3{1}+3{1,2}
12877  * """
12878  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12879  *
12880  * cpdef inline complexifier(obj):
12881  */
12882  __Pyx_XDECREF(__pyx_r);
12883  __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)
12884  __Pyx_GOTREF(__pyx_t_2);
12885  __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)
12886  __Pyx_GOTREF(__pyx_t_3);
12887  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12888  __pyx_t_2 = NULL;
12889  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12890  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12891  if (likely(__pyx_t_2)) {
12892  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12893  __Pyx_INCREF(__pyx_t_2);
12894  __Pyx_INCREF(function);
12895  __Pyx_DECREF_SET(__pyx_t_3, function);
12896  }
12897  }
12898  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_m) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_m);
12899  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12900  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12901  __Pyx_GOTREF(__pyx_t_1);
12902  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12903  __pyx_r = __pyx_t_1;
12904  __pyx_t_1 = 0;
12905  goto __pyx_L0;
12906 
12907  /* "PyClical.pyx":1518
12908  * return clifford(obj).pow(m)
12909  *
12910  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12911  * """
12912  * Outer product power of multivector.
12913  */
12914 
12915  /* function exit code */
12916  __pyx_L1_error:;
12917  __Pyx_XDECREF(__pyx_t_1);
12918  __Pyx_XDECREF(__pyx_t_2);
12919  __Pyx_XDECREF(__pyx_t_3);
12920  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12921  __pyx_r = 0;
12922  __pyx_L0:;
12923  __Pyx_XGIVEREF(__pyx_r);
12924  __Pyx_RefNannyFinishContext();
12925  return __pyx_r;
12926  }
12927 
12928  /* Python wrapper */
12929  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12930  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 ";
12931  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12932  PyObject *__pyx_v_obj = 0;
12933  PyObject *__pyx_v_m = 0;
12934  PyObject *__pyx_r = 0;
12935  __Pyx_RefNannyDeclarations
12936  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12937  {
12938  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12939  PyObject* values[2] = {0,0};
12940  if (unlikely(__pyx_kwds)) {
12941  Py_ssize_t kw_args;
12942  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12943  switch (pos_args) {
12944  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12945  CYTHON_FALLTHROUGH;
12946  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12947  CYTHON_FALLTHROUGH;
12948  case 0: break;
12949  default: goto __pyx_L5_argtuple_error;
12950  }
12951  kw_args = PyDict_Size(__pyx_kwds);
12952  switch (pos_args) {
12953  case 0:
12954  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12955  else goto __pyx_L5_argtuple_error;
12956  CYTHON_FALLTHROUGH;
12957  case 1:
12958  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12959  else {
12960  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12961  }
12962  }
12963  if (unlikely(kw_args > 0)) {
12964  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12965  }
12966  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12967  goto __pyx_L5_argtuple_error;
12968  } else {
12969  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12970  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12971  }
12972  __pyx_v_obj = values[0];
12973  __pyx_v_m = values[1];
12974  }
12975  goto __pyx_L4_argument_unpacking_done;
12976  __pyx_L5_argtuple_error:;
12977  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
12978  __pyx_L3_error:;
12979  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12980  __Pyx_RefNannyFinishContext();
12981  return NULL;
12982  __pyx_L4_argument_unpacking_done:;
12983  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12984 
12985  /* function exit code */
12986  __Pyx_RefNannyFinishContext();
12987  return __pyx_r;
12988  }
12989 
12990  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12991  PyObject *__pyx_r = NULL;
12992  __Pyx_RefNannyDeclarations
12993  PyObject *__pyx_t_1 = NULL;
12994  __Pyx_RefNannySetupContext("outer_pow", 0);
12995  __Pyx_XDECREF(__pyx_r);
12996  __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)
12997  __Pyx_GOTREF(__pyx_t_1);
12998  __pyx_r = __pyx_t_1;
12999  __pyx_t_1 = 0;
13000  goto __pyx_L0;
13001 
13002  /* function exit code */
13003  __pyx_L1_error:;
13004  __Pyx_XDECREF(__pyx_t_1);
13005  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13006  __pyx_r = NULL;
13007  __pyx_L0:;
13008  __Pyx_XGIVEREF(__pyx_r);
13009  __Pyx_RefNannyFinishContext();
13010  return __pyx_r;
13011  }
13012 
13013  /* "PyClical.pyx":1527
13014  * return clifford(obj).outer_pow(m)
13015  *
13016  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13017  * """
13018  * Square root of -1 which commutes with all members of the frame of the given multivector.
13019  */
13020 
13021  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13022  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13023  PyObject *__pyx_r = NULL;
13024  __Pyx_RefNannyDeclarations
13025  PyObject *__pyx_t_1 = NULL;
13026  PyObject *__pyx_t_2 = NULL;
13027  __Pyx_RefNannySetupContext("complexifier", 0);
13028 
13029  /* "PyClical.pyx":1540
13030  * {-1}
13031  * """
13032  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13033  *
13034  * cpdef inline sqrt(obj, i = None):
13035  */
13036  __Pyx_XDECREF(__pyx_r);
13037  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13038  __Pyx_GOTREF(__pyx_t_1);
13039  __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)
13040  __Pyx_GOTREF(__pyx_t_2);
13041  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13042  __pyx_r = __pyx_t_2;
13043  __pyx_t_2 = 0;
13044  goto __pyx_L0;
13045 
13046  /* "PyClical.pyx":1527
13047  * return clifford(obj).outer_pow(m)
13048  *
13049  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13050  * """
13051  * Square root of -1 which commutes with all members of the frame of the given multivector.
13052  */
13053 
13054  /* function exit code */
13055  __pyx_L1_error:;
13056  __Pyx_XDECREF(__pyx_t_1);
13057  __Pyx_XDECREF(__pyx_t_2);
13058  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13059  __pyx_r = 0;
13060  __pyx_L0:;
13061  __Pyx_XGIVEREF(__pyx_r);
13062  __Pyx_RefNannyFinishContext();
13063  return __pyx_r;
13064  }
13065 
13066  /* Python wrapper */
13067  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13068  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 ";
13069  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13070  PyObject *__pyx_r = 0;
13071  __Pyx_RefNannyDeclarations
13072  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13073  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13074 
13075  /* function exit code */
13076  __Pyx_RefNannyFinishContext();
13077  return __pyx_r;
13078  }
13079 
13080  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13081  PyObject *__pyx_r = NULL;
13082  __Pyx_RefNannyDeclarations
13083  PyObject *__pyx_t_1 = NULL;
13084  __Pyx_RefNannySetupContext("complexifier", 0);
13085  __Pyx_XDECREF(__pyx_r);
13086  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13087  __Pyx_GOTREF(__pyx_t_1);
13088  __pyx_r = __pyx_t_1;
13089  __pyx_t_1 = 0;
13090  goto __pyx_L0;
13091 
13092  /* function exit code */
13093  __pyx_L1_error:;
13094  __Pyx_XDECREF(__pyx_t_1);
13095  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13096  __pyx_r = NULL;
13097  __pyx_L0:;
13098  __Pyx_XGIVEREF(__pyx_r);
13099  __Pyx_RefNannyFinishContext();
13100  return __pyx_r;
13101  }
13102 
13103  /* "PyClical.pyx":1542
13104  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13105  *
13106  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13107  * """
13108  * Square root of multivector with optional complexifier.
13109  */
13110 
13111  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13112  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) {
13113  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13114  PyObject *__pyx_r = NULL;
13115  __Pyx_RefNannyDeclarations
13116  int __pyx_t_1;
13117  int __pyx_t_2;
13118  PyObject *__pyx_t_3 = NULL;
13119  Clifford __pyx_t_4;
13120  PyObject *__pyx_t_5 = NULL;
13121  PyObject *__pyx_t_6 = NULL;
13122  PyObject *__pyx_t_7 = NULL;
13123  PyObject *__pyx_t_8 = NULL;
13124  PyObject *__pyx_t_9 = NULL;
13125  PyObject *__pyx_t_10 = NULL;
13126  PyObject *__pyx_t_11 = NULL;
13127  __Pyx_RefNannySetupContext("sqrt", 0);
13128  if (__pyx_optional_args) {
13129  if (__pyx_optional_args->__pyx_n > 0) {
13130  __pyx_v_i = __pyx_optional_args->i;
13131  }
13132  }
13133 
13134  /* "PyClical.pyx":1557
13135  * -1
13136  * """
13137  * if not (i is None): # <<<<<<<<<<<<<<
13138  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13139  * else:
13140  */
13141  __pyx_t_1 = (__pyx_v_i != Py_None);
13142  __pyx_t_2 = (__pyx_t_1 != 0);
13143  if (__pyx_t_2) {
13144 
13145  /* "PyClical.pyx":1558
13146  * """
13147  * if not (i is None):
13148  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13149  * else:
13150  * try:
13151  */
13152  __Pyx_XDECREF(__pyx_r);
13153  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13154  __Pyx_GOTREF(__pyx_t_3);
13155  try {
13156  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13157  } catch(...) {
13158  __Pyx_CppExn2PyErr();
13159  __PYX_ERR(0, 1558, __pyx_L1_error)
13160  }
13161  __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)
13162  __Pyx_GOTREF(__pyx_t_5);
13163  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13164  __pyx_r = __pyx_t_5;
13165  __pyx_t_5 = 0;
13166  goto __pyx_L0;
13167 
13168  /* "PyClical.pyx":1557
13169  * -1
13170  * """
13171  * if not (i is None): # <<<<<<<<<<<<<<
13172  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13173  * else:
13174  */
13175  }
13176 
13177  /* "PyClical.pyx":1560
13178  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13179  * else:
13180  * try: # <<<<<<<<<<<<<<
13181  * return math.sqrt(obj)
13182  * except:
13183  */
13184  /*else*/ {
13185  {
13186  __Pyx_PyThreadState_declare
13187  __Pyx_PyThreadState_assign
13188  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13189  __Pyx_XGOTREF(__pyx_t_6);
13190  __Pyx_XGOTREF(__pyx_t_7);
13191  __Pyx_XGOTREF(__pyx_t_8);
13192  /*try:*/ {
13193 
13194  /* "PyClical.pyx":1561
13195  * else:
13196  * try:
13197  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13198  * except:
13199  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13200  */
13201  __Pyx_XDECREF(__pyx_r);
13202  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13203  __Pyx_GOTREF(__pyx_t_3);
13204  __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)
13205  __Pyx_GOTREF(__pyx_t_9);
13206  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13207  __pyx_t_3 = NULL;
13208  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13209  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13210  if (likely(__pyx_t_3)) {
13211  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13212  __Pyx_INCREF(__pyx_t_3);
13213  __Pyx_INCREF(function);
13214  __Pyx_DECREF_SET(__pyx_t_9, function);
13215  }
13216  }
13217  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
13218  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13219  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13220  __Pyx_GOTREF(__pyx_t_5);
13221  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13222  __pyx_r = __pyx_t_5;
13223  __pyx_t_5 = 0;
13224  goto __pyx_L8_try_return;
13225 
13226  /* "PyClical.pyx":1560
13227  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13228  * else:
13229  * try: # <<<<<<<<<<<<<<
13230  * return math.sqrt(obj)
13231  * except:
13232  */
13233  }
13234  __pyx_L4_error:;
13235  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13236  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13237  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13238 
13239  /* "PyClical.pyx":1562
13240  * try:
13241  * return math.sqrt(obj)
13242  * except: # <<<<<<<<<<<<<<
13243  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13244  *
13245  */
13246  /*except:*/ {
13247  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13248  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13249  __Pyx_GOTREF(__pyx_t_5);
13250  __Pyx_GOTREF(__pyx_t_9);
13251  __Pyx_GOTREF(__pyx_t_3);
13252 
13253  /* "PyClical.pyx":1563
13254  * return math.sqrt(obj)
13255  * except:
13256  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13257  *
13258  * cpdef inline exp(obj):
13259  */
13260  __Pyx_XDECREF(__pyx_r);
13261  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13262  __Pyx_GOTREF(__pyx_t_10);
13263  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13264  __Pyx_GOTREF(__pyx_t_11);
13265  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13266  __pyx_r = __pyx_t_11;
13267  __pyx_t_11 = 0;
13268  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13269  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13270  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13271  goto __pyx_L7_except_return;
13272  }
13273  __pyx_L6_except_error:;
13274 
13275  /* "PyClical.pyx":1560
13276  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13277  * else:
13278  * try: # <<<<<<<<<<<<<<
13279  * return math.sqrt(obj)
13280  * except:
13281  */
13282  __Pyx_XGIVEREF(__pyx_t_6);
13283  __Pyx_XGIVEREF(__pyx_t_7);
13284  __Pyx_XGIVEREF(__pyx_t_8);
13285  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13286  goto __pyx_L1_error;
13287  __pyx_L8_try_return:;
13288  __Pyx_XGIVEREF(__pyx_t_6);
13289  __Pyx_XGIVEREF(__pyx_t_7);
13290  __Pyx_XGIVEREF(__pyx_t_8);
13291  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13292  goto __pyx_L0;
13293  __pyx_L7_except_return:;
13294  __Pyx_XGIVEREF(__pyx_t_6);
13295  __Pyx_XGIVEREF(__pyx_t_7);
13296  __Pyx_XGIVEREF(__pyx_t_8);
13297  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13298  goto __pyx_L0;
13299  }
13300  }
13301 
13302  /* "PyClical.pyx":1542
13303  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13304  *
13305  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13306  * """
13307  * Square root of multivector with optional complexifier.
13308  */
13309 
13310  /* function exit code */
13311  __pyx_L1_error:;
13312  __Pyx_XDECREF(__pyx_t_3);
13313  __Pyx_XDECREF(__pyx_t_5);
13314  __Pyx_XDECREF(__pyx_t_9);
13315  __Pyx_XDECREF(__pyx_t_10);
13316  __Pyx_XDECREF(__pyx_t_11);
13317  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13318  __pyx_r = 0;
13319  __pyx_L0:;
13320  __Pyx_XGIVEREF(__pyx_r);
13321  __Pyx_RefNannyFinishContext();
13322  return __pyx_r;
13323  }
13324 
13325  /* Python wrapper */
13326  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13327  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 ";
13328  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13329  PyObject *__pyx_v_obj = 0;
13330  PyObject *__pyx_v_i = 0;
13331  PyObject *__pyx_r = 0;
13332  __Pyx_RefNannyDeclarations
13333  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13334  {
13335  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13336  PyObject* values[2] = {0,0};
13337  values[1] = ((PyObject *)Py_None);
13338  if (unlikely(__pyx_kwds)) {
13339  Py_ssize_t kw_args;
13340  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13341  switch (pos_args) {
13342  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13343  CYTHON_FALLTHROUGH;
13344  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13345  CYTHON_FALLTHROUGH;
13346  case 0: break;
13347  default: goto __pyx_L5_argtuple_error;
13348  }
13349  kw_args = PyDict_Size(__pyx_kwds);
13350  switch (pos_args) {
13351  case 0:
13352  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13353  else goto __pyx_L5_argtuple_error;
13354  CYTHON_FALLTHROUGH;
13355  case 1:
13356  if (kw_args > 0) {
13357  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13358  if (value) { values[1] = value; kw_args--; }
13359  }
13360  }
13361  if (unlikely(kw_args > 0)) {
13362  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13363  }
13364  } else {
13365  switch (PyTuple_GET_SIZE(__pyx_args)) {
13366  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13367  CYTHON_FALLTHROUGH;
13368  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13369  break;
13370  default: goto __pyx_L5_argtuple_error;
13371  }
13372  }
13373  __pyx_v_obj = values[0];
13374  __pyx_v_i = values[1];
13375  }
13376  goto __pyx_L4_argument_unpacking_done;
13377  __pyx_L5_argtuple_error:;
13378  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13379  __pyx_L3_error:;
13380  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13381  __Pyx_RefNannyFinishContext();
13382  return NULL;
13383  __pyx_L4_argument_unpacking_done:;
13384  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13385 
13386  /* function exit code */
13387  __Pyx_RefNannyFinishContext();
13388  return __pyx_r;
13389  }
13390 
13391  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13392  PyObject *__pyx_r = NULL;
13393  __Pyx_RefNannyDeclarations
13394  PyObject *__pyx_t_1 = NULL;
13395  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13396  __Pyx_RefNannySetupContext("sqrt", 0);
13397  __Pyx_XDECREF(__pyx_r);
13398  __pyx_t_2.__pyx_n = 1;
13399  __pyx_t_2.i = __pyx_v_i;
13400  __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)
13401  __Pyx_GOTREF(__pyx_t_1);
13402  __pyx_r = __pyx_t_1;
13403  __pyx_t_1 = 0;
13404  goto __pyx_L0;
13405 
13406  /* function exit code */
13407  __pyx_L1_error:;
13408  __Pyx_XDECREF(__pyx_t_1);
13409  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13410  __pyx_r = NULL;
13411  __pyx_L0:;
13412  __Pyx_XGIVEREF(__pyx_r);
13413  __Pyx_RefNannyFinishContext();
13414  return __pyx_r;
13415  }
13416 
13417  /* "PyClical.pyx":1565
13418  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13419  *
13420  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13421  * """
13422  * Exponential of multivector.
13423  */
13424 
13425  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13426  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13427  PyObject *__pyx_r = NULL;
13428  __Pyx_RefNannyDeclarations
13429  PyObject *__pyx_t_1 = NULL;
13430  PyObject *__pyx_t_2 = NULL;
13431  PyObject *__pyx_t_3 = NULL;
13432  PyObject *__pyx_t_4 = NULL;
13433  PyObject *__pyx_t_5 = NULL;
13434  PyObject *__pyx_t_6 = NULL;
13435  PyObject *__pyx_t_7 = NULL;
13436  PyObject *__pyx_t_8 = NULL;
13437  __Pyx_RefNannySetupContext("exp", 0);
13438 
13439  /* "PyClical.pyx":1574
13440  * {1,2}
13441  * """
13442  * try: # <<<<<<<<<<<<<<
13443  * return math.exp(obj)
13444  * except:
13445  */
13446  {
13447  __Pyx_PyThreadState_declare
13448  __Pyx_PyThreadState_assign
13449  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13450  __Pyx_XGOTREF(__pyx_t_1);
13451  __Pyx_XGOTREF(__pyx_t_2);
13452  __Pyx_XGOTREF(__pyx_t_3);
13453  /*try:*/ {
13454 
13455  /* "PyClical.pyx":1575
13456  * """
13457  * try:
13458  * return math.exp(obj) # <<<<<<<<<<<<<<
13459  * except:
13460  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13461  */
13462  __Pyx_XDECREF(__pyx_r);
13463  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13464  __Pyx_GOTREF(__pyx_t_5);
13465  __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)
13466  __Pyx_GOTREF(__pyx_t_6);
13467  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13468  __pyx_t_5 = NULL;
13469  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13470  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13471  if (likely(__pyx_t_5)) {
13472  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13473  __Pyx_INCREF(__pyx_t_5);
13474  __Pyx_INCREF(function);
13475  __Pyx_DECREF_SET(__pyx_t_6, function);
13476  }
13477  }
13478  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
13479  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13480  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13481  __Pyx_GOTREF(__pyx_t_4);
13482  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13483  __pyx_r = __pyx_t_4;
13484  __pyx_t_4 = 0;
13485  goto __pyx_L7_try_return;
13486 
13487  /* "PyClical.pyx":1574
13488  * {1,2}
13489  * """
13490  * try: # <<<<<<<<<<<<<<
13491  * return math.exp(obj)
13492  * except:
13493  */
13494  }
13495  __pyx_L3_error:;
13496  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13497  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13498  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13499 
13500  /* "PyClical.pyx":1576
13501  * try:
13502  * return math.exp(obj)
13503  * except: # <<<<<<<<<<<<<<
13504  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13505  *
13506  */
13507  /*except:*/ {
13508  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13509  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13510  __Pyx_GOTREF(__pyx_t_4);
13511  __Pyx_GOTREF(__pyx_t_6);
13512  __Pyx_GOTREF(__pyx_t_5);
13513 
13514  /* "PyClical.pyx":1577
13515  * return math.exp(obj)
13516  * except:
13517  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13518  *
13519  * cpdef inline log(obj,i = None):
13520  */
13521  __Pyx_XDECREF(__pyx_r);
13522  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13523  __Pyx_GOTREF(__pyx_t_7);
13524  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), exp(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13525  __Pyx_GOTREF(__pyx_t_8);
13526  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13527  __pyx_r = __pyx_t_8;
13528  __pyx_t_8 = 0;
13529  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13530  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13531  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13532  goto __pyx_L6_except_return;
13533  }
13534  __pyx_L5_except_error:;
13535 
13536  /* "PyClical.pyx":1574
13537  * {1,2}
13538  * """
13539  * try: # <<<<<<<<<<<<<<
13540  * return math.exp(obj)
13541  * except:
13542  */
13543  __Pyx_XGIVEREF(__pyx_t_1);
13544  __Pyx_XGIVEREF(__pyx_t_2);
13545  __Pyx_XGIVEREF(__pyx_t_3);
13546  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13547  goto __pyx_L1_error;
13548  __pyx_L7_try_return:;
13549  __Pyx_XGIVEREF(__pyx_t_1);
13550  __Pyx_XGIVEREF(__pyx_t_2);
13551  __Pyx_XGIVEREF(__pyx_t_3);
13552  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13553  goto __pyx_L0;
13554  __pyx_L6_except_return:;
13555  __Pyx_XGIVEREF(__pyx_t_1);
13556  __Pyx_XGIVEREF(__pyx_t_2);
13557  __Pyx_XGIVEREF(__pyx_t_3);
13558  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13559  goto __pyx_L0;
13560  }
13561 
13562  /* "PyClical.pyx":1565
13563  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13564  *
13565  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13566  * """
13567  * Exponential of multivector.
13568  */
13569 
13570  /* function exit code */
13571  __pyx_L1_error:;
13572  __Pyx_XDECREF(__pyx_t_4);
13573  __Pyx_XDECREF(__pyx_t_5);
13574  __Pyx_XDECREF(__pyx_t_6);
13575  __Pyx_XDECREF(__pyx_t_7);
13576  __Pyx_XDECREF(__pyx_t_8);
13577  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13578  __pyx_r = 0;
13579  __pyx_L0:;
13580  __Pyx_XGIVEREF(__pyx_r);
13581  __Pyx_RefNannyFinishContext();
13582  return __pyx_r;
13583  }
13584 
13585  /* Python wrapper */
13586  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13587  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 ";
13588  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13589  PyObject *__pyx_r = 0;
13590  __Pyx_RefNannyDeclarations
13591  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13592  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13593 
13594  /* function exit code */
13595  __Pyx_RefNannyFinishContext();
13596  return __pyx_r;
13597  }
13598 
13599  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13600  PyObject *__pyx_r = NULL;
13601  __Pyx_RefNannyDeclarations
13602  PyObject *__pyx_t_1 = NULL;
13603  __Pyx_RefNannySetupContext("exp", 0);
13604  __Pyx_XDECREF(__pyx_r);
13605  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13606  __Pyx_GOTREF(__pyx_t_1);
13607  __pyx_r = __pyx_t_1;
13608  __pyx_t_1 = 0;
13609  goto __pyx_L0;
13610 
13611  /* function exit code */
13612  __pyx_L1_error:;
13613  __Pyx_XDECREF(__pyx_t_1);
13614  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13615  __pyx_r = NULL;
13616  __pyx_L0:;
13617  __Pyx_XGIVEREF(__pyx_r);
13618  __Pyx_RefNannyFinishContext();
13619  return __pyx_r;
13620  }
13621 
13622  /* "PyClical.pyx":1579
13623  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13624  *
13625  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13626  * """
13627  * Natural logarithm of multivector with optional complexifier.
13628  */
13629 
13630  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13631  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) {
13632  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13633  PyObject *__pyx_r = NULL;
13634  __Pyx_RefNannyDeclarations
13635  int __pyx_t_1;
13636  int __pyx_t_2;
13637  PyObject *__pyx_t_3 = NULL;
13638  Clifford __pyx_t_4;
13639  PyObject *__pyx_t_5 = NULL;
13640  PyObject *__pyx_t_6 = NULL;
13641  PyObject *__pyx_t_7 = NULL;
13642  PyObject *__pyx_t_8 = NULL;
13643  PyObject *__pyx_t_9 = NULL;
13644  PyObject *__pyx_t_10 = NULL;
13645  PyObject *__pyx_t_11 = NULL;
13646  __Pyx_RefNannySetupContext("log", 0);
13647  if (__pyx_optional_args) {
13648  if (__pyx_optional_args->__pyx_n > 0) {
13649  __pyx_v_i = __pyx_optional_args->i;
13650  }
13651  }
13652 
13653  /* "PyClical.pyx":1594
13654  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13655  * """
13656  * if not (i is None): # <<<<<<<<<<<<<<
13657  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13658  * else:
13659  */
13660  __pyx_t_1 = (__pyx_v_i != Py_None);
13661  __pyx_t_2 = (__pyx_t_1 != 0);
13662  if (__pyx_t_2) {
13663 
13664  /* "PyClical.pyx":1595
13665  * """
13666  * if not (i is None):
13667  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13668  * else:
13669  * try:
13670  */
13671  __Pyx_XDECREF(__pyx_r);
13672  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13673  __Pyx_GOTREF(__pyx_t_3);
13674  try {
13675  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13676  } catch(...) {
13677  __Pyx_CppExn2PyErr();
13678  __PYX_ERR(0, 1595, __pyx_L1_error)
13679  }
13680  __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)
13681  __Pyx_GOTREF(__pyx_t_5);
13682  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13683  __pyx_r = __pyx_t_5;
13684  __pyx_t_5 = 0;
13685  goto __pyx_L0;
13686 
13687  /* "PyClical.pyx":1594
13688  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13689  * """
13690  * if not (i is None): # <<<<<<<<<<<<<<
13691  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13692  * else:
13693  */
13694  }
13695 
13696  /* "PyClical.pyx":1597
13697  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13698  * else:
13699  * try: # <<<<<<<<<<<<<<
13700  * return math.log(obj)
13701  * except:
13702  */
13703  /*else*/ {
13704  {
13705  __Pyx_PyThreadState_declare
13706  __Pyx_PyThreadState_assign
13707  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13708  __Pyx_XGOTREF(__pyx_t_6);
13709  __Pyx_XGOTREF(__pyx_t_7);
13710  __Pyx_XGOTREF(__pyx_t_8);
13711  /*try:*/ {
13712 
13713  /* "PyClical.pyx":1598
13714  * else:
13715  * try:
13716  * return math.log(obj) # <<<<<<<<<<<<<<
13717  * except:
13718  * return clifford().wrap( glucat.log(toClifford(obj)) )
13719  */
13720  __Pyx_XDECREF(__pyx_r);
13721  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13722  __Pyx_GOTREF(__pyx_t_3);
13723  __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)
13724  __Pyx_GOTREF(__pyx_t_9);
13725  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13726  __pyx_t_3 = NULL;
13727  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13728  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13729  if (likely(__pyx_t_3)) {
13730  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13731  __Pyx_INCREF(__pyx_t_3);
13732  __Pyx_INCREF(function);
13733  __Pyx_DECREF_SET(__pyx_t_9, function);
13734  }
13735  }
13736  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
13737  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13738  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13739  __Pyx_GOTREF(__pyx_t_5);
13740  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13741  __pyx_r = __pyx_t_5;
13742  __pyx_t_5 = 0;
13743  goto __pyx_L8_try_return;
13744 
13745  /* "PyClical.pyx":1597
13746  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13747  * else:
13748  * try: # <<<<<<<<<<<<<<
13749  * return math.log(obj)
13750  * except:
13751  */
13752  }
13753  __pyx_L4_error:;
13754  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13755  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13756  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13757 
13758  /* "PyClical.pyx":1599
13759  * try:
13760  * return math.log(obj)
13761  * except: # <<<<<<<<<<<<<<
13762  * return clifford().wrap( glucat.log(toClifford(obj)) )
13763  *
13764  */
13765  /*except:*/ {
13766  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13767  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13768  __Pyx_GOTREF(__pyx_t_5);
13769  __Pyx_GOTREF(__pyx_t_9);
13770  __Pyx_GOTREF(__pyx_t_3);
13771 
13772  /* "PyClical.pyx":1600
13773  * return math.log(obj)
13774  * except:
13775  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13776  *
13777  * cpdef inline cos(obj,i = None):
13778  */
13779  __Pyx_XDECREF(__pyx_r);
13780  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13781  __Pyx_GOTREF(__pyx_t_10);
13782  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), log(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13783  __Pyx_GOTREF(__pyx_t_11);
13784  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13785  __pyx_r = __pyx_t_11;
13786  __pyx_t_11 = 0;
13787  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13788  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13789  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13790  goto __pyx_L7_except_return;
13791  }
13792  __pyx_L6_except_error:;
13793 
13794  /* "PyClical.pyx":1597
13795  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13796  * else:
13797  * try: # <<<<<<<<<<<<<<
13798  * return math.log(obj)
13799  * except:
13800  */
13801  __Pyx_XGIVEREF(__pyx_t_6);
13802  __Pyx_XGIVEREF(__pyx_t_7);
13803  __Pyx_XGIVEREF(__pyx_t_8);
13804  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13805  goto __pyx_L1_error;
13806  __pyx_L8_try_return:;
13807  __Pyx_XGIVEREF(__pyx_t_6);
13808  __Pyx_XGIVEREF(__pyx_t_7);
13809  __Pyx_XGIVEREF(__pyx_t_8);
13810  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13811  goto __pyx_L0;
13812  __pyx_L7_except_return:;
13813  __Pyx_XGIVEREF(__pyx_t_6);
13814  __Pyx_XGIVEREF(__pyx_t_7);
13815  __Pyx_XGIVEREF(__pyx_t_8);
13816  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13817  goto __pyx_L0;
13818  }
13819  }
13820 
13821  /* "PyClical.pyx":1579
13822  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13823  *
13824  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13825  * """
13826  * Natural logarithm of multivector with optional complexifier.
13827  */
13828 
13829  /* function exit code */
13830  __pyx_L1_error:;
13831  __Pyx_XDECREF(__pyx_t_3);
13832  __Pyx_XDECREF(__pyx_t_5);
13833  __Pyx_XDECREF(__pyx_t_9);
13834  __Pyx_XDECREF(__pyx_t_10);
13835  __Pyx_XDECREF(__pyx_t_11);
13836  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13837  __pyx_r = 0;
13838  __pyx_L0:;
13839  __Pyx_XGIVEREF(__pyx_r);
13840  __Pyx_RefNannyFinishContext();
13841  return __pyx_r;
13842  }
13843 
13844  /* Python wrapper */
13845  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13846  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 ";
13847  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13848  PyObject *__pyx_v_obj = 0;
13849  PyObject *__pyx_v_i = 0;
13850  PyObject *__pyx_r = 0;
13851  __Pyx_RefNannyDeclarations
13852  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13853  {
13854  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13855  PyObject* values[2] = {0,0};
13856  values[1] = ((PyObject *)Py_None);
13857  if (unlikely(__pyx_kwds)) {
13858  Py_ssize_t kw_args;
13859  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13860  switch (pos_args) {
13861  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13862  CYTHON_FALLTHROUGH;
13863  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13864  CYTHON_FALLTHROUGH;
13865  case 0: break;
13866  default: goto __pyx_L5_argtuple_error;
13867  }
13868  kw_args = PyDict_Size(__pyx_kwds);
13869  switch (pos_args) {
13870  case 0:
13871  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13872  else goto __pyx_L5_argtuple_error;
13873  CYTHON_FALLTHROUGH;
13874  case 1:
13875  if (kw_args > 0) {
13876  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13877  if (value) { values[1] = value; kw_args--; }
13878  }
13879  }
13880  if (unlikely(kw_args > 0)) {
13881  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13882  }
13883  } else {
13884  switch (PyTuple_GET_SIZE(__pyx_args)) {
13885  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13886  CYTHON_FALLTHROUGH;
13887  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13888  break;
13889  default: goto __pyx_L5_argtuple_error;
13890  }
13891  }
13892  __pyx_v_obj = values[0];
13893  __pyx_v_i = values[1];
13894  }
13895  goto __pyx_L4_argument_unpacking_done;
13896  __pyx_L5_argtuple_error:;
13897  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
13898  __pyx_L3_error:;
13899  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13900  __Pyx_RefNannyFinishContext();
13901  return NULL;
13902  __pyx_L4_argument_unpacking_done:;
13903  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13904 
13905  /* function exit code */
13906  __Pyx_RefNannyFinishContext();
13907  return __pyx_r;
13908  }
13909 
13910  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13911  PyObject *__pyx_r = NULL;
13912  __Pyx_RefNannyDeclarations
13913  PyObject *__pyx_t_1 = NULL;
13914  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13915  __Pyx_RefNannySetupContext("log", 0);
13916  __Pyx_XDECREF(__pyx_r);
13917  __pyx_t_2.__pyx_n = 1;
13918  __pyx_t_2.i = __pyx_v_i;
13919  __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)
13920  __Pyx_GOTREF(__pyx_t_1);
13921  __pyx_r = __pyx_t_1;
13922  __pyx_t_1 = 0;
13923  goto __pyx_L0;
13924 
13925  /* function exit code */
13926  __pyx_L1_error:;
13927  __Pyx_XDECREF(__pyx_t_1);
13928  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13929  __pyx_r = NULL;
13930  __pyx_L0:;
13931  __Pyx_XGIVEREF(__pyx_r);
13932  __Pyx_RefNannyFinishContext();
13933  return __pyx_r;
13934  }
13935 
13936  /* "PyClical.pyx":1602
13937  * return clifford().wrap( glucat.log(toClifford(obj)) )
13938  *
13939  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13940  * """
13941  * Cosine of multivector with optional complexifier.
13942  */
13943 
13944  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13945  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) {
13946  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13947  PyObject *__pyx_r = NULL;
13948  __Pyx_RefNannyDeclarations
13949  int __pyx_t_1;
13950  int __pyx_t_2;
13951  PyObject *__pyx_t_3 = NULL;
13952  Clifford __pyx_t_4;
13953  PyObject *__pyx_t_5 = NULL;
13954  PyObject *__pyx_t_6 = NULL;
13955  PyObject *__pyx_t_7 = NULL;
13956  PyObject *__pyx_t_8 = NULL;
13957  PyObject *__pyx_t_9 = NULL;
13958  PyObject *__pyx_t_10 = NULL;
13959  PyObject *__pyx_t_11 = NULL;
13960  __Pyx_RefNannySetupContext("cos", 0);
13961  if (__pyx_optional_args) {
13962  if (__pyx_optional_args->__pyx_n > 0) {
13963  __pyx_v_i = __pyx_optional_args->i;
13964  }
13965  }
13966 
13967  /* "PyClical.pyx":1611
13968  * {1,2}
13969  * """
13970  * if not (i is None): # <<<<<<<<<<<<<<
13971  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13972  * else:
13973  */
13974  __pyx_t_1 = (__pyx_v_i != Py_None);
13975  __pyx_t_2 = (__pyx_t_1 != 0);
13976  if (__pyx_t_2) {
13977 
13978  /* "PyClical.pyx":1612
13979  * """
13980  * if not (i is None):
13981  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13982  * else:
13983  * try:
13984  */
13985  __Pyx_XDECREF(__pyx_r);
13986  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
13987  __Pyx_GOTREF(__pyx_t_3);
13988  try {
13989  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13990  } catch(...) {
13991  __Pyx_CppExn2PyErr();
13992  __PYX_ERR(0, 1612, __pyx_L1_error)
13993  }
13994  __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)
13995  __Pyx_GOTREF(__pyx_t_5);
13996  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13997  __pyx_r = __pyx_t_5;
13998  __pyx_t_5 = 0;
13999  goto __pyx_L0;
14000 
14001  /* "PyClical.pyx":1611
14002  * {1,2}
14003  * """
14004  * if not (i is None): # <<<<<<<<<<<<<<
14005  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14006  * else:
14007  */
14008  }
14009 
14010  /* "PyClical.pyx":1614
14011  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14012  * else:
14013  * try: # <<<<<<<<<<<<<<
14014  * return math.cos(obj)
14015  * except:
14016  */
14017  /*else*/ {
14018  {
14019  __Pyx_PyThreadState_declare
14020  __Pyx_PyThreadState_assign
14021  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14022  __Pyx_XGOTREF(__pyx_t_6);
14023  __Pyx_XGOTREF(__pyx_t_7);
14024  __Pyx_XGOTREF(__pyx_t_8);
14025  /*try:*/ {
14026 
14027  /* "PyClical.pyx":1615
14028  * else:
14029  * try:
14030  * return math.cos(obj) # <<<<<<<<<<<<<<
14031  * except:
14032  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14033  */
14034  __Pyx_XDECREF(__pyx_r);
14035  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14036  __Pyx_GOTREF(__pyx_t_3);
14037  __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)
14038  __Pyx_GOTREF(__pyx_t_9);
14039  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14040  __pyx_t_3 = NULL;
14041  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14042  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14043  if (likely(__pyx_t_3)) {
14044  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14045  __Pyx_INCREF(__pyx_t_3);
14046  __Pyx_INCREF(function);
14047  __Pyx_DECREF_SET(__pyx_t_9, function);
14048  }
14049  }
14050  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14051  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14052  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14053  __Pyx_GOTREF(__pyx_t_5);
14054  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14055  __pyx_r = __pyx_t_5;
14056  __pyx_t_5 = 0;
14057  goto __pyx_L8_try_return;
14058 
14059  /* "PyClical.pyx":1614
14060  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14061  * else:
14062  * try: # <<<<<<<<<<<<<<
14063  * return math.cos(obj)
14064  * except:
14065  */
14066  }
14067  __pyx_L4_error:;
14068  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14069  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14070  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14071 
14072  /* "PyClical.pyx":1616
14073  * try:
14074  * return math.cos(obj)
14075  * except: # <<<<<<<<<<<<<<
14076  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14077  *
14078  */
14079  /*except:*/ {
14080  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14081  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14082  __Pyx_GOTREF(__pyx_t_5);
14083  __Pyx_GOTREF(__pyx_t_9);
14084  __Pyx_GOTREF(__pyx_t_3);
14085 
14086  /* "PyClical.pyx":1617
14087  * return math.cos(obj)
14088  * except:
14089  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14090  *
14091  * cpdef inline acos(obj,i = None):
14092  */
14093  __Pyx_XDECREF(__pyx_r);
14094  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14095  __Pyx_GOTREF(__pyx_t_10);
14096  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14097  __Pyx_GOTREF(__pyx_t_11);
14098  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14099  __pyx_r = __pyx_t_11;
14100  __pyx_t_11 = 0;
14101  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14102  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14103  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14104  goto __pyx_L7_except_return;
14105  }
14106  __pyx_L6_except_error:;
14107 
14108  /* "PyClical.pyx":1614
14109  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14110  * else:
14111  * try: # <<<<<<<<<<<<<<
14112  * return math.cos(obj)
14113  * except:
14114  */
14115  __Pyx_XGIVEREF(__pyx_t_6);
14116  __Pyx_XGIVEREF(__pyx_t_7);
14117  __Pyx_XGIVEREF(__pyx_t_8);
14118  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14119  goto __pyx_L1_error;
14120  __pyx_L8_try_return:;
14121  __Pyx_XGIVEREF(__pyx_t_6);
14122  __Pyx_XGIVEREF(__pyx_t_7);
14123  __Pyx_XGIVEREF(__pyx_t_8);
14124  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14125  goto __pyx_L0;
14126  __pyx_L7_except_return:;
14127  __Pyx_XGIVEREF(__pyx_t_6);
14128  __Pyx_XGIVEREF(__pyx_t_7);
14129  __Pyx_XGIVEREF(__pyx_t_8);
14130  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14131  goto __pyx_L0;
14132  }
14133  }
14134 
14135  /* "PyClical.pyx":1602
14136  * return clifford().wrap( glucat.log(toClifford(obj)) )
14137  *
14138  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14139  * """
14140  * Cosine of multivector with optional complexifier.
14141  */
14142 
14143  /* function exit code */
14144  __pyx_L1_error:;
14145  __Pyx_XDECREF(__pyx_t_3);
14146  __Pyx_XDECREF(__pyx_t_5);
14147  __Pyx_XDECREF(__pyx_t_9);
14148  __Pyx_XDECREF(__pyx_t_10);
14149  __Pyx_XDECREF(__pyx_t_11);
14150  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14151  __pyx_r = 0;
14152  __pyx_L0:;
14153  __Pyx_XGIVEREF(__pyx_r);
14154  __Pyx_RefNannyFinishContext();
14155  return __pyx_r;
14156  }
14157 
14158  /* Python wrapper */
14159  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14160  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 ";
14161  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14162  PyObject *__pyx_v_obj = 0;
14163  PyObject *__pyx_v_i = 0;
14164  PyObject *__pyx_r = 0;
14165  __Pyx_RefNannyDeclarations
14166  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14167  {
14168  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14169  PyObject* values[2] = {0,0};
14170  values[1] = ((PyObject *)Py_None);
14171  if (unlikely(__pyx_kwds)) {
14172  Py_ssize_t kw_args;
14173  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14174  switch (pos_args) {
14175  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14176  CYTHON_FALLTHROUGH;
14177  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14178  CYTHON_FALLTHROUGH;
14179  case 0: break;
14180  default: goto __pyx_L5_argtuple_error;
14181  }
14182  kw_args = PyDict_Size(__pyx_kwds);
14183  switch (pos_args) {
14184  case 0:
14185  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14186  else goto __pyx_L5_argtuple_error;
14187  CYTHON_FALLTHROUGH;
14188  case 1:
14189  if (kw_args > 0) {
14190  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14191  if (value) { values[1] = value; kw_args--; }
14192  }
14193  }
14194  if (unlikely(kw_args > 0)) {
14195  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14196  }
14197  } else {
14198  switch (PyTuple_GET_SIZE(__pyx_args)) {
14199  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14200  CYTHON_FALLTHROUGH;
14201  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14202  break;
14203  default: goto __pyx_L5_argtuple_error;
14204  }
14205  }
14206  __pyx_v_obj = values[0];
14207  __pyx_v_i = values[1];
14208  }
14209  goto __pyx_L4_argument_unpacking_done;
14210  __pyx_L5_argtuple_error:;
14211  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14212  __pyx_L3_error:;
14213  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14214  __Pyx_RefNannyFinishContext();
14215  return NULL;
14216  __pyx_L4_argument_unpacking_done:;
14217  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14218 
14219  /* function exit code */
14220  __Pyx_RefNannyFinishContext();
14221  return __pyx_r;
14222  }
14223 
14224  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14225  PyObject *__pyx_r = NULL;
14226  __Pyx_RefNannyDeclarations
14227  PyObject *__pyx_t_1 = NULL;
14228  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14229  __Pyx_RefNannySetupContext("cos", 0);
14230  __Pyx_XDECREF(__pyx_r);
14231  __pyx_t_2.__pyx_n = 1;
14232  __pyx_t_2.i = __pyx_v_i;
14233  __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)
14234  __Pyx_GOTREF(__pyx_t_1);
14235  __pyx_r = __pyx_t_1;
14236  __pyx_t_1 = 0;
14237  goto __pyx_L0;
14238 
14239  /* function exit code */
14240  __pyx_L1_error:;
14241  __Pyx_XDECREF(__pyx_t_1);
14242  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14243  __pyx_r = NULL;
14244  __pyx_L0:;
14245  __Pyx_XGIVEREF(__pyx_r);
14246  __Pyx_RefNannyFinishContext();
14247  return __pyx_r;
14248  }
14249 
14250  /* "PyClical.pyx":1619
14251  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14252  *
14253  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14254  * """
14255  * Inverse cosine of multivector with optional complexifier.
14256  */
14257 
14258  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14259  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) {
14260  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14261  PyObject *__pyx_r = NULL;
14262  __Pyx_RefNannyDeclarations
14263  int __pyx_t_1;
14264  int __pyx_t_2;
14265  PyObject *__pyx_t_3 = NULL;
14266  Clifford __pyx_t_4;
14267  PyObject *__pyx_t_5 = NULL;
14268  PyObject *__pyx_t_6 = NULL;
14269  PyObject *__pyx_t_7 = NULL;
14270  PyObject *__pyx_t_8 = NULL;
14271  PyObject *__pyx_t_9 = NULL;
14272  PyObject *__pyx_t_10 = NULL;
14273  PyObject *__pyx_t_11 = NULL;
14274  __Pyx_RefNannySetupContext("acos", 0);
14275  if (__pyx_optional_args) {
14276  if (__pyx_optional_args->__pyx_n > 0) {
14277  __pyx_v_i = __pyx_optional_args->i;
14278  }
14279  }
14280 
14281  /* "PyClical.pyx":1632
14282  * {1,2}
14283  * """
14284  * if not (i is None): # <<<<<<<<<<<<<<
14285  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14286  * else:
14287  */
14288  __pyx_t_1 = (__pyx_v_i != Py_None);
14289  __pyx_t_2 = (__pyx_t_1 != 0);
14290  if (__pyx_t_2) {
14291 
14292  /* "PyClical.pyx":1633
14293  * """
14294  * if not (i is None):
14295  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14296  * else:
14297  * try:
14298  */
14299  __Pyx_XDECREF(__pyx_r);
14300  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14301  __Pyx_GOTREF(__pyx_t_3);
14302  try {
14303  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14304  } catch(...) {
14305  __Pyx_CppExn2PyErr();
14306  __PYX_ERR(0, 1633, __pyx_L1_error)
14307  }
14308  __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)
14309  __Pyx_GOTREF(__pyx_t_5);
14310  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14311  __pyx_r = __pyx_t_5;
14312  __pyx_t_5 = 0;
14313  goto __pyx_L0;
14314 
14315  /* "PyClical.pyx":1632
14316  * {1,2}
14317  * """
14318  * if not (i is None): # <<<<<<<<<<<<<<
14319  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14320  * else:
14321  */
14322  }
14323 
14324  /* "PyClical.pyx":1635
14325  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14326  * else:
14327  * try: # <<<<<<<<<<<<<<
14328  * return math.acos(obj)
14329  * except:
14330  */
14331  /*else*/ {
14332  {
14333  __Pyx_PyThreadState_declare
14334  __Pyx_PyThreadState_assign
14335  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14336  __Pyx_XGOTREF(__pyx_t_6);
14337  __Pyx_XGOTREF(__pyx_t_7);
14338  __Pyx_XGOTREF(__pyx_t_8);
14339  /*try:*/ {
14340 
14341  /* "PyClical.pyx":1636
14342  * else:
14343  * try:
14344  * return math.acos(obj) # <<<<<<<<<<<<<<
14345  * except:
14346  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14347  */
14348  __Pyx_XDECREF(__pyx_r);
14349  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14350  __Pyx_GOTREF(__pyx_t_3);
14351  __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)
14352  __Pyx_GOTREF(__pyx_t_9);
14353  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14354  __pyx_t_3 = NULL;
14355  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14356  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14357  if (likely(__pyx_t_3)) {
14358  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14359  __Pyx_INCREF(__pyx_t_3);
14360  __Pyx_INCREF(function);
14361  __Pyx_DECREF_SET(__pyx_t_9, function);
14362  }
14363  }
14364  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14365  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14366  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14367  __Pyx_GOTREF(__pyx_t_5);
14368  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14369  __pyx_r = __pyx_t_5;
14370  __pyx_t_5 = 0;
14371  goto __pyx_L8_try_return;
14372 
14373  /* "PyClical.pyx":1635
14374  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14375  * else:
14376  * try: # <<<<<<<<<<<<<<
14377  * return math.acos(obj)
14378  * except:
14379  */
14380  }
14381  __pyx_L4_error:;
14382  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14383  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14384  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14385 
14386  /* "PyClical.pyx":1637
14387  * try:
14388  * return math.acos(obj)
14389  * except: # <<<<<<<<<<<<<<
14390  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14391  *
14392  */
14393  /*except:*/ {
14394  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14395  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14396  __Pyx_GOTREF(__pyx_t_5);
14397  __Pyx_GOTREF(__pyx_t_9);
14398  __Pyx_GOTREF(__pyx_t_3);
14399 
14400  /* "PyClical.pyx":1638
14401  * return math.acos(obj)
14402  * except:
14403  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14404  *
14405  * cpdef inline cosh(obj):
14406  */
14407  __Pyx_XDECREF(__pyx_r);
14408  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14409  __Pyx_GOTREF(__pyx_t_10);
14410  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14411  __Pyx_GOTREF(__pyx_t_11);
14412  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14413  __pyx_r = __pyx_t_11;
14414  __pyx_t_11 = 0;
14415  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14416  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14417  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14418  goto __pyx_L7_except_return;
14419  }
14420  __pyx_L6_except_error:;
14421 
14422  /* "PyClical.pyx":1635
14423  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14424  * else:
14425  * try: # <<<<<<<<<<<<<<
14426  * return math.acos(obj)
14427  * except:
14428  */
14429  __Pyx_XGIVEREF(__pyx_t_6);
14430  __Pyx_XGIVEREF(__pyx_t_7);
14431  __Pyx_XGIVEREF(__pyx_t_8);
14432  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14433  goto __pyx_L1_error;
14434  __pyx_L8_try_return:;
14435  __Pyx_XGIVEREF(__pyx_t_6);
14436  __Pyx_XGIVEREF(__pyx_t_7);
14437  __Pyx_XGIVEREF(__pyx_t_8);
14438  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14439  goto __pyx_L0;
14440  __pyx_L7_except_return:;
14441  __Pyx_XGIVEREF(__pyx_t_6);
14442  __Pyx_XGIVEREF(__pyx_t_7);
14443  __Pyx_XGIVEREF(__pyx_t_8);
14444  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14445  goto __pyx_L0;
14446  }
14447  }
14448 
14449  /* "PyClical.pyx":1619
14450  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14451  *
14452  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14453  * """
14454  * Inverse cosine of multivector with optional complexifier.
14455  */
14456 
14457  /* function exit code */
14458  __pyx_L1_error:;
14459  __Pyx_XDECREF(__pyx_t_3);
14460  __Pyx_XDECREF(__pyx_t_5);
14461  __Pyx_XDECREF(__pyx_t_9);
14462  __Pyx_XDECREF(__pyx_t_10);
14463  __Pyx_XDECREF(__pyx_t_11);
14464  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14465  __pyx_r = 0;
14466  __pyx_L0:;
14467  __Pyx_XGIVEREF(__pyx_r);
14468  __Pyx_RefNannyFinishContext();
14469  return __pyx_r;
14470  }
14471 
14472  /* Python wrapper */
14473  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14474  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 ";
14475  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14476  PyObject *__pyx_v_obj = 0;
14477  PyObject *__pyx_v_i = 0;
14478  PyObject *__pyx_r = 0;
14479  __Pyx_RefNannyDeclarations
14480  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14481  {
14482  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14483  PyObject* values[2] = {0,0};
14484  values[1] = ((PyObject *)Py_None);
14485  if (unlikely(__pyx_kwds)) {
14486  Py_ssize_t kw_args;
14487  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14488  switch (pos_args) {
14489  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14490  CYTHON_FALLTHROUGH;
14491  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14492  CYTHON_FALLTHROUGH;
14493  case 0: break;
14494  default: goto __pyx_L5_argtuple_error;
14495  }
14496  kw_args = PyDict_Size(__pyx_kwds);
14497  switch (pos_args) {
14498  case 0:
14499  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14500  else goto __pyx_L5_argtuple_error;
14501  CYTHON_FALLTHROUGH;
14502  case 1:
14503  if (kw_args > 0) {
14504  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14505  if (value) { values[1] = value; kw_args--; }
14506  }
14507  }
14508  if (unlikely(kw_args > 0)) {
14509  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14510  }
14511  } else {
14512  switch (PyTuple_GET_SIZE(__pyx_args)) {
14513  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14514  CYTHON_FALLTHROUGH;
14515  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14516  break;
14517  default: goto __pyx_L5_argtuple_error;
14518  }
14519  }
14520  __pyx_v_obj = values[0];
14521  __pyx_v_i = values[1];
14522  }
14523  goto __pyx_L4_argument_unpacking_done;
14524  __pyx_L5_argtuple_error:;
14525  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14526  __pyx_L3_error:;
14527  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14528  __Pyx_RefNannyFinishContext();
14529  return NULL;
14530  __pyx_L4_argument_unpacking_done:;
14531  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14532 
14533  /* function exit code */
14534  __Pyx_RefNannyFinishContext();
14535  return __pyx_r;
14536  }
14537 
14538  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14539  PyObject *__pyx_r = NULL;
14540  __Pyx_RefNannyDeclarations
14541  PyObject *__pyx_t_1 = NULL;
14542  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14543  __Pyx_RefNannySetupContext("acos", 0);
14544  __Pyx_XDECREF(__pyx_r);
14545  __pyx_t_2.__pyx_n = 1;
14546  __pyx_t_2.i = __pyx_v_i;
14547  __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)
14548  __Pyx_GOTREF(__pyx_t_1);
14549  __pyx_r = __pyx_t_1;
14550  __pyx_t_1 = 0;
14551  goto __pyx_L0;
14552 
14553  /* function exit code */
14554  __pyx_L1_error:;
14555  __Pyx_XDECREF(__pyx_t_1);
14556  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14557  __pyx_r = NULL;
14558  __pyx_L0:;
14559  __Pyx_XGIVEREF(__pyx_r);
14560  __Pyx_RefNannyFinishContext();
14561  return __pyx_r;
14562  }
14563 
14564  /* "PyClical.pyx":1640
14565  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14566  *
14567  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14568  * """
14569  * Hyperbolic cosine of multivector.
14570  */
14571 
14572  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14573  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14574  PyObject *__pyx_r = NULL;
14575  __Pyx_RefNannyDeclarations
14576  PyObject *__pyx_t_1 = NULL;
14577  PyObject *__pyx_t_2 = NULL;
14578  PyObject *__pyx_t_3 = NULL;
14579  PyObject *__pyx_t_4 = NULL;
14580  PyObject *__pyx_t_5 = NULL;
14581  PyObject *__pyx_t_6 = NULL;
14582  PyObject *__pyx_t_7 = NULL;
14583  PyObject *__pyx_t_8 = NULL;
14584  __Pyx_RefNannySetupContext("cosh", 0);
14585 
14586  /* "PyClical.pyx":1651
14587  * {1,2}
14588  * """
14589  * try: # <<<<<<<<<<<<<<
14590  * return math.cosh(obj)
14591  * except:
14592  */
14593  {
14594  __Pyx_PyThreadState_declare
14595  __Pyx_PyThreadState_assign
14596  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14597  __Pyx_XGOTREF(__pyx_t_1);
14598  __Pyx_XGOTREF(__pyx_t_2);
14599  __Pyx_XGOTREF(__pyx_t_3);
14600  /*try:*/ {
14601 
14602  /* "PyClical.pyx":1652
14603  * """
14604  * try:
14605  * return math.cosh(obj) # <<<<<<<<<<<<<<
14606  * except:
14607  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14608  */
14609  __Pyx_XDECREF(__pyx_r);
14610  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14611  __Pyx_GOTREF(__pyx_t_5);
14612  __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)
14613  __Pyx_GOTREF(__pyx_t_6);
14614  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14615  __pyx_t_5 = NULL;
14616  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14617  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14618  if (likely(__pyx_t_5)) {
14619  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14620  __Pyx_INCREF(__pyx_t_5);
14621  __Pyx_INCREF(function);
14622  __Pyx_DECREF_SET(__pyx_t_6, function);
14623  }
14624  }
14625  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
14626  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14627  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14628  __Pyx_GOTREF(__pyx_t_4);
14629  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14630  __pyx_r = __pyx_t_4;
14631  __pyx_t_4 = 0;
14632  goto __pyx_L7_try_return;
14633 
14634  /* "PyClical.pyx":1651
14635  * {1,2}
14636  * """
14637  * try: # <<<<<<<<<<<<<<
14638  * return math.cosh(obj)
14639  * except:
14640  */
14641  }
14642  __pyx_L3_error:;
14643  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14644  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14645  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14646 
14647  /* "PyClical.pyx":1653
14648  * try:
14649  * return math.cosh(obj)
14650  * except: # <<<<<<<<<<<<<<
14651  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14652  *
14653  */
14654  /*except:*/ {
14655  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14656  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14657  __Pyx_GOTREF(__pyx_t_4);
14658  __Pyx_GOTREF(__pyx_t_6);
14659  __Pyx_GOTREF(__pyx_t_5);
14660 
14661  /* "PyClical.pyx":1654
14662  * return math.cosh(obj)
14663  * except:
14664  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14665  *
14666  * cpdef inline acosh(obj,i = None):
14667  */
14668  __Pyx_XDECREF(__pyx_r);
14669  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14670  __Pyx_GOTREF(__pyx_t_7);
14671  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), cosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14672  __Pyx_GOTREF(__pyx_t_8);
14673  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14674  __pyx_r = __pyx_t_8;
14675  __pyx_t_8 = 0;
14676  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14677  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14678  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14679  goto __pyx_L6_except_return;
14680  }
14681  __pyx_L5_except_error:;
14682 
14683  /* "PyClical.pyx":1651
14684  * {1,2}
14685  * """
14686  * try: # <<<<<<<<<<<<<<
14687  * return math.cosh(obj)
14688  * except:
14689  */
14690  __Pyx_XGIVEREF(__pyx_t_1);
14691  __Pyx_XGIVEREF(__pyx_t_2);
14692  __Pyx_XGIVEREF(__pyx_t_3);
14693  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14694  goto __pyx_L1_error;
14695  __pyx_L7_try_return:;
14696  __Pyx_XGIVEREF(__pyx_t_1);
14697  __Pyx_XGIVEREF(__pyx_t_2);
14698  __Pyx_XGIVEREF(__pyx_t_3);
14699  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14700  goto __pyx_L0;
14701  __pyx_L6_except_return:;
14702  __Pyx_XGIVEREF(__pyx_t_1);
14703  __Pyx_XGIVEREF(__pyx_t_2);
14704  __Pyx_XGIVEREF(__pyx_t_3);
14705  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14706  goto __pyx_L0;
14707  }
14708 
14709  /* "PyClical.pyx":1640
14710  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14711  *
14712  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14713  * """
14714  * Hyperbolic cosine of multivector.
14715  */
14716 
14717  /* function exit code */
14718  __pyx_L1_error:;
14719  __Pyx_XDECREF(__pyx_t_4);
14720  __Pyx_XDECREF(__pyx_t_5);
14721  __Pyx_XDECREF(__pyx_t_6);
14722  __Pyx_XDECREF(__pyx_t_7);
14723  __Pyx_XDECREF(__pyx_t_8);
14724  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14725  __pyx_r = 0;
14726  __pyx_L0:;
14727  __Pyx_XGIVEREF(__pyx_r);
14728  __Pyx_RefNannyFinishContext();
14729  return __pyx_r;
14730  }
14731 
14732  /* Python wrapper */
14733  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14734  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 ";
14735  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14736  PyObject *__pyx_r = 0;
14737  __Pyx_RefNannyDeclarations
14738  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14739  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14740 
14741  /* function exit code */
14742  __Pyx_RefNannyFinishContext();
14743  return __pyx_r;
14744  }
14745 
14746  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14747  PyObject *__pyx_r = NULL;
14748  __Pyx_RefNannyDeclarations
14749  PyObject *__pyx_t_1 = NULL;
14750  __Pyx_RefNannySetupContext("cosh", 0);
14751  __Pyx_XDECREF(__pyx_r);
14752  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14753  __Pyx_GOTREF(__pyx_t_1);
14754  __pyx_r = __pyx_t_1;
14755  __pyx_t_1 = 0;
14756  goto __pyx_L0;
14757 
14758  /* function exit code */
14759  __pyx_L1_error:;
14760  __Pyx_XDECREF(__pyx_t_1);
14761  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14762  __pyx_r = NULL;
14763  __pyx_L0:;
14764  __Pyx_XGIVEREF(__pyx_r);
14765  __Pyx_RefNannyFinishContext();
14766  return __pyx_r;
14767  }
14768 
14769  /* "PyClical.pyx":1656
14770  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14771  *
14772  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14773  * """
14774  * Inverse hyperbolic cosine of multivector with optional complexifier.
14775  */
14776 
14777  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14778  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) {
14779  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14780  PyObject *__pyx_r = NULL;
14781  __Pyx_RefNannyDeclarations
14782  int __pyx_t_1;
14783  int __pyx_t_2;
14784  PyObject *__pyx_t_3 = NULL;
14785  Clifford __pyx_t_4;
14786  PyObject *__pyx_t_5 = NULL;
14787  PyObject *__pyx_t_6 = NULL;
14788  PyObject *__pyx_t_7 = NULL;
14789  PyObject *__pyx_t_8 = NULL;
14790  PyObject *__pyx_t_9 = NULL;
14791  PyObject *__pyx_t_10 = NULL;
14792  PyObject *__pyx_t_11 = NULL;
14793  __Pyx_RefNannySetupContext("acosh", 0);
14794  if (__pyx_optional_args) {
14795  if (__pyx_optional_args->__pyx_n > 0) {
14796  __pyx_v_i = __pyx_optional_args->i;
14797  }
14798  }
14799 
14800  /* "PyClical.pyx":1671
14801  * {1,2}
14802  * """
14803  * if not (i is None): # <<<<<<<<<<<<<<
14804  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14805  * else:
14806  */
14807  __pyx_t_1 = (__pyx_v_i != Py_None);
14808  __pyx_t_2 = (__pyx_t_1 != 0);
14809  if (__pyx_t_2) {
14810 
14811  /* "PyClical.pyx":1672
14812  * """
14813  * if not (i is None):
14814  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14815  * else:
14816  * try:
14817  */
14818  __Pyx_XDECREF(__pyx_r);
14819  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
14820  __Pyx_GOTREF(__pyx_t_3);
14821  try {
14822  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14823  } catch(...) {
14824  __Pyx_CppExn2PyErr();
14825  __PYX_ERR(0, 1672, __pyx_L1_error)
14826  }
14827  __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)
14828  __Pyx_GOTREF(__pyx_t_5);
14829  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14830  __pyx_r = __pyx_t_5;
14831  __pyx_t_5 = 0;
14832  goto __pyx_L0;
14833 
14834  /* "PyClical.pyx":1671
14835  * {1,2}
14836  * """
14837  * if not (i is None): # <<<<<<<<<<<<<<
14838  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14839  * else:
14840  */
14841  }
14842 
14843  /* "PyClical.pyx":1674
14844  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14845  * else:
14846  * try: # <<<<<<<<<<<<<<
14847  * return math.acosh(obj)
14848  * except:
14849  */
14850  /*else*/ {
14851  {
14852  __Pyx_PyThreadState_declare
14853  __Pyx_PyThreadState_assign
14854  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14855  __Pyx_XGOTREF(__pyx_t_6);
14856  __Pyx_XGOTREF(__pyx_t_7);
14857  __Pyx_XGOTREF(__pyx_t_8);
14858  /*try:*/ {
14859 
14860  /* "PyClical.pyx":1675
14861  * else:
14862  * try:
14863  * return math.acosh(obj) # <<<<<<<<<<<<<<
14864  * except:
14865  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14866  */
14867  __Pyx_XDECREF(__pyx_r);
14868  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
14869  __Pyx_GOTREF(__pyx_t_3);
14870  __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)
14871  __Pyx_GOTREF(__pyx_t_9);
14872  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14873  __pyx_t_3 = NULL;
14874  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14875  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14876  if (likely(__pyx_t_3)) {
14877  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14878  __Pyx_INCREF(__pyx_t_3);
14879  __Pyx_INCREF(function);
14880  __Pyx_DECREF_SET(__pyx_t_9, function);
14881  }
14882  }
14883  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14884  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14885  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
14886  __Pyx_GOTREF(__pyx_t_5);
14887  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14888  __pyx_r = __pyx_t_5;
14889  __pyx_t_5 = 0;
14890  goto __pyx_L8_try_return;
14891 
14892  /* "PyClical.pyx":1674
14893  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14894  * else:
14895  * try: # <<<<<<<<<<<<<<
14896  * return math.acosh(obj)
14897  * except:
14898  */
14899  }
14900  __pyx_L4_error:;
14901  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14902  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14903  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14904 
14905  /* "PyClical.pyx":1676
14906  * try:
14907  * return math.acosh(obj)
14908  * except: # <<<<<<<<<<<<<<
14909  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14910  *
14911  */
14912  /*except:*/ {
14913  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14914  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
14915  __Pyx_GOTREF(__pyx_t_5);
14916  __Pyx_GOTREF(__pyx_t_9);
14917  __Pyx_GOTREF(__pyx_t_3);
14918 
14919  /* "PyClical.pyx":1677
14920  * return math.acosh(obj)
14921  * except:
14922  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14923  *
14924  * cpdef inline sin(obj,i = None):
14925  */
14926  __Pyx_XDECREF(__pyx_r);
14927  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14928  __Pyx_GOTREF(__pyx_t_10);
14929  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14930  __Pyx_GOTREF(__pyx_t_11);
14931  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14932  __pyx_r = __pyx_t_11;
14933  __pyx_t_11 = 0;
14934  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14935  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14936  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14937  goto __pyx_L7_except_return;
14938  }
14939  __pyx_L6_except_error:;
14940 
14941  /* "PyClical.pyx":1674
14942  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14943  * else:
14944  * try: # <<<<<<<<<<<<<<
14945  * return math.acosh(obj)
14946  * except:
14947  */
14948  __Pyx_XGIVEREF(__pyx_t_6);
14949  __Pyx_XGIVEREF(__pyx_t_7);
14950  __Pyx_XGIVEREF(__pyx_t_8);
14951  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14952  goto __pyx_L1_error;
14953  __pyx_L8_try_return:;
14954  __Pyx_XGIVEREF(__pyx_t_6);
14955  __Pyx_XGIVEREF(__pyx_t_7);
14956  __Pyx_XGIVEREF(__pyx_t_8);
14957  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14958  goto __pyx_L0;
14959  __pyx_L7_except_return:;
14960  __Pyx_XGIVEREF(__pyx_t_6);
14961  __Pyx_XGIVEREF(__pyx_t_7);
14962  __Pyx_XGIVEREF(__pyx_t_8);
14963  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14964  goto __pyx_L0;
14965  }
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  /* function exit code */
14977  __pyx_L1_error:;
14978  __Pyx_XDECREF(__pyx_t_3);
14979  __Pyx_XDECREF(__pyx_t_5);
14980  __Pyx_XDECREF(__pyx_t_9);
14981  __Pyx_XDECREF(__pyx_t_10);
14982  __Pyx_XDECREF(__pyx_t_11);
14983  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14984  __pyx_r = 0;
14985  __pyx_L0:;
14986  __Pyx_XGIVEREF(__pyx_r);
14987  __Pyx_RefNannyFinishContext();
14988  return __pyx_r;
14989  }
14990 
14991  /* Python wrapper */
14992  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14993  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 ";
14994  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14995  PyObject *__pyx_v_obj = 0;
14996  PyObject *__pyx_v_i = 0;
14997  PyObject *__pyx_r = 0;
14998  __Pyx_RefNannyDeclarations
14999  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15000  {
15001  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15002  PyObject* values[2] = {0,0};
15003  values[1] = ((PyObject *)Py_None);
15004  if (unlikely(__pyx_kwds)) {
15005  Py_ssize_t kw_args;
15006  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15007  switch (pos_args) {
15008  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15009  CYTHON_FALLTHROUGH;
15010  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15011  CYTHON_FALLTHROUGH;
15012  case 0: break;
15013  default: goto __pyx_L5_argtuple_error;
15014  }
15015  kw_args = PyDict_Size(__pyx_kwds);
15016  switch (pos_args) {
15017  case 0:
15018  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15019  else goto __pyx_L5_argtuple_error;
15020  CYTHON_FALLTHROUGH;
15021  case 1:
15022  if (kw_args > 0) {
15023  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15024  if (value) { values[1] = value; kw_args--; }
15025  }
15026  }
15027  if (unlikely(kw_args > 0)) {
15028  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15029  }
15030  } else {
15031  switch (PyTuple_GET_SIZE(__pyx_args)) {
15032  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15033  CYTHON_FALLTHROUGH;
15034  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15035  break;
15036  default: goto __pyx_L5_argtuple_error;
15037  }
15038  }
15039  __pyx_v_obj = values[0];
15040  __pyx_v_i = values[1];
15041  }
15042  goto __pyx_L4_argument_unpacking_done;
15043  __pyx_L5_argtuple_error:;
15044  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15045  __pyx_L3_error:;
15046  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15047  __Pyx_RefNannyFinishContext();
15048  return NULL;
15049  __pyx_L4_argument_unpacking_done:;
15050  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15051 
15052  /* function exit code */
15053  __Pyx_RefNannyFinishContext();
15054  return __pyx_r;
15055  }
15056 
15057  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15058  PyObject *__pyx_r = NULL;
15059  __Pyx_RefNannyDeclarations
15060  PyObject *__pyx_t_1 = NULL;
15061  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15062  __Pyx_RefNannySetupContext("acosh", 0);
15063  __Pyx_XDECREF(__pyx_r);
15064  __pyx_t_2.__pyx_n = 1;
15065  __pyx_t_2.i = __pyx_v_i;
15066  __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)
15067  __Pyx_GOTREF(__pyx_t_1);
15068  __pyx_r = __pyx_t_1;
15069  __pyx_t_1 = 0;
15070  goto __pyx_L0;
15071 
15072  /* function exit code */
15073  __pyx_L1_error:;
15074  __Pyx_XDECREF(__pyx_t_1);
15075  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15076  __pyx_r = NULL;
15077  __pyx_L0:;
15078  __Pyx_XGIVEREF(__pyx_r);
15079  __Pyx_RefNannyFinishContext();
15080  return __pyx_r;
15081  }
15082 
15083  /* "PyClical.pyx":1679
15084  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15085  *
15086  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15087  * """
15088  * Sine of multivector with optional complexifier.
15089  */
15090 
15091  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15092  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) {
15093  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15094  PyObject *__pyx_r = NULL;
15095  __Pyx_RefNannyDeclarations
15096  int __pyx_t_1;
15097  int __pyx_t_2;
15098  PyObject *__pyx_t_3 = NULL;
15099  Clifford __pyx_t_4;
15100  PyObject *__pyx_t_5 = NULL;
15101  PyObject *__pyx_t_6 = NULL;
15102  PyObject *__pyx_t_7 = NULL;
15103  PyObject *__pyx_t_8 = NULL;
15104  PyObject *__pyx_t_9 = NULL;
15105  PyObject *__pyx_t_10 = NULL;
15106  PyObject *__pyx_t_11 = NULL;
15107  __Pyx_RefNannySetupContext("sin", 0);
15108  if (__pyx_optional_args) {
15109  if (__pyx_optional_args->__pyx_n > 0) {
15110  __pyx_v_i = __pyx_optional_args->i;
15111  }
15112  }
15113 
15114  /* "PyClical.pyx":1690
15115  * {1,2,3}
15116  * """
15117  * if not (i is None): # <<<<<<<<<<<<<<
15118  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15119  * else:
15120  */
15121  __pyx_t_1 = (__pyx_v_i != Py_None);
15122  __pyx_t_2 = (__pyx_t_1 != 0);
15123  if (__pyx_t_2) {
15124 
15125  /* "PyClical.pyx":1691
15126  * """
15127  * if not (i is None):
15128  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15129  * else:
15130  * try:
15131  */
15132  __Pyx_XDECREF(__pyx_r);
15133  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15134  __Pyx_GOTREF(__pyx_t_3);
15135  try {
15136  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15137  } catch(...) {
15138  __Pyx_CppExn2PyErr();
15139  __PYX_ERR(0, 1691, __pyx_L1_error)
15140  }
15141  __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)
15142  __Pyx_GOTREF(__pyx_t_5);
15143  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15144  __pyx_r = __pyx_t_5;
15145  __pyx_t_5 = 0;
15146  goto __pyx_L0;
15147 
15148  /* "PyClical.pyx":1690
15149  * {1,2,3}
15150  * """
15151  * if not (i is None): # <<<<<<<<<<<<<<
15152  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15153  * else:
15154  */
15155  }
15156 
15157  /* "PyClical.pyx":1693
15158  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15159  * else:
15160  * try: # <<<<<<<<<<<<<<
15161  * return math.sin(obj)
15162  * except:
15163  */
15164  /*else*/ {
15165  {
15166  __Pyx_PyThreadState_declare
15167  __Pyx_PyThreadState_assign
15168  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15169  __Pyx_XGOTREF(__pyx_t_6);
15170  __Pyx_XGOTREF(__pyx_t_7);
15171  __Pyx_XGOTREF(__pyx_t_8);
15172  /*try:*/ {
15173 
15174  /* "PyClical.pyx":1694
15175  * else:
15176  * try:
15177  * return math.sin(obj) # <<<<<<<<<<<<<<
15178  * except:
15179  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15180  */
15181  __Pyx_XDECREF(__pyx_r);
15182  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15183  __Pyx_GOTREF(__pyx_t_3);
15184  __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)
15185  __Pyx_GOTREF(__pyx_t_9);
15186  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15187  __pyx_t_3 = NULL;
15188  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15189  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15190  if (likely(__pyx_t_3)) {
15191  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15192  __Pyx_INCREF(__pyx_t_3);
15193  __Pyx_INCREF(function);
15194  __Pyx_DECREF_SET(__pyx_t_9, function);
15195  }
15196  }
15197  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
15198  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15199  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15200  __Pyx_GOTREF(__pyx_t_5);
15201  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15202  __pyx_r = __pyx_t_5;
15203  __pyx_t_5 = 0;
15204  goto __pyx_L8_try_return;
15205 
15206  /* "PyClical.pyx":1693
15207  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15208  * else:
15209  * try: # <<<<<<<<<<<<<<
15210  * return math.sin(obj)
15211  * except:
15212  */
15213  }
15214  __pyx_L4_error:;
15215  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15216  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15217  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15218 
15219  /* "PyClical.pyx":1695
15220  * try:
15221  * return math.sin(obj)
15222  * except: # <<<<<<<<<<<<<<
15223  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15224  *
15225  */
15226  /*except:*/ {
15227  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15228  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15229  __Pyx_GOTREF(__pyx_t_5);
15230  __Pyx_GOTREF(__pyx_t_9);
15231  __Pyx_GOTREF(__pyx_t_3);
15232 
15233  /* "PyClical.pyx":1696
15234  * return math.sin(obj)
15235  * except:
15236  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15237  *
15238  * cpdef inline asin(obj,i = None):
15239  */
15240  __Pyx_XDECREF(__pyx_r);
15241  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15242  __Pyx_GOTREF(__pyx_t_10);
15243  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15244  __Pyx_GOTREF(__pyx_t_11);
15245  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15246  __pyx_r = __pyx_t_11;
15247  __pyx_t_11 = 0;
15248  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15249  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15250  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15251  goto __pyx_L7_except_return;
15252  }
15253  __pyx_L6_except_error:;
15254 
15255  /* "PyClical.pyx":1693
15256  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15257  * else:
15258  * try: # <<<<<<<<<<<<<<
15259  * return math.sin(obj)
15260  * except:
15261  */
15262  __Pyx_XGIVEREF(__pyx_t_6);
15263  __Pyx_XGIVEREF(__pyx_t_7);
15264  __Pyx_XGIVEREF(__pyx_t_8);
15265  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15266  goto __pyx_L1_error;
15267  __pyx_L8_try_return:;
15268  __Pyx_XGIVEREF(__pyx_t_6);
15269  __Pyx_XGIVEREF(__pyx_t_7);
15270  __Pyx_XGIVEREF(__pyx_t_8);
15271  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15272  goto __pyx_L0;
15273  __pyx_L7_except_return:;
15274  __Pyx_XGIVEREF(__pyx_t_6);
15275  __Pyx_XGIVEREF(__pyx_t_7);
15276  __Pyx_XGIVEREF(__pyx_t_8);
15277  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15278  goto __pyx_L0;
15279  }
15280  }
15281 
15282  /* "PyClical.pyx":1679
15283  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15284  *
15285  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15286  * """
15287  * Sine of multivector with optional complexifier.
15288  */
15289 
15290  /* function exit code */
15291  __pyx_L1_error:;
15292  __Pyx_XDECREF(__pyx_t_3);
15293  __Pyx_XDECREF(__pyx_t_5);
15294  __Pyx_XDECREF(__pyx_t_9);
15295  __Pyx_XDECREF(__pyx_t_10);
15296  __Pyx_XDECREF(__pyx_t_11);
15297  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15298  __pyx_r = 0;
15299  __pyx_L0:;
15300  __Pyx_XGIVEREF(__pyx_r);
15301  __Pyx_RefNannyFinishContext();
15302  return __pyx_r;
15303  }
15304 
15305  /* Python wrapper */
15306  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15307  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 ";
15308  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15309  PyObject *__pyx_v_obj = 0;
15310  PyObject *__pyx_v_i = 0;
15311  PyObject *__pyx_r = 0;
15312  __Pyx_RefNannyDeclarations
15313  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15314  {
15315  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15316  PyObject* values[2] = {0,0};
15317  values[1] = ((PyObject *)Py_None);
15318  if (unlikely(__pyx_kwds)) {
15319  Py_ssize_t kw_args;
15320  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15321  switch (pos_args) {
15322  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15323  CYTHON_FALLTHROUGH;
15324  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15325  CYTHON_FALLTHROUGH;
15326  case 0: break;
15327  default: goto __pyx_L5_argtuple_error;
15328  }
15329  kw_args = PyDict_Size(__pyx_kwds);
15330  switch (pos_args) {
15331  case 0:
15332  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15333  else goto __pyx_L5_argtuple_error;
15334  CYTHON_FALLTHROUGH;
15335  case 1:
15336  if (kw_args > 0) {
15337  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15338  if (value) { values[1] = value; kw_args--; }
15339  }
15340  }
15341  if (unlikely(kw_args > 0)) {
15342  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15343  }
15344  } else {
15345  switch (PyTuple_GET_SIZE(__pyx_args)) {
15346  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15347  CYTHON_FALLTHROUGH;
15348  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15349  break;
15350  default: goto __pyx_L5_argtuple_error;
15351  }
15352  }
15353  __pyx_v_obj = values[0];
15354  __pyx_v_i = values[1];
15355  }
15356  goto __pyx_L4_argument_unpacking_done;
15357  __pyx_L5_argtuple_error:;
15358  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15359  __pyx_L3_error:;
15360  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15361  __Pyx_RefNannyFinishContext();
15362  return NULL;
15363  __pyx_L4_argument_unpacking_done:;
15364  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15365 
15366  /* function exit code */
15367  __Pyx_RefNannyFinishContext();
15368  return __pyx_r;
15369  }
15370 
15371  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15372  PyObject *__pyx_r = NULL;
15373  __Pyx_RefNannyDeclarations
15374  PyObject *__pyx_t_1 = NULL;
15375  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15376  __Pyx_RefNannySetupContext("sin", 0);
15377  __Pyx_XDECREF(__pyx_r);
15378  __pyx_t_2.__pyx_n = 1;
15379  __pyx_t_2.i = __pyx_v_i;
15380  __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)
15381  __Pyx_GOTREF(__pyx_t_1);
15382  __pyx_r = __pyx_t_1;
15383  __pyx_t_1 = 0;
15384  goto __pyx_L0;
15385 
15386  /* function exit code */
15387  __pyx_L1_error:;
15388  __Pyx_XDECREF(__pyx_t_1);
15389  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15390  __pyx_r = NULL;
15391  __pyx_L0:;
15392  __Pyx_XGIVEREF(__pyx_r);
15393  __Pyx_RefNannyFinishContext();
15394  return __pyx_r;
15395  }
15396 
15397  /* "PyClical.pyx":1698
15398  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15399  *
15400  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15401  * """
15402  * Inverse sine of multivector with optional complexifier.
15403  */
15404 
15405  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15406  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) {
15407  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15408  PyObject *__pyx_r = NULL;
15409  __Pyx_RefNannyDeclarations
15410  int __pyx_t_1;
15411  int __pyx_t_2;
15412  PyObject *__pyx_t_3 = NULL;
15413  Clifford __pyx_t_4;
15414  PyObject *__pyx_t_5 = NULL;
15415  PyObject *__pyx_t_6 = NULL;
15416  PyObject *__pyx_t_7 = NULL;
15417  PyObject *__pyx_t_8 = NULL;
15418  PyObject *__pyx_t_9 = NULL;
15419  PyObject *__pyx_t_10 = NULL;
15420  PyObject *__pyx_t_11 = NULL;
15421  __Pyx_RefNannySetupContext("asin", 0);
15422  if (__pyx_optional_args) {
15423  if (__pyx_optional_args->__pyx_n > 0) {
15424  __pyx_v_i = __pyx_optional_args->i;
15425  }
15426  }
15427 
15428  /* "PyClical.pyx":1711
15429  * {1,2,3}
15430  * """
15431  * if not (i is None): # <<<<<<<<<<<<<<
15432  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15433  * else:
15434  */
15435  __pyx_t_1 = (__pyx_v_i != Py_None);
15436  __pyx_t_2 = (__pyx_t_1 != 0);
15437  if (__pyx_t_2) {
15438 
15439  /* "PyClical.pyx":1712
15440  * """
15441  * if not (i is None):
15442  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15443  * else:
15444  * try:
15445  */
15446  __Pyx_XDECREF(__pyx_r);
15447  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15448  __Pyx_GOTREF(__pyx_t_3);
15449  try {
15450  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15451  } catch(...) {
15452  __Pyx_CppExn2PyErr();
15453  __PYX_ERR(0, 1712, __pyx_L1_error)
15454  }
15455  __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)
15456  __Pyx_GOTREF(__pyx_t_5);
15457  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15458  __pyx_r = __pyx_t_5;
15459  __pyx_t_5 = 0;
15460  goto __pyx_L0;
15461 
15462  /* "PyClical.pyx":1711
15463  * {1,2,3}
15464  * """
15465  * if not (i is None): # <<<<<<<<<<<<<<
15466  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15467  * else:
15468  */
15469  }
15470 
15471  /* "PyClical.pyx":1714
15472  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15473  * else:
15474  * try: # <<<<<<<<<<<<<<
15475  * return math.asin(obj)
15476  * except:
15477  */
15478  /*else*/ {
15479  {
15480  __Pyx_PyThreadState_declare
15481  __Pyx_PyThreadState_assign
15482  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15483  __Pyx_XGOTREF(__pyx_t_6);
15484  __Pyx_XGOTREF(__pyx_t_7);
15485  __Pyx_XGOTREF(__pyx_t_8);
15486  /*try:*/ {
15487 
15488  /* "PyClical.pyx":1715
15489  * else:
15490  * try:
15491  * return math.asin(obj) # <<<<<<<<<<<<<<
15492  * except:
15493  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15494  */
15495  __Pyx_XDECREF(__pyx_r);
15496  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15497  __Pyx_GOTREF(__pyx_t_3);
15498  __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)
15499  __Pyx_GOTREF(__pyx_t_9);
15500  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15501  __pyx_t_3 = NULL;
15502  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15503  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15504  if (likely(__pyx_t_3)) {
15505  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15506  __Pyx_INCREF(__pyx_t_3);
15507  __Pyx_INCREF(function);
15508  __Pyx_DECREF_SET(__pyx_t_9, function);
15509  }
15510  }
15511  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
15512  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15513  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15514  __Pyx_GOTREF(__pyx_t_5);
15515  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15516  __pyx_r = __pyx_t_5;
15517  __pyx_t_5 = 0;
15518  goto __pyx_L8_try_return;
15519 
15520  /* "PyClical.pyx":1714
15521  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15522  * else:
15523  * try: # <<<<<<<<<<<<<<
15524  * return math.asin(obj)
15525  * except:
15526  */
15527  }
15528  __pyx_L4_error:;
15529  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15530  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15531  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15532 
15533  /* "PyClical.pyx":1716
15534  * try:
15535  * return math.asin(obj)
15536  * except: # <<<<<<<<<<<<<<
15537  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15538  *
15539  */
15540  /*except:*/ {
15541  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15542  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15543  __Pyx_GOTREF(__pyx_t_5);
15544  __Pyx_GOTREF(__pyx_t_9);
15545  __Pyx_GOTREF(__pyx_t_3);
15546 
15547  /* "PyClical.pyx":1717
15548  * return math.asin(obj)
15549  * except:
15550  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15551  *
15552  * cpdef inline sinh(obj):
15553  */
15554  __Pyx_XDECREF(__pyx_r);
15555  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15556  __Pyx_GOTREF(__pyx_t_10);
15557  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15558  __Pyx_GOTREF(__pyx_t_11);
15559  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15560  __pyx_r = __pyx_t_11;
15561  __pyx_t_11 = 0;
15562  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15563  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15564  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15565  goto __pyx_L7_except_return;
15566  }
15567  __pyx_L6_except_error:;
15568 
15569  /* "PyClical.pyx":1714
15570  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15571  * else:
15572  * try: # <<<<<<<<<<<<<<
15573  * return math.asin(obj)
15574  * except:
15575  */
15576  __Pyx_XGIVEREF(__pyx_t_6);
15577  __Pyx_XGIVEREF(__pyx_t_7);
15578  __Pyx_XGIVEREF(__pyx_t_8);
15579  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15580  goto __pyx_L1_error;
15581  __pyx_L8_try_return:;
15582  __Pyx_XGIVEREF(__pyx_t_6);
15583  __Pyx_XGIVEREF(__pyx_t_7);
15584  __Pyx_XGIVEREF(__pyx_t_8);
15585  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15586  goto __pyx_L0;
15587  __pyx_L7_except_return:;
15588  __Pyx_XGIVEREF(__pyx_t_6);
15589  __Pyx_XGIVEREF(__pyx_t_7);
15590  __Pyx_XGIVEREF(__pyx_t_8);
15591  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15592  goto __pyx_L0;
15593  }
15594  }
15595 
15596  /* "PyClical.pyx":1698
15597  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15598  *
15599  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15600  * """
15601  * Inverse sine of multivector with optional complexifier.
15602  */
15603 
15604  /* function exit code */
15605  __pyx_L1_error:;
15606  __Pyx_XDECREF(__pyx_t_3);
15607  __Pyx_XDECREF(__pyx_t_5);
15608  __Pyx_XDECREF(__pyx_t_9);
15609  __Pyx_XDECREF(__pyx_t_10);
15610  __Pyx_XDECREF(__pyx_t_11);
15611  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15612  __pyx_r = 0;
15613  __pyx_L0:;
15614  __Pyx_XGIVEREF(__pyx_r);
15615  __Pyx_RefNannyFinishContext();
15616  return __pyx_r;
15617  }
15618 
15619  /* Python wrapper */
15620  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15621  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 ";
15622  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15623  PyObject *__pyx_v_obj = 0;
15624  PyObject *__pyx_v_i = 0;
15625  PyObject *__pyx_r = 0;
15626  __Pyx_RefNannyDeclarations
15627  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15628  {
15629  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15630  PyObject* values[2] = {0,0};
15631  values[1] = ((PyObject *)Py_None);
15632  if (unlikely(__pyx_kwds)) {
15633  Py_ssize_t kw_args;
15634  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15635  switch (pos_args) {
15636  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15637  CYTHON_FALLTHROUGH;
15638  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15639  CYTHON_FALLTHROUGH;
15640  case 0: break;
15641  default: goto __pyx_L5_argtuple_error;
15642  }
15643  kw_args = PyDict_Size(__pyx_kwds);
15644  switch (pos_args) {
15645  case 0:
15646  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15647  else goto __pyx_L5_argtuple_error;
15648  CYTHON_FALLTHROUGH;
15649  case 1:
15650  if (kw_args > 0) {
15651  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15652  if (value) { values[1] = value; kw_args--; }
15653  }
15654  }
15655  if (unlikely(kw_args > 0)) {
15656  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15657  }
15658  } else {
15659  switch (PyTuple_GET_SIZE(__pyx_args)) {
15660  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15661  CYTHON_FALLTHROUGH;
15662  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15663  break;
15664  default: goto __pyx_L5_argtuple_error;
15665  }
15666  }
15667  __pyx_v_obj = values[0];
15668  __pyx_v_i = values[1];
15669  }
15670  goto __pyx_L4_argument_unpacking_done;
15671  __pyx_L5_argtuple_error:;
15672  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15673  __pyx_L3_error:;
15674  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15675  __Pyx_RefNannyFinishContext();
15676  return NULL;
15677  __pyx_L4_argument_unpacking_done:;
15678  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15679 
15680  /* function exit code */
15681  __Pyx_RefNannyFinishContext();
15682  return __pyx_r;
15683  }
15684 
15685  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15686  PyObject *__pyx_r = NULL;
15687  __Pyx_RefNannyDeclarations
15688  PyObject *__pyx_t_1 = NULL;
15689  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15690  __Pyx_RefNannySetupContext("asin", 0);
15691  __Pyx_XDECREF(__pyx_r);
15692  __pyx_t_2.__pyx_n = 1;
15693  __pyx_t_2.i = __pyx_v_i;
15694  __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)
15695  __Pyx_GOTREF(__pyx_t_1);
15696  __pyx_r = __pyx_t_1;
15697  __pyx_t_1 = 0;
15698  goto __pyx_L0;
15699 
15700  /* function exit code */
15701  __pyx_L1_error:;
15702  __Pyx_XDECREF(__pyx_t_1);
15703  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15704  __pyx_r = NULL;
15705  __pyx_L0:;
15706  __Pyx_XGIVEREF(__pyx_r);
15707  __Pyx_RefNannyFinishContext();
15708  return __pyx_r;
15709  }
15710 
15711  /* "PyClical.pyx":1719
15712  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15713  *
15714  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15715  * """
15716  * Hyperbolic sine of multivector.
15717  */
15718 
15719  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15720  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15721  PyObject *__pyx_r = NULL;
15722  __Pyx_RefNannyDeclarations
15723  PyObject *__pyx_t_1 = NULL;
15724  PyObject *__pyx_t_2 = NULL;
15725  PyObject *__pyx_t_3 = NULL;
15726  PyObject *__pyx_t_4 = NULL;
15727  PyObject *__pyx_t_5 = NULL;
15728  PyObject *__pyx_t_6 = NULL;
15729  PyObject *__pyx_t_7 = NULL;
15730  PyObject *__pyx_t_8 = NULL;
15731  __Pyx_RefNannySetupContext("sinh", 0);
15732 
15733  /* "PyClical.pyx":1728
15734  * 0.5{1,2}
15735  * """
15736  * try: # <<<<<<<<<<<<<<
15737  * return math.sinh(obj)
15738  * except:
15739  */
15740  {
15741  __Pyx_PyThreadState_declare
15742  __Pyx_PyThreadState_assign
15743  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15744  __Pyx_XGOTREF(__pyx_t_1);
15745  __Pyx_XGOTREF(__pyx_t_2);
15746  __Pyx_XGOTREF(__pyx_t_3);
15747  /*try:*/ {
15748 
15749  /* "PyClical.pyx":1729
15750  * """
15751  * try:
15752  * return math.sinh(obj) # <<<<<<<<<<<<<<
15753  * except:
15754  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15755  */
15756  __Pyx_XDECREF(__pyx_r);
15757  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
15758  __Pyx_GOTREF(__pyx_t_5);
15759  __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)
15760  __Pyx_GOTREF(__pyx_t_6);
15761  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15762  __pyx_t_5 = NULL;
15763  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15764  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15765  if (likely(__pyx_t_5)) {
15766  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15767  __Pyx_INCREF(__pyx_t_5);
15768  __Pyx_INCREF(function);
15769  __Pyx_DECREF_SET(__pyx_t_6, function);
15770  }
15771  }
15772  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
15773  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15774  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
15775  __Pyx_GOTREF(__pyx_t_4);
15776  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15777  __pyx_r = __pyx_t_4;
15778  __pyx_t_4 = 0;
15779  goto __pyx_L7_try_return;
15780 
15781  /* "PyClical.pyx":1728
15782  * 0.5{1,2}
15783  * """
15784  * try: # <<<<<<<<<<<<<<
15785  * return math.sinh(obj)
15786  * except:
15787  */
15788  }
15789  __pyx_L3_error:;
15790  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15791  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15792  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15793 
15794  /* "PyClical.pyx":1730
15795  * try:
15796  * return math.sinh(obj)
15797  * except: # <<<<<<<<<<<<<<
15798  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15799  *
15800  */
15801  /*except:*/ {
15802  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15803  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
15804  __Pyx_GOTREF(__pyx_t_4);
15805  __Pyx_GOTREF(__pyx_t_6);
15806  __Pyx_GOTREF(__pyx_t_5);
15807 
15808  /* "PyClical.pyx":1731
15809  * return math.sinh(obj)
15810  * except:
15811  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15812  *
15813  * cpdef inline asinh(obj,i = None):
15814  */
15815  __Pyx_XDECREF(__pyx_r);
15816  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15817  __Pyx_GOTREF(__pyx_t_7);
15818  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), sinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15819  __Pyx_GOTREF(__pyx_t_8);
15820  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15821  __pyx_r = __pyx_t_8;
15822  __pyx_t_8 = 0;
15823  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15824  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15825  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15826  goto __pyx_L6_except_return;
15827  }
15828  __pyx_L5_except_error:;
15829 
15830  /* "PyClical.pyx":1728
15831  * 0.5{1,2}
15832  * """
15833  * try: # <<<<<<<<<<<<<<
15834  * return math.sinh(obj)
15835  * except:
15836  */
15837  __Pyx_XGIVEREF(__pyx_t_1);
15838  __Pyx_XGIVEREF(__pyx_t_2);
15839  __Pyx_XGIVEREF(__pyx_t_3);
15840  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15841  goto __pyx_L1_error;
15842  __pyx_L7_try_return:;
15843  __Pyx_XGIVEREF(__pyx_t_1);
15844  __Pyx_XGIVEREF(__pyx_t_2);
15845  __Pyx_XGIVEREF(__pyx_t_3);
15846  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15847  goto __pyx_L0;
15848  __pyx_L6_except_return:;
15849  __Pyx_XGIVEREF(__pyx_t_1);
15850  __Pyx_XGIVEREF(__pyx_t_2);
15851  __Pyx_XGIVEREF(__pyx_t_3);
15852  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15853  goto __pyx_L0;
15854  }
15855 
15856  /* "PyClical.pyx":1719
15857  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15858  *
15859  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15860  * """
15861  * Hyperbolic sine of multivector.
15862  */
15863 
15864  /* function exit code */
15865  __pyx_L1_error:;
15866  __Pyx_XDECREF(__pyx_t_4);
15867  __Pyx_XDECREF(__pyx_t_5);
15868  __Pyx_XDECREF(__pyx_t_6);
15869  __Pyx_XDECREF(__pyx_t_7);
15870  __Pyx_XDECREF(__pyx_t_8);
15871  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15872  __pyx_r = 0;
15873  __pyx_L0:;
15874  __Pyx_XGIVEREF(__pyx_r);
15875  __Pyx_RefNannyFinishContext();
15876  return __pyx_r;
15877  }
15878 
15879  /* Python wrapper */
15880  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15881  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 ";
15882  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15883  PyObject *__pyx_r = 0;
15884  __Pyx_RefNannyDeclarations
15885  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
15886  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15887 
15888  /* function exit code */
15889  __Pyx_RefNannyFinishContext();
15890  return __pyx_r;
15891  }
15892 
15893  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15894  PyObject *__pyx_r = NULL;
15895  __Pyx_RefNannyDeclarations
15896  PyObject *__pyx_t_1 = NULL;
15897  __Pyx_RefNannySetupContext("sinh", 0);
15898  __Pyx_XDECREF(__pyx_r);
15899  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
15900  __Pyx_GOTREF(__pyx_t_1);
15901  __pyx_r = __pyx_t_1;
15902  __pyx_t_1 = 0;
15903  goto __pyx_L0;
15904 
15905  /* function exit code */
15906  __pyx_L1_error:;
15907  __Pyx_XDECREF(__pyx_t_1);
15908  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15909  __pyx_r = NULL;
15910  __pyx_L0:;
15911  __Pyx_XGIVEREF(__pyx_r);
15912  __Pyx_RefNannyFinishContext();
15913  return __pyx_r;
15914  }
15915 
15916  /* "PyClical.pyx":1733
15917  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15918  *
15919  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15920  * """
15921  * Inverse hyperbolic sine of multivector with optional complexifier.
15922  */
15923 
15924  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15925  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) {
15926  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15927  PyObject *__pyx_r = NULL;
15928  __Pyx_RefNannyDeclarations
15929  int __pyx_t_1;
15930  int __pyx_t_2;
15931  PyObject *__pyx_t_3 = NULL;
15932  Clifford __pyx_t_4;
15933  PyObject *__pyx_t_5 = NULL;
15934  PyObject *__pyx_t_6 = NULL;
15935  PyObject *__pyx_t_7 = NULL;
15936  PyObject *__pyx_t_8 = NULL;
15937  PyObject *__pyx_t_9 = NULL;
15938  PyObject *__pyx_t_10 = NULL;
15939  PyObject *__pyx_t_11 = NULL;
15940  __Pyx_RefNannySetupContext("asinh", 0);
15941  if (__pyx_optional_args) {
15942  if (__pyx_optional_args->__pyx_n > 0) {
15943  __pyx_v_i = __pyx_optional_args->i;
15944  }
15945  }
15946 
15947  /* "PyClical.pyx":1744
15948  * {1,2}
15949  * """
15950  * if not (i is None): # <<<<<<<<<<<<<<
15951  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15952  * else:
15953  */
15954  __pyx_t_1 = (__pyx_v_i != Py_None);
15955  __pyx_t_2 = (__pyx_t_1 != 0);
15956  if (__pyx_t_2) {
15957 
15958  /* "PyClical.pyx":1745
15959  * """
15960  * if not (i is None):
15961  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15962  * else:
15963  * try:
15964  */
15965  __Pyx_XDECREF(__pyx_r);
15966  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
15967  __Pyx_GOTREF(__pyx_t_3);
15968  try {
15969  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15970  } catch(...) {
15971  __Pyx_CppExn2PyErr();
15972  __PYX_ERR(0, 1745, __pyx_L1_error)
15973  }
15974  __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)
15975  __Pyx_GOTREF(__pyx_t_5);
15976  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15977  __pyx_r = __pyx_t_5;
15978  __pyx_t_5 = 0;
15979  goto __pyx_L0;
15980 
15981  /* "PyClical.pyx":1744
15982  * {1,2}
15983  * """
15984  * if not (i is None): # <<<<<<<<<<<<<<
15985  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15986  * else:
15987  */
15988  }
15989 
15990  /* "PyClical.pyx":1747
15991  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15992  * else:
15993  * try: # <<<<<<<<<<<<<<
15994  * return math.asinh(obj)
15995  * except:
15996  */
15997  /*else*/ {
15998  {
15999  __Pyx_PyThreadState_declare
16000  __Pyx_PyThreadState_assign
16001  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16002  __Pyx_XGOTREF(__pyx_t_6);
16003  __Pyx_XGOTREF(__pyx_t_7);
16004  __Pyx_XGOTREF(__pyx_t_8);
16005  /*try:*/ {
16006 
16007  /* "PyClical.pyx":1748
16008  * else:
16009  * try:
16010  * return math.asinh(obj) # <<<<<<<<<<<<<<
16011  * except:
16012  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16013  */
16014  __Pyx_XDECREF(__pyx_r);
16015  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16016  __Pyx_GOTREF(__pyx_t_3);
16017  __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)
16018  __Pyx_GOTREF(__pyx_t_9);
16019  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16020  __pyx_t_3 = NULL;
16021  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16022  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16023  if (likely(__pyx_t_3)) {
16024  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16025  __Pyx_INCREF(__pyx_t_3);
16026  __Pyx_INCREF(function);
16027  __Pyx_DECREF_SET(__pyx_t_9, function);
16028  }
16029  }
16030  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16031  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16032  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16033  __Pyx_GOTREF(__pyx_t_5);
16034  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16035  __pyx_r = __pyx_t_5;
16036  __pyx_t_5 = 0;
16037  goto __pyx_L8_try_return;
16038 
16039  /* "PyClical.pyx":1747
16040  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16041  * else:
16042  * try: # <<<<<<<<<<<<<<
16043  * return math.asinh(obj)
16044  * except:
16045  */
16046  }
16047  __pyx_L4_error:;
16048  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16049  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16050  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16051 
16052  /* "PyClical.pyx":1749
16053  * try:
16054  * return math.asinh(obj)
16055  * except: # <<<<<<<<<<<<<<
16056  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16057  *
16058  */
16059  /*except:*/ {
16060  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16061  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16062  __Pyx_GOTREF(__pyx_t_5);
16063  __Pyx_GOTREF(__pyx_t_9);
16064  __Pyx_GOTREF(__pyx_t_3);
16065 
16066  /* "PyClical.pyx":1750
16067  * return math.asinh(obj)
16068  * except:
16069  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16070  *
16071  * cpdef inline tan(obj,i = None):
16072  */
16073  __Pyx_XDECREF(__pyx_r);
16074  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16075  __Pyx_GOTREF(__pyx_t_10);
16076  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16077  __Pyx_GOTREF(__pyx_t_11);
16078  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16079  __pyx_r = __pyx_t_11;
16080  __pyx_t_11 = 0;
16081  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16082  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16083  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16084  goto __pyx_L7_except_return;
16085  }
16086  __pyx_L6_except_error:;
16087 
16088  /* "PyClical.pyx":1747
16089  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16090  * else:
16091  * try: # <<<<<<<<<<<<<<
16092  * return math.asinh(obj)
16093  * except:
16094  */
16095  __Pyx_XGIVEREF(__pyx_t_6);
16096  __Pyx_XGIVEREF(__pyx_t_7);
16097  __Pyx_XGIVEREF(__pyx_t_8);
16098  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16099  goto __pyx_L1_error;
16100  __pyx_L8_try_return:;
16101  __Pyx_XGIVEREF(__pyx_t_6);
16102  __Pyx_XGIVEREF(__pyx_t_7);
16103  __Pyx_XGIVEREF(__pyx_t_8);
16104  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16105  goto __pyx_L0;
16106  __pyx_L7_except_return:;
16107  __Pyx_XGIVEREF(__pyx_t_6);
16108  __Pyx_XGIVEREF(__pyx_t_7);
16109  __Pyx_XGIVEREF(__pyx_t_8);
16110  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16111  goto __pyx_L0;
16112  }
16113  }
16114 
16115  /* "PyClical.pyx":1733
16116  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16117  *
16118  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16119  * """
16120  * Inverse hyperbolic sine of multivector with optional complexifier.
16121  */
16122 
16123  /* function exit code */
16124  __pyx_L1_error:;
16125  __Pyx_XDECREF(__pyx_t_3);
16126  __Pyx_XDECREF(__pyx_t_5);
16127  __Pyx_XDECREF(__pyx_t_9);
16128  __Pyx_XDECREF(__pyx_t_10);
16129  __Pyx_XDECREF(__pyx_t_11);
16130  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16131  __pyx_r = 0;
16132  __pyx_L0:;
16133  __Pyx_XGIVEREF(__pyx_r);
16134  __Pyx_RefNannyFinishContext();
16135  return __pyx_r;
16136  }
16137 
16138  /* Python wrapper */
16139  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16140  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 ";
16141  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16142  PyObject *__pyx_v_obj = 0;
16143  PyObject *__pyx_v_i = 0;
16144  PyObject *__pyx_r = 0;
16145  __Pyx_RefNannyDeclarations
16146  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16147  {
16148  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16149  PyObject* values[2] = {0,0};
16150  values[1] = ((PyObject *)Py_None);
16151  if (unlikely(__pyx_kwds)) {
16152  Py_ssize_t kw_args;
16153  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16154  switch (pos_args) {
16155  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16156  CYTHON_FALLTHROUGH;
16157  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16158  CYTHON_FALLTHROUGH;
16159  case 0: break;
16160  default: goto __pyx_L5_argtuple_error;
16161  }
16162  kw_args = PyDict_Size(__pyx_kwds);
16163  switch (pos_args) {
16164  case 0:
16165  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16166  else goto __pyx_L5_argtuple_error;
16167  CYTHON_FALLTHROUGH;
16168  case 1:
16169  if (kw_args > 0) {
16170  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16171  if (value) { values[1] = value; kw_args--; }
16172  }
16173  }
16174  if (unlikely(kw_args > 0)) {
16175  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16176  }
16177  } else {
16178  switch (PyTuple_GET_SIZE(__pyx_args)) {
16179  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16180  CYTHON_FALLTHROUGH;
16181  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16182  break;
16183  default: goto __pyx_L5_argtuple_error;
16184  }
16185  }
16186  __pyx_v_obj = values[0];
16187  __pyx_v_i = values[1];
16188  }
16189  goto __pyx_L4_argument_unpacking_done;
16190  __pyx_L5_argtuple_error:;
16191  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16192  __pyx_L3_error:;
16193  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16194  __Pyx_RefNannyFinishContext();
16195  return NULL;
16196  __pyx_L4_argument_unpacking_done:;
16197  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16198 
16199  /* function exit code */
16200  __Pyx_RefNannyFinishContext();
16201  return __pyx_r;
16202  }
16203 
16204  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16205  PyObject *__pyx_r = NULL;
16206  __Pyx_RefNannyDeclarations
16207  PyObject *__pyx_t_1 = NULL;
16208  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16209  __Pyx_RefNannySetupContext("asinh", 0);
16210  __Pyx_XDECREF(__pyx_r);
16211  __pyx_t_2.__pyx_n = 1;
16212  __pyx_t_2.i = __pyx_v_i;
16213  __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)
16214  __Pyx_GOTREF(__pyx_t_1);
16215  __pyx_r = __pyx_t_1;
16216  __pyx_t_1 = 0;
16217  goto __pyx_L0;
16218 
16219  /* function exit code */
16220  __pyx_L1_error:;
16221  __Pyx_XDECREF(__pyx_t_1);
16222  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16223  __pyx_r = NULL;
16224  __pyx_L0:;
16225  __Pyx_XGIVEREF(__pyx_r);
16226  __Pyx_RefNannyFinishContext();
16227  return __pyx_r;
16228  }
16229 
16230  /* "PyClical.pyx":1752
16231  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16232  *
16233  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16234  * """
16235  * Tangent of multivector with optional complexifier.
16236  */
16237 
16238  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16239  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) {
16240  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16241  PyObject *__pyx_r = NULL;
16242  __Pyx_RefNannyDeclarations
16243  int __pyx_t_1;
16244  int __pyx_t_2;
16245  PyObject *__pyx_t_3 = NULL;
16246  Clifford __pyx_t_4;
16247  PyObject *__pyx_t_5 = NULL;
16248  PyObject *__pyx_t_6 = NULL;
16249  PyObject *__pyx_t_7 = NULL;
16250  PyObject *__pyx_t_8 = NULL;
16251  PyObject *__pyx_t_9 = NULL;
16252  PyObject *__pyx_t_10 = NULL;
16253  PyObject *__pyx_t_11 = NULL;
16254  __Pyx_RefNannySetupContext("tan", 0);
16255  if (__pyx_optional_args) {
16256  if (__pyx_optional_args->__pyx_n > 0) {
16257  __pyx_v_i = __pyx_optional_args->i;
16258  }
16259  }
16260 
16261  /* "PyClical.pyx":1761
16262  * 0.7616{1,2}
16263  * """
16264  * if not (i is None): # <<<<<<<<<<<<<<
16265  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16266  * else:
16267  */
16268  __pyx_t_1 = (__pyx_v_i != Py_None);
16269  __pyx_t_2 = (__pyx_t_1 != 0);
16270  if (__pyx_t_2) {
16271 
16272  /* "PyClical.pyx":1762
16273  * """
16274  * if not (i is None):
16275  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16276  * else:
16277  * try:
16278  */
16279  __Pyx_XDECREF(__pyx_r);
16280  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16281  __Pyx_GOTREF(__pyx_t_3);
16282  try {
16283  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16284  } catch(...) {
16285  __Pyx_CppExn2PyErr();
16286  __PYX_ERR(0, 1762, __pyx_L1_error)
16287  }
16288  __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)
16289  __Pyx_GOTREF(__pyx_t_5);
16290  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16291  __pyx_r = __pyx_t_5;
16292  __pyx_t_5 = 0;
16293  goto __pyx_L0;
16294 
16295  /* "PyClical.pyx":1761
16296  * 0.7616{1,2}
16297  * """
16298  * if not (i is None): # <<<<<<<<<<<<<<
16299  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16300  * else:
16301  */
16302  }
16303 
16304  /* "PyClical.pyx":1764
16305  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16306  * else:
16307  * try: # <<<<<<<<<<<<<<
16308  * return math.tan(obj)
16309  * except:
16310  */
16311  /*else*/ {
16312  {
16313  __Pyx_PyThreadState_declare
16314  __Pyx_PyThreadState_assign
16315  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16316  __Pyx_XGOTREF(__pyx_t_6);
16317  __Pyx_XGOTREF(__pyx_t_7);
16318  __Pyx_XGOTREF(__pyx_t_8);
16319  /*try:*/ {
16320 
16321  /* "PyClical.pyx":1765
16322  * else:
16323  * try:
16324  * return math.tan(obj) # <<<<<<<<<<<<<<
16325  * except:
16326  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16327  */
16328  __Pyx_XDECREF(__pyx_r);
16329  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16330  __Pyx_GOTREF(__pyx_t_3);
16331  __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)
16332  __Pyx_GOTREF(__pyx_t_9);
16333  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16334  __pyx_t_3 = NULL;
16335  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16336  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16337  if (likely(__pyx_t_3)) {
16338  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16339  __Pyx_INCREF(__pyx_t_3);
16340  __Pyx_INCREF(function);
16341  __Pyx_DECREF_SET(__pyx_t_9, function);
16342  }
16343  }
16344  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16345  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16346  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16347  __Pyx_GOTREF(__pyx_t_5);
16348  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16349  __pyx_r = __pyx_t_5;
16350  __pyx_t_5 = 0;
16351  goto __pyx_L8_try_return;
16352 
16353  /* "PyClical.pyx":1764
16354  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16355  * else:
16356  * try: # <<<<<<<<<<<<<<
16357  * return math.tan(obj)
16358  * except:
16359  */
16360  }
16361  __pyx_L4_error:;
16362  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16363  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16364  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16365 
16366  /* "PyClical.pyx":1766
16367  * try:
16368  * return math.tan(obj)
16369  * except: # <<<<<<<<<<<<<<
16370  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16371  *
16372  */
16373  /*except:*/ {
16374  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16375  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16376  __Pyx_GOTREF(__pyx_t_5);
16377  __Pyx_GOTREF(__pyx_t_9);
16378  __Pyx_GOTREF(__pyx_t_3);
16379 
16380  /* "PyClical.pyx":1767
16381  * return math.tan(obj)
16382  * except:
16383  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16384  *
16385  * cpdef inline atan(obj,i = None):
16386  */
16387  __Pyx_XDECREF(__pyx_r);
16388  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16389  __Pyx_GOTREF(__pyx_t_10);
16390  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16391  __Pyx_GOTREF(__pyx_t_11);
16392  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16393  __pyx_r = __pyx_t_11;
16394  __pyx_t_11 = 0;
16395  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16396  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16397  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16398  goto __pyx_L7_except_return;
16399  }
16400  __pyx_L6_except_error:;
16401 
16402  /* "PyClical.pyx":1764
16403  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16404  * else:
16405  * try: # <<<<<<<<<<<<<<
16406  * return math.tan(obj)
16407  * except:
16408  */
16409  __Pyx_XGIVEREF(__pyx_t_6);
16410  __Pyx_XGIVEREF(__pyx_t_7);
16411  __Pyx_XGIVEREF(__pyx_t_8);
16412  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16413  goto __pyx_L1_error;
16414  __pyx_L8_try_return:;
16415  __Pyx_XGIVEREF(__pyx_t_6);
16416  __Pyx_XGIVEREF(__pyx_t_7);
16417  __Pyx_XGIVEREF(__pyx_t_8);
16418  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16419  goto __pyx_L0;
16420  __pyx_L7_except_return:;
16421  __Pyx_XGIVEREF(__pyx_t_6);
16422  __Pyx_XGIVEREF(__pyx_t_7);
16423  __Pyx_XGIVEREF(__pyx_t_8);
16424  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16425  goto __pyx_L0;
16426  }
16427  }
16428 
16429  /* "PyClical.pyx":1752
16430  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16431  *
16432  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16433  * """
16434  * Tangent of multivector with optional complexifier.
16435  */
16436 
16437  /* function exit code */
16438  __pyx_L1_error:;
16439  __Pyx_XDECREF(__pyx_t_3);
16440  __Pyx_XDECREF(__pyx_t_5);
16441  __Pyx_XDECREF(__pyx_t_9);
16442  __Pyx_XDECREF(__pyx_t_10);
16443  __Pyx_XDECREF(__pyx_t_11);
16444  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16445  __pyx_r = 0;
16446  __pyx_L0:;
16447  __Pyx_XGIVEREF(__pyx_r);
16448  __Pyx_RefNannyFinishContext();
16449  return __pyx_r;
16450  }
16451 
16452  /* Python wrapper */
16453  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16454  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 ";
16455  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16456  PyObject *__pyx_v_obj = 0;
16457  PyObject *__pyx_v_i = 0;
16458  PyObject *__pyx_r = 0;
16459  __Pyx_RefNannyDeclarations
16460  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16461  {
16462  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16463  PyObject* values[2] = {0,0};
16464  values[1] = ((PyObject *)Py_None);
16465  if (unlikely(__pyx_kwds)) {
16466  Py_ssize_t kw_args;
16467  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16468  switch (pos_args) {
16469  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16470  CYTHON_FALLTHROUGH;
16471  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16472  CYTHON_FALLTHROUGH;
16473  case 0: break;
16474  default: goto __pyx_L5_argtuple_error;
16475  }
16476  kw_args = PyDict_Size(__pyx_kwds);
16477  switch (pos_args) {
16478  case 0:
16479  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16480  else goto __pyx_L5_argtuple_error;
16481  CYTHON_FALLTHROUGH;
16482  case 1:
16483  if (kw_args > 0) {
16484  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16485  if (value) { values[1] = value; kw_args--; }
16486  }
16487  }
16488  if (unlikely(kw_args > 0)) {
16489  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16490  }
16491  } else {
16492  switch (PyTuple_GET_SIZE(__pyx_args)) {
16493  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16494  CYTHON_FALLTHROUGH;
16495  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16496  break;
16497  default: goto __pyx_L5_argtuple_error;
16498  }
16499  }
16500  __pyx_v_obj = values[0];
16501  __pyx_v_i = values[1];
16502  }
16503  goto __pyx_L4_argument_unpacking_done;
16504  __pyx_L5_argtuple_error:;
16505  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16506  __pyx_L3_error:;
16507  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16508  __Pyx_RefNannyFinishContext();
16509  return NULL;
16510  __pyx_L4_argument_unpacking_done:;
16511  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16512 
16513  /* function exit code */
16514  __Pyx_RefNannyFinishContext();
16515  return __pyx_r;
16516  }
16517 
16518  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16519  PyObject *__pyx_r = NULL;
16520  __Pyx_RefNannyDeclarations
16521  PyObject *__pyx_t_1 = NULL;
16522  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16523  __Pyx_RefNannySetupContext("tan", 0);
16524  __Pyx_XDECREF(__pyx_r);
16525  __pyx_t_2.__pyx_n = 1;
16526  __pyx_t_2.i = __pyx_v_i;
16527  __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)
16528  __Pyx_GOTREF(__pyx_t_1);
16529  __pyx_r = __pyx_t_1;
16530  __pyx_t_1 = 0;
16531  goto __pyx_L0;
16532 
16533  /* function exit code */
16534  __pyx_L1_error:;
16535  __Pyx_XDECREF(__pyx_t_1);
16536  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16537  __pyx_r = NULL;
16538  __pyx_L0:;
16539  __Pyx_XGIVEREF(__pyx_r);
16540  __Pyx_RefNannyFinishContext();
16541  return __pyx_r;
16542  }
16543 
16544  /* "PyClical.pyx":1769
16545  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16546  *
16547  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16548  * """
16549  * Inverse tangent of multivector with optional complexifier.
16550  */
16551 
16552  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16553  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) {
16554  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16555  PyObject *__pyx_r = NULL;
16556  __Pyx_RefNannyDeclarations
16557  int __pyx_t_1;
16558  int __pyx_t_2;
16559  PyObject *__pyx_t_3 = NULL;
16560  Clifford __pyx_t_4;
16561  PyObject *__pyx_t_5 = NULL;
16562  PyObject *__pyx_t_6 = NULL;
16563  PyObject *__pyx_t_7 = NULL;
16564  PyObject *__pyx_t_8 = NULL;
16565  PyObject *__pyx_t_9 = NULL;
16566  PyObject *__pyx_t_10 = NULL;
16567  PyObject *__pyx_t_11 = NULL;
16568  __Pyx_RefNannySetupContext("atan", 0);
16569  if (__pyx_optional_args) {
16570  if (__pyx_optional_args->__pyx_n > 0) {
16571  __pyx_v_i = __pyx_optional_args->i;
16572  }
16573  }
16574 
16575  /* "PyClical.pyx":1778
16576  * {1}
16577  * """
16578  * if not (i is None): # <<<<<<<<<<<<<<
16579  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16580  * else:
16581  */
16582  __pyx_t_1 = (__pyx_v_i != Py_None);
16583  __pyx_t_2 = (__pyx_t_1 != 0);
16584  if (__pyx_t_2) {
16585 
16586  /* "PyClical.pyx":1779
16587  * """
16588  * if not (i is None):
16589  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16590  * else:
16591  * try:
16592  */
16593  __Pyx_XDECREF(__pyx_r);
16594  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16595  __Pyx_GOTREF(__pyx_t_3);
16596  try {
16597  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16598  } catch(...) {
16599  __Pyx_CppExn2PyErr();
16600  __PYX_ERR(0, 1779, __pyx_L1_error)
16601  }
16602  __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)
16603  __Pyx_GOTREF(__pyx_t_5);
16604  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16605  __pyx_r = __pyx_t_5;
16606  __pyx_t_5 = 0;
16607  goto __pyx_L0;
16608 
16609  /* "PyClical.pyx":1778
16610  * {1}
16611  * """
16612  * if not (i is None): # <<<<<<<<<<<<<<
16613  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16614  * else:
16615  */
16616  }
16617 
16618  /* "PyClical.pyx":1781
16619  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16620  * else:
16621  * try: # <<<<<<<<<<<<<<
16622  * return math.atan(obj)
16623  * except:
16624  */
16625  /*else*/ {
16626  {
16627  __Pyx_PyThreadState_declare
16628  __Pyx_PyThreadState_assign
16629  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16630  __Pyx_XGOTREF(__pyx_t_6);
16631  __Pyx_XGOTREF(__pyx_t_7);
16632  __Pyx_XGOTREF(__pyx_t_8);
16633  /*try:*/ {
16634 
16635  /* "PyClical.pyx":1782
16636  * else:
16637  * try:
16638  * return math.atan(obj) # <<<<<<<<<<<<<<
16639  * except:
16640  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16641  */
16642  __Pyx_XDECREF(__pyx_r);
16643  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
16644  __Pyx_GOTREF(__pyx_t_3);
16645  __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)
16646  __Pyx_GOTREF(__pyx_t_9);
16647  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16648  __pyx_t_3 = NULL;
16649  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16650  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16651  if (likely(__pyx_t_3)) {
16652  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16653  __Pyx_INCREF(__pyx_t_3);
16654  __Pyx_INCREF(function);
16655  __Pyx_DECREF_SET(__pyx_t_9, function);
16656  }
16657  }
16658  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16659  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16660  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
16661  __Pyx_GOTREF(__pyx_t_5);
16662  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16663  __pyx_r = __pyx_t_5;
16664  __pyx_t_5 = 0;
16665  goto __pyx_L8_try_return;
16666 
16667  /* "PyClical.pyx":1781
16668  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16669  * else:
16670  * try: # <<<<<<<<<<<<<<
16671  * return math.atan(obj)
16672  * except:
16673  */
16674  }
16675  __pyx_L4_error:;
16676  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16677  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16678  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16679 
16680  /* "PyClical.pyx":1783
16681  * try:
16682  * return math.atan(obj)
16683  * except: # <<<<<<<<<<<<<<
16684  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16685  *
16686  */
16687  /*except:*/ {
16688  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16689  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
16690  __Pyx_GOTREF(__pyx_t_5);
16691  __Pyx_GOTREF(__pyx_t_9);
16692  __Pyx_GOTREF(__pyx_t_3);
16693 
16694  /* "PyClical.pyx":1784
16695  * return math.atan(obj)
16696  * except:
16697  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16698  *
16699  * cpdef inline tanh(obj):
16700  */
16701  __Pyx_XDECREF(__pyx_r);
16702  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16703  __Pyx_GOTREF(__pyx_t_10);
16704  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16705  __Pyx_GOTREF(__pyx_t_11);
16706  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16707  __pyx_r = __pyx_t_11;
16708  __pyx_t_11 = 0;
16709  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16710  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16711  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16712  goto __pyx_L7_except_return;
16713  }
16714  __pyx_L6_except_error:;
16715 
16716  /* "PyClical.pyx":1781
16717  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16718  * else:
16719  * try: # <<<<<<<<<<<<<<
16720  * return math.atan(obj)
16721  * except:
16722  */
16723  __Pyx_XGIVEREF(__pyx_t_6);
16724  __Pyx_XGIVEREF(__pyx_t_7);
16725  __Pyx_XGIVEREF(__pyx_t_8);
16726  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16727  goto __pyx_L1_error;
16728  __pyx_L8_try_return:;
16729  __Pyx_XGIVEREF(__pyx_t_6);
16730  __Pyx_XGIVEREF(__pyx_t_7);
16731  __Pyx_XGIVEREF(__pyx_t_8);
16732  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16733  goto __pyx_L0;
16734  __pyx_L7_except_return:;
16735  __Pyx_XGIVEREF(__pyx_t_6);
16736  __Pyx_XGIVEREF(__pyx_t_7);
16737  __Pyx_XGIVEREF(__pyx_t_8);
16738  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16739  goto __pyx_L0;
16740  }
16741  }
16742 
16743  /* "PyClical.pyx":1769
16744  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16745  *
16746  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16747  * """
16748  * Inverse tangent of multivector with optional complexifier.
16749  */
16750 
16751  /* function exit code */
16752  __pyx_L1_error:;
16753  __Pyx_XDECREF(__pyx_t_3);
16754  __Pyx_XDECREF(__pyx_t_5);
16755  __Pyx_XDECREF(__pyx_t_9);
16756  __Pyx_XDECREF(__pyx_t_10);
16757  __Pyx_XDECREF(__pyx_t_11);
16758  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16759  __pyx_r = 0;
16760  __pyx_L0:;
16761  __Pyx_XGIVEREF(__pyx_r);
16762  __Pyx_RefNannyFinishContext();
16763  return __pyx_r;
16764  }
16765 
16766  /* Python wrapper */
16767  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16768  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 ";
16769  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16770  PyObject *__pyx_v_obj = 0;
16771  PyObject *__pyx_v_i = 0;
16772  PyObject *__pyx_r = 0;
16773  __Pyx_RefNannyDeclarations
16774  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
16775  {
16776  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16777  PyObject* values[2] = {0,0};
16778  values[1] = ((PyObject *)Py_None);
16779  if (unlikely(__pyx_kwds)) {
16780  Py_ssize_t kw_args;
16781  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16782  switch (pos_args) {
16783  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16784  CYTHON_FALLTHROUGH;
16785  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16786  CYTHON_FALLTHROUGH;
16787  case 0: break;
16788  default: goto __pyx_L5_argtuple_error;
16789  }
16790  kw_args = PyDict_Size(__pyx_kwds);
16791  switch (pos_args) {
16792  case 0:
16793  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16794  else goto __pyx_L5_argtuple_error;
16795  CYTHON_FALLTHROUGH;
16796  case 1:
16797  if (kw_args > 0) {
16798  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16799  if (value) { values[1] = value; kw_args--; }
16800  }
16801  }
16802  if (unlikely(kw_args > 0)) {
16803  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
16804  }
16805  } else {
16806  switch (PyTuple_GET_SIZE(__pyx_args)) {
16807  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16808  CYTHON_FALLTHROUGH;
16809  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16810  break;
16811  default: goto __pyx_L5_argtuple_error;
16812  }
16813  }
16814  __pyx_v_obj = values[0];
16815  __pyx_v_i = values[1];
16816  }
16817  goto __pyx_L4_argument_unpacking_done;
16818  __pyx_L5_argtuple_error:;
16819  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
16820  __pyx_L3_error:;
16821  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16822  __Pyx_RefNannyFinishContext();
16823  return NULL;
16824  __pyx_L4_argument_unpacking_done:;
16825  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16826 
16827  /* function exit code */
16828  __Pyx_RefNannyFinishContext();
16829  return __pyx_r;
16830  }
16831 
16832  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16833  PyObject *__pyx_r = NULL;
16834  __Pyx_RefNannyDeclarations
16835  PyObject *__pyx_t_1 = NULL;
16836  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16837  __Pyx_RefNannySetupContext("atan", 0);
16838  __Pyx_XDECREF(__pyx_r);
16839  __pyx_t_2.__pyx_n = 1;
16840  __pyx_t_2.i = __pyx_v_i;
16841  __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)
16842  __Pyx_GOTREF(__pyx_t_1);
16843  __pyx_r = __pyx_t_1;
16844  __pyx_t_1 = 0;
16845  goto __pyx_L0;
16846 
16847  /* function exit code */
16848  __pyx_L1_error:;
16849  __Pyx_XDECREF(__pyx_t_1);
16850  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16851  __pyx_r = NULL;
16852  __pyx_L0:;
16853  __Pyx_XGIVEREF(__pyx_r);
16854  __Pyx_RefNannyFinishContext();
16855  return __pyx_r;
16856  }
16857 
16858  /* "PyClical.pyx":1786
16859  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16860  *
16861  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16862  * """
16863  * Hyperbolic tangent of multivector.
16864  */
16865 
16866  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16867  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16868  PyObject *__pyx_r = NULL;
16869  __Pyx_RefNannyDeclarations
16870  PyObject *__pyx_t_1 = NULL;
16871  PyObject *__pyx_t_2 = NULL;
16872  PyObject *__pyx_t_3 = NULL;
16873  PyObject *__pyx_t_4 = NULL;
16874  PyObject *__pyx_t_5 = NULL;
16875  PyObject *__pyx_t_6 = NULL;
16876  PyObject *__pyx_t_7 = NULL;
16877  PyObject *__pyx_t_8 = NULL;
16878  __Pyx_RefNannySetupContext("tanh", 0);
16879 
16880  /* "PyClical.pyx":1793
16881  * {1,2}
16882  * """
16883  * try: # <<<<<<<<<<<<<<
16884  * return math.tanh(obj)
16885  * except:
16886  */
16887  {
16888  __Pyx_PyThreadState_declare
16889  __Pyx_PyThreadState_assign
16890  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16891  __Pyx_XGOTREF(__pyx_t_1);
16892  __Pyx_XGOTREF(__pyx_t_2);
16893  __Pyx_XGOTREF(__pyx_t_3);
16894  /*try:*/ {
16895 
16896  /* "PyClical.pyx":1794
16897  * """
16898  * try:
16899  * return math.tanh(obj) # <<<<<<<<<<<<<<
16900  * except:
16901  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16902  */
16903  __Pyx_XDECREF(__pyx_r);
16904  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
16905  __Pyx_GOTREF(__pyx_t_5);
16906  __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)
16907  __Pyx_GOTREF(__pyx_t_6);
16908  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16909  __pyx_t_5 = NULL;
16910  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16911  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16912  if (likely(__pyx_t_5)) {
16913  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16914  __Pyx_INCREF(__pyx_t_5);
16915  __Pyx_INCREF(function);
16916  __Pyx_DECREF_SET(__pyx_t_6, function);
16917  }
16918  }
16919  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
16920  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16921  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
16922  __Pyx_GOTREF(__pyx_t_4);
16923  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16924  __pyx_r = __pyx_t_4;
16925  __pyx_t_4 = 0;
16926  goto __pyx_L7_try_return;
16927 
16928  /* "PyClical.pyx":1793
16929  * {1,2}
16930  * """
16931  * try: # <<<<<<<<<<<<<<
16932  * return math.tanh(obj)
16933  * except:
16934  */
16935  }
16936  __pyx_L3_error:;
16937  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16938  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16939  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16940 
16941  /* "PyClical.pyx":1795
16942  * try:
16943  * return math.tanh(obj)
16944  * except: # <<<<<<<<<<<<<<
16945  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16946  *
16947  */
16948  /*except:*/ {
16949  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16950  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
16951  __Pyx_GOTREF(__pyx_t_4);
16952  __Pyx_GOTREF(__pyx_t_6);
16953  __Pyx_GOTREF(__pyx_t_5);
16954 
16955  /* "PyClical.pyx":1796
16956  * return math.tanh(obj)
16957  * except:
16958  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16959  *
16960  * cpdef inline atanh(obj,i = None):
16961  */
16962  __Pyx_XDECREF(__pyx_r);
16963  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16964  __Pyx_GOTREF(__pyx_t_7);
16965  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), tanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16966  __Pyx_GOTREF(__pyx_t_8);
16967  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16968  __pyx_r = __pyx_t_8;
16969  __pyx_t_8 = 0;
16970  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16971  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16972  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16973  goto __pyx_L6_except_return;
16974  }
16975  __pyx_L5_except_error:;
16976 
16977  /* "PyClical.pyx":1793
16978  * {1,2}
16979  * """
16980  * try: # <<<<<<<<<<<<<<
16981  * return math.tanh(obj)
16982  * except:
16983  */
16984  __Pyx_XGIVEREF(__pyx_t_1);
16985  __Pyx_XGIVEREF(__pyx_t_2);
16986  __Pyx_XGIVEREF(__pyx_t_3);
16987  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16988  goto __pyx_L1_error;
16989  __pyx_L7_try_return:;
16990  __Pyx_XGIVEREF(__pyx_t_1);
16991  __Pyx_XGIVEREF(__pyx_t_2);
16992  __Pyx_XGIVEREF(__pyx_t_3);
16993  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16994  goto __pyx_L0;
16995  __pyx_L6_except_return:;
16996  __Pyx_XGIVEREF(__pyx_t_1);
16997  __Pyx_XGIVEREF(__pyx_t_2);
16998  __Pyx_XGIVEREF(__pyx_t_3);
16999  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17000  goto __pyx_L0;
17001  }
17002 
17003  /* "PyClical.pyx":1786
17004  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17005  *
17006  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17007  * """
17008  * Hyperbolic tangent of multivector.
17009  */
17010 
17011  /* function exit code */
17012  __pyx_L1_error:;
17013  __Pyx_XDECREF(__pyx_t_4);
17014  __Pyx_XDECREF(__pyx_t_5);
17015  __Pyx_XDECREF(__pyx_t_6);
17016  __Pyx_XDECREF(__pyx_t_7);
17017  __Pyx_XDECREF(__pyx_t_8);
17018  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17019  __pyx_r = 0;
17020  __pyx_L0:;
17021  __Pyx_XGIVEREF(__pyx_r);
17022  __Pyx_RefNannyFinishContext();
17023  return __pyx_r;
17024  }
17025 
17026  /* Python wrapper */
17027  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17028  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 ";
17029  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17030  PyObject *__pyx_r = 0;
17031  __Pyx_RefNannyDeclarations
17032  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17033  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17034 
17035  /* function exit code */
17036  __Pyx_RefNannyFinishContext();
17037  return __pyx_r;
17038  }
17039 
17040  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17041  PyObject *__pyx_r = NULL;
17042  __Pyx_RefNannyDeclarations
17043  PyObject *__pyx_t_1 = NULL;
17044  __Pyx_RefNannySetupContext("tanh", 0);
17045  __Pyx_XDECREF(__pyx_r);
17046  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17047  __Pyx_GOTREF(__pyx_t_1);
17048  __pyx_r = __pyx_t_1;
17049  __pyx_t_1 = 0;
17050  goto __pyx_L0;
17051 
17052  /* function exit code */
17053  __pyx_L1_error:;
17054  __Pyx_XDECREF(__pyx_t_1);
17055  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17056  __pyx_r = NULL;
17057  __pyx_L0:;
17058  __Pyx_XGIVEREF(__pyx_r);
17059  __Pyx_RefNannyFinishContext();
17060  return __pyx_r;
17061  }
17062 
17063  /* "PyClical.pyx":1798
17064  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17065  *
17066  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17067  * """
17068  * Inverse hyperbolic tangent of multivector with optional complexifier.
17069  */
17070 
17071  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17072  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) {
17073  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17074  PyObject *__pyx_r = NULL;
17075  __Pyx_RefNannyDeclarations
17076  int __pyx_t_1;
17077  int __pyx_t_2;
17078  PyObject *__pyx_t_3 = NULL;
17079  Clifford __pyx_t_4;
17080  PyObject *__pyx_t_5 = NULL;
17081  PyObject *__pyx_t_6 = NULL;
17082  PyObject *__pyx_t_7 = NULL;
17083  PyObject *__pyx_t_8 = NULL;
17084  PyObject *__pyx_t_9 = NULL;
17085  PyObject *__pyx_t_10 = NULL;
17086  PyObject *__pyx_t_11 = NULL;
17087  __Pyx_RefNannySetupContext("atanh", 0);
17088  if (__pyx_optional_args) {
17089  if (__pyx_optional_args->__pyx_n > 0) {
17090  __pyx_v_i = __pyx_optional_args->i;
17091  }
17092  }
17093 
17094  /* "PyClical.pyx":1807
17095  * {1,2}
17096  * """
17097  * if not (i is None): # <<<<<<<<<<<<<<
17098  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17099  * else:
17100  */
17101  __pyx_t_1 = (__pyx_v_i != Py_None);
17102  __pyx_t_2 = (__pyx_t_1 != 0);
17103  if (__pyx_t_2) {
17104 
17105  /* "PyClical.pyx":1808
17106  * """
17107  * if not (i is None):
17108  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17109  * else:
17110  * try:
17111  */
17112  __Pyx_XDECREF(__pyx_r);
17113  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17114  __Pyx_GOTREF(__pyx_t_3);
17115  try {
17116  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17117  } catch(...) {
17118  __Pyx_CppExn2PyErr();
17119  __PYX_ERR(0, 1808, __pyx_L1_error)
17120  }
17121  __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)
17122  __Pyx_GOTREF(__pyx_t_5);
17123  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17124  __pyx_r = __pyx_t_5;
17125  __pyx_t_5 = 0;
17126  goto __pyx_L0;
17127 
17128  /* "PyClical.pyx":1807
17129  * {1,2}
17130  * """
17131  * if not (i is None): # <<<<<<<<<<<<<<
17132  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17133  * else:
17134  */
17135  }
17136 
17137  /* "PyClical.pyx":1810
17138  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17139  * else:
17140  * try: # <<<<<<<<<<<<<<
17141  * return math.atanh(obj)
17142  * except:
17143  */
17144  /*else*/ {
17145  {
17146  __Pyx_PyThreadState_declare
17147  __Pyx_PyThreadState_assign
17148  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17149  __Pyx_XGOTREF(__pyx_t_6);
17150  __Pyx_XGOTREF(__pyx_t_7);
17151  __Pyx_XGOTREF(__pyx_t_8);
17152  /*try:*/ {
17153 
17154  /* "PyClical.pyx":1811
17155  * else:
17156  * try:
17157  * return math.atanh(obj) # <<<<<<<<<<<<<<
17158  * except:
17159  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17160  */
17161  __Pyx_XDECREF(__pyx_r);
17162  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17163  __Pyx_GOTREF(__pyx_t_3);
17164  __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)
17165  __Pyx_GOTREF(__pyx_t_9);
17166  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17167  __pyx_t_3 = NULL;
17168  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17169  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17170  if (likely(__pyx_t_3)) {
17171  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17172  __Pyx_INCREF(__pyx_t_3);
17173  __Pyx_INCREF(function);
17174  __Pyx_DECREF_SET(__pyx_t_9, function);
17175  }
17176  }
17177  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
17178  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17179  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17180  __Pyx_GOTREF(__pyx_t_5);
17181  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17182  __pyx_r = __pyx_t_5;
17183  __pyx_t_5 = 0;
17184  goto __pyx_L8_try_return;
17185 
17186  /* "PyClical.pyx":1810
17187  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17188  * else:
17189  * try: # <<<<<<<<<<<<<<
17190  * return math.atanh(obj)
17191  * except:
17192  */
17193  }
17194  __pyx_L4_error:;
17195  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17196  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17197  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17198 
17199  /* "PyClical.pyx":1812
17200  * try:
17201  * return math.atanh(obj)
17202  * except: # <<<<<<<<<<<<<<
17203  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17204  *
17205  */
17206  /*except:*/ {
17207  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17208  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17209  __Pyx_GOTREF(__pyx_t_5);
17210  __Pyx_GOTREF(__pyx_t_9);
17211  __Pyx_GOTREF(__pyx_t_3);
17212 
17213  /* "PyClical.pyx":1813
17214  * return math.atanh(obj)
17215  * except:
17216  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17217  *
17218  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17219  */
17220  __Pyx_XDECREF(__pyx_r);
17221  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17222  __Pyx_GOTREF(__pyx_t_10);
17223  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17224  __Pyx_GOTREF(__pyx_t_11);
17225  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17226  __pyx_r = __pyx_t_11;
17227  __pyx_t_11 = 0;
17228  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17229  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17230  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17231  goto __pyx_L7_except_return;
17232  }
17233  __pyx_L6_except_error:;
17234 
17235  /* "PyClical.pyx":1810
17236  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17237  * else:
17238  * try: # <<<<<<<<<<<<<<
17239  * return math.atanh(obj)
17240  * except:
17241  */
17242  __Pyx_XGIVEREF(__pyx_t_6);
17243  __Pyx_XGIVEREF(__pyx_t_7);
17244  __Pyx_XGIVEREF(__pyx_t_8);
17245  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17246  goto __pyx_L1_error;
17247  __pyx_L8_try_return:;
17248  __Pyx_XGIVEREF(__pyx_t_6);
17249  __Pyx_XGIVEREF(__pyx_t_7);
17250  __Pyx_XGIVEREF(__pyx_t_8);
17251  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17252  goto __pyx_L0;
17253  __pyx_L7_except_return:;
17254  __Pyx_XGIVEREF(__pyx_t_6);
17255  __Pyx_XGIVEREF(__pyx_t_7);
17256  __Pyx_XGIVEREF(__pyx_t_8);
17257  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17258  goto __pyx_L0;
17259  }
17260  }
17261 
17262  /* "PyClical.pyx":1798
17263  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17264  *
17265  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17266  * """
17267  * Inverse hyperbolic tangent of multivector with optional complexifier.
17268  */
17269 
17270  /* function exit code */
17271  __pyx_L1_error:;
17272  __Pyx_XDECREF(__pyx_t_3);
17273  __Pyx_XDECREF(__pyx_t_5);
17274  __Pyx_XDECREF(__pyx_t_9);
17275  __Pyx_XDECREF(__pyx_t_10);
17276  __Pyx_XDECREF(__pyx_t_11);
17277  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17278  __pyx_r = 0;
17279  __pyx_L0:;
17280  __Pyx_XGIVEREF(__pyx_r);
17281  __Pyx_RefNannyFinishContext();
17282  return __pyx_r;
17283  }
17284 
17285  /* Python wrapper */
17286  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17287  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 ";
17288  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17289  PyObject *__pyx_v_obj = 0;
17290  PyObject *__pyx_v_i = 0;
17291  PyObject *__pyx_r = 0;
17292  __Pyx_RefNannyDeclarations
17293  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17294  {
17295  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17296  PyObject* values[2] = {0,0};
17297  values[1] = ((PyObject *)Py_None);
17298  if (unlikely(__pyx_kwds)) {
17299  Py_ssize_t kw_args;
17300  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17301  switch (pos_args) {
17302  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17303  CYTHON_FALLTHROUGH;
17304  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17305  CYTHON_FALLTHROUGH;
17306  case 0: break;
17307  default: goto __pyx_L5_argtuple_error;
17308  }
17309  kw_args = PyDict_Size(__pyx_kwds);
17310  switch (pos_args) {
17311  case 0:
17312  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17313  else goto __pyx_L5_argtuple_error;
17314  CYTHON_FALLTHROUGH;
17315  case 1:
17316  if (kw_args > 0) {
17317  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17318  if (value) { values[1] = value; kw_args--; }
17319  }
17320  }
17321  if (unlikely(kw_args > 0)) {
17322  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17323  }
17324  } else {
17325  switch (PyTuple_GET_SIZE(__pyx_args)) {
17326  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17327  CYTHON_FALLTHROUGH;
17328  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17329  break;
17330  default: goto __pyx_L5_argtuple_error;
17331  }
17332  }
17333  __pyx_v_obj = values[0];
17334  __pyx_v_i = values[1];
17335  }
17336  goto __pyx_L4_argument_unpacking_done;
17337  __pyx_L5_argtuple_error:;
17338  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17339  __pyx_L3_error:;
17340  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17341  __Pyx_RefNannyFinishContext();
17342  return NULL;
17343  __pyx_L4_argument_unpacking_done:;
17344  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17345 
17346  /* function exit code */
17347  __Pyx_RefNannyFinishContext();
17348  return __pyx_r;
17349  }
17350 
17351  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17352  PyObject *__pyx_r = NULL;
17353  __Pyx_RefNannyDeclarations
17354  PyObject *__pyx_t_1 = NULL;
17355  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17356  __Pyx_RefNannySetupContext("atanh", 0);
17357  __Pyx_XDECREF(__pyx_r);
17358  __pyx_t_2.__pyx_n = 1;
17359  __pyx_t_2.i = __pyx_v_i;
17360  __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)
17361  __Pyx_GOTREF(__pyx_t_1);
17362  __pyx_r = __pyx_t_1;
17363  __pyx_t_1 = 0;
17364  goto __pyx_L0;
17365 
17366  /* function exit code */
17367  __pyx_L1_error:;
17368  __Pyx_XDECREF(__pyx_t_1);
17369  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17370  __pyx_r = NULL;
17371  __pyx_L0:;
17372  __Pyx_XGIVEREF(__pyx_r);
17373  __Pyx_RefNannyFinishContext();
17374  return __pyx_r;
17375  }
17376 
17377  /* "PyClical.pyx":1815
17378  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17379  *
17380  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17381  * """
17382  * Random multivector within a frame.
17383  */
17384 
17385  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17386  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) {
17387  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17388  PyObject *__pyx_r = NULL;
17389  __Pyx_RefNannyDeclarations
17390  PyObject *__pyx_t_1 = NULL;
17391  PyObject *__pyx_t_2 = NULL;
17392  scalar_t __pyx_t_3;
17393  PyObject *__pyx_t_4 = NULL;
17394  __Pyx_RefNannySetupContext("random_clifford", 0);
17395  if (__pyx_optional_args) {
17396  if (__pyx_optional_args->__pyx_n > 0) {
17397  __pyx_v_fill = __pyx_optional_args->fill;
17398  }
17399  }
17400 
17401  /* "PyClical.pyx":1822
17402  * {-3,-1,2}
17403  * """
17404  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17405  *
17406  * cpdef inline cga3(obj):
17407  */
17408  __Pyx_XDECREF(__pyx_r);
17409  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17410  __Pyx_GOTREF(__pyx_t_1);
17411  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17412  __Pyx_GOTREF(__pyx_t_2);
17413  __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)
17414  __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)
17415  __Pyx_GOTREF(__pyx_t_4);
17416  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17417  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17418  __pyx_r = __pyx_t_4;
17419  __pyx_t_4 = 0;
17420  goto __pyx_L0;
17421 
17422  /* "PyClical.pyx":1815
17423  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17424  *
17425  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17426  * """
17427  * Random multivector within a frame.
17428  */
17429 
17430  /* function exit code */
17431  __pyx_L1_error:;
17432  __Pyx_XDECREF(__pyx_t_1);
17433  __Pyx_XDECREF(__pyx_t_2);
17434  __Pyx_XDECREF(__pyx_t_4);
17435  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17436  __pyx_r = 0;
17437  __pyx_L0:;
17438  __Pyx_XGIVEREF(__pyx_r);
17439  __Pyx_RefNannyFinishContext();
17440  return __pyx_r;
17441  }
17442 
17443  /* Python wrapper */
17444  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17445  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 ";
17446  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17447  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17448  PyObject *__pyx_v_fill = 0;
17449  PyObject *__pyx_r = 0;
17450  __Pyx_RefNannyDeclarations
17451  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17452  {
17453  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17454  PyObject* values[2] = {0,0};
17455  values[1] = ((PyObject *)__pyx_float_1_0);
17456  if (unlikely(__pyx_kwds)) {
17457  Py_ssize_t kw_args;
17458  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17459  switch (pos_args) {
17460  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17461  CYTHON_FALLTHROUGH;
17462  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17463  CYTHON_FALLTHROUGH;
17464  case 0: break;
17465  default: goto __pyx_L5_argtuple_error;
17466  }
17467  kw_args = PyDict_Size(__pyx_kwds);
17468  switch (pos_args) {
17469  case 0:
17470  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17471  else goto __pyx_L5_argtuple_error;
17472  CYTHON_FALLTHROUGH;
17473  case 1:
17474  if (kw_args > 0) {
17475  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17476  if (value) { values[1] = value; kw_args--; }
17477  }
17478  }
17479  if (unlikely(kw_args > 0)) {
17480  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17481  }
17482  } else {
17483  switch (PyTuple_GET_SIZE(__pyx_args)) {
17484  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17485  CYTHON_FALLTHROUGH;
17486  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17487  break;
17488  default: goto __pyx_L5_argtuple_error;
17489  }
17490  }
17491  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17492  __pyx_v_fill = values[1];
17493  }
17494  goto __pyx_L4_argument_unpacking_done;
17495  __pyx_L5_argtuple_error:;
17496  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17497  __pyx_L3_error:;
17498  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17499  __Pyx_RefNannyFinishContext();
17500  return NULL;
17501  __pyx_L4_argument_unpacking_done:;
17502  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17503  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17504 
17505  /* function exit code */
17506  goto __pyx_L0;
17507  __pyx_L1_error:;
17508  __pyx_r = NULL;
17509  __pyx_L0:;
17510  __Pyx_RefNannyFinishContext();
17511  return __pyx_r;
17512  }
17513 
17514  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) {
17515  PyObject *__pyx_r = NULL;
17516  __Pyx_RefNannyDeclarations
17517  PyObject *__pyx_t_1 = NULL;
17518  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17519  __Pyx_RefNannySetupContext("random_clifford", 0);
17520  __Pyx_XDECREF(__pyx_r);
17521  __pyx_t_2.__pyx_n = 1;
17522  __pyx_t_2.fill = __pyx_v_fill;
17523  __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)
17524  __Pyx_GOTREF(__pyx_t_1);
17525  __pyx_r = __pyx_t_1;
17526  __pyx_t_1 = 0;
17527  goto __pyx_L0;
17528 
17529  /* function exit code */
17530  __pyx_L1_error:;
17531  __Pyx_XDECREF(__pyx_t_1);
17532  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17533  __pyx_r = NULL;
17534  __pyx_L0:;
17535  __Pyx_XGIVEREF(__pyx_r);
17536  __Pyx_RefNannyFinishContext();
17537  return __pyx_r;
17538  }
17539 
17540  /* "PyClical.pyx":1824
17541  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17542  *
17543  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17544  * """
17545  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17546  */
17547 
17548  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17549  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17550  PyObject *__pyx_r = NULL;
17551  __Pyx_RefNannyDeclarations
17552  PyObject *__pyx_t_1 = NULL;
17553  PyObject *__pyx_t_2 = NULL;
17554  __Pyx_RefNannySetupContext("cga3", 0);
17555 
17556  /* "PyClical.pyx":1831
17557  * 87{-1}+4{1}+18{2}+2{3}+85{4}
17558  * """
17559  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17560  *
17561  * cpdef inline cga3std(obj):
17562  */
17563  __Pyx_XDECREF(__pyx_r);
17564  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
17565  __Pyx_GOTREF(__pyx_t_1);
17566  __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)
17567  __Pyx_GOTREF(__pyx_t_2);
17568  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17569  __pyx_r = __pyx_t_2;
17570  __pyx_t_2 = 0;
17571  goto __pyx_L0;
17572 
17573  /* "PyClical.pyx":1824
17574  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17575  *
17576  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17577  * """
17578  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17579  */
17580 
17581  /* function exit code */
17582  __pyx_L1_error:;
17583  __Pyx_XDECREF(__pyx_t_1);
17584  __Pyx_XDECREF(__pyx_t_2);
17585  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17586  __pyx_r = 0;
17587  __pyx_L0:;
17588  __Pyx_XGIVEREF(__pyx_r);
17589  __Pyx_RefNannyFinishContext();
17590  return __pyx_r;
17591  }
17592 
17593  /* Python wrapper */
17594  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17595  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 ";
17596  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17597  PyObject *__pyx_r = 0;
17598  __Pyx_RefNannyDeclarations
17599  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
17600  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17601 
17602  /* function exit code */
17603  __Pyx_RefNannyFinishContext();
17604  return __pyx_r;
17605  }
17606 
17607  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17608  PyObject *__pyx_r = NULL;
17609  __Pyx_RefNannyDeclarations
17610  PyObject *__pyx_t_1 = NULL;
17611  __Pyx_RefNannySetupContext("cga3", 0);
17612  __Pyx_XDECREF(__pyx_r);
17613  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
17614  __Pyx_GOTREF(__pyx_t_1);
17615  __pyx_r = __pyx_t_1;
17616  __pyx_t_1 = 0;
17617  goto __pyx_L0;
17618 
17619  /* function exit code */
17620  __pyx_L1_error:;
17621  __Pyx_XDECREF(__pyx_t_1);
17622  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17623  __pyx_r = NULL;
17624  __pyx_L0:;
17625  __Pyx_XGIVEREF(__pyx_r);
17626  __Pyx_RefNannyFinishContext();
17627  return __pyx_r;
17628  }
17629 
17630  /* "PyClical.pyx":1833
17631  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17632  *
17633  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17634  * """
17635  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17636  */
17637 
17638  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17639  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17640  PyObject *__pyx_r = NULL;
17641  __Pyx_RefNannyDeclarations
17642  PyObject *__pyx_t_1 = NULL;
17643  PyObject *__pyx_t_2 = NULL;
17644  __Pyx_RefNannySetupContext("cga3std", 0);
17645 
17646  /* "PyClical.pyx":1842
17647  * 0
17648  * """
17649  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
17650  *
17651  * cpdef inline agc3(obj):
17652  */
17653  __Pyx_XDECREF(__pyx_r);
17654  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
17655  __Pyx_GOTREF(__pyx_t_1);
17656  __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)
17657  __Pyx_GOTREF(__pyx_t_2);
17658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17659  __pyx_r = __pyx_t_2;
17660  __pyx_t_2 = 0;
17661  goto __pyx_L0;
17662 
17663  /* "PyClical.pyx":1833
17664  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17665  *
17666  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17667  * """
17668  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17669  */
17670 
17671  /* function exit code */
17672  __pyx_L1_error:;
17673  __Pyx_XDECREF(__pyx_t_1);
17674  __Pyx_XDECREF(__pyx_t_2);
17675  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17676  __pyx_r = 0;
17677  __pyx_L0:;
17678  __Pyx_XGIVEREF(__pyx_r);
17679  __Pyx_RefNannyFinishContext();
17680  return __pyx_r;
17681  }
17682 
17683  /* Python wrapper */
17684  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17685  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 ";
17686  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17687  PyObject *__pyx_r = 0;
17688  __Pyx_RefNannyDeclarations
17689  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
17690  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17691 
17692  /* function exit code */
17693  __Pyx_RefNannyFinishContext();
17694  return __pyx_r;
17695  }
17696 
17697  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17698  PyObject *__pyx_r = NULL;
17699  __Pyx_RefNannyDeclarations
17700  PyObject *__pyx_t_1 = NULL;
17701  __Pyx_RefNannySetupContext("cga3std", 0);
17702  __Pyx_XDECREF(__pyx_r);
17703  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
17704  __Pyx_GOTREF(__pyx_t_1);
17705  __pyx_r = __pyx_t_1;
17706  __pyx_t_1 = 0;
17707  goto __pyx_L0;
17708 
17709  /* function exit code */
17710  __pyx_L1_error:;
17711  __Pyx_XDECREF(__pyx_t_1);
17712  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17713  __pyx_r = NULL;
17714  __pyx_L0:;
17715  __Pyx_XGIVEREF(__pyx_r);
17716  __Pyx_RefNannyFinishContext();
17717  return __pyx_r;
17718  }
17719 
17720  /* "PyClical.pyx":1844
17721  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17722  *
17723  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17724  * """
17725  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17726  */
17727 
17728  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17729  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17730  PyObject *__pyx_r = NULL;
17731  __Pyx_RefNannyDeclarations
17732  PyObject *__pyx_t_1 = NULL;
17733  PyObject *__pyx_t_2 = NULL;
17734  __Pyx_RefNannySetupContext("agc3", 0);
17735 
17736  /* "PyClical.pyx":1853
17737  * 0
17738  * """
17739  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17740  *
17741  * # Some abbreviations.
17742  */
17743  __Pyx_XDECREF(__pyx_r);
17744  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
17745  __Pyx_GOTREF(__pyx_t_1);
17746  __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)
17747  __Pyx_GOTREF(__pyx_t_2);
17748  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17749  __pyx_r = __pyx_t_2;
17750  __pyx_t_2 = 0;
17751  goto __pyx_L0;
17752 
17753  /* "PyClical.pyx":1844
17754  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17755  *
17756  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17757  * """
17758  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17759  */
17760 
17761  /* function exit code */
17762  __pyx_L1_error:;
17763  __Pyx_XDECREF(__pyx_t_1);
17764  __Pyx_XDECREF(__pyx_t_2);
17765  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17766  __pyx_r = 0;
17767  __pyx_L0:;
17768  __Pyx_XGIVEREF(__pyx_r);
17769  __Pyx_RefNannyFinishContext();
17770  return __pyx_r;
17771  }
17772 
17773  /* Python wrapper */
17774  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17775  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 ";
17776  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17777  PyObject *__pyx_r = 0;
17778  __Pyx_RefNannyDeclarations
17779  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
17780  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17781 
17782  /* function exit code */
17783  __Pyx_RefNannyFinishContext();
17784  return __pyx_r;
17785  }
17786 
17787  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17788  PyObject *__pyx_r = NULL;
17789  __Pyx_RefNannyDeclarations
17790  PyObject *__pyx_t_1 = NULL;
17791  __Pyx_RefNannySetupContext("agc3", 0);
17792  __Pyx_XDECREF(__pyx_r);
17793  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
17794  __Pyx_GOTREF(__pyx_t_1);
17795  __pyx_r = __pyx_t_1;
17796  __pyx_t_1 = 0;
17797  goto __pyx_L0;
17798 
17799  /* function exit code */
17800  __pyx_L1_error:;
17801  __Pyx_XDECREF(__pyx_t_1);
17802  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17803  __pyx_r = NULL;
17804  __pyx_L0:;
17805  __Pyx_XGIVEREF(__pyx_r);
17806  __Pyx_RefNannyFinishContext();
17807  return __pyx_r;
17808  }
17809 
17810  /* "PyClical.pyx":1887
17811  * """
17812  *
17813  * def e(obj): # <<<<<<<<<<<<<<
17814  * """
17815  * Abbreviation for clifford(index_set(obj)).
17816  */
17817 
17818  /* Python wrapper */
17819  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17820  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 ";
17821  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17822  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17823  PyObject *__pyx_r = 0;
17824  __Pyx_RefNannyDeclarations
17825  __Pyx_RefNannySetupContext("e (wrapper)", 0);
17826  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17827 
17828  /* function exit code */
17829  __Pyx_RefNannyFinishContext();
17830  return __pyx_r;
17831  }
17832 
17833  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17834  PyObject *__pyx_r = NULL;
17835  __Pyx_RefNannyDeclarations
17836  PyObject *__pyx_t_1 = NULL;
17837  PyObject *__pyx_t_2 = NULL;
17838  __Pyx_RefNannySetupContext("e", 0);
17839 
17840  /* "PyClical.pyx":1898
17841  * 1
17842  * """
17843  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
17844  *
17845  * def istpq(p, q):
17846  */
17847  __Pyx_XDECREF(__pyx_r);
17848  __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)
17849  __Pyx_GOTREF(__pyx_t_1);
17850  __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)
17851  __Pyx_GOTREF(__pyx_t_2);
17852  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17853  __pyx_r = __pyx_t_2;
17854  __pyx_t_2 = 0;
17855  goto __pyx_L0;
17856 
17857  /* "PyClical.pyx":1887
17858  * """
17859  *
17860  * def e(obj): # <<<<<<<<<<<<<<
17861  * """
17862  * Abbreviation for clifford(index_set(obj)).
17863  */
17864 
17865  /* function exit code */
17866  __pyx_L1_error:;
17867  __Pyx_XDECREF(__pyx_t_1);
17868  __Pyx_XDECREF(__pyx_t_2);
17869  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17870  __pyx_r = NULL;
17871  __pyx_L0:;
17872  __Pyx_XGIVEREF(__pyx_r);
17873  __Pyx_RefNannyFinishContext();
17874  return __pyx_r;
17875  }
17876 
17877  /* "PyClical.pyx":1900
17878  * return clifford(index_set(obj))
17879  *
17880  * def istpq(p, q): # <<<<<<<<<<<<<<
17881  * """
17882  * Abbreviation for index_set({-q,...p}).
17883  */
17884 
17885  /* Python wrapper */
17886  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17887  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 ";
17888  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17889  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17890  PyObject *__pyx_v_p = 0;
17891  PyObject *__pyx_v_q = 0;
17892  PyObject *__pyx_r = 0;
17893  __Pyx_RefNannyDeclarations
17894  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
17895  {
17896  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17897  PyObject* values[2] = {0,0};
17898  if (unlikely(__pyx_kwds)) {
17899  Py_ssize_t kw_args;
17900  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17901  switch (pos_args) {
17902  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17903  CYTHON_FALLTHROUGH;
17904  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17905  CYTHON_FALLTHROUGH;
17906  case 0: break;
17907  default: goto __pyx_L5_argtuple_error;
17908  }
17909  kw_args = PyDict_Size(__pyx_kwds);
17910  switch (pos_args) {
17911  case 0:
17912  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17913  else goto __pyx_L5_argtuple_error;
17914  CYTHON_FALLTHROUGH;
17915  case 1:
17916  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17917  else {
17918  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
17919  }
17920  }
17921  if (unlikely(kw_args > 0)) {
17922  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
17923  }
17924  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17925  goto __pyx_L5_argtuple_error;
17926  } else {
17927  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17928  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17929  }
17930  __pyx_v_p = values[0];
17931  __pyx_v_q = values[1];
17932  }
17933  goto __pyx_L4_argument_unpacking_done;
17934  __pyx_L5_argtuple_error:;
17935  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
17936  __pyx_L3_error:;
17937  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17938  __Pyx_RefNannyFinishContext();
17939  return NULL;
17940  __pyx_L4_argument_unpacking_done:;
17941  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17942 
17943  /* function exit code */
17944  __Pyx_RefNannyFinishContext();
17945  return __pyx_r;
17946  }
17947 
17948  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17949  PyObject *__pyx_r = NULL;
17950  __Pyx_RefNannyDeclarations
17951  PyObject *__pyx_t_1 = NULL;
17952  PyObject *__pyx_t_2 = NULL;
17953  PyObject *__pyx_t_3 = NULL;
17954  __Pyx_RefNannySetupContext("istpq", 0);
17955 
17956  /* "PyClical.pyx":1907
17957  * {-3,-2,-1,1,2}
17958  * """
17959  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
17960  *
17961  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17962  */
17963  __Pyx_XDECREF(__pyx_r);
17964  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
17965  __Pyx_GOTREF(__pyx_t_1);
17966  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
17967  __Pyx_GOTREF(__pyx_t_2);
17968  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17969  __Pyx_GOTREF(__pyx_t_3);
17970  __Pyx_GIVEREF(__pyx_t_1);
17971  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17972  __Pyx_GIVEREF(__pyx_t_2);
17973  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17974  __pyx_t_1 = 0;
17975  __pyx_t_2 = 0;
17976  __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)
17977  __Pyx_GOTREF(__pyx_t_2);
17978  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17979  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17980  __Pyx_GOTREF(__pyx_t_3);
17981  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17982  __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)
17983  __Pyx_GOTREF(__pyx_t_2);
17984  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17985  __pyx_r = __pyx_t_2;
17986  __pyx_t_2 = 0;
17987  goto __pyx_L0;
17988 
17989  /* "PyClical.pyx":1900
17990  * return clifford(index_set(obj))
17991  *
17992  * def istpq(p, q): # <<<<<<<<<<<<<<
17993  * """
17994  * Abbreviation for index_set({-q,...p}).
17995  */
17996 
17997  /* function exit code */
17998  __pyx_L1_error:;
17999  __Pyx_XDECREF(__pyx_t_1);
18000  __Pyx_XDECREF(__pyx_t_2);
18001  __Pyx_XDECREF(__pyx_t_3);
18002  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18003  __pyx_r = NULL;
18004  __pyx_L0:;
18005  __Pyx_XGIVEREF(__pyx_r);
18006  __Pyx_RefNannyFinishContext();
18007  return __pyx_r;
18008  }
18009 
18010  /* "PyClical.pyx":1913
18011  *
18012  * # Doctest interface.
18013  * def _test(): # <<<<<<<<<<<<<<
18014  * import PyClical, doctest
18015  * return doctest.testmod(PyClical)
18016  */
18017 
18018  /* Python wrapper */
18019  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18020  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18021  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18022  PyObject *__pyx_r = 0;
18023  __Pyx_RefNannyDeclarations
18024  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18025  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18026 
18027  /* function exit code */
18028  __Pyx_RefNannyFinishContext();
18029  return __pyx_r;
18030  }
18031 
18032  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18033  PyObject *__pyx_v_PyClical = NULL;
18034  PyObject *__pyx_v_doctest = NULL;
18035  PyObject *__pyx_r = NULL;
18036  __Pyx_RefNannyDeclarations
18037  PyObject *__pyx_t_1 = NULL;
18038  PyObject *__pyx_t_2 = NULL;
18039  PyObject *__pyx_t_3 = NULL;
18040  __Pyx_RefNannySetupContext("_test", 0);
18041 
18042  /* "PyClical.pyx":1914
18043  * # Doctest interface.
18044  * def _test():
18045  * import PyClical, doctest # <<<<<<<<<<<<<<
18046  * return doctest.testmod(PyClical)
18047  *
18048  */
18049  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18050  __Pyx_GOTREF(__pyx_t_1);
18051  __pyx_v_PyClical = __pyx_t_1;
18052  __pyx_t_1 = 0;
18053  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18054  __Pyx_GOTREF(__pyx_t_1);
18055  __pyx_v_doctest = __pyx_t_1;
18056  __pyx_t_1 = 0;
18057 
18058  /* "PyClical.pyx":1915
18059  * def _test():
18060  * import PyClical, doctest
18061  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18062  *
18063  * if __name__ == "__main__":
18064  */
18065  __Pyx_XDECREF(__pyx_r);
18066  __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)
18067  __Pyx_GOTREF(__pyx_t_2);
18068  __pyx_t_3 = NULL;
18069  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18070  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18071  if (likely(__pyx_t_3)) {
18072  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18073  __Pyx_INCREF(__pyx_t_3);
18074  __Pyx_INCREF(function);
18075  __Pyx_DECREF_SET(__pyx_t_2, function);
18076  }
18077  }
18078  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_PyClical) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical);
18079  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18080  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18081  __Pyx_GOTREF(__pyx_t_1);
18082  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18083  __pyx_r = __pyx_t_1;
18084  __pyx_t_1 = 0;
18085  goto __pyx_L0;
18086 
18087  /* "PyClical.pyx":1913
18088  *
18089  * # Doctest interface.
18090  * def _test(): # <<<<<<<<<<<<<<
18091  * import PyClical, doctest
18092  * return doctest.testmod(PyClical)
18093  */
18094 
18095  /* function exit code */
18096  __pyx_L1_error:;
18097  __Pyx_XDECREF(__pyx_t_1);
18098  __Pyx_XDECREF(__pyx_t_2);
18099  __Pyx_XDECREF(__pyx_t_3);
18100  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18101  __pyx_r = NULL;
18102  __pyx_L0:;
18103  __Pyx_XDECREF(__pyx_v_PyClical);
18104  __Pyx_XDECREF(__pyx_v_doctest);
18105  __Pyx_XGIVEREF(__pyx_r);
18106  __Pyx_RefNannyFinishContext();
18107  return __pyx_r;
18108  }
18109  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18110 
18111  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18112  struct __pyx_obj_8PyClical_index_set *p;
18113  PyObject *o;
18114  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18115  o = (*t->tp_alloc)(t, 0);
18116  } else {
18117  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18118  }
18119  if (unlikely(!o)) return 0;
18120  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18121  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18122  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18123  return o;
18124  bad:
18125  Py_DECREF(o); o = 0;
18126  return NULL;
18127  }
18128 
18129  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18130  #if CYTHON_USE_TP_FINALIZE
18131  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))) {
18132  if (PyObject_CallFinalizerFromDealloc(o)) return;
18133  }
18134  #endif
18135  {
18136  PyObject *etype, *eval, *etb;
18137  PyErr_Fetch(&etype, &eval, &etb);
18138  ++Py_REFCNT(o);
18139  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18140  --Py_REFCNT(o);
18141  PyErr_Restore(etype, eval, etb);
18142  }
18143  (*Py_TYPE(o)->tp_free)(o);
18144  }
18145  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18146  PyObject *r;
18147  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18148  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18149  Py_DECREF(x);
18150  return r;
18151  }
18152 
18153  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18154  if (v) {
18155  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18156  }
18157  else {
18158  PyErr_Format(PyExc_NotImplementedError,
18159  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18160  return -1;
18161  }
18162  }
18163 
18164  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18165  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18166  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18167  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18168  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18169  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18170  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18171  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18172  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18173  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18174  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18175  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18176  {0, 0, 0, 0}
18177  };
18178 
18179  static PyNumberMethods __pyx_tp_as_number_index_set = {
18180  0, /*nb_add*/
18181  0, /*nb_subtract*/
18182  0, /*nb_multiply*/
18183  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18184  0, /*nb_divide*/
18185  #endif
18186  0, /*nb_remainder*/
18187  0, /*nb_divmod*/
18188  0, /*nb_power*/
18189  0, /*nb_negative*/
18190  0, /*nb_positive*/
18191  0, /*nb_absolute*/
18192  0, /*nb_nonzero*/
18193  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18194  0, /*nb_lshift*/
18195  0, /*nb_rshift*/
18196  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18197  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18198  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18199  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18200  0, /*nb_coerce*/
18201  #endif
18202  0, /*nb_int*/
18203  #if PY_MAJOR_VERSION < 3
18204  0, /*nb_long*/
18205  #else
18206  0, /*reserved*/
18207  #endif
18208  0, /*nb_float*/
18209  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18210  0, /*nb_oct*/
18211  #endif
18212  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18213  0, /*nb_hex*/
18214  #endif
18215  0, /*nb_inplace_add*/
18216  0, /*nb_inplace_subtract*/
18217  0, /*nb_inplace_multiply*/
18218  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18219  0, /*nb_inplace_divide*/
18220  #endif
18221  0, /*nb_inplace_remainder*/
18222  0, /*nb_inplace_power*/
18223  0, /*nb_inplace_lshift*/
18224  0, /*nb_inplace_rshift*/
18225  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18226  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18227  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18228  0, /*nb_floor_divide*/
18229  0, /*nb_true_divide*/
18230  0, /*nb_inplace_floor_divide*/
18231  0, /*nb_inplace_true_divide*/
18232  0, /*nb_index*/
18233  #if PY_VERSION_HEX >= 0x03050000
18234  0, /*nb_matrix_multiply*/
18235  #endif
18236  #if PY_VERSION_HEX >= 0x03050000
18237  0, /*nb_inplace_matrix_multiply*/
18238  #endif
18239  };
18240 
18241  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18242  0, /*sq_length*/
18243  0, /*sq_concat*/
18244  0, /*sq_repeat*/
18245  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18246  0, /*sq_slice*/
18247  0, /*sq_ass_item*/
18248  0, /*sq_ass_slice*/
18249  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18250  0, /*sq_inplace_concat*/
18251  0, /*sq_inplace_repeat*/
18252  };
18253 
18254  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18255  0, /*mp_length*/
18256  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18257  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18258  };
18259 
18260  static PyTypeObject __pyx_type_8PyClical_index_set = {
18261  PyVarObject_HEAD_INIT(0, 0)
18262  "PyClical.index_set", /*tp_name*/
18263  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18264  0, /*tp_itemsize*/
18265  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18266  0, /*tp_print*/
18267  0, /*tp_getattr*/
18268  0, /*tp_setattr*/
18269  #if PY_MAJOR_VERSION < 3
18270  0, /*tp_compare*/
18271  #endif
18272  #if PY_MAJOR_VERSION >= 3
18273  0, /*tp_as_async*/
18274  #endif
18275  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18276  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18277  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18278  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18279  0, /*tp_hash*/
18280  0, /*tp_call*/
18281  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18282  0, /*tp_getattro*/
18283  0, /*tp_setattro*/
18284  0, /*tp_as_buffer*/
18285  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18286  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18287  0, /*tp_traverse*/
18288  0, /*tp_clear*/
18289  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18290  0, /*tp_weaklistoffset*/
18291  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18292  0, /*tp_iternext*/
18293  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18294  0, /*tp_members*/
18295  0, /*tp_getset*/
18296  0, /*tp_base*/
18297  0, /*tp_dict*/
18298  0, /*tp_descr_get*/
18299  0, /*tp_descr_set*/
18300  0, /*tp_dictoffset*/
18301  0, /*tp_init*/
18302  0, /*tp_alloc*/
18303  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18304  0, /*tp_free*/
18305  0, /*tp_is_gc*/
18306  0, /*tp_bases*/
18307  0, /*tp_mro*/
18308  0, /*tp_cache*/
18309  0, /*tp_subclasses*/
18310  0, /*tp_weaklist*/
18311  0, /*tp_del*/
18312  0, /*tp_version_tag*/
18313  #if PY_VERSION_HEX >= 0x030400a1
18314  0, /*tp_finalize*/
18315  #endif
18316  };
18317  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18318 
18319  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18320  struct __pyx_obj_8PyClical_clifford *p;
18321  PyObject *o;
18322  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18323  o = (*t->tp_alloc)(t, 0);
18324  } else {
18325  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18326  }
18327  if (unlikely(!o)) return 0;
18328  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18329  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18330  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18331  return o;
18332  bad:
18333  Py_DECREF(o); o = 0;
18334  return NULL;
18335  }
18336 
18337  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18338  #if CYTHON_USE_TP_FINALIZE
18339  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))) {
18340  if (PyObject_CallFinalizerFromDealloc(o)) return;
18341  }
18342  #endif
18343  {
18344  PyObject *etype, *eval, *etb;
18345  PyErr_Fetch(&etype, &eval, &etb);
18346  ++Py_REFCNT(o);
18347  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18348  --Py_REFCNT(o);
18349  PyErr_Restore(etype, eval, etb);
18350  }
18351  (*Py_TYPE(o)->tp_free)(o);
18352  }
18353  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18354  PyObject *r;
18355  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18356  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18357  Py_DECREF(x);
18358  return r;
18359  }
18360 
18361  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18362  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18363  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18364  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18365  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18366  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18367  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18368  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18369  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18370  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18371  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18372  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18373  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18374  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18375  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18376  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18377  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18378  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18379  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18380  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18381  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18382  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18383  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18384  {0, 0, 0, 0}
18385  };
18386 
18387  static PyNumberMethods __pyx_tp_as_number_clifford = {
18388  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18389  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18390  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18391  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18392  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18393  #endif
18394  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18395  0, /*nb_divmod*/
18396  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18397  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18398  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18399  0, /*nb_absolute*/
18400  0, /*nb_nonzero*/
18401  0, /*nb_invert*/
18402  0, /*nb_lshift*/
18403  0, /*nb_rshift*/
18404  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18405  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18406  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18407  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18408  0, /*nb_coerce*/
18409  #endif
18410  0, /*nb_int*/
18411  #if PY_MAJOR_VERSION < 3
18412  0, /*nb_long*/
18413  #else
18414  0, /*reserved*/
18415  #endif
18416  0, /*nb_float*/
18417  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18418  0, /*nb_oct*/
18419  #endif
18420  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18421  0, /*nb_hex*/
18422  #endif
18423  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18424  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18425  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18426  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18427  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18428  #endif
18429  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18430  0, /*nb_inplace_power*/
18431  0, /*nb_inplace_lshift*/
18432  0, /*nb_inplace_rshift*/
18433  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18434  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18435  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18436  0, /*nb_floor_divide*/
18437  0, /*nb_true_divide*/
18438  0, /*nb_inplace_floor_divide*/
18439  0, /*nb_inplace_true_divide*/
18440  0, /*nb_index*/
18441  #if PY_VERSION_HEX >= 0x03050000
18442  0, /*nb_matrix_multiply*/
18443  #endif
18444  #if PY_VERSION_HEX >= 0x03050000
18445  0, /*nb_inplace_matrix_multiply*/
18446  #endif
18447  };
18448 
18449  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18450  0, /*sq_length*/
18451  0, /*sq_concat*/
18452  0, /*sq_repeat*/
18453  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18454  0, /*sq_slice*/
18455  0, /*sq_ass_item*/
18456  0, /*sq_ass_slice*/
18457  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18458  0, /*sq_inplace_concat*/
18459  0, /*sq_inplace_repeat*/
18460  };
18461 
18462  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18463  0, /*mp_length*/
18464  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18465  0, /*mp_ass_subscript*/
18466  };
18467 
18468  static PyTypeObject __pyx_type_8PyClical_clifford = {
18469  PyVarObject_HEAD_INIT(0, 0)
18470  "PyClical.clifford", /*tp_name*/
18471  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18472  0, /*tp_itemsize*/
18473  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18474  0, /*tp_print*/
18475  0, /*tp_getattr*/
18476  0, /*tp_setattr*/
18477  #if PY_MAJOR_VERSION < 3
18478  0, /*tp_compare*/
18479  #endif
18480  #if PY_MAJOR_VERSION >= 3
18481  0, /*tp_as_async*/
18482  #endif
18483  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18484  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18485  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18486  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18487  0, /*tp_hash*/
18488  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18489  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18490  0, /*tp_getattro*/
18491  0, /*tp_setattro*/
18492  0, /*tp_as_buffer*/
18493  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18494  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18495  0, /*tp_traverse*/
18496  0, /*tp_clear*/
18497  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18498  0, /*tp_weaklistoffset*/
18499  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18500  0, /*tp_iternext*/
18501  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18502  0, /*tp_members*/
18503  0, /*tp_getset*/
18504  0, /*tp_base*/
18505  0, /*tp_dict*/
18506  0, /*tp_descr_get*/
18507  0, /*tp_descr_set*/
18508  0, /*tp_dictoffset*/
18509  0, /*tp_init*/
18510  0, /*tp_alloc*/
18511  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
18512  0, /*tp_free*/
18513  0, /*tp_is_gc*/
18514  0, /*tp_bases*/
18515  0, /*tp_mro*/
18516  0, /*tp_cache*/
18517  0, /*tp_subclasses*/
18518  0, /*tp_weaklist*/
18519  0, /*tp_del*/
18520  0, /*tp_version_tag*/
18521  #if PY_VERSION_HEX >= 0x030400a1
18522  0, /*tp_finalize*/
18523  #endif
18524  };
18525 
18526  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18527  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18528 
18529  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18530  PyObject *o;
18531  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__)))) {
18532  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18533  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18534  (void) PyObject_INIT(o, t);
18535  PyObject_GC_Track(o);
18536  } else {
18537  o = (*t->tp_alloc)(t, 0);
18538  if (unlikely(!o)) return 0;
18539  }
18540  return o;
18541  }
18542 
18543  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18544  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18545  PyObject_GC_UnTrack(o);
18546  Py_CLEAR(p->__pyx_v_idx);
18547  Py_CLEAR(p->__pyx_v_self);
18548  Py_CLEAR(p->__pyx_t_0);
18549  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__)))) {
18550  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18551  } else {
18552  (*Py_TYPE(o)->tp_free)(o);
18553  }
18554  }
18555 
18556  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
18557  int e;
18558  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18559  if (p->__pyx_v_idx) {
18560  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
18561  }
18562  if (p->__pyx_v_self) {
18563  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
18564  }
18565  if (p->__pyx_t_0) {
18566  e = (*v)(p->__pyx_t_0, a); if (e) return e;
18567  }
18568  return 0;
18569  }
18570 
18571  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18572  PyVarObject_HEAD_INIT(0, 0)
18573  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
18574  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
18575  0, /*tp_itemsize*/
18576  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
18577  0, /*tp_print*/
18578  0, /*tp_getattr*/
18579  0, /*tp_setattr*/
18580  #if PY_MAJOR_VERSION < 3
18581  0, /*tp_compare*/
18582  #endif
18583  #if PY_MAJOR_VERSION >= 3
18584  0, /*tp_as_async*/
18585  #endif
18586  0, /*tp_repr*/
18587  0, /*tp_as_number*/
18588  0, /*tp_as_sequence*/
18589  0, /*tp_as_mapping*/
18590  0, /*tp_hash*/
18591  0, /*tp_call*/
18592  0, /*tp_str*/
18593  0, /*tp_getattro*/
18594  0, /*tp_setattro*/
18595  0, /*tp_as_buffer*/
18596  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
18597  0, /*tp_doc*/
18598  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
18599  0, /*tp_clear*/
18600  0, /*tp_richcompare*/
18601  0, /*tp_weaklistoffset*/
18602  0, /*tp_iter*/
18603  0, /*tp_iternext*/
18604  0, /*tp_methods*/
18605  0, /*tp_members*/
18606  0, /*tp_getset*/
18607  0, /*tp_base*/
18608  0, /*tp_dict*/
18609  0, /*tp_descr_get*/
18610  0, /*tp_descr_set*/
18611  0, /*tp_dictoffset*/
18612  0, /*tp_init*/
18613  0, /*tp_alloc*/
18614  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
18615  0, /*tp_free*/
18616  0, /*tp_is_gc*/
18617  0, /*tp_bases*/
18618  0, /*tp_mro*/
18619  0, /*tp_cache*/
18620  0, /*tp_subclasses*/
18621  0, /*tp_weaklist*/
18622  0, /*tp_del*/
18623  0, /*tp_version_tag*/
18624  #if PY_VERSION_HEX >= 0x030400a1
18625  0, /*tp_finalize*/
18626  #endif
18627  };
18628 
18629  static PyMethodDef __pyx_methods[] = {
18630  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18631  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18632  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18633  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18634  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18635  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18636  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18637  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18638  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18639  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18640  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18641  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18642  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18643  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18644  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18645  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18646  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18647  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18648  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18649  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18650  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18651  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18652  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18653  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18654  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18655  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18656  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18657  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18658  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18659  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18660  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18661  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18662  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18663  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18664  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18665  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18666  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18667  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18668  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18669  {0, 0, 0, 0}
18670  };
18671 
18672  #if PY_MAJOR_VERSION >= 3
18673  #if CYTHON_PEP489_MULTI_PHASE_INIT
18674  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
18675  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
18676  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
18677  {Py_mod_create, (void*)__pyx_pymod_create},
18678  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
18679  {0, NULL}
18680  };
18681  #endif
18682 
18683  static struct PyModuleDef __pyx_moduledef = {
18684  PyModuleDef_HEAD_INIT,
18685  "PyClical",
18686  0, /* m_doc */
18687  #if CYTHON_PEP489_MULTI_PHASE_INIT
18688  0, /* m_size */
18689  #else
18690  -1, /* m_size */
18691  #endif
18692  __pyx_methods /* m_methods */,
18693  #if CYTHON_PEP489_MULTI_PHASE_INIT
18694  __pyx_moduledef_slots, /* m_slots */
18695  #else
18696  NULL, /* m_reload */
18697  #endif
18698  NULL, /* m_traverse */
18699  NULL, /* m_clear */
18700  NULL /* m_free */
18701  };
18702  #endif
18703  #ifndef CYTHON_SMALL_CODE
18704 #if defined(__clang__)
18705  #define CYTHON_SMALL_CODE
18706 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
18707  #define CYTHON_SMALL_CODE __attribute__((cold))
18708 #else
18709  #define CYTHON_SMALL_CODE
18710 #endif
18711 #endif
18712 
18713 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18714  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
18715  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18716  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18717  {&__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},
18718  {&__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},
18719  {&__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},
18720  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18721  {&__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},
18722  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18723  {&__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},
18724  {&__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},
18725  {&__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},
18726  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18727  {&__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},
18728  {&__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},
18729  {&__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},
18730  {&__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},
18731  {&__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},
18732  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18733  {&__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},
18734  {&__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},
18735  {&__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},
18736  {&__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},
18737  {&__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},
18738  {&__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},
18739  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18740  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18741  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18742  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18743  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18744  {&__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},
18745  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18746  {&__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},
18747  {&__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},
18748  {&__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},
18749  {&__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},
18750  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18751  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18752  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18753  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18754  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18755  {&__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},
18756  {&__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},
18757  {&__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},
18758  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18759  {&__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},
18760  {&__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},
18761  {&__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},
18762  {&__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},
18763  {&__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},
18764  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18765  {&__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},
18766  {&__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},
18767  {&__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},
18768  {&__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},
18769  {&__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},
18770  {&__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},
18771  {&__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},
18772  {&__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},
18773  {&__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},
18774  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18775  {&__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},
18776  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18777  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18778  {&__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},
18779  {&__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},
18780  {&__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},
18781  {&__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},
18782  {&__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},
18783  {&__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},
18784  {&__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},
18785  {&__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},
18786  {&__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},
18787  {&__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},
18788  {&__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},
18789  {&__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},
18790  {&__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},
18791  {&__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},
18792  {&__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},
18793  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18794  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
18795  {&__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},
18796  {&__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},
18797  {&__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},
18798  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
18799  {&__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},
18800  {&__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},
18801  {&__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},
18802  {&__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},
18803  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18804  {&__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},
18805  {&__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},
18806  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18807  {&__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},
18808  {&__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},
18809  {&__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},
18810  {&__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},
18811  {&__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},
18812  {&__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},
18813  {&__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},
18814  {&__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},
18815  {&__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},
18816  {&__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},
18817  {&__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},
18818  {&__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},
18819  {&__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},
18820  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18821  {&__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},
18822  {&__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},
18823  {&__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},
18824  {&__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},
18825  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18826  {&__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},
18827  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18828  {&__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},
18829  {&__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},
18830  {&__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},
18831  {&__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},
18832  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18833  {&__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},
18834  {&__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},
18835  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18836  {&__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},
18837  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
18838  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
18839  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
18840  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18841  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
18842  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
18843  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18844  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
18845  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18846  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18847  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18848  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18849  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18850  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18851  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
18852  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18853  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18854  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18855  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
18856  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18857  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18858  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18859  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18860  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18861  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
18862  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
18863  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18864  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18865  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18866  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18867  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18868  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18869  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18870  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18871  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18872  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18873  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18874  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18875  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18876  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18877  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18878  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18879  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18880  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18881  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18882  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18883  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18884  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18885  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18886  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18887  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18888  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18889  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18890  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18891  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18892  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18893  {&__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},
18894  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18895  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18896  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18897  {&__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},
18898  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18899  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18900  {&__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},
18901  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18902  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18903  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18904  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18905  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18906  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18907  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18908  {&__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},
18909  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
18910  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18911  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18912  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18913  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18914  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
18915  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18916  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
18917  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
18918  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18919  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18920  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18921  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18922  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
18923  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18924  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
18925  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18926  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
18927  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18928  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
18929  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
18930  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
18931  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
18932  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
18933  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
18934  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18935  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18936  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
18937  {&__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},
18938  {&__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},
18939  {&__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},
18940  {&__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},
18941  {&__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},
18942  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18943  {&__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},
18944  {&__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},
18945  {&__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},
18946  {&__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},
18947  {&__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},
18948  {&__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},
18949  {&__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},
18950  {&__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},
18951  {&__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},
18952  {&__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},
18953  {&__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},
18954  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18955  {&__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},
18956  {&__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},
18957  {&__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},
18958  {&__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},
18959  {&__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},
18960  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
18961  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
18962  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
18963  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
18964  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
18965  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
18966  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
18967  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
18968  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
18969  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
18970  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
18971  {&__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},
18972  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
18973  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
18974  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
18975  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
18976  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
18977  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
18978  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
18979  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
18980  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
18981  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
18982  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
18983  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
18984  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
18985  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
18986  {&__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},
18987  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
18988  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
18989  {&__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},
18990  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
18991  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
18992  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
18993  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
18994  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
18995  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
18996  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
18997  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
18998  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
18999  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19000  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19001  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19002  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19003  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19004  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19005  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19006  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19007  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19008  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19009  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19010  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19011  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19012  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19013  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19014  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19015  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19016  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19017  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19018  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19019  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19020  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19021  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19022  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19023  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19024  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19025  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19026  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19027  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19028  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19029  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19030  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19031  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19032  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19033  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19034  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19035  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19036  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19037  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19038  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19039  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19040  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19041  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19042  {0, 0, 0, 0, 0, 0, 0}
19043 };
19044 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
19045  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19046  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19047  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19048  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19049  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19050  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19051  #if PY_MAJOR_VERSION >= 3
19052  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19053  #else
19054  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19055  #endif
19056  return 0;
19057  __pyx_L1_error:;
19058  return -1;
19059 }
19060 
19061 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
19062  __Pyx_RefNannyDeclarations
19063  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19064 
19065  /* "(tree fragment)":2
19066  * def __reduce_cython__(self):
19067  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19068  * def __setstate_cython__(self, __pyx_state):
19069  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19070  */
19071  __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)
19072  __Pyx_GOTREF(__pyx_tuple__3);
19073  __Pyx_GIVEREF(__pyx_tuple__3);
19074 
19075  /* "(tree fragment)":4
19076  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19077  * def __setstate_cython__(self, __pyx_state):
19078  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19079  */
19080  __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)
19081  __Pyx_GOTREF(__pyx_tuple__4);
19082  __Pyx_GIVEREF(__pyx_tuple__4);
19083 
19084  /* "PyClical.pyx":635
19085  * TypeError: Not applicable.
19086  * """
19087  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19088  *
19089  * def __iter__(self):
19090  */
19091  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19092  __Pyx_GOTREF(__pyx_tuple__10);
19093  __Pyx_GIVEREF(__pyx_tuple__10);
19094 
19095  /* "(tree fragment)":2
19096  * def __reduce_cython__(self):
19097  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19098  * def __setstate_cython__(self, __pyx_state):
19099  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19100  */
19101  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
19102  __Pyx_GOTREF(__pyx_tuple__11);
19103  __Pyx_GIVEREF(__pyx_tuple__11);
19104 
19105  /* "(tree fragment)":4
19106  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19107  * def __setstate_cython__(self, __pyx_state):
19108  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19109  */
19110  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
19111  __Pyx_GOTREF(__pyx_tuple__12);
19112  __Pyx_GIVEREF(__pyx_tuple__12);
19113 
19114  /* "PyClical.pyx":404
19115  * return index_set_to_str( self.unwrap() ).c_str()
19116  *
19117  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19118  * """
19119  * Tests for functions that Doctest cannot see.
19120  */
19121  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_index_set_hidden_doctests, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 404, __pyx_L1_error)
19122 
19123  /* "PyClical.pyx":1243
19124  * return clifford_to_str( self.unwrap() ).c_str()
19125  *
19126  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19127  * """
19128  * Tests for functions that Doctest cannot see.
19129  */
19130  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_clifford_hidden_doctests, 1243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 1243, __pyx_L1_error)
19131 
19132  /* "PyClical.pyx":1856
19133  *
19134  * # Some abbreviations.
19135  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19136  * pi = tau / 2.0
19137  *
19138  */
19139  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1856, __pyx_L1_error)
19140  __Pyx_GOTREF(__pyx_tuple__15);
19141  __Pyx_GIVEREF(__pyx_tuple__15);
19142 
19143  /* "PyClical.pyx":1887
19144  * """
19145  *
19146  * def e(obj): # <<<<<<<<<<<<<<
19147  * """
19148  * Abbreviation for clifford(index_set(obj)).
19149  */
19150  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1887, __pyx_L1_error)
19151  __Pyx_GOTREF(__pyx_tuple__16);
19152  __Pyx_GIVEREF(__pyx_tuple__16);
19153  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_e, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19154 
19155  /* "PyClical.pyx":1900
19156  * return clifford(index_set(obj))
19157  *
19158  * def istpq(p, q): # <<<<<<<<<<<<<<
19159  * """
19160  * Abbreviation for index_set({-q,...p}).
19161  */
19162  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1900, __pyx_L1_error)
19163  __Pyx_GOTREF(__pyx_tuple__18);
19164  __Pyx_GIVEREF(__pyx_tuple__18);
19165  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_istpq, 1900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 1900, __pyx_L1_error)
19166 
19167  /* "PyClical.pyx":1909
19168  * return index_set(set(range(-q,p+1)))
19169  *
19170  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19171  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19172  *
19173  */
19174  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1909, __pyx_L1_error)
19175  __Pyx_GOTREF(__pyx_tuple__20);
19176  __Pyx_GIVEREF(__pyx_tuple__20);
19177  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19178  __Pyx_GOTREF(__pyx_tuple__21);
19179  __Pyx_GIVEREF(__pyx_tuple__21);
19180 
19181  /* "PyClical.pyx":1913
19182  *
19183  * # Doctest interface.
19184  * def _test(): # <<<<<<<<<<<<<<
19185  * import PyClical, doctest
19186  * return doctest.testmod(PyClical)
19187  */
19188  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1913, __pyx_L1_error)
19189  __Pyx_GOTREF(__pyx_tuple__22);
19190  __Pyx_GIVEREF(__pyx_tuple__22);
19191  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_test, 1913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 1913, __pyx_L1_error)
19192  __Pyx_RefNannyFinishContext();
19193  return 0;
19194  __pyx_L1_error:;
19195  __Pyx_RefNannyFinishContext();
19196  return -1;
19197 }
19198 
19199 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
19200  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19201  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19202  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19203  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19204  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19205  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19206  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19207  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19208  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19209  return 0;
19210  __pyx_L1_error:;
19211  return -1;
19212 }
19213 
19214 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
19215 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
19216 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
19217 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
19218 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
19219 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
19220 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
19221 
19222 static int __Pyx_modinit_global_init_code(void) {
19223  __Pyx_RefNannyDeclarations
19224  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19225  /*--- Global init code ---*/
19226  __Pyx_RefNannyFinishContext();
19227  return 0;
19228 }
19229 
19230 static int __Pyx_modinit_variable_export_code(void) {
19231  __Pyx_RefNannyDeclarations
19232  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19233  /*--- Variable export code ---*/
19234  __Pyx_RefNannyFinishContext();
19235  return 0;
19236 }
19237 
19238 static int __Pyx_modinit_function_export_code(void) {
19239  __Pyx_RefNannyDeclarations
19240  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19241  /*--- Function export code ---*/
19242  __Pyx_RefNannyFinishContext();
19243  return 0;
19244 }
19245 
19246 static int __Pyx_modinit_type_init_code(void) {
19247  __Pyx_RefNannyDeclarations
19248  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19249  /*--- Type init code ---*/
19250  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19251  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19252  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19253  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19254  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19255  __pyx_type_8PyClical_index_set.tp_print = 0;
19256  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)) {
19257  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19258  }
19259  #if CYTHON_COMPILING_IN_CPYTHON
19260  {
19261  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19262  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19263  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19264  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19265  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19266  }
19267  }
19268  #endif
19269  #if CYTHON_COMPILING_IN_CPYTHON
19270  {
19271  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19272  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19273  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19274  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19275  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19276  }
19277  }
19278  #endif
19279  #if CYTHON_COMPILING_IN_CPYTHON
19280  {
19281  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19282  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19283  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19284  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19285  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19286  }
19287  }
19288  #endif
19289  #if CYTHON_COMPILING_IN_CPYTHON
19290  {
19291  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19292  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19293  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19294  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19295  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19296  }
19297  }
19298  #endif
19299  #if CYTHON_COMPILING_IN_CPYTHON
19300  {
19301  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19302  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19303  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19304  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19305  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19306  }
19307  }
19308  #endif
19309  #if CYTHON_COMPILING_IN_CPYTHON
19310  {
19311  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19312  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19313  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19314  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19315  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19316  }
19317  }
19318  #endif
19319  #if CYTHON_COMPILING_IN_CPYTHON
19320  {
19321  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19322  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19323  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19324  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19325  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19326  }
19327  }
19328  #endif
19329  #if CYTHON_COMPILING_IN_CPYTHON
19330  {
19331  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19332  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19333  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19334  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19335  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19336  }
19337  }
19338  #endif
19339  #if CYTHON_COMPILING_IN_CPYTHON
19340  {
19341  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19342  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19343  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19344  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19345  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19346  }
19347  }
19348  #endif
19349  #if CYTHON_COMPILING_IN_CPYTHON
19350  {
19351  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19352  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19353  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19354  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19355  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19356  }
19357  }
19358  #endif
19359  #if CYTHON_COMPILING_IN_CPYTHON
19360  {
19361  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19362  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19363  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19364  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19365  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19366  }
19367  }
19368  #endif
19369  #if CYTHON_COMPILING_IN_CPYTHON
19370  {
19371  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19372  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19373  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19374  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19375  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19376  }
19377  }
19378  #endif
19379  #if CYTHON_COMPILING_IN_CPYTHON
19380  {
19381  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19382  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19383  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19384  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19385  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19386  }
19387  }
19388  #endif
19389  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19390  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19391  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19392  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19393  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19394  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19395  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19396  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19397  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19398  __pyx_type_8PyClical_clifford.tp_print = 0;
19399  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19400  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19401  }
19402  #if CYTHON_COMPILING_IN_CPYTHON
19403  {
19404  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19405  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19406  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19407  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19408  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19409  }
19410  }
19411  #endif
19412  #if CYTHON_COMPILING_IN_CPYTHON
19413  {
19414  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19415  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19416  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19417  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19418  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19419  }
19420  }
19421  #endif
19422  #if CYTHON_COMPILING_IN_CPYTHON
19423  {
19424  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19425  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19426  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19427  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19428  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19429  }
19430  }
19431  #endif
19432  #if CYTHON_COMPILING_IN_CPYTHON
19433  {
19434  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19435  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19436  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19437  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19438  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19439  }
19440  }
19441  #endif
19442  #if CYTHON_COMPILING_IN_CPYTHON
19443  {
19444  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19445  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19446  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19447  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19448  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19449  }
19450  }
19451  #endif
19452  #if CYTHON_COMPILING_IN_CPYTHON
19453  {
19454  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19455  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19456  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19457  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19458  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19459  }
19460  }
19461  #endif
19462  #if CYTHON_COMPILING_IN_CPYTHON
19463  {
19464  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19465  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19466  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19467  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19468  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19469  }
19470  }
19471  #endif
19472  #if CYTHON_COMPILING_IN_CPYTHON
19473  {
19474  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19475  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19476  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19477  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19478  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19479  }
19480  }
19481  #endif
19482  #if CYTHON_COMPILING_IN_CPYTHON
19483  {
19484  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19485  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19486  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19487  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19488  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19489  }
19490  }
19491  #endif
19492  #if CYTHON_COMPILING_IN_CPYTHON
19493  {
19494  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19495  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19496  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19497  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19498  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19499  }
19500  }
19501  #endif
19502  #if CYTHON_COMPILING_IN_CPYTHON
19503  {
19504  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19505  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19506  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19507  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19508  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19509  }
19510  }
19511  #endif
19512  #if CYTHON_COMPILING_IN_CPYTHON
19513  {
19514  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19515  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19516  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19517  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19518  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19519  }
19520  }
19521  #endif
19522  #if CYTHON_COMPILING_IN_CPYTHON
19523  {
19524  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19525  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19526  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19527  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19528  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19529  }
19530  }
19531  #endif
19532  #if CYTHON_COMPILING_IN_CPYTHON
19533  {
19534  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19535  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19536  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19537  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19538  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19539  }
19540  }
19541  #endif
19542  #if CYTHON_COMPILING_IN_CPYTHON
19543  {
19544  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19545  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19546  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19547  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19548  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19549  }
19550  }
19551  #endif
19552  #if CYTHON_COMPILING_IN_CPYTHON
19553  {
19554  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19555  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19556  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19557  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19558  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19559  }
19560  }
19561  #endif
19562  #if CYTHON_COMPILING_IN_CPYTHON
19563  {
19564  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19565  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19566  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19567  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19568  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19569  }
19570  }
19571  #endif
19572  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19573  #if CYTHON_COMPILING_IN_CPYTHON
19574  {
19575  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19576  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19577  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19578  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19579  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19580  }
19581  }
19582  #endif
19583  #endif
19584  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19585  #if CYTHON_COMPILING_IN_CPYTHON
19586  {
19587  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19588  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19589  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19590  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19591  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19592  }
19593  }
19594  #endif
19595  #endif
19596  #if CYTHON_COMPILING_IN_CPYTHON
19597  {
19598  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19599  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19600  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19601  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19602  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19603  }
19604  }
19605  #endif
19606  #if CYTHON_COMPILING_IN_CPYTHON
19607  {
19608  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19609  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19610  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19611  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19612  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19613  }
19614  }
19615  #endif
19616  #if CYTHON_COMPILING_IN_CPYTHON
19617  {
19618  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19619  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19620  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19621  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19622  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19623  }
19624  }
19625  #endif
19626  #if CYTHON_COMPILING_IN_CPYTHON
19627  {
19628  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19629  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19630  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19631  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19632  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19633  }
19634  }
19635  #endif
19636  #if CYTHON_COMPILING_IN_CPYTHON
19637  {
19638  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19639  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19640  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19641  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19642  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19643  }
19644  }
19645  #endif
19646  #if CYTHON_COMPILING_IN_CPYTHON
19647  {
19648  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19649  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19650  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19651  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19652  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19653  }
19654  }
19655  #endif
19656  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19657  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19658  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19659  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19660  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
19661  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19662  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)) {
19663  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
19664  }
19665  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19666  __Pyx_RefNannyFinishContext();
19667  return 0;
19668  __pyx_L1_error:;
19669  __Pyx_RefNannyFinishContext();
19670  return -1;
19671 }
19672 
19673 static int __Pyx_modinit_type_import_code(void) {
19674  __Pyx_RefNannyDeclarations
19675  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
19676  /*--- Type import code ---*/
19677  __Pyx_RefNannyFinishContext();
19678  return 0;
19679 }
19680 
19681 static int __Pyx_modinit_variable_import_code(void) {
19682  __Pyx_RefNannyDeclarations
19683  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
19684  /*--- Variable import code ---*/
19685  __Pyx_RefNannyFinishContext();
19686  return 0;
19687 }
19688 
19689 static int __Pyx_modinit_function_import_code(void) {
19690  __Pyx_RefNannyDeclarations
19691  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
19692  /*--- Function import code ---*/
19693  __Pyx_RefNannyFinishContext();
19694  return 0;
19695 }
19696 
19697 
19698 #if PY_MAJOR_VERSION < 3
19699 #ifdef CYTHON_NO_PYINIT_EXPORT
19700 #define __Pyx_PyMODINIT_FUNC void
19701 #else
19702 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19703 #endif
19704 #else
19705 #ifdef CYTHON_NO_PYINIT_EXPORT
19706 #define __Pyx_PyMODINIT_FUNC PyObject *
19707 #else
19708 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19709 #endif
19710 #endif
19711 
19712 
19713 #if PY_MAJOR_VERSION < 3
19714 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
19715 __Pyx_PyMODINIT_FUNC initPyClical(void)
19716 #else
19717 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
19718 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
19719 #if CYTHON_PEP489_MULTI_PHASE_INIT
19720 {
19721  return PyModuleDef_Init(&__pyx_moduledef);
19722 }
19723 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
19724  #if PY_VERSION_HEX >= 0x030700A1
19725  static PY_INT64_T main_interpreter_id = -1;
19726  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
19727  if (main_interpreter_id == -1) {
19728  main_interpreter_id = current_id;
19729  return (unlikely(current_id == -1)) ? -1 : 0;
19730  } else if (unlikely(main_interpreter_id != current_id))
19731  #else
19732  static PyInterpreterState *main_interpreter = NULL;
19733  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
19734  if (!main_interpreter) {
19735  main_interpreter = current_interpreter;
19736  } else if (unlikely(main_interpreter != current_interpreter))
19737  #endif
19738  {
19739  PyErr_SetString(
19740  PyExc_ImportError,
19741  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
19742  return -1;
19743  }
19744  return 0;
19745 }
19746 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
19747  PyObject *value = PyObject_GetAttrString(spec, from_name);
19748  int result = 0;
19749  if (likely(value)) {
19750  if (allow_none || value != Py_None) {
19751  result = PyDict_SetItemString(moddict, to_name, value);
19752  }
19753  Py_DECREF(value);
19754  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19755  PyErr_Clear();
19756  } else {
19757  result = -1;
19758  }
19759  return result;
19760 }
19761 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19762  PyObject *module = NULL, *moddict, *modname;
19763  if (__Pyx_check_single_interpreter())
19764  return NULL;
19765  if (__pyx_m)
19766  return __Pyx_NewRef(__pyx_m);
19767  modname = PyObject_GetAttrString(spec, "name");
19768  if (unlikely(!modname)) goto bad;
19769  module = PyModule_NewObject(modname);
19770  Py_DECREF(modname);
19771  if (unlikely(!module)) goto bad;
19772  moddict = PyModule_GetDict(module);
19773  if (unlikely(!moddict)) goto bad;
19774  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
19775  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
19776  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
19777  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
19778  return module;
19779 bad:
19780  Py_XDECREF(module);
19781  return NULL;
19782 }
19783 
19784 
19785 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
19786 #endif
19787 #endif
19788 {
19789  PyObject *__pyx_t_1 = NULL;
19790  PyObject *__pyx_t_2 = NULL;
19791  PyObject *__pyx_t_3 = NULL;
19792  int __pyx_t_4;
19793  __Pyx_RefNannyDeclarations
19794  #if CYTHON_PEP489_MULTI_PHASE_INIT
19795  if (__pyx_m) {
19796  if (__pyx_m == __pyx_pyinit_module) return 0;
19797  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
19798  return -1;
19799  }
19800  #elif PY_MAJOR_VERSION >= 3
19801  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
19802  #endif
19803  #if CYTHON_REFNANNY
19804 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
19805 if (!__Pyx_RefNanny) {
19806  PyErr_Clear();
19807  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
19808  if (!__Pyx_RefNanny)
19809  Py_FatalError("failed to import 'refnanny' module");
19810 }
19811 #endif
19812  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19813  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19814  #ifdef __Pxy_PyFrame_Initialize_Offsets
19815  __Pxy_PyFrame_Initialize_Offsets();
19816  #endif
19817  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
19818  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
19819  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
19820  #ifdef __Pyx_CyFunction_USED
19821  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19822  #endif
19823  #ifdef __Pyx_FusedFunction_USED
19824  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19825  #endif
19826  #ifdef __Pyx_Coroutine_USED
19827  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19828  #endif
19829  #ifdef __Pyx_Generator_USED
19830  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19831  #endif
19832  #ifdef __Pyx_AsyncGen_USED
19833  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19834  #endif
19835  #ifdef __Pyx_StopAsyncIteration_USED
19836  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19837  #endif
19838  /*--- Library function declarations ---*/
19839  /*--- Threads initialization code ---*/
19840  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
19841  #ifdef WITH_THREAD /* Python build with threading support? */
19842  PyEval_InitThreads();
19843  #endif
19844  #endif
19845  /*--- Module creation code ---*/
19846  #if CYTHON_PEP489_MULTI_PHASE_INIT
19847  __pyx_m = __pyx_pyinit_module;
19848  Py_INCREF(__pyx_m);
19849  #else
19850  #if PY_MAJOR_VERSION < 3
19851  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19852  #else
19853  __pyx_m = PyModule_Create(&__pyx_moduledef);
19854  #endif
19855  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
19856  #endif
19857  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
19858  Py_INCREF(__pyx_d);
19859  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
19860  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
19861  #if CYTHON_COMPILING_IN_PYPY
19862  Py_INCREF(__pyx_b);
19863  #endif
19864  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19865  /*--- Initialize various global constants etc. ---*/
19866  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19867  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
19868  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19869  #endif
19870  if (__pyx_module_is_main_PyClical) {
19871  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19872  }
19873  #if PY_MAJOR_VERSION >= 3
19874  {
19875  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
19876  if (!PyDict_GetItemString(modules, "PyClical")) {
19877  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
19878  }
19879  }
19880  #endif
19881  /*--- Builtin init code ---*/
19882  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19883  /*--- Constants init code ---*/
19884  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19885  /*--- Global type/function init code ---*/
19886  (void)__Pyx_modinit_global_init_code();
19887  (void)__Pyx_modinit_variable_export_code();
19888  (void)__Pyx_modinit_function_export_code();
19889  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
19890  (void)__Pyx_modinit_type_import_code();
19891  (void)__Pyx_modinit_variable_import_code();
19892  (void)__Pyx_modinit_function_import_code();
19893  /*--- Execution code ---*/
19894  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
19895  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19896  #endif
19897 
19898  /* "PyClical.pyx":28
19899  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
19900  *
19901  * import math # <<<<<<<<<<<<<<
19902  * import numbers
19903  * import collections
19904  */
19905  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
19906  __Pyx_GOTREF(__pyx_t_1);
19907  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
19908  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19909 
19910  /* "PyClical.pyx":29
19911  *
19912  * import math
19913  * import numbers # <<<<<<<<<<<<<<
19914  * import collections
19915  *
19916  */
19917  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
19918  __Pyx_GOTREF(__pyx_t_1);
19919  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
19920  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19921 
19922  /* "PyClical.pyx":30
19923  * import math
19924  * import numbers
19925  * import collections # <<<<<<<<<<<<<<
19926  *
19927  * __version__ = "0.8.2"
19928  */
19929  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
19930  __Pyx_GOTREF(__pyx_t_1);
19931  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
19932  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19933 
19934  /* "PyClical.pyx":32
19935  * import collections
19936  *
19937  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
19938  *
19939  * from PyClical cimport *
19940  */
19941  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
19942 
19943  /* "PyClical.pyx":404
19944  * return index_set_to_str( self.unwrap() ).c_str()
19945  *
19946  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19947  * """
19948  * Tests for functions that Doctest cannot see.
19949  */
19950  __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)
19951  __Pyx_GOTREF(__pyx_t_1);
19952  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
19953  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19954 
19955  /* "PyClical.pyx":1243
19956  * return clifford_to_str( self.unwrap() ).c_str()
19957  *
19958  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19959  * """
19960  * Tests for functions that Doctest cannot see.
19961  */
19962  __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)
19963  __Pyx_GOTREF(__pyx_t_1);
19964  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
19965  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19966 
19967  /* "PyClical.pyx":1856
19968  *
19969  * # Some abbreviations.
19970  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19971  * pi = tau / 2.0
19972  *
19973  */
19974  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
19975  __Pyx_GOTREF(__pyx_t_1);
19976  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
19977  __Pyx_GOTREF(__pyx_t_2);
19978  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19979  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
19980  __Pyx_GOTREF(__pyx_t_1);
19981  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19982  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
19983  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19984 
19985  /* "PyClical.pyx":1857
19986  * # Some abbreviations.
19987  * tau = atan(clifford(1.0)) * 8.0
19988  * pi = tau / 2.0 # <<<<<<<<<<<<<<
19989  *
19990  * cl = clifford
19991  */
19992  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
19993  __Pyx_GOTREF(__pyx_t_1);
19994  __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
19995  __Pyx_GOTREF(__pyx_t_2);
19996  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19997  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
19998  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19999 
20000  /* "PyClical.pyx":1859
20001  * pi = tau / 2.0
20002  *
20003  * cl = clifford # <<<<<<<<<<<<<<
20004  * """
20005  * Abbreviation for clifford.
20006  */
20007  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20008 
20009  /* "PyClical.pyx":1879
20010  * """
20011  *
20012  * ist = index_set # <<<<<<<<<<<<<<
20013  * """
20014  * Abbreviation for index_set.
20015  */
20016  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20017 
20018  /* "PyClical.pyx":1887
20019  * """
20020  *
20021  * def e(obj): # <<<<<<<<<<<<<<
20022  * """
20023  * Abbreviation for clifford(index_set(obj)).
20024  */
20025  __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)
20026  __Pyx_GOTREF(__pyx_t_2);
20027  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20028  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20029 
20030  /* "PyClical.pyx":1900
20031  * return clifford(index_set(obj))
20032  *
20033  * def istpq(p, q): # <<<<<<<<<<<<<<
20034  * """
20035  * Abbreviation for index_set({-q,...p}).
20036  */
20037  __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)
20038  __Pyx_GOTREF(__pyx_t_2);
20039  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20040  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20041 
20042  /* "PyClical.pyx":1909
20043  * return index_set(set(range(-q,p+1)))
20044  *
20045  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20046  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20047  *
20048  */
20049  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20050  __Pyx_GOTREF(__pyx_t_2);
20051  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20052  __Pyx_GOTREF(__pyx_t_1);
20053  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20054  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20055  __Pyx_GOTREF(__pyx_t_2);
20056  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error)
20057  __Pyx_GOTREF(__pyx_t_3);
20058  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20059  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20060  __Pyx_GOTREF(__pyx_t_2);
20061  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20062  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20063  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20064  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20065 
20066  /* "PyClical.pyx":1910
20067  *
20068  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20069  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20070  *
20071  * # Doctest interface.
20072  */
20073  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20074  __Pyx_GOTREF(__pyx_t_2);
20075  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1910, __pyx_L1_error)
20076  __Pyx_GOTREF(__pyx_t_3);
20077  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20078  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20079  __Pyx_GOTREF(__pyx_t_2);
20080  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
20081  __Pyx_GOTREF(__pyx_t_1);
20082  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20083  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20084  __Pyx_GOTREF(__pyx_t_2);
20085  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20086  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20087  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20088  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20089 
20090  /* "PyClical.pyx":1913
20091  *
20092  * # Doctest interface.
20093  * def _test(): # <<<<<<<<<<<<<<
20094  * import PyClical, doctest
20095  * return doctest.testmod(PyClical)
20096  */
20097  __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)
20098  __Pyx_GOTREF(__pyx_t_2);
20099  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20100  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20101 
20102  /* "PyClical.pyx":1917
20103  * return doctest.testmod(PyClical)
20104  *
20105  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20106  * _test()
20107  */
20108  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20109  __Pyx_GOTREF(__pyx_t_2);
20110  __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)
20111  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20112  if (__pyx_t_4) {
20113 
20114  /* "PyClical.pyx":1918
20115  *
20116  * if __name__ == "__main__":
20117  * _test() # <<<<<<<<<<<<<<
20118  */
20119  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20120  __Pyx_GOTREF(__pyx_t_2);
20121  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20122  __Pyx_GOTREF(__pyx_t_1);
20123  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20124  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20125 
20126  /* "PyClical.pyx":1917
20127  * return doctest.testmod(PyClical)
20128  *
20129  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20130  * _test()
20131  */
20132  }
20133 
20134  /* "PyClical.pyx":1
20135  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20136  * # distutils: language = c++
20137  * #
20138  */
20139  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20140  __Pyx_GOTREF(__pyx_t_1);
20141  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)
20142  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)
20143  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)
20144  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)
20145  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)
20146  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)
20147  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)
20148  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)
20149  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)
20150  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)
20151  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)
20152  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)
20153  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)
20154  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)
20155  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)
20156  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)
20157  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)
20158  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)
20159  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)
20160  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)
20161  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)
20162  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)
20163  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)
20164  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)
20165  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)
20166  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)
20167  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)
20168  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)
20169  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)
20170  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)
20171  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)
20172  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)
20173  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)
20174  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)
20175  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)
20176  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)
20177  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)
20178  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)
20179  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)
20180  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)
20181  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)
20182  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)
20183  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)
20184  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)
20185  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)
20186  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)
20187  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)
20188  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)
20189  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)
20190  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)
20191  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)
20192  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)
20193  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)
20194  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)
20195  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)
20196  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)
20197  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)
20198  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)
20199  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)
20200  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)
20201  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)
20202  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)
20203  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)
20204  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)
20205  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)
20206  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)
20207  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)
20208  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)
20209  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)
20210  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)
20211  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)
20212  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)
20213  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)
20214  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)
20215  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)
20216  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)
20217  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)
20218  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)
20219  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)
20220  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)
20221  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)
20222  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)
20223  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)
20224  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)
20225  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)
20226  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)
20227  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)
20228  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)
20229  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)
20230  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)
20231  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)
20232  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)
20233  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)
20234  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)
20235  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)
20236  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)
20237  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)
20238  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)
20239  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)
20240  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)
20241  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)
20242  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)
20243  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)
20244  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)
20245  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)
20246  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)
20247  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)
20248  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20249  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20250 
20251  /*--- Wrapped vars code ---*/
20252 
20253  goto __pyx_L0;
20254  __pyx_L1_error:;
20255  __Pyx_XDECREF(__pyx_t_1);
20256  __Pyx_XDECREF(__pyx_t_2);
20257  __Pyx_XDECREF(__pyx_t_3);
20258  if (__pyx_m) {
20259  if (__pyx_d) {
20260  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20261  }
20262  Py_CLEAR(__pyx_m);
20263  } else if (!PyErr_Occurred()) {
20264  PyErr_SetString(PyExc_ImportError, "init PyClical");
20265  }
20266  __pyx_L0:;
20267  __Pyx_RefNannyFinishContext();
20268  #if CYTHON_PEP489_MULTI_PHASE_INIT
20269  return (__pyx_m != NULL) ? 0 : -1;
20270  #elif PY_MAJOR_VERSION >= 3
20271  return __pyx_m;
20272  #else
20273  return;
20274  #endif
20275 }
20276 
20277 /* --- Runtime support code --- */
20278 /* Refnanny */
20279 #if CYTHON_REFNANNY
20280 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20281  PyObject *m = NULL, *p = NULL;
20282  void *r = NULL;
20283  m = PyImport_ImportModule(modname);
20284  if (!m) goto end;
20285  p = PyObject_GetAttrString(m, "RefNannyAPI");
20286  if (!p) goto end;
20287  r = PyLong_AsVoidPtr(p);
20288 end:
20289  Py_XDECREF(p);
20290  Py_XDECREF(m);
20291  return (__Pyx_RefNannyAPIStruct *)r;
20292 }
20293 #endif
20294 
20295 /* PyObjectGetAttrStr */
20296 #if CYTHON_USE_TYPE_SLOTS
20297 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20298  PyTypeObject* tp = Py_TYPE(obj);
20299  if (likely(tp->tp_getattro))
20300  return tp->tp_getattro(obj, attr_name);
20301 #if PY_MAJOR_VERSION < 3
20302  if (likely(tp->tp_getattr))
20303  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20304 #endif
20305  return PyObject_GetAttr(obj, attr_name);
20306 }
20307 #endif
20308 
20309 /* GetBuiltinName */
20310 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20311  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20312  if (unlikely(!result)) {
20313  PyErr_Format(PyExc_NameError,
20314 #if PY_MAJOR_VERSION >= 3
20315  "name '%U' is not defined", name);
20316 #else
20317  "name '%.200s' is not defined", PyString_AS_STRING(name));
20318 #endif
20319  }
20320  return result;
20321 }
20322 
20323 /* PyCFunctionFastCall */
20324 #if CYTHON_FAST_PYCCALL
20325 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20326  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20327  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20328  PyObject *self = PyCFunction_GET_SELF(func);
20329  int flags = PyCFunction_GET_FLAGS(func);
20330  assert(PyCFunction_Check(func));
20331  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
20332  assert(nargs >= 0);
20333  assert(nargs == 0 || args != NULL);
20334  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20335  because it may clear it (directly or indirectly) and so the
20336  caller loses its exception */
20337  assert(!PyErr_Occurred());
20338  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20339  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
20340  } else {
20341  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
20342  }
20343 }
20344 #endif
20345 
20346 /* PyFunctionFastCall */
20347 #if CYTHON_FAST_PYCALL
20348 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20349  PyObject *globals) {
20350  PyFrameObject *f;
20351  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20352  PyObject **fastlocals;
20353  Py_ssize_t i;
20354  PyObject *result;
20355  assert(globals != NULL);
20356  /* XXX Perhaps we should create a specialized
20357  PyFrame_New() that doesn't take locals, but does
20358  take builtins without sanity checking them.
20359  */
20360  assert(tstate != NULL);
20361  f = PyFrame_New(tstate, co, globals, NULL);
20362  if (f == NULL) {
20363  return NULL;
20364  }
20365  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
20366  for (i = 0; i < na; i++) {
20367  Py_INCREF(*args);
20368  fastlocals[i] = *args++;
20369  }
20370  result = PyEval_EvalFrameEx(f,0);
20371  ++tstate->recursion_depth;
20372  Py_DECREF(f);
20373  --tstate->recursion_depth;
20374  return result;
20375 }
20376 #if 1 || PY_VERSION_HEX < 0x030600B1
20377 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
20378  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20379  PyObject *globals = PyFunction_GET_GLOBALS(func);
20380  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20381  PyObject *closure;
20382 #if PY_MAJOR_VERSION >= 3
20383  PyObject *kwdefs;
20384 #endif
20385  PyObject *kwtuple, **k;
20386  PyObject **d;
20387  Py_ssize_t nd;
20388  Py_ssize_t nk;
20389  PyObject *result;
20390  assert(kwargs == NULL || PyDict_Check(kwargs));
20391  nk = kwargs ? PyDict_Size(kwargs) : 0;
20392  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20393  return NULL;
20394  }
20395  if (
20396 #if PY_MAJOR_VERSION >= 3
20397  co->co_kwonlyargcount == 0 &&
20398 #endif
20399  likely(kwargs == NULL || nk == 0) &&
20400  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20401  if (argdefs == NULL && co->co_argcount == nargs) {
20402  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20403  goto done;
20404  }
20405  else if (nargs == 0 && argdefs != NULL
20406  && co->co_argcount == Py_SIZE(argdefs)) {
20407  /* function called with no arguments, but all parameters have
20408  a default value: use default values as arguments .*/
20409  args = &PyTuple_GET_ITEM(argdefs, 0);
20410  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20411  goto done;
20412  }
20413  }
20414  if (kwargs != NULL) {
20415  Py_ssize_t pos, i;
20416  kwtuple = PyTuple_New(2 * nk);
20417  if (kwtuple == NULL) {
20418  result = NULL;
20419  goto done;
20420  }
20421  k = &PyTuple_GET_ITEM(kwtuple, 0);
20422  pos = i = 0;
20423  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20424  Py_INCREF(k[i]);
20425  Py_INCREF(k[i+1]);
20426  i += 2;
20427  }
20428  nk = i / 2;
20429  }
20430  else {
20431  kwtuple = NULL;
20432  k = NULL;
20433  }
20434  closure = PyFunction_GET_CLOSURE(func);
20435 #if PY_MAJOR_VERSION >= 3
20436  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20437 #endif
20438  if (argdefs != NULL) {
20439  d = &PyTuple_GET_ITEM(argdefs, 0);
20440  nd = Py_SIZE(argdefs);
20441  }
20442  else {
20443  d = NULL;
20444  nd = 0;
20445  }
20446 #if PY_MAJOR_VERSION >= 3
20447  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20448  args, nargs,
20449  k, (int)nk,
20450  d, (int)nd, kwdefs, closure);
20451 #else
20452  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20453  args, nargs,
20454  k, (int)nk,
20455  d, (int)nd, closure);
20456 #endif
20457  Py_XDECREF(kwtuple);
20458 done:
20459  Py_LeaveRecursiveCall();
20460  return result;
20461 }
20462 #endif
20463 #endif
20464 
20465 /* PyObjectCall */
20466 #if CYTHON_COMPILING_IN_CPYTHON
20467 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20468  PyObject *result;
20469  ternaryfunc call = func->ob_type->tp_call;
20470  if (unlikely(!call))
20471  return PyObject_Call(func, arg, kw);
20472  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20473  return NULL;
20474  result = (*call)(func, arg, kw);
20475  Py_LeaveRecursiveCall();
20476  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20477  PyErr_SetString(
20478  PyExc_SystemError,
20479  "NULL result without error in PyObject_Call");
20480  }
20481  return result;
20482 }
20483 #endif
20484 
20485 /* PyObjectCallMethO */
20486 #if CYTHON_COMPILING_IN_CPYTHON
20487 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20488  PyObject *self, *result;
20489  PyCFunction cfunc;
20490  cfunc = PyCFunction_GET_FUNCTION(func);
20491  self = PyCFunction_GET_SELF(func);
20492  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20493  return NULL;
20494  result = cfunc(self, arg);
20495  Py_LeaveRecursiveCall();
20496  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20497  PyErr_SetString(
20498  PyExc_SystemError,
20499  "NULL result without error in PyObject_Call");
20500  }
20501  return result;
20502 }
20503 #endif
20504 
20505 /* PyObjectCallOneArg */
20506 #if CYTHON_COMPILING_IN_CPYTHON
20507 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20508  PyObject *result;
20509  PyObject *args = PyTuple_New(1);
20510  if (unlikely(!args)) return NULL;
20511  Py_INCREF(arg);
20512  PyTuple_SET_ITEM(args, 0, arg);
20513  result = __Pyx_PyObject_Call(func, args, NULL);
20514  Py_DECREF(args);
20515  return result;
20516 }
20517 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20518 #if CYTHON_FAST_PYCALL
20519  if (PyFunction_Check(func)) {
20520  return __Pyx_PyFunction_FastCall(func, &arg, 1);
20521  }
20522 #endif
20523  if (likely(PyCFunction_Check(func))) {
20524  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20525  return __Pyx_PyObject_CallMethO(func, arg);
20526 #if CYTHON_FAST_PYCCALL
20527  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
20528  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
20529 #endif
20530  }
20531  }
20532  return __Pyx__PyObject_CallOneArg(func, arg);
20533 }
20534 #else
20535 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20536  PyObject *result;
20537  PyObject *args = PyTuple_Pack(1, arg);
20538  if (unlikely(!args)) return NULL;
20539  result = __Pyx_PyObject_Call(func, args, NULL);
20540  Py_DECREF(args);
20541  return result;
20542 }
20543 #endif
20544 
20545 /* PyErrFetchRestore */
20546 #if CYTHON_FAST_THREAD_STATE
20547 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20548  PyObject *tmp_type, *tmp_value, *tmp_tb;
20549  tmp_type = tstate->curexc_type;
20550  tmp_value = tstate->curexc_value;
20551  tmp_tb = tstate->curexc_traceback;
20552  tstate->curexc_type = type;
20553  tstate->curexc_value = value;
20554  tstate->curexc_traceback = tb;
20555  Py_XDECREF(tmp_type);
20556  Py_XDECREF(tmp_value);
20557  Py_XDECREF(tmp_tb);
20558 }
20559 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20560  *type = tstate->curexc_type;
20561  *value = tstate->curexc_value;
20562  *tb = tstate->curexc_traceback;
20563  tstate->curexc_type = 0;
20564  tstate->curexc_value = 0;
20565  tstate->curexc_traceback = 0;
20566 }
20567 #endif
20568 
20569 /* WriteUnraisableException */
20570 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20571  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20572  int full_traceback, CYTHON_UNUSED int nogil) {
20573  PyObject *old_exc, *old_val, *old_tb;
20574  PyObject *ctx;
20575  __Pyx_PyThreadState_declare
20576 #ifdef WITH_THREAD
20577  PyGILState_STATE state;
20578  if (nogil)
20579  state = PyGILState_Ensure();
20580 #ifdef _MSC_VER
20581  else state = (PyGILState_STATE)-1;
20582 #endif
20583 #endif
20584  __Pyx_PyThreadState_assign
20585  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20586  if (full_traceback) {
20587  Py_XINCREF(old_exc);
20588  Py_XINCREF(old_val);
20589  Py_XINCREF(old_tb);
20590  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20591  PyErr_PrintEx(1);
20592  }
20593  #if PY_MAJOR_VERSION < 3
20594  ctx = PyString_FromString(name);
20595  #else
20596  ctx = PyUnicode_FromString(name);
20597  #endif
20598  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20599  if (!ctx) {
20600  PyErr_WriteUnraisable(Py_None);
20601  } else {
20602  PyErr_WriteUnraisable(ctx);
20603  Py_DECREF(ctx);
20604  }
20605 #ifdef WITH_THREAD
20606  if (nogil)
20607  PyGILState_Release(state);
20608 #endif
20609 }
20610 
20611 /* PyDictVersioning */
20612 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
20613 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
20614  PyObject *dict = Py_TYPE(obj)->tp_dict;
20615  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
20616 }
20617 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
20618  PyObject **dictptr = NULL;
20619  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
20620  if (offset) {
20621 #if CYTHON_COMPILING_IN_CPYTHON
20622  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
20623 #else
20624  dictptr = _PyObject_GetDictPtr(obj);
20625 #endif
20626  }
20627  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
20628 }
20629 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
20630  PyObject *dict = Py_TYPE(obj)->tp_dict;
20631  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
20632  return 0;
20633  return obj_dict_version == __Pyx_get_object_dict_version(obj);
20634 }
20635 #endif
20636 
20637 /* PyObjectCallNoArg */
20638 #if CYTHON_COMPILING_IN_CPYTHON
20639 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20640 #if CYTHON_FAST_PYCALL
20641  if (PyFunction_Check(func)) {
20642  return __Pyx_PyFunction_FastCall(func, NULL, 0);
20643  }
20644 #endif
20645 #ifdef __Pyx_CyFunction_USED
20646  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
20647 #else
20648  if (likely(PyCFunction_Check(func)))
20649 #endif
20650  {
20651  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20652  return __Pyx_PyObject_CallMethO(func, NULL);
20653  }
20654  }
20655  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20656 }
20657 #endif
20658 
20659 /* RaiseDoubleKeywords */
20660 static void __Pyx_RaiseDoubleKeywordsError(
20661  const char* func_name,
20662  PyObject* kw_name)
20663 {
20664  PyErr_Format(PyExc_TypeError,
20665  #if PY_MAJOR_VERSION >= 3
20666  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20667  #else
20668  "%s() got multiple values for keyword argument '%s'", func_name,
20669  PyString_AsString(kw_name));
20670  #endif
20671 }
20672 
20673 /* ParseKeywords */
20674 static int __Pyx_ParseOptionalKeywords(
20675  PyObject *kwds,
20676  PyObject **argnames[],
20677  PyObject *kwds2,
20678  PyObject *values[],
20679  Py_ssize_t num_pos_args,
20680  const char* function_name)
20681 {
20682  PyObject *key = 0, *value = 0;
20683  Py_ssize_t pos = 0;
20684  PyObject*** name;
20685  PyObject*** first_kw_arg = argnames + num_pos_args;
20686  while (PyDict_Next(kwds, &pos, &key, &value)) {
20687  name = first_kw_arg;
20688  while (*name && (**name != key)) name++;
20689  if (*name) {
20690  values[name-argnames] = value;
20691  continue;
20692  }
20693  name = first_kw_arg;
20694  #if PY_MAJOR_VERSION < 3
20695  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20696  while (*name) {
20697  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20698  && _PyString_Eq(**name, key)) {
20699  values[name-argnames] = value;
20700  break;
20701  }
20702  name++;
20703  }
20704  if (*name) continue;
20705  else {
20706  PyObject*** argname = argnames;
20707  while (argname != first_kw_arg) {
20708  if ((**argname == key) || (
20709  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20710  && _PyString_Eq(**argname, key))) {
20711  goto arg_passed_twice;
20712  }
20713  argname++;
20714  }
20715  }
20716  } else
20717  #endif
20718  if (likely(PyUnicode_Check(key))) {
20719  while (*name) {
20720  int cmp = (**name == key) ? 0 :
20721  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20722  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20723  #endif
20724  PyUnicode_Compare(**name, key);
20725  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20726  if (cmp == 0) {
20727  values[name-argnames] = value;
20728  break;
20729  }
20730  name++;
20731  }
20732  if (*name) continue;
20733  else {
20734  PyObject*** argname = argnames;
20735  while (argname != first_kw_arg) {
20736  int cmp = (**argname == key) ? 0 :
20737  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20738  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20739  #endif
20740  PyUnicode_Compare(**argname, key);
20741  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20742  if (cmp == 0) goto arg_passed_twice;
20743  argname++;
20744  }
20745  }
20746  } else
20747  goto invalid_keyword_type;
20748  if (kwds2) {
20749  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
20750  } else {
20751  goto invalid_keyword;
20752  }
20753  }
20754  return 0;
20755 arg_passed_twice:
20756  __Pyx_RaiseDoubleKeywordsError(function_name, key);
20757  goto bad;
20758 invalid_keyword_type:
20759  PyErr_Format(PyExc_TypeError,
20760  "%.200s() keywords must be strings", function_name);
20761  goto bad;
20762 invalid_keyword:
20763  PyErr_Format(PyExc_TypeError,
20764  #if PY_MAJOR_VERSION < 3
20765  "%.200s() got an unexpected keyword argument '%.200s'",
20766  function_name, PyString_AsString(key));
20767  #else
20768  "%s() got an unexpected keyword argument '%U'",
20769  function_name, key);
20770  #endif
20771 bad:
20772  return -1;
20773 }
20774 
20775 /* RaiseArgTupleInvalid */
20776 static void __Pyx_RaiseArgtupleInvalid(
20777  const char* func_name,
20778  int exact,
20779  Py_ssize_t num_min,
20780  Py_ssize_t num_max,
20781  Py_ssize_t num_found)
20782 {
20783  Py_ssize_t num_expected;
20784  const char *more_or_less;
20785  if (num_found < num_min) {
20786  num_expected = num_min;
20787  more_or_less = "at least";
20788  } else {
20789  num_expected = num_max;
20790  more_or_less = "at most";
20791  }
20792  if (exact) {
20793  more_or_less = "exactly";
20794  }
20795  PyErr_Format(PyExc_TypeError,
20796  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
20797  func_name, more_or_less, num_expected,
20798  (num_expected == 1) ? "" : "s", num_found);
20799 }
20800 
20801 /* GetModuleGlobalName */
20802 #if CYTHON_USE_DICT_VERSIONS
20803 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
20804 #else
20805 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
20806 #endif
20807 {
20808  PyObject *result;
20809 #if !CYTHON_AVOID_BORROWED_REFS
20810 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
20811  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
20812  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20813  if (likely(result)) {
20814  return __Pyx_NewRef(result);
20815  } else if (unlikely(PyErr_Occurred())) {
20816  return NULL;
20817  }
20818 #else
20819  result = PyDict_GetItem(__pyx_d, name);
20820  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20821  if (likely(result)) {
20822  return __Pyx_NewRef(result);
20823  }
20824 #endif
20825 #else
20826  result = PyObject_GetItem(__pyx_d, name);
20827  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20828  if (likely(result)) {
20829  return __Pyx_NewRef(result);
20830  }
20831  PyErr_Clear();
20832 #endif
20833  return __Pyx_GetBuiltinName(name);
20834 }
20835 
20836 /* GetTopmostException */
20837 #if CYTHON_USE_EXC_INFO_STACK
20838 static _PyErr_StackItem *
20839 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
20840 {
20841  _PyErr_StackItem *exc_info = tstate->exc_info;
20842  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
20843  exc_info->previous_item != NULL)
20844  {
20845  exc_info = exc_info->previous_item;
20846  }
20847  return exc_info;
20848 }
20849 #endif
20850 
20851 /* SaveResetException */
20852 #if CYTHON_FAST_THREAD_STATE
20853 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20854  #if CYTHON_USE_EXC_INFO_STACK
20855  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
20856  *type = exc_info->exc_type;
20857  *value = exc_info->exc_value;
20858  *tb = exc_info->exc_traceback;
20859  #else
20860  *type = tstate->exc_type;
20861  *value = tstate->exc_value;
20862  *tb = tstate->exc_traceback;
20863  #endif
20864  Py_XINCREF(*type);
20865  Py_XINCREF(*value);
20866  Py_XINCREF(*tb);
20867 }
20868 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20869  PyObject *tmp_type, *tmp_value, *tmp_tb;
20870  #if CYTHON_USE_EXC_INFO_STACK
20871  _PyErr_StackItem *exc_info = tstate->exc_info;
20872  tmp_type = exc_info->exc_type;
20873  tmp_value = exc_info->exc_value;
20874  tmp_tb = exc_info->exc_traceback;
20875  exc_info->exc_type = type;
20876  exc_info->exc_value = value;
20877  exc_info->exc_traceback = tb;
20878  #else
20879  tmp_type = tstate->exc_type;
20880  tmp_value = tstate->exc_value;
20881  tmp_tb = tstate->exc_traceback;
20882  tstate->exc_type = type;
20883  tstate->exc_value = value;
20884  tstate->exc_traceback = tb;
20885  #endif
20886  Py_XDECREF(tmp_type);
20887  Py_XDECREF(tmp_value);
20888  Py_XDECREF(tmp_tb);
20889 }
20890 #endif
20891 
20892 /* PyErrExceptionMatches */
20893 #if CYTHON_FAST_THREAD_STATE
20894 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
20895  Py_ssize_t i, n;
20896  n = PyTuple_GET_SIZE(tuple);
20897 #if PY_MAJOR_VERSION >= 3
20898  for (i=0; i<n; i++) {
20899  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
20900  }
20901 #endif
20902  for (i=0; i<n; i++) {
20903  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
20904  }
20905  return 0;
20906 }
20907 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
20908  PyObject *exc_type = tstate->curexc_type;
20909  if (exc_type == err) return 1;
20910  if (unlikely(!exc_type)) return 0;
20911  if (unlikely(PyTuple_Check(err)))
20912  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
20913  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
20914 }
20915 #endif
20916 
20917 /* GetException */
20918 #if CYTHON_FAST_THREAD_STATE
20919 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
20920 #else
20921 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
20922 #endif
20923 {
20924  PyObject *local_type, *local_value, *local_tb;
20925 #if CYTHON_FAST_THREAD_STATE
20926  PyObject *tmp_type, *tmp_value, *tmp_tb;
20927  local_type = tstate->curexc_type;
20928  local_value = tstate->curexc_value;
20929  local_tb = tstate->curexc_traceback;
20930  tstate->curexc_type = 0;
20931  tstate->curexc_value = 0;
20932  tstate->curexc_traceback = 0;
20933 #else
20934  PyErr_Fetch(&local_type, &local_value, &local_tb);
20935 #endif
20936  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20937 #if CYTHON_FAST_THREAD_STATE
20938  if (unlikely(tstate->curexc_type))
20939 #else
20940  if (unlikely(PyErr_Occurred()))
20941 #endif
20942  goto bad;
20943  #if PY_MAJOR_VERSION >= 3
20944  if (local_tb) {
20945  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20946  goto bad;
20947  }
20948  #endif
20949  Py_XINCREF(local_tb);
20950  Py_XINCREF(local_type);
20951  Py_XINCREF(local_value);
20952  *type = local_type;
20953  *value = local_value;
20954  *tb = local_tb;
20955 #if CYTHON_FAST_THREAD_STATE
20956  #if CYTHON_USE_EXC_INFO_STACK
20957  {
20958  _PyErr_StackItem *exc_info = tstate->exc_info;
20959  tmp_type = exc_info->exc_type;
20960  tmp_value = exc_info->exc_value;
20961  tmp_tb = exc_info->exc_traceback;
20962  exc_info->exc_type = local_type;
20963  exc_info->exc_value = local_value;
20964  exc_info->exc_traceback = local_tb;
20965  }
20966  #else
20967  tmp_type = tstate->exc_type;
20968  tmp_value = tstate->exc_value;
20969  tmp_tb = tstate->exc_traceback;
20970  tstate->exc_type = local_type;
20971  tstate->exc_value = local_value;
20972  tstate->exc_traceback = local_tb;
20973  #endif
20974  Py_XDECREF(tmp_type);
20975  Py_XDECREF(tmp_value);
20976  Py_XDECREF(tmp_tb);
20977 #else
20978  PyErr_SetExcInfo(local_type, local_value, local_tb);
20979 #endif
20980  return 0;
20981 bad:
20982  *type = 0;
20983  *value = 0;
20984  *tb = 0;
20985  Py_XDECREF(local_type);
20986  Py_XDECREF(local_value);
20987  Py_XDECREF(local_tb);
20988  return -1;
20989 }
20990 
20991 /* RaiseException */
20992 #if PY_MAJOR_VERSION < 3
20993 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
20994  CYTHON_UNUSED PyObject *cause) {
20995  __Pyx_PyThreadState_declare
20996  Py_XINCREF(type);
20997  if (!value || value == Py_None)
20998  value = NULL;
20999  else
21000  Py_INCREF(value);
21001  if (!tb || tb == Py_None)
21002  tb = NULL;
21003  else {
21004  Py_INCREF(tb);
21005  if (!PyTraceBack_Check(tb)) {
21006  PyErr_SetString(PyExc_TypeError,
21007  "raise: arg 3 must be a traceback or None");
21008  goto raise_error;
21009  }
21010  }
21011  if (PyType_Check(type)) {
21012 #if CYTHON_COMPILING_IN_PYPY
21013  if (!value) {
21014  Py_INCREF(Py_None);
21015  value = Py_None;
21016  }
21017 #endif
21018  PyErr_NormalizeException(&type, &value, &tb);
21019  } else {
21020  if (value) {
21021  PyErr_SetString(PyExc_TypeError,
21022  "instance exception may not have a separate value");
21023  goto raise_error;
21024  }
21025  value = type;
21026  type = (PyObject*) Py_TYPE(type);
21027  Py_INCREF(type);
21028  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21029  PyErr_SetString(PyExc_TypeError,
21030  "raise: exception class must be a subclass of BaseException");
21031  goto raise_error;
21032  }
21033  }
21034  __Pyx_PyThreadState_assign
21035  __Pyx_ErrRestore(type, value, tb);
21036  return;
21037 raise_error:
21038  Py_XDECREF(value);
21039  Py_XDECREF(type);
21040  Py_XDECREF(tb);
21041  return;
21042 }
21043 #else
21044 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21045  PyObject* owned_instance = NULL;
21046  if (tb == Py_None) {
21047  tb = 0;
21048  } else if (tb && !PyTraceBack_Check(tb)) {
21049  PyErr_SetString(PyExc_TypeError,
21050  "raise: arg 3 must be a traceback or None");
21051  goto bad;
21052  }
21053  if (value == Py_None)
21054  value = 0;
21055  if (PyExceptionInstance_Check(type)) {
21056  if (value) {
21057  PyErr_SetString(PyExc_TypeError,
21058  "instance exception may not have a separate value");
21059  goto bad;
21060  }
21061  value = type;
21062  type = (PyObject*) Py_TYPE(value);
21063  } else if (PyExceptionClass_Check(type)) {
21064  PyObject *instance_class = NULL;
21065  if (value && PyExceptionInstance_Check(value)) {
21066  instance_class = (PyObject*) Py_TYPE(value);
21067  if (instance_class != type) {
21068  int is_subclass = PyObject_IsSubclass(instance_class, type);
21069  if (!is_subclass) {
21070  instance_class = NULL;
21071  } else if (unlikely(is_subclass == -1)) {
21072  goto bad;
21073  } else {
21074  type = instance_class;
21075  }
21076  }
21077  }
21078  if (!instance_class) {
21079  PyObject *args;
21080  if (!value)
21081  args = PyTuple_New(0);
21082  else if (PyTuple_Check(value)) {
21083  Py_INCREF(value);
21084  args = value;
21085  } else
21086  args = PyTuple_Pack(1, value);
21087  if (!args)
21088  goto bad;
21089  owned_instance = PyObject_Call(type, args, NULL);
21090  Py_DECREF(args);
21091  if (!owned_instance)
21092  goto bad;
21093  value = owned_instance;
21094  if (!PyExceptionInstance_Check(value)) {
21095  PyErr_Format(PyExc_TypeError,
21096  "calling %R should have returned an instance of "
21097  "BaseException, not %R",
21098  type, Py_TYPE(value));
21099  goto bad;
21100  }
21101  }
21102  } else {
21103  PyErr_SetString(PyExc_TypeError,
21104  "raise: exception class must be a subclass of BaseException");
21105  goto bad;
21106  }
21107  if (cause) {
21108  PyObject *fixed_cause;
21109  if (cause == Py_None) {
21110  fixed_cause = NULL;
21111  } else if (PyExceptionClass_Check(cause)) {
21112  fixed_cause = PyObject_CallObject(cause, NULL);
21113  if (fixed_cause == NULL)
21114  goto bad;
21115  } else if (PyExceptionInstance_Check(cause)) {
21116  fixed_cause = cause;
21117  Py_INCREF(fixed_cause);
21118  } else {
21119  PyErr_SetString(PyExc_TypeError,
21120  "exception causes must derive from "
21121  "BaseException");
21122  goto bad;
21123  }
21124  PyException_SetCause(value, fixed_cause);
21125  }
21126  PyErr_SetObject(type, value);
21127  if (tb) {
21128 #if CYTHON_COMPILING_IN_PYPY
21129  PyObject *tmp_type, *tmp_value, *tmp_tb;
21130  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21131  Py_INCREF(tb);
21132  PyErr_Restore(tmp_type, tmp_value, tb);
21133  Py_XDECREF(tmp_tb);
21134 #else
21135  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21136  PyObject* tmp_tb = tstate->curexc_traceback;
21137  if (tb != tmp_tb) {
21138  Py_INCREF(tb);
21139  tstate->curexc_traceback = tb;
21140  Py_XDECREF(tmp_tb);
21141  }
21142 #endif
21143  }
21144 bad:
21145  Py_XDECREF(owned_instance);
21146  return;
21147 }
21148 #endif
21149 
21150 /* PyIntBinop */
21151 #if !CYTHON_COMPILING_IN_PYPY
21152 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
21153  (void)inplace;
21154  (void)zerodivision_check;
21155  #if PY_MAJOR_VERSION < 3
21156  if (likely(PyInt_CheckExact(op1))) {
21157  const long b = intval;
21158  long x;
21159  long a = PyInt_AS_LONG(op1);
21160  x = (long)((unsigned long)a + b);
21161  if (likely((x^a) >= 0 || (x^b) >= 0))
21162  return PyInt_FromLong(x);
21163  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21164  }
21165  #endif
21166  #if CYTHON_USE_PYLONG_INTERNALS
21167  if (likely(PyLong_CheckExact(op1))) {
21168  const long b = intval;
21169  long a, x;
21170 #ifdef HAVE_LONG_LONG
21171  const PY_LONG_LONG llb = intval;
21172  PY_LONG_LONG lla, llx;
21173 #endif
21174  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21175  const Py_ssize_t size = Py_SIZE(op1);
21176  if (likely(__Pyx_sst_abs(size) <= 1)) {
21177  a = likely(size) ? digits[0] : 0;
21178  if (size == -1) a = -a;
21179  } else {
21180  switch (size) {
21181  case -2:
21182  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21183  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21184  break;
21185 #ifdef HAVE_LONG_LONG
21186  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21187  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21188  goto long_long;
21189 #endif
21190  }
21191  CYTHON_FALLTHROUGH;
21192  case 2:
21193  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21194  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21195  break;
21196 #ifdef HAVE_LONG_LONG
21197  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21198  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21199  goto long_long;
21200 #endif
21201  }
21202  CYTHON_FALLTHROUGH;
21203  case -3:
21204  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21205  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21206  break;
21207 #ifdef HAVE_LONG_LONG
21208  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21209  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]));
21210  goto long_long;
21211 #endif
21212  }
21213  CYTHON_FALLTHROUGH;
21214  case 3:
21215  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21216  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21217  break;
21218 #ifdef HAVE_LONG_LONG
21219  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21220  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]));
21221  goto long_long;
21222 #endif
21223  }
21224  CYTHON_FALLTHROUGH;
21225  case -4:
21226  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21227  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21228  break;
21229 #ifdef HAVE_LONG_LONG
21230  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21231  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]));
21232  goto long_long;
21233 #endif
21234  }
21235  CYTHON_FALLTHROUGH;
21236  case 4:
21237  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21238  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21239  break;
21240 #ifdef HAVE_LONG_LONG
21241  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21242  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]));
21243  goto long_long;
21244 #endif
21245  }
21246  CYTHON_FALLTHROUGH;
21247  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21248  }
21249  }
21250  x = a + b;
21251  return PyLong_FromLong(x);
21252 #ifdef HAVE_LONG_LONG
21253  long_long:
21254  llx = lla + llb;
21255  return PyLong_FromLongLong(llx);
21256 #endif
21257 
21258 
21259  }
21260  #endif
21261  if (PyFloat_CheckExact(op1)) {
21262  const long b = intval;
21263  double a = PyFloat_AS_DOUBLE(op1);
21264  double result;
21265  PyFPE_START_PROTECT("add", return NULL)
21266  result = ((double)a) + (double)b;
21267  PyFPE_END_PROTECT(result)
21268  return PyFloat_FromDouble(result);
21269  }
21270  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21271 }
21272 #endif
21273 
21274 /* SetItemInt */
21275 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21276  int r;
21277  if (!j) return -1;
21278  r = PyObject_SetItem(o, j, v);
21279  Py_DECREF(j);
21280  return r;
21281 }
21282 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21283  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21284 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21285  if (is_list || PyList_CheckExact(o)) {
21286  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21287  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
21288  PyObject* old = PyList_GET_ITEM(o, n);
21289  Py_INCREF(v);
21290  PyList_SET_ITEM(o, n, v);
21291  Py_DECREF(old);
21292  return 1;
21293  }
21294  } else {
21295  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21296  if (likely(m && m->sq_ass_item)) {
21297  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21298  Py_ssize_t l = m->sq_length(o);
21299  if (likely(l >= 0)) {
21300  i += l;
21301  } else {
21302  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21303  return -1;
21304  PyErr_Clear();
21305  }
21306  }
21307  return m->sq_ass_item(o, i, v);
21308  }
21309  }
21310 #else
21311 #if CYTHON_COMPILING_IN_PYPY
21312  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
21313 #else
21314  if (is_list || PySequence_Check(o))
21315 #endif
21316  {
21317  return PySequence_SetItem(o, i, v);
21318  }
21319 #endif
21320  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21321 }
21322 
21323 /* PyObjectCall2Args */
21324 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21325  PyObject *args, *result = NULL;
21326  #if CYTHON_FAST_PYCALL
21327  if (PyFunction_Check(function)) {
21328  PyObject *args[2] = {arg1, arg2};
21329  return __Pyx_PyFunction_FastCall(function, args, 2);
21330  }
21331  #endif
21332  #if CYTHON_FAST_PYCCALL
21333  if (__Pyx_PyFastCFunction_Check(function)) {
21334  PyObject *args[2] = {arg1, arg2};
21335  return __Pyx_PyCFunction_FastCall(function, args, 2);
21336  }
21337  #endif
21338  args = PyTuple_New(2);
21339  if (unlikely(!args)) goto done;
21340  Py_INCREF(arg1);
21341  PyTuple_SET_ITEM(args, 0, arg1);
21342  Py_INCREF(arg2);
21343  PyTuple_SET_ITEM(args, 1, arg2);
21344  Py_INCREF(function);
21345  result = __Pyx_PyObject_Call(function, args, NULL);
21346  Py_DECREF(args);
21347  Py_DECREF(function);
21348 done:
21349  return result;
21350 }
21351 
21352 /* ArgTypeTest */
21353 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21354 {
21355  if (unlikely(!type)) {
21356  PyErr_SetString(PyExc_SystemError, "Missing type object");
21357  return 0;
21358  }
21359  else if (exact) {
21360  #if PY_MAJOR_VERSION == 2
21361  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21362  #endif
21363  }
21364  else {
21365  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21366  }
21367  PyErr_Format(PyExc_TypeError,
21368  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21369  name, type->tp_name, Py_TYPE(obj)->tp_name);
21370  return 0;
21371 }
21372 
21373 /* Import */
21374 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21375  PyObject *empty_list = 0;
21376  PyObject *module = 0;
21377  PyObject *global_dict = 0;
21378  PyObject *empty_dict = 0;
21379  PyObject *list;
21380  #if PY_MAJOR_VERSION < 3
21381  PyObject *py_import;
21382  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21383  if (!py_import)
21384  goto bad;
21385  #endif
21386  if (from_list)
21387  list = from_list;
21388  else {
21389  empty_list = PyList_New(0);
21390  if (!empty_list)
21391  goto bad;
21392  list = empty_list;
21393  }
21394  global_dict = PyModule_GetDict(__pyx_m);
21395  if (!global_dict)
21396  goto bad;
21397  empty_dict = PyDict_New();
21398  if (!empty_dict)
21399  goto bad;
21400  {
21401  #if PY_MAJOR_VERSION >= 3
21402  if (level == -1) {
21403  if (strchr(__Pyx_MODULE_NAME, '.')) {
21404  module = PyImport_ImportModuleLevelObject(
21405  name, global_dict, empty_dict, list, 1);
21406  if (!module) {
21407  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21408  goto bad;
21409  PyErr_Clear();
21410  }
21411  }
21412  level = 0;
21413  }
21414  #endif
21415  if (!module) {
21416  #if PY_MAJOR_VERSION < 3
21417  PyObject *py_level = PyInt_FromLong(level);
21418  if (!py_level)
21419  goto bad;
21420  module = PyObject_CallFunctionObjArgs(py_import,
21421  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
21422  Py_DECREF(py_level);
21423  #else
21424  module = PyImport_ImportModuleLevelObject(
21425  name, global_dict, empty_dict, list, level);
21426  #endif
21427  }
21428  }
21429 bad:
21430  #if PY_MAJOR_VERSION < 3
21431  Py_XDECREF(py_import);
21432  #endif
21433  Py_XDECREF(empty_list);
21434  Py_XDECREF(empty_dict);
21435  return module;
21436 }
21437 
21438 /* PyObject_GenericGetAttrNoDict */
21439 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21440 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21441  PyErr_Format(PyExc_AttributeError,
21442 #if PY_MAJOR_VERSION >= 3
21443  "'%.50s' object has no attribute '%U'",
21444  tp->tp_name, attr_name);
21445 #else
21446  "'%.50s' object has no attribute '%.400s'",
21447  tp->tp_name, PyString_AS_STRING(attr_name));
21448 #endif
21449  return NULL;
21450 }
21451 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21452  PyObject *descr;
21453  PyTypeObject *tp = Py_TYPE(obj);
21454  if (unlikely(!PyString_Check(attr_name))) {
21455  return PyObject_GenericGetAttr(obj, attr_name);
21456  }
21457  assert(!tp->tp_dictoffset);
21458  descr = _PyType_Lookup(tp, attr_name);
21459  if (unlikely(!descr)) {
21460  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21461  }
21462  Py_INCREF(descr);
21463  #if PY_MAJOR_VERSION < 3
21464  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21465  #endif
21466  {
21467  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21468  if (unlikely(f)) {
21469  PyObject *res = f(descr, obj, (PyObject *)tp);
21470  Py_DECREF(descr);
21471  return res;
21472  }
21473  }
21474  return descr;
21475 }
21476 #endif
21477 
21478 /* PyObject_GenericGetAttr */
21479 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21480 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21481  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21482  return PyObject_GenericGetAttr(obj, attr_name);
21483  }
21484  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21485 }
21486 #endif
21487 
21488 /* SetVTable */
21489 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21490 #if PY_VERSION_HEX >= 0x02070000
21491  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21492 #else
21493  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21494 #endif
21495  if (!ob)
21496  goto bad;
21497  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21498  goto bad;
21499  Py_DECREF(ob);
21500  return 0;
21501 bad:
21502  Py_XDECREF(ob);
21503  return -1;
21504 }
21505 
21506 /* SetupReduce */
21507 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21508  int ret;
21509  PyObject *name_attr;
21510  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21511  if (likely(name_attr)) {
21512  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21513  } else {
21514  ret = -1;
21515  }
21516  if (unlikely(ret < 0)) {
21517  PyErr_Clear();
21518  ret = 0;
21519  }
21520  Py_XDECREF(name_attr);
21521  return ret;
21522 }
21523 static int __Pyx_setup_reduce(PyObject* type_obj) {
21524  int ret = 0;
21525  PyObject *object_reduce = NULL;
21526  PyObject *object_reduce_ex = NULL;
21527  PyObject *reduce = NULL;
21528  PyObject *reduce_ex = NULL;
21529  PyObject *reduce_cython = NULL;
21530  PyObject *setstate = NULL;
21531  PyObject *setstate_cython = NULL;
21532 #if CYTHON_USE_PYTYPE_LOOKUP
21533  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21534 #else
21535  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21536 #endif
21537 #if CYTHON_USE_PYTYPE_LOOKUP
21538  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21539 #else
21540  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21541 #endif
21542  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21543  if (reduce_ex == object_reduce_ex) {
21544 #if CYTHON_USE_PYTYPE_LOOKUP
21545  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21546 #else
21547  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21548 #endif
21549  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21550  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21551  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21552  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21553  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21554  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21555  if (!setstate) PyErr_Clear();
21556  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21557  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21558  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21559  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21560  }
21561  PyType_Modified((PyTypeObject*)type_obj);
21562  }
21563  }
21564  goto GOOD;
21565 BAD:
21566  if (!PyErr_Occurred())
21567  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21568  ret = -1;
21569 GOOD:
21570 #if !CYTHON_USE_PYTYPE_LOOKUP
21571  Py_XDECREF(object_reduce);
21572  Py_XDECREF(object_reduce_ex);
21573 #endif
21574  Py_XDECREF(reduce);
21575  Py_XDECREF(reduce_ex);
21576  Py_XDECREF(reduce_cython);
21577  Py_XDECREF(setstate);
21578  Py_XDECREF(setstate_cython);
21579  return ret;
21580 }
21581 
21582 /* PyFloatBinop */
21583 #if !CYTHON_COMPILING_IN_PYPY
21584 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
21585  const double b = floatval;
21586  double a, result;
21587  (void)inplace;
21588  (void)zerodivision_check;
21589  if (likely(PyFloat_CheckExact(op1))) {
21590  a = PyFloat_AS_DOUBLE(op1);
21591 
21592  } else
21593  #if PY_MAJOR_VERSION < 3
21594  if (likely(PyInt_CheckExact(op1))) {
21595  a = (double) PyInt_AS_LONG(op1);
21596 
21597  } else
21598  #endif
21599  if (likely(PyLong_CheckExact(op1))) {
21600  #if CYTHON_USE_PYLONG_INTERNALS
21601  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21602  const Py_ssize_t size = Py_SIZE(op1);
21603  switch (size) {
21604  case 0: a = 0.0; break;
21605  case -1: a = -(double) digits[0]; break;
21606  case 1: a = (double) digits[0]; break;
21607  case -2:
21608  case 2:
21609  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21610  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21611  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21612  if (size == -2)
21613  a = -a;
21614  break;
21615  }
21616  }
21617  CYTHON_FALLTHROUGH;
21618  case -3:
21619  case 3:
21620  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21621  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21622  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21623  if (size == -3)
21624  a = -a;
21625  break;
21626  }
21627  }
21628  CYTHON_FALLTHROUGH;
21629  case -4:
21630  case 4:
21631  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21632  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21633  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21634  if (size == -4)
21635  a = -a;
21636  break;
21637  }
21638  }
21639  CYTHON_FALLTHROUGH;
21640  default:
21641  #else
21642  {
21643  #endif
21644  a = PyLong_AsDouble(op1);
21645  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
21646 
21647  }
21648  } else {
21649  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21650  }
21651 
21652  PyFPE_START_PROTECT("divide", return NULL)
21653  result = a / b;
21654  PyFPE_END_PROTECT(result)
21655  return PyFloat_FromDouble(result);
21656 }
21657 #endif
21658 
21659 /* BytesEquals */
21660  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21661 #if CYTHON_COMPILING_IN_PYPY
21662  return PyObject_RichCompareBool(s1, s2, equals);
21663 #else
21664  if (s1 == s2) {
21665  return (equals == Py_EQ);
21666  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21667  const char *ps1, *ps2;
21668  Py_ssize_t length = PyBytes_GET_SIZE(s1);
21669  if (length != PyBytes_GET_SIZE(s2))
21670  return (equals == Py_NE);
21671  ps1 = PyBytes_AS_STRING(s1);
21672  ps2 = PyBytes_AS_STRING(s2);
21673  if (ps1[0] != ps2[0]) {
21674  return (equals == Py_NE);
21675  } else if (length == 1) {
21676  return (equals == Py_EQ);
21677  } else {
21678  int result;
21679 #if CYTHON_USE_UNICODE_INTERNALS
21680  Py_hash_t hash1, hash2;
21681  hash1 = ((PyBytesObject*)s1)->ob_shash;
21682  hash2 = ((PyBytesObject*)s2)->ob_shash;
21683  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21684  return (equals == Py_NE);
21685  }
21686 #endif
21687  result = memcmp(ps1, ps2, (size_t)length);
21688  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21689  }
21690  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21691  return (equals == Py_NE);
21692  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21693  return (equals == Py_NE);
21694  } else {
21695  int result;
21696  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21697  if (!py_result)
21698  return -1;
21699  result = __Pyx_PyObject_IsTrue(py_result);
21700  Py_DECREF(py_result);
21701  return result;
21702  }
21703 #endif
21704 }
21705 
21706 /* UnicodeEquals */
21707  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
21708 #if CYTHON_COMPILING_IN_PYPY
21709  return PyObject_RichCompareBool(s1, s2, equals);
21710 #else
21711 #if PY_MAJOR_VERSION < 3
21712  PyObject* owned_ref = NULL;
21713 #endif
21714  int s1_is_unicode, s2_is_unicode;
21715  if (s1 == s2) {
21716  goto return_eq;
21717  }
21718  s1_is_unicode = PyUnicode_CheckExact(s1);
21719  s2_is_unicode = PyUnicode_CheckExact(s2);
21720 #if PY_MAJOR_VERSION < 3
21721  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21722  owned_ref = PyUnicode_FromObject(s2);
21723  if (unlikely(!owned_ref))
21724  return -1;
21725  s2 = owned_ref;
21726  s2_is_unicode = 1;
21727  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21728  owned_ref = PyUnicode_FromObject(s1);
21729  if (unlikely(!owned_ref))
21730  return -1;
21731  s1 = owned_ref;
21732  s1_is_unicode = 1;
21733  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21734  return __Pyx_PyBytes_Equals(s1, s2, equals);
21735  }
21736 #endif
21737  if (s1_is_unicode & s2_is_unicode) {
21738  Py_ssize_t length;
21739  int kind;
21740  void *data1, *data2;
21741  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21742  return -1;
21743  length = __Pyx_PyUnicode_GET_LENGTH(s1);
21744  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21745  goto return_ne;
21746  }
21747 #if CYTHON_USE_UNICODE_INTERNALS
21748  {
21749  Py_hash_t hash1, hash2;
21750  #if CYTHON_PEP393_ENABLED
21751  hash1 = ((PyASCIIObject*)s1)->hash;
21752  hash2 = ((PyASCIIObject*)s2)->hash;
21753  #else
21754  hash1 = ((PyUnicodeObject*)s1)->hash;
21755  hash2 = ((PyUnicodeObject*)s2)->hash;
21756  #endif
21757  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21758  goto return_ne;
21759  }
21760  }
21761 #endif
21762  kind = __Pyx_PyUnicode_KIND(s1);
21763  if (kind != __Pyx_PyUnicode_KIND(s2)) {
21764  goto return_ne;
21765  }
21766  data1 = __Pyx_PyUnicode_DATA(s1);
21767  data2 = __Pyx_PyUnicode_DATA(s2);
21768  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21769  goto return_ne;
21770  } else if (length == 1) {
21771  goto return_eq;
21772  } else {
21773  int result = memcmp(data1, data2, (size_t)(length * kind));
21774  #if PY_MAJOR_VERSION < 3
21775  Py_XDECREF(owned_ref);
21776  #endif
21777  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21778  }
21779  } else if ((s1 == Py_None) & s2_is_unicode) {
21780  goto return_ne;
21781  } else if ((s2 == Py_None) & s1_is_unicode) {
21782  goto return_ne;
21783  } else {
21784  int result;
21785  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21786  #if PY_MAJOR_VERSION < 3
21787  Py_XDECREF(owned_ref);
21788  #endif
21789  if (!py_result)
21790  return -1;
21791  result = __Pyx_PyObject_IsTrue(py_result);
21792  Py_DECREF(py_result);
21793  return result;
21794  }
21795 return_eq:
21796  #if PY_MAJOR_VERSION < 3
21797  Py_XDECREF(owned_ref);
21798  #endif
21799  return (equals == Py_EQ);
21800 return_ne:
21801  #if PY_MAJOR_VERSION < 3
21802  Py_XDECREF(owned_ref);
21803  #endif
21804  return (equals == Py_NE);
21805 #endif
21806 }
21807 
21808 /* CLineInTraceback */
21809  #ifndef CYTHON_CLINE_IN_TRACEBACK
21810 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
21811  PyObject *use_cline;
21812  PyObject *ptype, *pvalue, *ptraceback;
21813 #if CYTHON_COMPILING_IN_CPYTHON
21814  PyObject **cython_runtime_dict;
21815 #endif
21816  if (unlikely(!__pyx_cython_runtime)) {
21817  return c_line;
21818  }
21819  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
21820 #if CYTHON_COMPILING_IN_CPYTHON
21821  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
21822  if (likely(cython_runtime_dict)) {
21823  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
21824  use_cline, *cython_runtime_dict,
21825  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
21826  } else
21827 #endif
21828  {
21829  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
21830  if (use_cline_obj) {
21831  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
21832  Py_DECREF(use_cline_obj);
21833  } else {
21834  PyErr_Clear();
21835  use_cline = NULL;
21836  }
21837  }
21838  if (!use_cline) {
21839  c_line = 0;
21840  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
21841  }
21842  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
21843  c_line = 0;
21844  }
21845  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
21846  return c_line;
21847 }
21848 #endif
21849 
21850 /* CodeObjectCache */
21851  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
21852  int start = 0, mid = 0, end = count - 1;
21853  if (end >= 0 && code_line > entries[end].code_line) {
21854  return count;
21855  }
21856  while (start < end) {
21857  mid = start + (end - start) / 2;
21858  if (code_line < entries[mid].code_line) {
21859  end = mid;
21860  } else if (code_line > entries[mid].code_line) {
21861  start = mid + 1;
21862  } else {
21863  return mid;
21864  }
21865  }
21866  if (code_line <= entries[mid].code_line) {
21867  return mid;
21868  } else {
21869  return mid + 1;
21870  }
21871 }
21872 static PyCodeObject *__pyx_find_code_object(int code_line) {
21873  PyCodeObject* code_object;
21874  int pos;
21875  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21876  return NULL;
21877  }
21878  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21879  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21880  return NULL;
21881  }
21882  code_object = __pyx_code_cache.entries[pos].code_object;
21883  Py_INCREF(code_object);
21884  return code_object;
21885 }
21886 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
21887  int pos, i;
21888  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21889  if (unlikely(!code_line)) {
21890  return;
21891  }
21892  if (unlikely(!entries)) {
21893  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
21894  if (likely(entries)) {
21895  __pyx_code_cache.entries = entries;
21896  __pyx_code_cache.max_count = 64;
21897  __pyx_code_cache.count = 1;
21898  entries[0].code_line = code_line;
21899  entries[0].code_object = code_object;
21900  Py_INCREF(code_object);
21901  }
21902  return;
21903  }
21904  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21905  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21906  PyCodeObject* tmp = entries[pos].code_object;
21907  entries[pos].code_object = code_object;
21908  Py_DECREF(tmp);
21909  return;
21910  }
21911  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21912  int new_max = __pyx_code_cache.max_count + 64;
21913  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21914  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
21915  if (unlikely(!entries)) {
21916  return;
21917  }
21918  __pyx_code_cache.entries = entries;
21919  __pyx_code_cache.max_count = new_max;
21920  }
21921  for (i=__pyx_code_cache.count; i>pos; i--) {
21922  entries[i] = entries[i-1];
21923  }
21924  entries[pos].code_line = code_line;
21925  entries[pos].code_object = code_object;
21926  __pyx_code_cache.count++;
21927  Py_INCREF(code_object);
21928 }
21929 
21930 /* AddTraceback */
21931  #include "compile.h"
21932 #include "frameobject.h"
21933 #include "traceback.h"
21934 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21935  const char *funcname, int c_line,
21936  int py_line, const char *filename) {
21937  PyCodeObject *py_code = 0;
21938  PyObject *py_srcfile = 0;
21939  PyObject *py_funcname = 0;
21940  #if PY_MAJOR_VERSION < 3
21941  py_srcfile = PyString_FromString(filename);
21942  #else
21943  py_srcfile = PyUnicode_FromString(filename);
21944  #endif
21945  if (!py_srcfile) goto bad;
21946  if (c_line) {
21947  #if PY_MAJOR_VERSION < 3
21948  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21949  #else
21950  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21951  #endif
21952  }
21953  else {
21954  #if PY_MAJOR_VERSION < 3
21955  py_funcname = PyString_FromString(funcname);
21956  #else
21957  py_funcname = PyUnicode_FromString(funcname);
21958  #endif
21959  }
21960  if (!py_funcname) goto bad;
21961  py_code = __Pyx_PyCode_New(
21962  0,
21963  0,
21964  0,
21965  0,
21966  0,
21967  __pyx_empty_bytes, /*PyObject *code,*/
21968  __pyx_empty_tuple, /*PyObject *consts,*/
21969  __pyx_empty_tuple, /*PyObject *names,*/
21970  __pyx_empty_tuple, /*PyObject *varnames,*/
21971  __pyx_empty_tuple, /*PyObject *freevars,*/
21972  __pyx_empty_tuple, /*PyObject *cellvars,*/
21973  py_srcfile, /*PyObject *filename,*/
21974  py_funcname, /*PyObject *name,*/
21975  py_line,
21976  __pyx_empty_bytes /*PyObject *lnotab*/
21977  );
21978  Py_DECREF(py_srcfile);
21979  Py_DECREF(py_funcname);
21980  return py_code;
21981 bad:
21982  Py_XDECREF(py_srcfile);
21983  Py_XDECREF(py_funcname);
21984  return NULL;
21985 }
21986 static void __Pyx_AddTraceback(const char *funcname, int c_line,
21987  int py_line, const char *filename) {
21988  PyCodeObject *py_code = 0;
21989  PyFrameObject *py_frame = 0;
21990  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21991  if (c_line) {
21992  c_line = __Pyx_CLineForTraceback(tstate, c_line);
21993  }
21994  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
21995  if (!py_code) {
21996  py_code = __Pyx_CreateCodeObjectForTraceback(
21997  funcname, c_line, py_line, filename);
21998  if (!py_code) goto bad;
21999  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22000  }
22001  py_frame = PyFrame_New(
22002  tstate, /*PyThreadState *tstate,*/
22003  py_code, /*PyCodeObject *code,*/
22004  __pyx_d, /*PyObject *globals,*/
22005  0 /*PyObject *locals*/
22006  );
22007  if (!py_frame) goto bad;
22008  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22009  PyTraceBack_Here(py_frame);
22010 bad:
22011  Py_XDECREF(py_code);
22012  Py_XDECREF(py_frame);
22013 }
22014 
22015 /* CIntFromPyVerify */
22016  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22017  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22018 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22019  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22020 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22021  {\
22022  func_type value = func_value;\
22023  if (sizeof(target_type) < sizeof(func_type)) {\
22024  if (unlikely(value != (func_type) (target_type) value)) {\
22025  func_type zero = 0;\
22026  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22027  return (target_type) -1;\
22028  if (is_unsigned && unlikely(value < zero))\
22029  goto raise_neg_overflow;\
22030  else\
22031  goto raise_overflow;\
22032  }\
22033  }\
22034  return (target_type) value;\
22035  }
22036 
22037 /* CIntToPy */
22038  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22039  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22040  const int is_unsigned = neg_one > const_zero;
22041  if (is_unsigned) {
22042  if (sizeof(int) < sizeof(long)) {
22043  return PyInt_FromLong((long) value);
22044  } else if (sizeof(int) <= sizeof(unsigned long)) {
22045  return PyLong_FromUnsignedLong((unsigned long) value);
22046 #ifdef HAVE_LONG_LONG
22047  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22048  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22049 #endif
22050  }
22051  } else {
22052  if (sizeof(int) <= sizeof(long)) {
22053  return PyInt_FromLong((long) value);
22054 #ifdef HAVE_LONG_LONG
22055  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22056  return PyLong_FromLongLong((PY_LONG_LONG) value);
22057 #endif
22058  }
22059  }
22060  {
22061  int one = 1; int little = (int)*(unsigned char *)&one;
22062  unsigned char *bytes = (unsigned char *)&value;
22063  return _PyLong_FromByteArray(bytes, sizeof(int),
22064  little, !is_unsigned);
22065  }
22066 }
22067 
22068 /* CIntFromPy */
22069  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22070  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22071  const int is_unsigned = neg_one > const_zero;
22072 #if PY_MAJOR_VERSION < 3
22073  if (likely(PyInt_Check(x))) {
22074  if (sizeof(int) < sizeof(long)) {
22075  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22076  } else {
22077  long val = PyInt_AS_LONG(x);
22078  if (is_unsigned && unlikely(val < 0)) {
22079  goto raise_neg_overflow;
22080  }
22081  return (int) val;
22082  }
22083  } else
22084 #endif
22085  if (likely(PyLong_Check(x))) {
22086  if (is_unsigned) {
22087 #if CYTHON_USE_PYLONG_INTERNALS
22088  const digit* digits = ((PyLongObject*)x)->ob_digit;
22089  switch (Py_SIZE(x)) {
22090  case 0: return (int) 0;
22091  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22092  case 2:
22093  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22094  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22095  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22096  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22097  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22098  }
22099  }
22100  break;
22101  case 3:
22102  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22103  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22104  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22105  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22106  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22107  }
22108  }
22109  break;
22110  case 4:
22111  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22112  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22113  __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])))
22114  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22115  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22116  }
22117  }
22118  break;
22119  }
22120 #endif
22121 #if CYTHON_COMPILING_IN_CPYTHON
22122  if (unlikely(Py_SIZE(x) < 0)) {
22123  goto raise_neg_overflow;
22124  }
22125 #else
22126  {
22127  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22128  if (unlikely(result < 0))
22129  return (int) -1;
22130  if (unlikely(result == 1))
22131  goto raise_neg_overflow;
22132  }
22133 #endif
22134  if (sizeof(int) <= sizeof(unsigned long)) {
22135  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22136 #ifdef HAVE_LONG_LONG
22137  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22138  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22139 #endif
22140  }
22141  } else {
22142 #if CYTHON_USE_PYLONG_INTERNALS
22143  const digit* digits = ((PyLongObject*)x)->ob_digit;
22144  switch (Py_SIZE(x)) {
22145  case 0: return (int) 0;
22146  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22147  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22148  case -2:
22149  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22150  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22151  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22152  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22153  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22154  }
22155  }
22156  break;
22157  case 2:
22158  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22159  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22160  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22161  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22162  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22163  }
22164  }
22165  break;
22166  case -3:
22167  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22168  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22169  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22170  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22171  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22172  }
22173  }
22174  break;
22175  case 3:
22176  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22177  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22178  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22179  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22180  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22181  }
22182  }
22183  break;
22184  case -4:
22185  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22186  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22187  __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])))
22188  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22189  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22190  }
22191  }
22192  break;
22193  case 4:
22194  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22195  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22196  __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])))
22197  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22198  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22199  }
22200  }
22201  break;
22202  }
22203 #endif
22204  if (sizeof(int) <= sizeof(long)) {
22205  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22206 #ifdef HAVE_LONG_LONG
22207  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22208  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22209 #endif
22210  }
22211  }
22212  {
22213 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22214  PyErr_SetString(PyExc_RuntimeError,
22215  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22216 #else
22217  int val;
22218  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22219  #if PY_MAJOR_VERSION < 3
22220  if (likely(v) && !PyLong_Check(v)) {
22221  PyObject *tmp = v;
22222  v = PyNumber_Long(tmp);
22223  Py_DECREF(tmp);
22224  }
22225  #endif
22226  if (likely(v)) {
22227  int one = 1; int is_little = (int)*(unsigned char *)&one;
22228  unsigned char *bytes = (unsigned char *)&val;
22229  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22230  bytes, sizeof(val),
22231  is_little, !is_unsigned);
22232  Py_DECREF(v);
22233  if (likely(!ret))
22234  return val;
22235  }
22236 #endif
22237  return (int) -1;
22238  }
22239  } else {
22240  int val;
22241  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22242  if (!tmp) return (int) -1;
22243  val = __Pyx_PyInt_As_int(tmp);
22244  Py_DECREF(tmp);
22245  return val;
22246  }
22247 raise_overflow:
22248  PyErr_SetString(PyExc_OverflowError,
22249  "value too large to convert to int");
22250  return (int) -1;
22251 raise_neg_overflow:
22252  PyErr_SetString(PyExc_OverflowError,
22253  "can't convert negative value to int");
22254  return (int) -1;
22255 }
22256 
22257 /* CIntToPy */
22258  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22259  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22260  const int is_unsigned = neg_one > const_zero;
22261  if (is_unsigned) {
22262  if (sizeof(long) < sizeof(long)) {
22263  return PyInt_FromLong((long) value);
22264  } else if (sizeof(long) <= sizeof(unsigned long)) {
22265  return PyLong_FromUnsignedLong((unsigned long) value);
22266 #ifdef HAVE_LONG_LONG
22267  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22268  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22269 #endif
22270  }
22271  } else {
22272  if (sizeof(long) <= sizeof(long)) {
22273  return PyInt_FromLong((long) value);
22274 #ifdef HAVE_LONG_LONG
22275  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22276  return PyLong_FromLongLong((PY_LONG_LONG) value);
22277 #endif
22278  }
22279  }
22280  {
22281  int one = 1; int little = (int)*(unsigned char *)&one;
22282  unsigned char *bytes = (unsigned char *)&value;
22283  return _PyLong_FromByteArray(bytes, sizeof(long),
22284  little, !is_unsigned);
22285  }
22286 }
22287 
22288 /* CIntFromPy */
22289  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22290  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22291  const int is_unsigned = neg_one > const_zero;
22292 #if PY_MAJOR_VERSION < 3
22293  if (likely(PyInt_Check(x))) {
22294  if (sizeof(long) < sizeof(long)) {
22295  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22296  } else {
22297  long val = PyInt_AS_LONG(x);
22298  if (is_unsigned && unlikely(val < 0)) {
22299  goto raise_neg_overflow;
22300  }
22301  return (long) val;
22302  }
22303  } else
22304 #endif
22305  if (likely(PyLong_Check(x))) {
22306  if (is_unsigned) {
22307 #if CYTHON_USE_PYLONG_INTERNALS
22308  const digit* digits = ((PyLongObject*)x)->ob_digit;
22309  switch (Py_SIZE(x)) {
22310  case 0: return (long) 0;
22311  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22312  case 2:
22313  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22314  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22315  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22316  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22317  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22318  }
22319  }
22320  break;
22321  case 3:
22322  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22323  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22324  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22325  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22326  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22327  }
22328  }
22329  break;
22330  case 4:
22331  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22332  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22333  __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])))
22334  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22335  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22336  }
22337  }
22338  break;
22339  }
22340 #endif
22341 #if CYTHON_COMPILING_IN_CPYTHON
22342  if (unlikely(Py_SIZE(x) < 0)) {
22343  goto raise_neg_overflow;
22344  }
22345 #else
22346  {
22347  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22348  if (unlikely(result < 0))
22349  return (long) -1;
22350  if (unlikely(result == 1))
22351  goto raise_neg_overflow;
22352  }
22353 #endif
22354  if (sizeof(long) <= sizeof(unsigned long)) {
22355  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22356 #ifdef HAVE_LONG_LONG
22357  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22358  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22359 #endif
22360  }
22361  } else {
22362 #if CYTHON_USE_PYLONG_INTERNALS
22363  const digit* digits = ((PyLongObject*)x)->ob_digit;
22364  switch (Py_SIZE(x)) {
22365  case 0: return (long) 0;
22366  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22367  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22368  case -2:
22369  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22370  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22371  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22372  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22373  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22374  }
22375  }
22376  break;
22377  case 2:
22378  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22379  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22380  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22381  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22382  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22383  }
22384  }
22385  break;
22386  case -3:
22387  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22388  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22389  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22390  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22391  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22392  }
22393  }
22394  break;
22395  case 3:
22396  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22397  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22398  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22399  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22400  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22401  }
22402  }
22403  break;
22404  case -4:
22405  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22406  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22407  __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])))
22408  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22409  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22410  }
22411  }
22412  break;
22413  case 4:
22414  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22415  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22416  __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])))
22417  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22418  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22419  }
22420  }
22421  break;
22422  }
22423 #endif
22424  if (sizeof(long) <= sizeof(long)) {
22425  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22426 #ifdef HAVE_LONG_LONG
22427  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22428  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22429 #endif
22430  }
22431  }
22432  {
22433 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22434  PyErr_SetString(PyExc_RuntimeError,
22435  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22436 #else
22437  long val;
22438  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22439  #if PY_MAJOR_VERSION < 3
22440  if (likely(v) && !PyLong_Check(v)) {
22441  PyObject *tmp = v;
22442  v = PyNumber_Long(tmp);
22443  Py_DECREF(tmp);
22444  }
22445  #endif
22446  if (likely(v)) {
22447  int one = 1; int is_little = (int)*(unsigned char *)&one;
22448  unsigned char *bytes = (unsigned char *)&val;
22449  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22450  bytes, sizeof(val),
22451  is_little, !is_unsigned);
22452  Py_DECREF(v);
22453  if (likely(!ret))
22454  return val;
22455  }
22456 #endif
22457  return (long) -1;
22458  }
22459  } else {
22460  long val;
22461  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22462  if (!tmp) return (long) -1;
22463  val = __Pyx_PyInt_As_long(tmp);
22464  Py_DECREF(tmp);
22465  return val;
22466  }
22467 raise_overflow:
22468  PyErr_SetString(PyExc_OverflowError,
22469  "value too large to convert to long");
22470  return (long) -1;
22471 raise_neg_overflow:
22472  PyErr_SetString(PyExc_OverflowError,
22473  "can't convert negative value to long");
22474  return (long) -1;
22475 }
22476 
22477 /* FastTypeChecks */
22478  #if CYTHON_COMPILING_IN_CPYTHON
22479 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22480  while (a) {
22481  a = a->tp_base;
22482  if (a == b)
22483  return 1;
22484  }
22485  return b == &PyBaseObject_Type;
22486 }
22487 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22488  PyObject *mro;
22489  if (a == b) return 1;
22490  mro = a->tp_mro;
22491  if (likely(mro)) {
22492  Py_ssize_t i, n;
22493  n = PyTuple_GET_SIZE(mro);
22494  for (i = 0; i < n; i++) {
22495  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22496  return 1;
22497  }
22498  return 0;
22499  }
22500  return __Pyx_InBases(a, b);
22501 }
22502 #if PY_MAJOR_VERSION == 2
22503 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22504  PyObject *exception, *value, *tb;
22505  int res;
22506  __Pyx_PyThreadState_declare
22507  __Pyx_PyThreadState_assign
22508  __Pyx_ErrFetch(&exception, &value, &tb);
22509  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22510  if (unlikely(res == -1)) {
22511  PyErr_WriteUnraisable(err);
22512  res = 0;
22513  }
22514  if (!res) {
22515  res = PyObject_IsSubclass(err, exc_type2);
22516  if (unlikely(res == -1)) {
22517  PyErr_WriteUnraisable(err);
22518  res = 0;
22519  }
22520  }
22521  __Pyx_ErrRestore(exception, value, tb);
22522  return res;
22523 }
22524 #else
22525 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22526  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22527  if (!res) {
22528  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22529  }
22530  return res;
22531 }
22532 #endif
22533 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22534  Py_ssize_t i, n;
22535  assert(PyExceptionClass_Check(exc_type));
22536  n = PyTuple_GET_SIZE(tuple);
22537 #if PY_MAJOR_VERSION >= 3
22538  for (i=0; i<n; i++) {
22539  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22540  }
22541 #endif
22542  for (i=0; i<n; i++) {
22543  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22544  #if PY_MAJOR_VERSION < 3
22545  if (likely(exc_type == t)) return 1;
22546  #endif
22547  if (likely(PyExceptionClass_Check(t))) {
22548  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22549  } else {
22550  }
22551  }
22552  return 0;
22553 }
22554 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22555  if (likely(err == exc_type)) return 1;
22556  if (likely(PyExceptionClass_Check(err))) {
22557  if (likely(PyExceptionClass_Check(exc_type))) {
22558  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22559  } else if (likely(PyTuple_Check(exc_type))) {
22560  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22561  } else {
22562  }
22563  }
22564  return PyErr_GivenExceptionMatches(err, exc_type);
22565 }
22566 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22567  assert(PyExceptionClass_Check(exc_type1));
22568  assert(PyExceptionClass_Check(exc_type2));
22569  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22570  if (likely(PyExceptionClass_Check(err))) {
22571  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22572  }
22573  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22574 }
22575 #endif
22576 
22577 /* FetchCommonType */
22578  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22579  PyObject* fake_module;
22580  PyTypeObject* cached_type = NULL;
22581  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22582  if (!fake_module) return NULL;
22583  Py_INCREF(fake_module);
22584  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22585  if (cached_type) {
22586  if (!PyType_Check((PyObject*)cached_type)) {
22587  PyErr_Format(PyExc_TypeError,
22588  "Shared Cython type %.200s is not a type object",
22589  type->tp_name);
22590  goto bad;
22591  }
22592  if (cached_type->tp_basicsize != type->tp_basicsize) {
22593  PyErr_Format(PyExc_TypeError,
22594  "Shared Cython type %.200s has the wrong size, try recompiling",
22595  type->tp_name);
22596  goto bad;
22597  }
22598  } else {
22599  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22600  PyErr_Clear();
22601  if (PyType_Ready(type) < 0) goto bad;
22602  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22603  goto bad;
22604  Py_INCREF(type);
22605  cached_type = type;
22606  }
22607 done:
22608  Py_DECREF(fake_module);
22609  return cached_type;
22610 bad:
22611  Py_XDECREF(cached_type);
22612  cached_type = NULL;
22613  goto done;
22614 }
22615 
22616 /* SwapException */
22617  #if CYTHON_FAST_THREAD_STATE
22618 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22619  PyObject *tmp_type, *tmp_value, *tmp_tb;
22620  #if CYTHON_USE_EXC_INFO_STACK
22621  _PyErr_StackItem *exc_info = tstate->exc_info;
22622  tmp_type = exc_info->exc_type;
22623  tmp_value = exc_info->exc_value;
22624  tmp_tb = exc_info->exc_traceback;
22625  exc_info->exc_type = *type;
22626  exc_info->exc_value = *value;
22627  exc_info->exc_traceback = *tb;
22628  #else
22629  tmp_type = tstate->exc_type;
22630  tmp_value = tstate->exc_value;
22631  tmp_tb = tstate->exc_traceback;
22632  tstate->exc_type = *type;
22633  tstate->exc_value = *value;
22634  tstate->exc_traceback = *tb;
22635  #endif
22636  *type = tmp_type;
22637  *value = tmp_value;
22638  *tb = tmp_tb;
22639 }
22640 #else
22641 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22642  PyObject *tmp_type, *tmp_value, *tmp_tb;
22643  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22644  PyErr_SetExcInfo(*type, *value, *tb);
22645  *type = tmp_type;
22646  *value = tmp_value;
22647  *tb = tmp_tb;
22648 }
22649 #endif
22650 
22651 /* PyObjectGetMethod */
22652  static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
22653  PyObject *attr;
22654 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
22655  PyTypeObject *tp = Py_TYPE(obj);
22656  PyObject *descr;
22657  descrgetfunc f = NULL;
22658  PyObject **dictptr, *dict;
22659  int meth_found = 0;
22660  assert (*method == NULL);
22661  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
22662  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22663  goto try_unpack;
22664  }
22665  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
22666  return 0;
22667  }
22668  descr = _PyType_Lookup(tp, name);
22669  if (likely(descr != NULL)) {
22670  Py_INCREF(descr);
22671 #if PY_MAJOR_VERSION >= 3
22672  #ifdef __Pyx_CyFunction_USED
22673  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
22674  #else
22675  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
22676  #endif
22677 #else
22678  #ifdef __Pyx_CyFunction_USED
22679  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
22680  #else
22681  if (likely(PyFunction_Check(descr)))
22682  #endif
22683 #endif
22684  {
22685  meth_found = 1;
22686  } else {
22687  f = Py_TYPE(descr)->tp_descr_get;
22688  if (f != NULL && PyDescr_IsData(descr)) {
22689  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22690  Py_DECREF(descr);
22691  goto try_unpack;
22692  }
22693  }
22694  }
22695  dictptr = _PyObject_GetDictPtr(obj);
22696  if (dictptr != NULL && (dict = *dictptr) != NULL) {
22697  Py_INCREF(dict);
22698  attr = __Pyx_PyDict_GetItemStr(dict, name);
22699  if (attr != NULL) {
22700  Py_INCREF(attr);
22701  Py_DECREF(dict);
22702  Py_XDECREF(descr);
22703  goto try_unpack;
22704  }
22705  Py_DECREF(dict);
22706  }
22707  if (meth_found) {
22708  *method = descr;
22709  return 1;
22710  }
22711  if (f != NULL) {
22712  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22713  Py_DECREF(descr);
22714  goto try_unpack;
22715  }
22716  if (descr != NULL) {
22717  *method = descr;
22718  return 0;
22719  }
22720  PyErr_Format(PyExc_AttributeError,
22721 #if PY_MAJOR_VERSION >= 3
22722  "'%.50s' object has no attribute '%U'",
22723  tp->tp_name, name);
22724 #else
22725  "'%.50s' object has no attribute '%.400s'",
22726  tp->tp_name, PyString_AS_STRING(name));
22727 #endif
22728  return 0;
22729 #else
22730  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22731  goto try_unpack;
22732 #endif
22733 try_unpack:
22734 #if CYTHON_UNPACK_METHODS
22735  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
22736  PyObject *function = PyMethod_GET_FUNCTION(attr);
22737  Py_INCREF(function);
22738  Py_DECREF(attr);
22739  *method = function;
22740  return 1;
22741  }
22742 #endif
22743  *method = attr;
22744  return 0;
22745 }
22746 
22747 /* PyObjectCallMethod1 */
22748  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
22749  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
22750  Py_DECREF(method);
22751  return result;
22752 }
22753 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
22754  PyObject *method = NULL, *result;
22755  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
22756  if (likely(is_method)) {
22757  result = __Pyx_PyObject_Call2Args(method, obj, arg);
22758  Py_DECREF(method);
22759  return result;
22760  }
22761  if (unlikely(!method)) return NULL;
22762  return __Pyx__PyObject_CallMethod1(method, arg);
22763 }
22764 
22765 /* CoroutineBase */
22766  #include <structmember.h>
22767 #include <frameobject.h>
22768 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
22769 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
22770  PyObject *et, *ev, *tb;
22771  PyObject *value = NULL;
22772  __Pyx_ErrFetch(&et, &ev, &tb);
22773  if (!et) {
22774  Py_XDECREF(tb);
22775  Py_XDECREF(ev);
22776  Py_INCREF(Py_None);
22777  *pvalue = Py_None;
22778  return 0;
22779  }
22780  if (likely(et == PyExc_StopIteration)) {
22781  if (!ev) {
22782  Py_INCREF(Py_None);
22783  value = Py_None;
22784  }
22785 #if PY_VERSION_HEX >= 0x030300A0
22786  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
22787  value = ((PyStopIterationObject *)ev)->value;
22788  Py_INCREF(value);
22789  Py_DECREF(ev);
22790  }
22791 #endif
22792  else if (unlikely(PyTuple_Check(ev))) {
22793  if (PyTuple_GET_SIZE(ev) >= 1) {
22794 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22795  value = PyTuple_GET_ITEM(ev, 0);
22796  Py_INCREF(value);
22797 #else
22798  value = PySequence_ITEM(ev, 0);
22799 #endif
22800  } else {
22801  Py_INCREF(Py_None);
22802  value = Py_None;
22803  }
22804  Py_DECREF(ev);
22805  }
22806  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
22807  value = ev;
22808  }
22809  if (likely(value)) {
22810  Py_XDECREF(tb);
22811  Py_DECREF(et);
22812  *pvalue = value;
22813  return 0;
22814  }
22815  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
22816  __Pyx_ErrRestore(et, ev, tb);
22817  return -1;
22818  }
22819  PyErr_NormalizeException(&et, &ev, &tb);
22820  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
22821  __Pyx_ErrRestore(et, ev, tb);
22822  return -1;
22823  }
22824  Py_XDECREF(tb);
22825  Py_DECREF(et);
22826 #if PY_VERSION_HEX >= 0x030300A0
22827  value = ((PyStopIterationObject *)ev)->value;
22828  Py_INCREF(value);
22829  Py_DECREF(ev);
22830 #else
22831  {
22832  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
22833  Py_DECREF(ev);
22834  if (likely(args)) {
22835  value = PySequence_GetItem(args, 0);
22836  Py_DECREF(args);
22837  }
22838  if (unlikely(!value)) {
22839  __Pyx_ErrRestore(NULL, NULL, NULL);
22840  Py_INCREF(Py_None);
22841  value = Py_None;
22842  }
22843  }
22844 #endif
22845  *pvalue = value;
22846  return 0;
22847 }
22848 static CYTHON_INLINE
22849 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
22850  PyObject *t, *v, *tb;
22851  t = exc_state->exc_type;
22852  v = exc_state->exc_value;
22853  tb = exc_state->exc_traceback;
22854  exc_state->exc_type = NULL;
22855  exc_state->exc_value = NULL;
22856  exc_state->exc_traceback = NULL;
22857  Py_XDECREF(t);
22858  Py_XDECREF(v);
22859  Py_XDECREF(tb);
22860 }
22861 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
22862 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
22863  const char *msg;
22864  if ((0)) {
22865  #ifdef __Pyx_Coroutine_USED
22866  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
22867  msg = "coroutine already executing";
22868  #endif
22869  #ifdef __Pyx_AsyncGen_USED
22870  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
22871  msg = "async generator already executing";
22872  #endif
22873  } else {
22874  msg = "generator already executing";
22875  }
22876  PyErr_SetString(PyExc_ValueError, msg);
22877 }
22878 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
22879 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
22880  const char *msg;
22881  if ((0)) {
22882  #ifdef __Pyx_Coroutine_USED
22883  } else if (__Pyx_Coroutine_Check(gen)) {
22884  msg = "can't send non-None value to a just-started coroutine";
22885  #endif
22886  #ifdef __Pyx_AsyncGen_USED
22887  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
22888  msg = "can't send non-None value to a just-started async generator";
22889  #endif
22890  } else {
22891  msg = "can't send non-None value to a just-started generator";
22892  }
22893  PyErr_SetString(PyExc_TypeError, msg);
22894 }
22895 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
22896 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
22897  #ifdef __Pyx_Coroutine_USED
22898  if (!closing && __Pyx_Coroutine_Check(gen)) {
22899  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
22900  } else
22901  #endif
22902  if (value) {
22903  #ifdef __Pyx_AsyncGen_USED
22904  if (__Pyx_AsyncGen_CheckExact(gen))
22905  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
22906  else
22907  #endif
22908  PyErr_SetNone(PyExc_StopIteration);
22909  }
22910 }
22911 static
22912 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
22913  __Pyx_PyThreadState_declare
22914  PyThreadState *tstate;
22915  __Pyx_ExcInfoStruct *exc_state;
22916  PyObject *retval;
22917  assert(!self->is_running);
22918  if (unlikely(self->resume_label == 0)) {
22919  if (unlikely(value && value != Py_None)) {
22920  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
22921  }
22922  }
22923  if (unlikely(self->resume_label == -1)) {
22924  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
22925  }
22926 #if CYTHON_FAST_THREAD_STATE
22927  __Pyx_PyThreadState_assign
22928  tstate = __pyx_tstate;
22929 #else
22930  tstate = __Pyx_PyThreadState_Current;
22931 #endif
22932  exc_state = &self->gi_exc_state;
22933  if (exc_state->exc_type) {
22934  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22935  #else
22936  if (exc_state->exc_traceback) {
22937  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
22938  PyFrameObject *f = tb->tb_frame;
22939  Py_XINCREF(tstate->frame);
22940  assert(f->f_back == NULL);
22941  f->f_back = tstate->frame;
22942  }
22943  #endif
22944  }
22945 #if CYTHON_USE_EXC_INFO_STACK
22946  exc_state->previous_item = tstate->exc_info;
22947  tstate->exc_info = exc_state;
22948 #else
22949  if (exc_state->exc_type) {
22950  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22951  } else {
22952  __Pyx_Coroutine_ExceptionClear(exc_state);
22953  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22954  }
22955 #endif
22956  self->is_running = 1;
22957  retval = self->body((PyObject *) self, tstate, value);
22958  self->is_running = 0;
22959 #if CYTHON_USE_EXC_INFO_STACK
22960  exc_state = &self->gi_exc_state;
22961  tstate->exc_info = exc_state->previous_item;
22962  exc_state->previous_item = NULL;
22963  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
22964 #endif
22965  return retval;
22966 }
22967 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
22968  PyObject *exc_tb = exc_state->exc_traceback;
22969  if (likely(exc_tb)) {
22970 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22971 #else
22972  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
22973  PyFrameObject *f = tb->tb_frame;
22974  Py_CLEAR(f->f_back);
22975 #endif
22976  }
22977 }
22978 static CYTHON_INLINE
22979 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
22980  if (unlikely(!retval)) {
22981  __Pyx_PyThreadState_declare
22982  __Pyx_PyThreadState_assign
22983  if (!__Pyx_PyErr_Occurred()) {
22984  PyObject *exc = PyExc_StopIteration;
22985  #ifdef __Pyx_AsyncGen_USED
22986  if (__Pyx_AsyncGen_CheckExact(gen))
22987  exc = __Pyx_PyExc_StopAsyncIteration;
22988  #endif
22989  __Pyx_PyErr_SetNone(exc);
22990  }
22991  }
22992  return retval;
22993 }
22994 static CYTHON_INLINE
22995 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
22996  PyObject *ret;
22997  PyObject *val = NULL;
22998  __Pyx_Coroutine_Undelegate(gen);
22999  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23000  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23001  Py_XDECREF(val);
23002  return ret;
23003 }
23004 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23005  PyObject *retval;
23006  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23007  PyObject *yf = gen->yieldfrom;
23008  if (unlikely(gen->is_running))
23009  return __Pyx_Coroutine_AlreadyRunningError(gen);
23010  if (yf) {
23011  PyObject *ret;
23012  gen->is_running = 1;
23013  #ifdef __Pyx_Generator_USED
23014  if (__Pyx_Generator_CheckExact(yf)) {
23015  ret = __Pyx_Coroutine_Send(yf, value);
23016  } else
23017  #endif
23018  #ifdef __Pyx_Coroutine_USED
23019  if (__Pyx_Coroutine_Check(yf)) {
23020  ret = __Pyx_Coroutine_Send(yf, value);
23021  } else
23022  #endif
23023  #ifdef __Pyx_AsyncGen_USED
23024  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23025  ret = __Pyx_async_gen_asend_send(yf, value);
23026  } else
23027  #endif
23028  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23029  if (PyGen_CheckExact(yf)) {
23030  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23031  } else
23032  #endif
23033  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23034  if (PyCoro_CheckExact(yf)) {
23035  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23036  } else
23037  #endif
23038  {
23039  if (value == Py_None)
23040  ret = Py_TYPE(yf)->tp_iternext(yf);
23041  else
23042  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23043  }
23044  gen->is_running = 0;
23045  if (likely(ret)) {
23046  return ret;
23047  }
23048  retval = __Pyx_Coroutine_FinishDelegation(gen);
23049  } else {
23050  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23051  }
23052  return __Pyx_Coroutine_MethodReturn(self, retval);
23053 }
23054 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23055  PyObject *retval = NULL;
23056  int err = 0;
23057  #ifdef __Pyx_Generator_USED
23058  if (__Pyx_Generator_CheckExact(yf)) {
23059  retval = __Pyx_Coroutine_Close(yf);
23060  if (!retval)
23061  return -1;
23062  } else
23063  #endif
23064  #ifdef __Pyx_Coroutine_USED
23065  if (__Pyx_Coroutine_Check(yf)) {
23066  retval = __Pyx_Coroutine_Close(yf);
23067  if (!retval)
23068  return -1;
23069  } else
23070  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23071  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
23072  if (!retval)
23073  return -1;
23074  } else
23075  #endif
23076  #ifdef __Pyx_AsyncGen_USED
23077  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23078  retval = __Pyx_async_gen_asend_close(yf, NULL);
23079  } else
23080  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23081  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23082  } else
23083  #endif
23084  {
23085  PyObject *meth;
23086  gen->is_running = 1;
23087  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23088  if (unlikely(!meth)) {
23089  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23090  PyErr_WriteUnraisable(yf);
23091  }
23092  PyErr_Clear();
23093  } else {
23094  retval = PyObject_CallFunction(meth, NULL);
23095  Py_DECREF(meth);
23096  if (!retval)
23097  err = -1;
23098  }
23099  gen->is_running = 0;
23100  }
23101  Py_XDECREF(retval);
23102  return err;
23103 }
23104 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23105  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23106  PyObject *yf = gen->yieldfrom;
23107  if (unlikely(gen->is_running))
23108  return __Pyx_Coroutine_AlreadyRunningError(gen);
23109  if (yf) {
23110  PyObject *ret;
23111  gen->is_running = 1;
23112  #ifdef __Pyx_Generator_USED
23113  if (__Pyx_Generator_CheckExact(yf)) {
23114  ret = __Pyx_Generator_Next(yf);
23115  } else
23116  #endif
23117  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23118  if (PyGen_CheckExact(yf)) {
23119  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23120  } else
23121  #endif
23122  #ifdef __Pyx_Coroutine_USED
23123  if (__Pyx_Coroutine_Check(yf)) {
23124  ret = __Pyx_Coroutine_Send(yf, Py_None);
23125  } else
23126  #endif
23127  ret = Py_TYPE(yf)->tp_iternext(yf);
23128  gen->is_running = 0;
23129  if (likely(ret)) {
23130  return ret;
23131  }
23132  return __Pyx_Coroutine_FinishDelegation(gen);
23133  }
23134  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23135 }
23136 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
23137  return __Pyx_Coroutine_Close(self);
23138 }
23139 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23140  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23141  PyObject *retval, *raised_exception;
23142  PyObject *yf = gen->yieldfrom;
23143  int err = 0;
23144  if (unlikely(gen->is_running))
23145  return __Pyx_Coroutine_AlreadyRunningError(gen);
23146  if (yf) {
23147  Py_INCREF(yf);
23148  err = __Pyx_Coroutine_CloseIter(gen, yf);
23149  __Pyx_Coroutine_Undelegate(gen);
23150  Py_DECREF(yf);
23151  }
23152  if (err == 0)
23153  PyErr_SetNone(PyExc_GeneratorExit);
23154  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23155  if (unlikely(retval)) {
23156  const char *msg;
23157  Py_DECREF(retval);
23158  if ((0)) {
23159  #ifdef __Pyx_Coroutine_USED
23160  } else if (__Pyx_Coroutine_Check(self)) {
23161  msg = "coroutine ignored GeneratorExit";
23162  #endif
23163  #ifdef __Pyx_AsyncGen_USED
23164  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23165 #if PY_VERSION_HEX < 0x03060000
23166  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23167 #else
23168  msg = "async generator ignored GeneratorExit";
23169 #endif
23170  #endif
23171  } else {
23172  msg = "generator ignored GeneratorExit";
23173  }
23174  PyErr_SetString(PyExc_RuntimeError, msg);
23175  return NULL;
23176  }
23177  raised_exception = PyErr_Occurred();
23178  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23179  if (raised_exception) PyErr_Clear();
23180  Py_INCREF(Py_None);
23181  return Py_None;
23182  }
23183  return NULL;
23184 }
23185 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23186  PyObject *args, int close_on_genexit) {
23187  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23188  PyObject *yf = gen->yieldfrom;
23189  if (unlikely(gen->is_running))
23190  return __Pyx_Coroutine_AlreadyRunningError(gen);
23191  if (yf) {
23192  PyObject *ret;
23193  Py_INCREF(yf);
23194  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23195  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23196  Py_DECREF(yf);
23197  __Pyx_Coroutine_Undelegate(gen);
23198  if (err < 0)
23199  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23200  goto throw_here;
23201  }
23202  gen->is_running = 1;
23203  if (0
23204  #ifdef __Pyx_Generator_USED
23205  || __Pyx_Generator_CheckExact(yf)
23206  #endif
23207  #ifdef __Pyx_Coroutine_USED
23208  || __Pyx_Coroutine_Check(yf)
23209  #endif
23210  ) {
23211  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23212  #ifdef __Pyx_Coroutine_USED
23213  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23214  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23215  #endif
23216  } else {
23217  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23218  if (unlikely(!meth)) {
23219  Py_DECREF(yf);
23220  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23221  gen->is_running = 0;
23222  return NULL;
23223  }
23224  PyErr_Clear();
23225  __Pyx_Coroutine_Undelegate(gen);
23226  gen->is_running = 0;
23227  goto throw_here;
23228  }
23229  if (likely(args)) {
23230  ret = PyObject_CallObject(meth, args);
23231  } else {
23232  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23233  }
23234  Py_DECREF(meth);
23235  }
23236  gen->is_running = 0;
23237  Py_DECREF(yf);
23238  if (!ret) {
23239  ret = __Pyx_Coroutine_FinishDelegation(gen);
23240  }
23241  return __Pyx_Coroutine_MethodReturn(self, ret);
23242  }
23243 throw_here:
23244  __Pyx_Raise(typ, val, tb, NULL);
23245  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23246 }
23247 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23248  PyObject *typ;
23249  PyObject *val = NULL;
23250  PyObject *tb = NULL;
23251  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23252  return NULL;
23253  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23254 }
23255 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
23256  Py_VISIT(exc_state->exc_type);
23257  Py_VISIT(exc_state->exc_value);
23258  Py_VISIT(exc_state->exc_traceback);
23259  return 0;
23260 }
23261 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23262  Py_VISIT(gen->closure);
23263  Py_VISIT(gen->classobj);
23264  Py_VISIT(gen->yieldfrom);
23265  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
23266 }
23267 static int __Pyx_Coroutine_clear(PyObject *self) {
23268  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23269  Py_CLEAR(gen->closure);
23270  Py_CLEAR(gen->classobj);
23271  Py_CLEAR(gen->yieldfrom);
23272  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
23273 #ifdef __Pyx_AsyncGen_USED
23274  if (__Pyx_AsyncGen_CheckExact(self)) {
23275  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23276  }
23277 #endif
23278  Py_CLEAR(gen->gi_code);
23279  Py_CLEAR(gen->gi_name);
23280  Py_CLEAR(gen->gi_qualname);
23281  Py_CLEAR(gen->gi_modulename);
23282  return 0;
23283 }
23284 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23285  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23286  PyObject_GC_UnTrack(gen);
23287  if (gen->gi_weakreflist != NULL)
23288  PyObject_ClearWeakRefs(self);
23289  if (gen->resume_label >= 0) {
23290  PyObject_GC_Track(self);
23291 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23292  if (PyObject_CallFinalizerFromDealloc(self))
23293 #else
23294  Py_TYPE(gen)->tp_del(self);
23295  if (self->ob_refcnt > 0)
23296 #endif
23297  {
23298  return;
23299  }
23300  PyObject_GC_UnTrack(self);
23301  }
23302 #ifdef __Pyx_AsyncGen_USED
23303  if (__Pyx_AsyncGen_CheckExact(self)) {
23304  /* We have to handle this case for asynchronous generators
23305  right here, because this code has to be between UNTRACK
23306  and GC_Del. */
23307  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23308  }
23309 #endif
23310  __Pyx_Coroutine_clear(self);
23311  PyObject_GC_Del(gen);
23312 }
23313 static void __Pyx_Coroutine_del(PyObject *self) {
23314  PyObject *error_type, *error_value, *error_traceback;
23315  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23316  __Pyx_PyThreadState_declare
23317  if (gen->resume_label < 0) {
23318  return;
23319  }
23320 #if !CYTHON_USE_TP_FINALIZE
23321  assert(self->ob_refcnt == 0);
23322  self->ob_refcnt = 1;
23323 #endif
23324  __Pyx_PyThreadState_assign
23325  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23326 #ifdef __Pyx_AsyncGen_USED
23327  if (__Pyx_AsyncGen_CheckExact(self)) {
23328  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23329  PyObject *finalizer = agen->ag_finalizer;
23330  if (finalizer && !agen->ag_closed) {
23331  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23332  if (unlikely(!res)) {
23333  PyErr_WriteUnraisable(self);
23334  } else {
23335  Py_DECREF(res);
23336  }
23337  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23338  return;
23339  }
23340  }
23341 #endif
23342  if (unlikely(gen->resume_label == 0 && !error_value)) {
23343 #ifdef __Pyx_Coroutine_USED
23344 #ifdef __Pyx_Generator_USED
23345  if (!__Pyx_Generator_CheckExact(self))
23346 #endif
23347  {
23348  PyObject_GC_UnTrack(self);
23349 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23350  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23351  PyErr_WriteUnraisable(self);
23352 #else
23353  {PyObject *msg;
23354  char *cmsg;
23355  #if CYTHON_COMPILING_IN_PYPY
23356  msg = NULL;
23357  cmsg = (char*) "coroutine was never awaited";
23358  #else
23359  char *cname;
23360  PyObject *qualname;
23361  qualname = gen->gi_qualname;
23362  cname = PyString_AS_STRING(qualname);
23363  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23364  if (unlikely(!msg)) {
23365  PyErr_Clear();
23366  cmsg = (char*) "coroutine was never awaited";
23367  } else {
23368  cmsg = PyString_AS_STRING(msg);
23369  }
23370  #endif
23371  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23372  PyErr_WriteUnraisable(self);
23373  Py_XDECREF(msg);}
23374 #endif
23375  PyObject_GC_Track(self);
23376  }
23377 #endif
23378  } else {
23379  PyObject *res = __Pyx_Coroutine_Close(self);
23380  if (unlikely(!res)) {
23381  if (PyErr_Occurred())
23382  PyErr_WriteUnraisable(self);
23383  } else {
23384  Py_DECREF(res);
23385  }
23386  }
23387  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23388 #if !CYTHON_USE_TP_FINALIZE
23389  assert(self->ob_refcnt > 0);
23390  if (--self->ob_refcnt == 0) {
23391  return;
23392  }
23393  {
23394  Py_ssize_t refcnt = self->ob_refcnt;
23395  _Py_NewReference(self);
23396  self->ob_refcnt = refcnt;
23397  }
23398 #if CYTHON_COMPILING_IN_CPYTHON
23399  assert(PyType_IS_GC(self->ob_type) &&
23400  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23401  _Py_DEC_REFTOTAL;
23402 #endif
23403 #ifdef COUNT_ALLOCS
23404  --Py_TYPE(self)->tp_frees;
23405  --Py_TYPE(self)->tp_allocs;
23406 #endif
23407 #endif
23408 }
23409 static PyObject *
23410 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23411 {
23412  PyObject *name = self->gi_name;
23413  if (unlikely(!name)) name = Py_None;
23414  Py_INCREF(name);
23415  return name;
23416 }
23417 static int
23418 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23419 {
23420  PyObject *tmp;
23421 #if PY_MAJOR_VERSION >= 3
23422  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23423 #else
23424  if (unlikely(value == NULL || !PyString_Check(value)))
23425 #endif
23426  {
23427  PyErr_SetString(PyExc_TypeError,
23428  "__name__ must be set to a string object");
23429  return -1;
23430  }
23431  tmp = self->gi_name;
23432  Py_INCREF(value);
23433  self->gi_name = value;
23434  Py_XDECREF(tmp);
23435  return 0;
23436 }
23437 static PyObject *
23438 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23439 {
23440  PyObject *name = self->gi_qualname;
23441  if (unlikely(!name)) name = Py_None;
23442  Py_INCREF(name);
23443  return name;
23444 }
23445 static int
23446 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23447 {
23448  PyObject *tmp;
23449 #if PY_MAJOR_VERSION >= 3
23450  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23451 #else
23452  if (unlikely(value == NULL || !PyString_Check(value)))
23453 #endif
23454  {
23455  PyErr_SetString(PyExc_TypeError,
23456  "__qualname__ must be set to a string object");
23457  return -1;
23458  }
23459  tmp = self->gi_qualname;
23460  Py_INCREF(value);
23461  self->gi_qualname = value;
23462  Py_XDECREF(tmp);
23463  return 0;
23464 }
23465 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23466  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23467  PyObject *name, PyObject *qualname, PyObject *module_name) {
23468  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23469  if (unlikely(!gen))
23470  return NULL;
23471  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23472 }
23473 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23474  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23475  PyObject *name, PyObject *qualname, PyObject *module_name) {
23476  gen->body = body;
23477  gen->closure = closure;
23478  Py_XINCREF(closure);
23479  gen->is_running = 0;
23480  gen->resume_label = 0;
23481  gen->classobj = NULL;
23482  gen->yieldfrom = NULL;
23483  gen->gi_exc_state.exc_type = NULL;
23484  gen->gi_exc_state.exc_value = NULL;
23485  gen->gi_exc_state.exc_traceback = NULL;
23486 #if CYTHON_USE_EXC_INFO_STACK
23487  gen->gi_exc_state.previous_item = NULL;
23488 #endif
23489  gen->gi_weakreflist = NULL;
23490  Py_XINCREF(qualname);
23491  gen->gi_qualname = qualname;
23492  Py_XINCREF(name);
23493  gen->gi_name = name;
23494  Py_XINCREF(module_name);
23495  gen->gi_modulename = module_name;
23496  Py_XINCREF(code);
23497  gen->gi_code = code;
23498  PyObject_GC_Track(gen);
23499  return gen;
23500 }
23501 
23502 /* PatchModuleWithCoroutine */
23503  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23504 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23505  int result;
23506  PyObject *globals, *result_obj;
23507  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23508  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23509  #ifdef __Pyx_Coroutine_USED
23510  (PyObject*)__pyx_CoroutineType);
23511  #else
23512  Py_None);
23513  #endif
23514  if (unlikely(result < 0)) goto ignore;
23515  result = PyDict_SetItemString(globals, "_cython_generator_type",
23516  #ifdef __Pyx_Generator_USED
23517  (PyObject*)__pyx_GeneratorType);
23518  #else
23519  Py_None);
23520  #endif
23521  if (unlikely(result < 0)) goto ignore;
23522  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23523  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23524  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23525  if (unlikely(!result_obj)) goto ignore;
23526  Py_DECREF(result_obj);
23527  Py_DECREF(globals);
23528  return module;
23529 ignore:
23530  Py_XDECREF(globals);
23531  PyErr_WriteUnraisable(module);
23532  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23533  Py_DECREF(module);
23534  module = NULL;
23535  }
23536 #else
23537  py_code++;
23538 #endif
23539  return module;
23540 }
23541 
23542 /* PatchGeneratorABC */
23543  #ifndef CYTHON_REGISTER_ABCS
23544 #define CYTHON_REGISTER_ABCS 1
23545 #endif
23546 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23547 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23548 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23549  module = __Pyx_Coroutine_patch_module(
23550  module, ""
23551 "if _cython_generator_type is not None:\n"
23552 " try: Generator = _module.Generator\n"
23553 " except AttributeError: pass\n"
23554 " else: Generator.register(_cython_generator_type)\n"
23555 "if _cython_coroutine_type is not None:\n"
23556 " try: Coroutine = _module.Coroutine\n"
23557 " except AttributeError: pass\n"
23558 " else: Coroutine.register(_cython_coroutine_type)\n"
23559  );
23560  return module;
23561 }
23562 #endif
23563 static int __Pyx_patch_abc(void) {
23564 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23565  static int abc_patched = 0;
23566  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23567  PyObject *module;
23568  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23569  if (!module) {
23570  PyErr_WriteUnraisable(NULL);
23571  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23572  ((PY_MAJOR_VERSION >= 3) ?
23573  "Cython module failed to register with collections.abc module" :
23574  "Cython module failed to register with collections module"), 1) < 0)) {
23575  return -1;
23576  }
23577  } else {
23578  module = __Pyx_patch_abc_module(module);
23579  abc_patched = 1;
23580  if (unlikely(!module))
23581  return -1;
23582  Py_DECREF(module);
23583  }
23584  module = PyImport_ImportModule("backports_abc");
23585  if (module) {
23586  module = __Pyx_patch_abc_module(module);
23587  Py_XDECREF(module);
23588  }
23589  if (!module) {
23590  PyErr_Clear();
23591  }
23592  }
23593 #else
23594  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23595 #endif
23596  return 0;
23597 }
23598 
23599 /* Generator */
23600  static PyMethodDef __pyx_Generator_methods[] = {
23601  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23602  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23603  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23604  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23605  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
23606  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23607  {0, 0, 0, 0}
23608 };
23609 static PyMemberDef __pyx_Generator_memberlist[] = {
23610  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23611  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23612  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23613  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23614  {0, 0, 0, 0, 0}
23615 };
23616 static PyGetSetDef __pyx_Generator_getsets[] = {
23617  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23618  (char*) PyDoc_STR("name of the generator"), 0},
23619  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23620  (char*) PyDoc_STR("qualified name of the generator"), 0},
23621  {0, 0, 0, 0, 0}
23622 };
23623 static PyTypeObject __pyx_GeneratorType_type = {
23624  PyVarObject_HEAD_INIT(0, 0)
23625  "generator",
23626  sizeof(__pyx_CoroutineObject),
23627  0,
23628  (destructor) __Pyx_Coroutine_dealloc,
23629  0,
23630  0,
23631  0,
23632  0,
23633  0,
23634  0,
23635  0,
23636  0,
23637  0,
23638  0,
23639  0,
23640  0,
23641  0,
23642  0,
23643  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23644  0,
23645  (traverseproc) __Pyx_Coroutine_traverse,
23646  0,
23647  0,
23648  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23649  0,
23650  (iternextfunc) __Pyx_Generator_Next,
23651  __pyx_Generator_methods,
23652  __pyx_Generator_memberlist,
23653  __pyx_Generator_getsets,
23654  0,
23655  0,
23656  0,
23657  0,
23658  0,
23659  0,
23660  0,
23661  0,
23662  0,
23663  0,
23664  0,
23665  0,
23666  0,
23667  0,
23668  0,
23669 #if CYTHON_USE_TP_FINALIZE
23670  0,
23671 #else
23672  __Pyx_Coroutine_del,
23673 #endif
23674  0,
23675 #if CYTHON_USE_TP_FINALIZE
23676  __Pyx_Coroutine_del,
23677 #elif PY_VERSION_HEX >= 0x030400a1
23678  0,
23679 #endif
23680 };
23681 static int __pyx_Generator_init(void) {
23682  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23683  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23684  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23685  if (unlikely(!__pyx_GeneratorType)) {
23686  return -1;
23687  }
23688  return 0;
23689 }
23690 
23691 /* CheckBinaryVersion */
23692  static int __Pyx_check_binary_version(void) {
23693  char ctversion[4], rtversion[4];
23694  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23695  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23696  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23697  char message[200];
23698  PyOS_snprintf(message, sizeof(message),
23699  "compiletime version %s of module '%.100s' "
23700  "does not match runtime version %s",
23701  ctversion, __Pyx_MODULE_NAME, rtversion);
23702  return PyErr_WarnEx(NULL, message, 1);
23703  }
23704  return 0;
23705 }
23706 
23707 /* InitStrings */
23708  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23709  while (t->p) {
23710  #if PY_MAJOR_VERSION < 3
23711  if (t->is_unicode) {
23712  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
23713  } else if (t->intern) {
23714  *t->p = PyString_InternFromString(t->s);
23715  } else {
23716  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23717  }
23718  #else
23719  if (t->is_unicode | t->is_str) {
23720  if (t->intern) {
23721  *t->p = PyUnicode_InternFromString(t->s);
23722  } else if (t->encoding) {
23723  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
23724  } else {
23725  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
23726  }
23727  } else {
23728  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
23729  }
23730  #endif
23731  if (!*t->p)
23732  return -1;
23733  if (PyObject_Hash(*t->p) == -1)
23734  return -1;
23735  ++t;
23736  }
23737  return 0;
23738 }
23739 
23740 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
23741  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
23742 }
23743 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
23744  Py_ssize_t ignore;
23745  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
23746 }
23747 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23748 #if !CYTHON_PEP393_ENABLED
23749 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23750  char* defenc_c;
23751  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
23752  if (!defenc) return NULL;
23753  defenc_c = PyBytes_AS_STRING(defenc);
23754 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23755  {
23756  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
23757  char* c;
23758  for (c = defenc_c; c < end; c++) {
23759  if ((unsigned char) (*c) >= 128) {
23760  PyUnicode_AsASCIIString(o);
23761  return NULL;
23762  }
23763  }
23764  }
23765 #endif
23766  *length = PyBytes_GET_SIZE(defenc);
23767  return defenc_c;
23768 }
23769 #else
23770 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23771  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
23772 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23773  if (likely(PyUnicode_IS_ASCII(o))) {
23774  *length = PyUnicode_GET_LENGTH(o);
23775  return PyUnicode_AsUTF8(o);
23776  } else {
23777  PyUnicode_AsASCIIString(o);
23778  return NULL;
23779  }
23780 #else
23781  return PyUnicode_AsUTF8AndSize(o, length);
23782 #endif
23783 }
23784 #endif
23785 #endif
23786 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23787 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23788  if (
23789 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23790  __Pyx_sys_getdefaultencoding_not_ascii &&
23791 #endif
23792  PyUnicode_Check(o)) {
23793  return __Pyx_PyUnicode_AsStringAndSize(o, length);
23794  } else
23795 #endif
23796 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
23797  if (PyByteArray_Check(o)) {
23798  *length = PyByteArray_GET_SIZE(o);
23799  return PyByteArray_AS_STRING(o);
23800  } else
23801 #endif
23802  {
23803  char* result;
23804  int r = PyBytes_AsStringAndSize(o, &result, length);
23805  if (unlikely(r < 0)) {
23806  return NULL;
23807  } else {
23808  return result;
23809  }
23810  }
23811 }
23812 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
23813  int is_true = x == Py_True;
23814  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
23815  else return PyObject_IsTrue(x);
23816 }
23817 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
23818  int retval;
23819  if (unlikely(!x)) return -1;
23820  retval = __Pyx_PyObject_IsTrue(x);
23821  Py_DECREF(x);
23822  return retval;
23823 }
23824 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
23825 #if PY_MAJOR_VERSION >= 3
23826  if (PyLong_Check(result)) {
23827  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
23828  "__int__ returned non-int (type %.200s). "
23829  "The ability to return an instance of a strict subclass of int "
23830  "is deprecated, and may be removed in a future version of Python.",
23831  Py_TYPE(result)->tp_name)) {
23832  Py_DECREF(result);
23833  return NULL;
23834  }
23835  return result;
23836  }
23837 #endif
23838  PyErr_Format(PyExc_TypeError,
23839  "__%.4s__ returned non-%.4s (type %.200s)",
23840  type_name, type_name, Py_TYPE(result)->tp_name);
23841  Py_DECREF(result);
23842  return NULL;
23843 }
23844 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
23845 #if CYTHON_USE_TYPE_SLOTS
23846  PyNumberMethods *m;
23847 #endif
23848  const char *name = NULL;
23849  PyObject *res = NULL;
23850 #if PY_MAJOR_VERSION < 3
23851  if (likely(PyInt_Check(x) || PyLong_Check(x)))
23852 #else
23853  if (likely(PyLong_Check(x)))
23854 #endif
23855  return __Pyx_NewRef(x);
23856 #if CYTHON_USE_TYPE_SLOTS
23857  m = Py_TYPE(x)->tp_as_number;
23858  #if PY_MAJOR_VERSION < 3
23859  if (m && m->nb_int) {
23860  name = "int";
23861  res = m->nb_int(x);
23862  }
23863  else if (m && m->nb_long) {
23864  name = "long";
23865  res = m->nb_long(x);
23866  }
23867  #else
23868  if (likely(m && m->nb_int)) {
23869  name = "int";
23870  res = m->nb_int(x);
23871  }
23872  #endif
23873 #else
23874  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
23875  res = PyNumber_Int(x);
23876  }
23877 #endif
23878  if (likely(res)) {
23879 #if PY_MAJOR_VERSION < 3
23880  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
23881 #else
23882  if (unlikely(!PyLong_CheckExact(res))) {
23883 #endif
23884  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
23885  }
23886  }
23887  else if (!PyErr_Occurred()) {
23888  PyErr_SetString(PyExc_TypeError,
23889  "an integer is required");
23890  }
23891  return res;
23892 }
23893 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
23894  Py_ssize_t ival;
23895  PyObject *x;
23896 #if PY_MAJOR_VERSION < 3
23897  if (likely(PyInt_CheckExact(b))) {
23898  if (sizeof(Py_ssize_t) >= sizeof(long))
23899  return PyInt_AS_LONG(b);
23900  else
23901  return PyInt_AsSsize_t(b);
23902  }
23903 #endif
23904  if (likely(PyLong_CheckExact(b))) {
23905  #if CYTHON_USE_PYLONG_INTERNALS
23906  const digit* digits = ((PyLongObject*)b)->ob_digit;
23907  const Py_ssize_t size = Py_SIZE(b);
23908  if (likely(__Pyx_sst_abs(size) <= 1)) {
23909  ival = likely(size) ? digits[0] : 0;
23910  if (size == -1) ival = -ival;
23911  return ival;
23912  } else {
23913  switch (size) {
23914  case 2:
23915  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23916  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23917  }
23918  break;
23919  case -2:
23920  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23921  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23922  }
23923  break;
23924  case 3:
23925  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23926  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23927  }
23928  break;
23929  case -3:
23930  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23931  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23932  }
23933  break;
23934  case 4:
23935  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23936  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]));
23937  }
23938  break;
23939  case -4:
23940  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23941  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]));
23942  }
23943  break;
23944  }
23945  }
23946  #endif
23947  return PyLong_AsSsize_t(b);
23948  }
23949  x = PyNumber_Index(b);
23950  if (!x) return -1;
23951  ival = PyInt_AsSsize_t(x);
23952  Py_DECREF(x);
23953  return ival;
23954 }
23955 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
23956  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
23957 }
23958 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
23959  return PyInt_FromSize_t(ival);
23960 }
23961 
23962 
23963 #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.
const Multivector< Scalar_T, LO, HI > operator &(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Inner product.
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.
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.
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10....
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