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  "-fmessage-length=0",
19  "-grecord-gcc-switches",
20  "-O2",
21  "-Wall",
22  "-D_FORTIFY_SOURCE=2",
23  "-fstack-protector-strong",
24  "-funwind-tables",
25  "-fasynchronous-unwind-tables",
26  "-fstack-clash-protection",
27  "-g",
28  "-finline-limit=4000",
29  "--param",
30  "inline-unit-growth=200",
31  "-funroll-loops",
32  "-fvariable-expansion-in-unroller",
33  "-DNDEBUG",
34  "-DHAVE_BITS_WORDSIZE_H",
35  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
36  "-D_GLUCAT_USE_DENSE_MATRICES",
37  "-D_GLUCAT_CHECK_ISNAN",
38  "-Wno-unused-local-typedefs",
39  "-Wno-misleading-indentation",
40  "-fno-check-new",
41  "-fexceptions"
42  ],
43  "include_dirs": [
44  ".",
45  ".."
46  ],
47  "language": "c++",
48  "name": "PyClical",
49  "sources": [
50  "PyClical.pyx"
51  ]
52  },
53  "module_name": "PyClical"
54 }
55 END: Cython Metadata */
56 
57 #define PY_SSIZE_T_CLEAN
58 #include "Python.h"
59 #ifndef Py_PYTHON_H
60  #error Python headers needed to compile C extensions, please install development version of Python.
61 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
62  #error Cython requires Python 2.6+ or Python 3.3+.
63 #else
64 #define CYTHON_ABI "0_29_6"
65 #define CYTHON_HEX_VERSION 0x001D06F0
66 #define CYTHON_FUTURE_DIVISION 0
67 #include <stddef.h>
68 #ifndef offsetof
69  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
70 #endif
71 #if !defined(WIN32) && !defined(MS_WINDOWS)
72  #ifndef __stdcall
73  #define __stdcall
74  #endif
75  #ifndef __cdecl
76  #define __cdecl
77  #endif
78  #ifndef __fastcall
79  #define __fastcall
80  #endif
81 #endif
82 #ifndef DL_IMPORT
83  #define DL_IMPORT(t) t
84 #endif
85 #ifndef DL_EXPORT
86  #define DL_EXPORT(t) t
87 #endif
88 #define __PYX_COMMA ,
89 #ifndef HAVE_LONG_LONG
90  #if PY_VERSION_HEX >= 0x02070000
91  #define HAVE_LONG_LONG
92  #endif
93 #endif
94 #ifndef PY_LONG_LONG
95  #define PY_LONG_LONG LONG_LONG
96 #endif
97 #ifndef Py_HUGE_VAL
98  #define Py_HUGE_VAL HUGE_VAL
99 #endif
100 #ifdef PYPY_VERSION
101  #define CYTHON_COMPILING_IN_PYPY 1
102  #define CYTHON_COMPILING_IN_PYSTON 0
103  #define CYTHON_COMPILING_IN_CPYTHON 0
104  #undef CYTHON_USE_TYPE_SLOTS
105  #define CYTHON_USE_TYPE_SLOTS 0
106  #undef CYTHON_USE_PYTYPE_LOOKUP
107  #define CYTHON_USE_PYTYPE_LOOKUP 0
108  #if PY_VERSION_HEX < 0x03050000
109  #undef CYTHON_USE_ASYNC_SLOTS
110  #define CYTHON_USE_ASYNC_SLOTS 0
111  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
112  #define CYTHON_USE_ASYNC_SLOTS 1
113  #endif
114  #undef CYTHON_USE_PYLIST_INTERNALS
115  #define CYTHON_USE_PYLIST_INTERNALS 0
116  #undef CYTHON_USE_UNICODE_INTERNALS
117  #define CYTHON_USE_UNICODE_INTERNALS 0
118  #undef CYTHON_USE_UNICODE_WRITER
119  #define CYTHON_USE_UNICODE_WRITER 0
120  #undef CYTHON_USE_PYLONG_INTERNALS
121  #define CYTHON_USE_PYLONG_INTERNALS 0
122  #undef CYTHON_AVOID_BORROWED_REFS
123  #define CYTHON_AVOID_BORROWED_REFS 1
124  #undef CYTHON_ASSUME_SAFE_MACROS
125  #define CYTHON_ASSUME_SAFE_MACROS 0
126  #undef CYTHON_UNPACK_METHODS
127  #define CYTHON_UNPACK_METHODS 0
128  #undef CYTHON_FAST_THREAD_STATE
129  #define CYTHON_FAST_THREAD_STATE 0
130  #undef CYTHON_FAST_PYCALL
131  #define CYTHON_FAST_PYCALL 0
132  #undef CYTHON_PEP489_MULTI_PHASE_INIT
133  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
134  #undef CYTHON_USE_TP_FINALIZE
135  #define CYTHON_USE_TP_FINALIZE 0
136  #undef CYTHON_USE_DICT_VERSIONS
137  #define CYTHON_USE_DICT_VERSIONS 0
138  #undef CYTHON_USE_EXC_INFO_STACK
139  #define CYTHON_USE_EXC_INFO_STACK 0
140 #elif defined(PYSTON_VERSION)
141  #define CYTHON_COMPILING_IN_PYPY 0
142  #define CYTHON_COMPILING_IN_PYSTON 1
143  #define CYTHON_COMPILING_IN_CPYTHON 0
144  #ifndef CYTHON_USE_TYPE_SLOTS
145  #define CYTHON_USE_TYPE_SLOTS 1
146  #endif
147  #undef CYTHON_USE_PYTYPE_LOOKUP
148  #define CYTHON_USE_PYTYPE_LOOKUP 0
149  #undef CYTHON_USE_ASYNC_SLOTS
150  #define CYTHON_USE_ASYNC_SLOTS 0
151  #undef CYTHON_USE_PYLIST_INTERNALS
152  #define CYTHON_USE_PYLIST_INTERNALS 0
153  #ifndef CYTHON_USE_UNICODE_INTERNALS
154  #define CYTHON_USE_UNICODE_INTERNALS 1
155  #endif
156  #undef CYTHON_USE_UNICODE_WRITER
157  #define CYTHON_USE_UNICODE_WRITER 0
158  #undef CYTHON_USE_PYLONG_INTERNALS
159  #define CYTHON_USE_PYLONG_INTERNALS 0
160  #ifndef CYTHON_AVOID_BORROWED_REFS
161  #define CYTHON_AVOID_BORROWED_REFS 0
162  #endif
163  #ifndef CYTHON_ASSUME_SAFE_MACROS
164  #define CYTHON_ASSUME_SAFE_MACROS 1
165  #endif
166  #ifndef CYTHON_UNPACK_METHODS
167  #define CYTHON_UNPACK_METHODS 1
168  #endif
169  #undef CYTHON_FAST_THREAD_STATE
170  #define CYTHON_FAST_THREAD_STATE 0
171  #undef CYTHON_FAST_PYCALL
172  #define CYTHON_FAST_PYCALL 0
173  #undef CYTHON_PEP489_MULTI_PHASE_INIT
174  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
175  #undef CYTHON_USE_TP_FINALIZE
176  #define CYTHON_USE_TP_FINALIZE 0
177  #undef CYTHON_USE_DICT_VERSIONS
178  #define CYTHON_USE_DICT_VERSIONS 0
179  #undef CYTHON_USE_EXC_INFO_STACK
180  #define CYTHON_USE_EXC_INFO_STACK 0
181 #else
182  #define CYTHON_COMPILING_IN_PYPY 0
183  #define CYTHON_COMPILING_IN_PYSTON 0
184  #define CYTHON_COMPILING_IN_CPYTHON 1
185  #ifndef CYTHON_USE_TYPE_SLOTS
186  #define CYTHON_USE_TYPE_SLOTS 1
187  #endif
188  #if PY_VERSION_HEX < 0x02070000
189  #undef CYTHON_USE_PYTYPE_LOOKUP
190  #define CYTHON_USE_PYTYPE_LOOKUP 0
191  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
192  #define CYTHON_USE_PYTYPE_LOOKUP 1
193  #endif
194  #if PY_MAJOR_VERSION < 3
195  #undef CYTHON_USE_ASYNC_SLOTS
196  #define CYTHON_USE_ASYNC_SLOTS 0
197  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
198  #define CYTHON_USE_ASYNC_SLOTS 1
199  #endif
200  #if PY_VERSION_HEX < 0x02070000
201  #undef CYTHON_USE_PYLONG_INTERNALS
202  #define CYTHON_USE_PYLONG_INTERNALS 0
203  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
204  #define CYTHON_USE_PYLONG_INTERNALS 1
205  #endif
206  #ifndef CYTHON_USE_PYLIST_INTERNALS
207  #define CYTHON_USE_PYLIST_INTERNALS 1
208  #endif
209  #ifndef CYTHON_USE_UNICODE_INTERNALS
210  #define CYTHON_USE_UNICODE_INTERNALS 1
211  #endif
212  #if PY_VERSION_HEX < 0x030300F0
213  #undef CYTHON_USE_UNICODE_WRITER
214  #define CYTHON_USE_UNICODE_WRITER 0
215  #elif !defined(CYTHON_USE_UNICODE_WRITER)
216  #define CYTHON_USE_UNICODE_WRITER 1
217  #endif
218  #ifndef CYTHON_AVOID_BORROWED_REFS
219  #define CYTHON_AVOID_BORROWED_REFS 0
220  #endif
221  #ifndef CYTHON_ASSUME_SAFE_MACROS
222  #define CYTHON_ASSUME_SAFE_MACROS 1
223  #endif
224  #ifndef CYTHON_UNPACK_METHODS
225  #define CYTHON_UNPACK_METHODS 1
226  #endif
227  #ifndef CYTHON_FAST_THREAD_STATE
228  #define CYTHON_FAST_THREAD_STATE 1
229  #endif
230  #ifndef CYTHON_FAST_PYCALL
231  #define CYTHON_FAST_PYCALL 1
232  #endif
233  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
234  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
235  #endif
236  #ifndef CYTHON_USE_TP_FINALIZE
237  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
238  #endif
239  #ifndef CYTHON_USE_DICT_VERSIONS
240  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
241  #endif
242  #ifndef CYTHON_USE_EXC_INFO_STACK
243  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
244  #endif
245 #endif
246 #if !defined(CYTHON_FAST_PYCCALL)
247 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
248 #endif
249 #if CYTHON_USE_PYLONG_INTERNALS
250  #include "longintrepr.h"
251  #undef SHIFT
252  #undef BASE
253  #undef MASK
254  #ifdef SIZEOF_VOID_P
255  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
256  #endif
257 #endif
258 #ifndef __has_attribute
259  #define __has_attribute(x) 0
260 #endif
261 #ifndef __has_cpp_attribute
262  #define __has_cpp_attribute(x) 0
263 #endif
264 #ifndef CYTHON_RESTRICT
265  #if defined(__GNUC__)
266  #define CYTHON_RESTRICT __restrict__
267  #elif defined(_MSC_VER) && _MSC_VER >= 1400
268  #define CYTHON_RESTRICT __restrict
269  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
270  #define CYTHON_RESTRICT restrict
271  #else
272  #define CYTHON_RESTRICT
273  #endif
274 #endif
275 #ifndef CYTHON_UNUSED
276 # if defined(__GNUC__)
277 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
278 # define CYTHON_UNUSED __attribute__ ((__unused__))
279 # else
280 # define CYTHON_UNUSED
281 # endif
282 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
283 # define CYTHON_UNUSED __attribute__ ((__unused__))
284 # else
285 # define CYTHON_UNUSED
286 # endif
287 #endif
288 #ifndef CYTHON_MAYBE_UNUSED_VAR
289 # if defined(__cplusplus)
290  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
291 # else
292 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
293 # endif
294 #endif
295 #ifndef CYTHON_NCP_UNUSED
296 # if CYTHON_COMPILING_IN_CPYTHON
297 # define CYTHON_NCP_UNUSED
298 # else
299 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
300 # endif
301 #endif
302 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
303 #ifdef _MSC_VER
304  #ifndef _MSC_STDINT_H_
305  #if _MSC_VER < 1300
306  typedef unsigned char uint8_t;
307  typedef unsigned int uint32_t;
308  #else
309  typedef unsigned __int8 uint8_t;
310  typedef unsigned __int32 uint32_t;
311  #endif
312  #endif
313 #else
314  #include <stdint.h>
315 #endif
316 #ifndef CYTHON_FALLTHROUGH
317  #if defined(__cplusplus) && __cplusplus >= 201103L
318  #if __has_cpp_attribute(fallthrough)
319  #define CYTHON_FALLTHROUGH [[fallthrough]]
320  #elif __has_cpp_attribute(clang::fallthrough)
321  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
322  #elif __has_cpp_attribute(gnu::fallthrough)
323  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
324  #endif
325  #endif
326  #ifndef CYTHON_FALLTHROUGH
327  #if __has_attribute(fallthrough)
328  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
329  #else
330  #define CYTHON_FALLTHROUGH
331  #endif
332  #endif
333  #if defined(__clang__ ) && defined(__apple_build_version__)
334  #if __apple_build_version__ < 7000000
335  #undef CYTHON_FALLTHROUGH
336  #define CYTHON_FALLTHROUGH
337  #endif
338  #endif
339 #endif
340 
341 #ifndef __cplusplus
342  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
343 #endif
344 #ifndef CYTHON_INLINE
345  #if defined(__clang__)
346  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
347  #else
348  #define CYTHON_INLINE inline
349  #endif
350 #endif
351 template<typename T>
352 void __Pyx_call_destructor(T& x) {
353  x.~T();
354 }
355 template<typename T>
356 class __Pyx_FakeReference {
357  public:
358  __Pyx_FakeReference() : ptr(NULL) { }
359  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
360  T *operator->() { return ptr; }
361  T *operator&() { return ptr; }
362  operator T&() { return *ptr; }
363  template<typename U> bool operator ==(U other) { return *ptr == other; }
364  template<typename U> bool operator !=(U other) { return *ptr != other; }
365  private:
366  T *ptr;
367 };
368 
369 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
370  #define Py_OptimizeFlag 0
371 #endif
372 #define __PYX_BUILD_PY_SSIZE_T "n"
373 #define CYTHON_FORMAT_SSIZE_T "z"
374 #if PY_MAJOR_VERSION < 3
375  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
376  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
377  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
378  #define __Pyx_DefaultClassType PyClass_Type
379 #else
380  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
381  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
382  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
383  #define __Pyx_DefaultClassType PyType_Type
384 #endif
385 #ifndef Py_TPFLAGS_CHECKTYPES
386  #define Py_TPFLAGS_CHECKTYPES 0
387 #endif
388 #ifndef Py_TPFLAGS_HAVE_INDEX
389  #define Py_TPFLAGS_HAVE_INDEX 0
390 #endif
391 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
392  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
393 #endif
394 #ifndef Py_TPFLAGS_HAVE_FINALIZE
395  #define Py_TPFLAGS_HAVE_FINALIZE 0
396 #endif
397 #ifndef METH_STACKLESS
398  #define METH_STACKLESS 0
399 #endif
400 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
401  #ifndef METH_FASTCALL
402  #define METH_FASTCALL 0x80
403  #endif
404  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
405  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
406  Py_ssize_t nargs, PyObject *kwnames);
407 #else
408  #define __Pyx_PyCFunctionFast _PyCFunctionFast
409  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
410 #endif
411 #if CYTHON_FAST_PYCCALL
412 #define __Pyx_PyFastCFunction_Check(func)\
413  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
414 #else
415 #define __Pyx_PyFastCFunction_Check(func) 0
416 #endif
417 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
418  #define PyObject_Malloc(s) PyMem_Malloc(s)
419  #define PyObject_Free(p) PyMem_Free(p)
420  #define PyObject_Realloc(p) PyMem_Realloc(p)
421 #endif
422 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
423  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
424  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
425  #define PyMem_RawFree(p) PyMem_Free(p)
426 #endif
427 #if CYTHON_COMPILING_IN_PYSTON
428  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
429  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
430 #else
431  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
432  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
433 #endif
434 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
435  #define __Pyx_PyThreadState_Current PyThreadState_GET()
436 #elif PY_VERSION_HEX >= 0x03060000
437  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
438 #elif PY_VERSION_HEX >= 0x03000000
439  #define __Pyx_PyThreadState_Current PyThreadState_GET()
440 #else
441  #define __Pyx_PyThreadState_Current _PyThreadState_Current
442 #endif
443 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
444 #include "pythread.h"
445 #define Py_tss_NEEDS_INIT 0
446 typedef int Py_tss_t;
447 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
448  *key = PyThread_create_key();
449  return 0;
450 }
451 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
452  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
453  *key = Py_tss_NEEDS_INIT;
454  return key;
455 }
456 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
457  PyObject_Free(key);
458 }
459 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
460  return *key != Py_tss_NEEDS_INIT;
461 }
462 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
463  PyThread_delete_key(*key);
464  *key = Py_tss_NEEDS_INIT;
465 }
466 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
467  return PyThread_set_key_value(*key, value);
468 }
469 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
470  return PyThread_get_key_value(*key);
471 }
472 #endif
473 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
474 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
475 #else
476 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
477 #endif
478 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
479  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
480  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
481 #else
482  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
483  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
484 #endif
485 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
486 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
487 #else
488 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
489 #endif
490 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
491  #define CYTHON_PEP393_ENABLED 1
492  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
493  0 : _PyUnicode_Ready((PyObject *)(op)))
494  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
495  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
496  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
497  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
498  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
499  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
500  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
501  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
502 #else
503  #define CYTHON_PEP393_ENABLED 0
504  #define PyUnicode_1BYTE_KIND 1
505  #define PyUnicode_2BYTE_KIND 2
506  #define PyUnicode_4BYTE_KIND 4
507  #define __Pyx_PyUnicode_READY(op) (0)
508  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
509  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
510  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
511  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
512  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
513  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
514  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
515  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
516 #endif
517 #if CYTHON_COMPILING_IN_PYPY
518  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
519  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
520 #else
521  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
522  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
523  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
524 #endif
525 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
526  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
527 #endif
528 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
529  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
530 #endif
531 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
532  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
533 #endif
534 #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))
535 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
536 #if PY_MAJOR_VERSION >= 3
537  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
538 #else
539  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
540 #endif
541 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
542  #define PyObject_ASCII(o) PyObject_Repr(o)
543 #endif
544 #if PY_MAJOR_VERSION >= 3
545  #define PyBaseString_Type PyUnicode_Type
546  #define PyStringObject PyUnicodeObject
547  #define PyString_Type PyUnicode_Type
548  #define PyString_Check PyUnicode_Check
549  #define PyString_CheckExact PyUnicode_CheckExact
550  #define PyObject_Unicode PyObject_Str
551 #endif
552 #if PY_MAJOR_VERSION >= 3
553  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
554  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
555 #else
556  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
557  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
558 #endif
559 #ifndef PySet_CheckExact
560  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
561 #endif
562 #if CYTHON_ASSUME_SAFE_MACROS
563  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
564 #else
565  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
566 #endif
567 #if PY_MAJOR_VERSION >= 3
568  #define PyIntObject PyLongObject
569  #define PyInt_Type PyLong_Type
570  #define PyInt_Check(op) PyLong_Check(op)
571  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
572  #define PyInt_FromString PyLong_FromString
573  #define PyInt_FromUnicode PyLong_FromUnicode
574  #define PyInt_FromLong PyLong_FromLong
575  #define PyInt_FromSize_t PyLong_FromSize_t
576  #define PyInt_FromSsize_t PyLong_FromSsize_t
577  #define PyInt_AsLong PyLong_AsLong
578  #define PyInt_AS_LONG PyLong_AS_LONG
579  #define PyInt_AsSsize_t PyLong_AsSsize_t
580  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
581  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
582  #define PyNumber_Int PyNumber_Long
583 #endif
584 #if PY_MAJOR_VERSION >= 3
585  #define PyBoolObject PyLongObject
586 #endif
587 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
588  #ifndef PyUnicode_InternFromString
589  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
590  #endif
591 #endif
592 #if PY_VERSION_HEX < 0x030200A4
593  typedef long Py_hash_t;
594  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
595  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
596 #else
597  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
598  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
599 #endif
600 #if PY_MAJOR_VERSION >= 3
601  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
602 #else
603  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
604 #endif
605 #if CYTHON_USE_ASYNC_SLOTS
606  #if PY_VERSION_HEX >= 0x030500B1
607  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
608  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
609  #else
610  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
611  #endif
612 #else
613  #define __Pyx_PyType_AsAsync(obj) NULL
614 #endif
615 #ifndef __Pyx_PyAsyncMethodsStruct
616  typedef struct {
617  unaryfunc am_await;
618  unaryfunc am_aiter;
619  unaryfunc am_anext;
620  } __Pyx_PyAsyncMethodsStruct;
621 #endif
622 
623 #if defined(WIN32) || defined(MS_WINDOWS)
624  #define _USE_MATH_DEFINES
625 #endif
626 #include <math.h>
627 #ifdef NAN
628 #define __PYX_NAN() ((float) NAN)
629 #else
630 static CYTHON_INLINE float __PYX_NAN() {
631  float value;
632  memset(&value, 0xFF, sizeof(value));
633  return value;
634 }
635 #endif
636 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
637 #define __Pyx_truncl trunc
638 #else
639 #define __Pyx_truncl truncl
640 #endif
641 
642 
643 #define __PYX_ERR(f_index, lineno, Ln_error) \
644 { \
645  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
646 }
647 
648 #ifndef __PYX_EXTERN_C
649  #ifdef __cplusplus
650  #define __PYX_EXTERN_C extern "C"
651  #else
652  #define __PYX_EXTERN_C extern
653  #endif
654 #endif
655 
656 #define __PYX_HAVE__PyClical
657 #define __PYX_HAVE_API__PyClical
658 /* Early includes */
659 #include "ios"
660 #include "new"
661 #include "stdexcept"
662 #include "typeinfo"
663 #include <vector>
664 #include "PyClical.h"
665 #ifdef _OPENMP
666 #include <omp.h>
667 #endif /* _OPENMP */
668 
669 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
670 #define CYTHON_WITHOUT_ASSERTIONS
671 #endif
672 
673 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
674  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
675 
676 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
677 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
678 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
679 #define __PYX_DEFAULT_STRING_ENCODING ""
680 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
681 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
682 #define __Pyx_uchar_cast(c) ((unsigned char)c)
683 #define __Pyx_long_cast(x) ((long)x)
684 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
685  (sizeof(type) < sizeof(Py_ssize_t)) ||\
686  (sizeof(type) > sizeof(Py_ssize_t) &&\
687  likely(v < (type)PY_SSIZE_T_MAX ||\
688  v == (type)PY_SSIZE_T_MAX) &&\
689  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
690  v == (type)PY_SSIZE_T_MIN))) ||\
691  (sizeof(type) == sizeof(Py_ssize_t) &&\
692  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
693  v == (type)PY_SSIZE_T_MAX))) )
694 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
695  return (size_t) i < (size_t) limit;
696 }
697 #if defined (__cplusplus) && __cplusplus >= 201103L
698  #include <cstdlib>
699  #define __Pyx_sst_abs(value) std::abs(value)
700 #elif SIZEOF_INT >= SIZEOF_SIZE_T
701  #define __Pyx_sst_abs(value) abs(value)
702 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
703  #define __Pyx_sst_abs(value) labs(value)
704 #elif defined (_MSC_VER)
705  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
706 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
707  #define __Pyx_sst_abs(value) llabs(value)
708 #elif defined (__GNUC__)
709  #define __Pyx_sst_abs(value) __builtin_llabs(value)
710 #else
711  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
712 #endif
713 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
714 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
715 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
716 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
717 #define __Pyx_PyBytes_FromString PyBytes_FromString
718 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
719 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
720 #if PY_MAJOR_VERSION < 3
721  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
722  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
723 #else
724  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
725  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
726 #endif
727 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
728 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
729 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
730 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
731 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
732 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
733 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
734 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
735 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
736 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
737 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
738 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
739 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
740 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
741 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
742 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
743 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
744  const Py_UNICODE *u_end = u;
745  while (*u_end++) ;
746  return (size_t)(u_end - u - 1);
747 }
748 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
749 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
750 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
751 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
752 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
753 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
754 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
755 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
756 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
757 #define __Pyx_PySequence_Tuple(obj)\
758  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
759 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
760 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
761 #if CYTHON_ASSUME_SAFE_MACROS
762 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
763 #else
764 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
765 #endif
766 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
767 #if PY_MAJOR_VERSION >= 3
768 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
769 #else
770 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
771 #endif
772 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
773 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
774 static int __Pyx_sys_getdefaultencoding_not_ascii;
775 static int __Pyx_init_sys_getdefaultencoding_params(void) {
776  PyObject* sys;
777  PyObject* default_encoding = NULL;
778  PyObject* ascii_chars_u = NULL;
779  PyObject* ascii_chars_b = NULL;
780  const char* default_encoding_c;
781  sys = PyImport_ImportModule("sys");
782  if (!sys) goto bad;
783  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
784  Py_DECREF(sys);
785  if (!default_encoding) goto bad;
786  default_encoding_c = PyBytes_AsString(default_encoding);
787  if (!default_encoding_c) goto bad;
788  if (strcmp(default_encoding_c, "ascii") == 0) {
789  __Pyx_sys_getdefaultencoding_not_ascii = 0;
790  } else {
791  char ascii_chars[128];
792  int c;
793  for (c = 0; c < 128; c++) {
794  ascii_chars[c] = c;
795  }
796  __Pyx_sys_getdefaultencoding_not_ascii = 1;
797  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
798  if (!ascii_chars_u) goto bad;
799  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
800  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
801  PyErr_Format(
802  PyExc_ValueError,
803  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
804  default_encoding_c);
805  goto bad;
806  }
807  Py_DECREF(ascii_chars_u);
808  Py_DECREF(ascii_chars_b);
809  }
810  Py_DECREF(default_encoding);
811  return 0;
812 bad:
813  Py_XDECREF(default_encoding);
814  Py_XDECREF(ascii_chars_u);
815  Py_XDECREF(ascii_chars_b);
816  return -1;
817 }
818 #endif
819 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
820 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
821 #else
822 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
823 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
824 static char* __PYX_DEFAULT_STRING_ENCODING;
825 static int __Pyx_init_sys_getdefaultencoding_params(void) {
826  PyObject* sys;
827  PyObject* default_encoding = NULL;
828  char* default_encoding_c;
829  sys = PyImport_ImportModule("sys");
830  if (!sys) goto bad;
831  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
832  Py_DECREF(sys);
833  if (!default_encoding) goto bad;
834  default_encoding_c = PyBytes_AsString(default_encoding);
835  if (!default_encoding_c) goto bad;
836  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
837  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
838  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
839  Py_DECREF(default_encoding);
840  return 0;
841 bad:
842  Py_XDECREF(default_encoding);
843  return -1;
844 }
845 #endif
846 #endif
847 
848 
849 /* Test for GCC > 2.95 */
850 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
851  #define likely(x) __builtin_expect(!!(x), 1)
852  #define unlikely(x) __builtin_expect(!!(x), 0)
853 #else /* !__GNUC__ or GCC < 2.95 */
854  #define likely(x) (x)
855  #define unlikely(x) (x)
856 #endif /* __GNUC__ */
857 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
858 
859 static PyObject *__pyx_m = NULL;
860 static PyObject *__pyx_d;
861 static PyObject *__pyx_b;
862 static PyObject *__pyx_cython_runtime = NULL;
863 static PyObject *__pyx_empty_tuple;
864 static PyObject *__pyx_empty_bytes;
865 static PyObject *__pyx_empty_unicode;
866 static int __pyx_lineno;
867 static int __pyx_clineno = 0;
868 static const char * __pyx_cfilenm= __FILE__;
869 static const char *__pyx_filename;
870 
871 
872 static const char *__pyx_f[] = {
873  "PyClical.pyx",
874  "stringsource",
875 };
876 
877 /*--- Type declarations ---*/
878 struct __pyx_obj_8PyClical_index_set;
879 struct __pyx_obj_8PyClical_clifford;
880 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
881 struct __pyx_opt_args_8PyClical_sqrt;
882 struct __pyx_opt_args_8PyClical_log;
883 struct __pyx_opt_args_8PyClical_cos;
884 struct __pyx_opt_args_8PyClical_acos;
885 struct __pyx_opt_args_8PyClical_acosh;
886 struct __pyx_opt_args_8PyClical_sin;
887 struct __pyx_opt_args_8PyClical_asin;
888 struct __pyx_opt_args_8PyClical_asinh;
889 struct __pyx_opt_args_8PyClical_tan;
890 struct __pyx_opt_args_8PyClical_atan;
891 struct __pyx_opt_args_8PyClical_atanh;
892 struct __pyx_opt_args_8PyClical_random_clifford;
893 
894 /* "PyClical.pyx":1542
895  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
896  *
897  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
898  * """
899  * Square root of multivector with optional complexifier.
900  */
901 struct __pyx_opt_args_8PyClical_sqrt {
902  int __pyx_n;
903  PyObject *i;
904 };
905 
906 /* "PyClical.pyx":1579
907  * return clifford().wrap( glucat.exp(toClifford(obj)) )
908  *
909  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
910  * """
911  * Natural logarithm of multivector with optional complexifier.
912  */
913 struct __pyx_opt_args_8PyClical_log {
914  int __pyx_n;
915  PyObject *i;
916 };
917 
918 /* "PyClical.pyx":1602
919  * return clifford().wrap( glucat.log(toClifford(obj)) )
920  *
921  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
922  * """
923  * Cosine of multivector with optional complexifier.
924  */
925 struct __pyx_opt_args_8PyClical_cos {
926  int __pyx_n;
927  PyObject *i;
928 };
929 
930 /* "PyClical.pyx":1619
931  * return clifford().wrap( glucat.cos(toClifford(obj)) )
932  *
933  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
934  * """
935  * Inverse cosine of multivector with optional complexifier.
936  */
937 struct __pyx_opt_args_8PyClical_acos {
938  int __pyx_n;
939  PyObject *i;
940 };
941 
942 /* "PyClical.pyx":1656
943  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
944  *
945  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
946  * """
947  * Inverse hyperbolic cosine of multivector with optional complexifier.
948  */
949 struct __pyx_opt_args_8PyClical_acosh {
950  int __pyx_n;
951  PyObject *i;
952 };
953 
954 /* "PyClical.pyx":1679
955  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
956  *
957  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
958  * """
959  * Sine of multivector with optional complexifier.
960  */
961 struct __pyx_opt_args_8PyClical_sin {
962  int __pyx_n;
963  PyObject *i;
964 };
965 
966 /* "PyClical.pyx":1698
967  * return clifford().wrap( glucat.sin(toClifford(obj)) )
968  *
969  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
970  * """
971  * Inverse sine of multivector with optional complexifier.
972  */
973 struct __pyx_opt_args_8PyClical_asin {
974  int __pyx_n;
975  PyObject *i;
976 };
977 
978 /* "PyClical.pyx":1733
979  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
980  *
981  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
982  * """
983  * Inverse hyperbolic sine of multivector with optional complexifier.
984  */
985 struct __pyx_opt_args_8PyClical_asinh {
986  int __pyx_n;
987  PyObject *i;
988 };
989 
990 /* "PyClical.pyx":1752
991  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
992  *
993  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
994  * """
995  * Tangent of multivector with optional complexifier.
996  */
997 struct __pyx_opt_args_8PyClical_tan {
998  int __pyx_n;
999  PyObject *i;
1000 };
1001 
1002 /* "PyClical.pyx":1769
1003  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1004  *
1005  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1006  * """
1007  * Inverse tangent of multivector with optional complexifier.
1008  */
1009 struct __pyx_opt_args_8PyClical_atan {
1010  int __pyx_n;
1011  PyObject *i;
1012 };
1013 
1014 /* "PyClical.pyx":1798
1015  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1016  *
1017  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1018  * """
1019  * Inverse hyperbolic tangent of multivector with optional complexifier.
1020  */
1021 struct __pyx_opt_args_8PyClical_atanh {
1022  int __pyx_n;
1023  PyObject *i;
1024 };
1025 
1026 /* "PyClical.pyx":1815
1027  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1028  *
1029  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1030  * """
1031  * Random multivector within a frame.
1032  */
1033 struct __pyx_opt_args_8PyClical_random_clifford {
1034  int __pyx_n;
1035  PyObject *fill;
1036 };
1037 
1038 /* "PyClical.pyx":37
1039  *
1040  * # Forward reference
1041  * cdef class index_set # <<<<<<<<<<<<<<
1042  *
1043  * cdef inline IndexSet toIndexSet(obj):
1044  */
1045 struct __pyx_obj_8PyClical_index_set {
1046  PyObject_HEAD
1047  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1048  IndexSet *instance;
1049 };
1050 
1051 
1052 /* "PyClical.pyx":530
1053  *
1054  * # Forward reference.
1055  * cdef class clifford # <<<<<<<<<<<<<<
1056  *
1057  * cdef inline Clifford toClifford(obj):
1058  */
1059 struct __pyx_obj_8PyClical_clifford {
1060  PyObject_HEAD
1061  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1062  Clifford *instance;
1063 };
1064 
1065 
1066 /* "PyClical.pyx":227
1067  * return self.instance.getitem(idx)
1068  *
1069  * def __iter__(self): # <<<<<<<<<<<<<<
1070  * """
1071  * Iterate over the indices of an index_set.
1072  */
1073 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1074  PyObject_HEAD
1075  PyObject *__pyx_v_idx;
1076  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1077  PyObject *__pyx_t_0;
1078  Py_ssize_t __pyx_t_1;
1079  PyObject *(*__pyx_t_2)(PyObject *);
1080 };
1081 
1082 
1083 
1084 /* "PyClical.pyx":45
1085  * return index_set(obj).instance[0]
1086  *
1087  * cdef class index_set: # <<<<<<<<<<<<<<
1088  * """
1089  * Python class index_set wraps C++ class IndexSet.
1090  */
1091 
1092 struct __pyx_vtabstruct_8PyClical_index_set {
1093  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1094  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1095  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1096 };
1097 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1098 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1099 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1100 
1101 
1102 /* "PyClical.pyx":535
1103  * return clifford(obj).instance[0]
1104  *
1105  * cdef class clifford: # <<<<<<<<<<<<<<
1106  * """
1107  * Python class clifford wraps C++ class Clifford.
1108  */
1109 
1110 struct __pyx_vtabstruct_8PyClical_clifford {
1111  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1112  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1113  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1114 };
1115 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1116 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1117 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1118 
1119 /* --- Runtime support code (head) --- */
1120 /* Refnanny.proto */
1121 #ifndef CYTHON_REFNANNY
1122  #define CYTHON_REFNANNY 0
1123 #endif
1124 #if CYTHON_REFNANNY
1125  typedef struct {
1126  void (*INCREF)(void*, PyObject*, int);
1127  void (*DECREF)(void*, PyObject*, int);
1128  void (*GOTREF)(void*, PyObject*, int);
1129  void (*GIVEREF)(void*, PyObject*, int);
1130  void* (*SetupContext)(const char*, int, const char*);
1131  void (*FinishContext)(void**);
1132  } __Pyx_RefNannyAPIStruct;
1133  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1134  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1135  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1136 #ifdef WITH_THREAD
1137  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1138  if (acquire_gil) {\
1139  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1140  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1141  PyGILState_Release(__pyx_gilstate_save);\
1142  } else {\
1143  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1144  }
1145 #else
1146  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1147  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1148 #endif
1149  #define __Pyx_RefNannyFinishContext()\
1150  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1151  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1152  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1153  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1154  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1155  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1156  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1157  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1158  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1159 #else
1160  #define __Pyx_RefNannyDeclarations
1161  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1162  #define __Pyx_RefNannyFinishContext()
1163  #define __Pyx_INCREF(r) Py_INCREF(r)
1164  #define __Pyx_DECREF(r) Py_DECREF(r)
1165  #define __Pyx_GOTREF(r)
1166  #define __Pyx_GIVEREF(r)
1167  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1168  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1169  #define __Pyx_XGOTREF(r)
1170  #define __Pyx_XGIVEREF(r)
1171 #endif
1172 #define __Pyx_XDECREF_SET(r, v) do {\
1173  PyObject *tmp = (PyObject *) r;\
1174  r = v; __Pyx_XDECREF(tmp);\
1175  } while (0)
1176 #define __Pyx_DECREF_SET(r, v) do {\
1177  PyObject *tmp = (PyObject *) r;\
1178  r = v; __Pyx_DECREF(tmp);\
1179  } while (0)
1180 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1181 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1182 
1183 /* PyObjectGetAttrStr.proto */
1184 #if CYTHON_USE_TYPE_SLOTS
1185 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1186 #else
1187 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1188 #endif
1189 
1190 /* GetBuiltinName.proto */
1191 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1192 
1193 /* PyCFunctionFastCall.proto */
1194 #if CYTHON_FAST_PYCCALL
1195 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1196 #else
1197 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1198 #endif
1199 
1200 /* PyFunctionFastCall.proto */
1201 #if CYTHON_FAST_PYCALL
1202 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1203  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1204 #if 1 || PY_VERSION_HEX < 0x030600B1
1205 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1206 #else
1207 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1208 #endif
1209 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1210  (sizeof(char [1 - 2*!(cond)]) - 1)
1211 #ifndef Py_MEMBER_SIZE
1212 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1213 #endif
1214  static size_t __pyx_pyframe_localsplus_offset = 0;
1215  #include "frameobject.h"
1216  #define __Pxy_PyFrame_Initialize_Offsets()\
1217  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1218  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1219  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1220  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1221 #endif
1222 
1223 /* PyObjectCall.proto */
1224 #if CYTHON_COMPILING_IN_CPYTHON
1225 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1226 #else
1227 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1228 #endif
1229 
1230 /* PyObjectCallMethO.proto */
1231 #if CYTHON_COMPILING_IN_CPYTHON
1232 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1233 #endif
1234 
1235 /* PyObjectCallOneArg.proto */
1236 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1237 
1238 /* PyThreadStateGet.proto */
1239 #if CYTHON_FAST_THREAD_STATE
1240 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1241 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1242 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1243 #else
1244 #define __Pyx_PyThreadState_declare
1245 #define __Pyx_PyThreadState_assign
1246 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1247 #endif
1248 
1249 /* PyErrFetchRestore.proto */
1250 #if CYTHON_FAST_THREAD_STATE
1251 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1252 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1253 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1254 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1255 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1256 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1257 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1258 #if CYTHON_COMPILING_IN_CPYTHON
1259 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1260 #else
1261 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1262 #endif
1263 #else
1264 #define __Pyx_PyErr_Clear() PyErr_Clear()
1265 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1266 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1267 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1268 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1269 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1270 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1271 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1272 #endif
1273 
1274 /* WriteUnraisableException.proto */
1275 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1276  int lineno, const char *filename,
1277  int full_traceback, int nogil);
1278 
1279 /* PyDictVersioning.proto */
1280 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1281 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1282 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1283 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1284  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1285  (cache_var) = (value);
1286 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1287  static PY_UINT64_T __pyx_dict_version = 0;\
1288  static PyObject *__pyx_dict_cached_value = NULL;\
1289  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1290  (VAR) = __pyx_dict_cached_value;\
1291  } else {\
1292  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1293  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1294  }\
1295 }
1296 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1297 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1298 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1299 #else
1300 #define __PYX_GET_DICT_VERSION(dict) (0)
1301 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1302 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1303 #endif
1304 
1305 /* PyObjectCallNoArg.proto */
1306 #if CYTHON_COMPILING_IN_CPYTHON
1307 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1308 #else
1309 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1310 #endif
1311 
1312 /* RaiseDoubleKeywords.proto */
1313 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1314 
1315 /* ParseKeywords.proto */
1316 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1317  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1318  const char* function_name);
1319 
1320 /* RaiseArgTupleInvalid.proto */
1321 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1322  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1323 
1324 /* GetModuleGlobalName.proto */
1325 #if CYTHON_USE_DICT_VERSIONS
1326 #define __Pyx_GetModuleGlobalName(var, name) {\
1327  static PY_UINT64_T __pyx_dict_version = 0;\
1328  static PyObject *__pyx_dict_cached_value = NULL;\
1329  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1330  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1331  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1332 }
1333 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1334  PY_UINT64_T __pyx_dict_version;\
1335  PyObject *__pyx_dict_cached_value;\
1336  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1337 }
1338 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1339 #else
1340 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1341 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1342 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1343 #endif
1344 
1345 /* GetTopmostException.proto */
1346 #if CYTHON_USE_EXC_INFO_STACK
1347 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1348 #endif
1349 
1350 /* SaveResetException.proto */
1351 #if CYTHON_FAST_THREAD_STATE
1352 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1353 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1354 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1355 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1356 #else
1357 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1358 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1359 #endif
1360 
1361 /* PyErrExceptionMatches.proto */
1362 #if CYTHON_FAST_THREAD_STATE
1363 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1364 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1365 #else
1366 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1367 #endif
1368 
1369 /* GetException.proto */
1370 #if CYTHON_FAST_THREAD_STATE
1371 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1372 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1373 #else
1374 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1375 #endif
1376 
1377 /* RaiseException.proto */
1378 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1379 
1380 /* PyIntBinop.proto */
1381 #if !CYTHON_COMPILING_IN_PYPY
1382 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1383 #else
1384 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1385  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1386 #endif
1387 
1388 /* PySequenceContains.proto */
1389 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1390  int result = PySequence_Contains(seq, item);
1391  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1392 }
1393 
1394 /* SetItemInt.proto */
1395 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1396  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1397  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1398  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1399  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1400 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1401 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1402  int is_list, int wraparound, int boundscheck);
1403 
1404 /* PyObjectCall2Args.proto */
1405 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1406 
1407 /* ArgTypeTest.proto */
1408 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1409  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1410  __Pyx__ArgTypeTest(obj, type, name, exact))
1411 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1412 
1413 /* Import.proto */
1414 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1415 
1416 /* IncludeStringH.proto */
1417 #include <string.h>
1418 
1419 /* PyObject_GenericGetAttrNoDict.proto */
1420 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1421 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1422 #else
1423 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1424 #endif
1425 
1426 /* PyObject_GenericGetAttr.proto */
1427 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1428 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1429 #else
1430 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1431 #endif
1432 
1433 /* SetVTable.proto */
1434 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1435 
1436 /* SetupReduce.proto */
1437 static int __Pyx_setup_reduce(PyObject* type_obj);
1438 
1439 /* PyFloatBinop.proto */
1440 #if !CYTHON_COMPILING_IN_PYPY
1441 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1442 #else
1443 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1444  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1445  #endif
1446 
1447 /* BytesEquals.proto */
1448 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1449 
1450 /* UnicodeEquals.proto */
1451 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1452 
1453 /* StrEquals.proto */
1454 #if PY_MAJOR_VERSION >= 3
1455 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1456 #else
1457 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1458 #endif
1459 
1460 /* CLineInTraceback.proto */
1461 #ifdef CYTHON_CLINE_IN_TRACEBACK
1462 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1463 #else
1464 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1465 #endif
1466 
1467 /* CodeObjectCache.proto */
1468 typedef struct {
1469  PyCodeObject* code_object;
1470  int code_line;
1471 } __Pyx_CodeObjectCacheEntry;
1472 struct __Pyx_CodeObjectCache {
1473  int count;
1474  int max_count;
1475  __Pyx_CodeObjectCacheEntry* entries;
1476 };
1477 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1478 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1479 static PyCodeObject *__pyx_find_code_object(int code_line);
1480 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1481 
1482 /* AddTraceback.proto */
1483 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1484  int py_line, const char *filename);
1485 
1486 /* CppExceptionConversion.proto */
1487 #ifndef __Pyx_CppExn2PyErr
1488 #include <new>
1489 #include <typeinfo>
1490 #include <stdexcept>
1491 #include <ios>
1492 static void __Pyx_CppExn2PyErr() {
1493  try {
1494  if (PyErr_Occurred())
1495  ; // let the latest Python exn pass through and ignore the current one
1496  else
1497  throw;
1498  } catch (const std::bad_alloc& exn) {
1499  PyErr_SetString(PyExc_MemoryError, exn.what());
1500  } catch (const std::bad_cast& exn) {
1501  PyErr_SetString(PyExc_TypeError, exn.what());
1502  } catch (const std::bad_typeid& exn) {
1503  PyErr_SetString(PyExc_TypeError, exn.what());
1504  } catch (const std::domain_error& exn) {
1505  PyErr_SetString(PyExc_ValueError, exn.what());
1506  } catch (const std::invalid_argument& exn) {
1507  PyErr_SetString(PyExc_ValueError, exn.what());
1508  } catch (const std::ios_base::failure& exn) {
1509  PyErr_SetString(PyExc_IOError, exn.what());
1510  } catch (const std::out_of_range& exn) {
1511  PyErr_SetString(PyExc_IndexError, exn.what());
1512  } catch (const std::overflow_error& exn) {
1513  PyErr_SetString(PyExc_OverflowError, exn.what());
1514  } catch (const std::range_error& exn) {
1515  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1516  } catch (const std::underflow_error& exn) {
1517  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1518  } catch (const std::exception& exn) {
1519  PyErr_SetString(PyExc_RuntimeError, exn.what());
1520  }
1521  catch (...)
1522  {
1523  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1524  }
1525 }
1526 #endif
1527 
1528 /* CIntToPy.proto */
1529 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1530 
1531 /* CIntFromPy.proto */
1532 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1533 
1534 /* CIntToPy.proto */
1535 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1536 
1537 /* CIntFromPy.proto */
1538 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1539 
1540 /* FastTypeChecks.proto */
1541 #if CYTHON_COMPILING_IN_CPYTHON
1542 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1543 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1544 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1545 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1546 #else
1547 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1548 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1549 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1550 #endif
1551 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1552 
1553 /* FetchCommonType.proto */
1554 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1555 
1556 /* SwapException.proto */
1557 #if CYTHON_FAST_THREAD_STATE
1558 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1559 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1560 #else
1561 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1562 #endif
1563 
1564 /* PyObjectGetMethod.proto */
1565 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1566 
1567 /* PyObjectCallMethod1.proto */
1568 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1569 
1570 /* CoroutineBase.proto */
1571 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1572 #if CYTHON_USE_EXC_INFO_STACK
1573 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1574 #else
1575 typedef struct {
1576  PyObject *exc_type;
1577  PyObject *exc_value;
1578  PyObject *exc_traceback;
1579 } __Pyx_ExcInfoStruct;
1580 #endif
1581 typedef struct {
1582  PyObject_HEAD
1583  __pyx_coroutine_body_t body;
1584  PyObject *closure;
1585  __Pyx_ExcInfoStruct gi_exc_state;
1586  PyObject *gi_weakreflist;
1587  PyObject *classobj;
1588  PyObject *yieldfrom;
1589  PyObject *gi_name;
1590  PyObject *gi_qualname;
1591  PyObject *gi_modulename;
1592  PyObject *gi_code;
1593  int resume_label;
1594  char is_running;
1595 } __pyx_CoroutineObject;
1596 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1597  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1598  PyObject *name, PyObject *qualname, PyObject *module_name);
1599 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1600  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1601  PyObject *name, PyObject *qualname, PyObject *module_name);
1602 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1603 static int __Pyx_Coroutine_clear(PyObject *self);
1604 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1605 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1606 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1607 #if CYTHON_USE_EXC_INFO_STACK
1608 #define __Pyx_Coroutine_SwapException(self)
1609 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1610 #else
1611 #define __Pyx_Coroutine_SwapException(self) {\
1612  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1613  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1614  }
1615 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1616  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1617  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1618  }
1619 #endif
1620 #if CYTHON_FAST_THREAD_STATE
1621 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1622  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1623 #else
1624 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1625  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1626 #endif
1627 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1628 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1629 
1630 /* PatchModuleWithCoroutine.proto */
1631 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1632 
1633 /* PatchGeneratorABC.proto */
1634 static int __Pyx_patch_abc(void);
1635 
1636 /* Generator.proto */
1637 #define __Pyx_Generator_USED
1638 static PyTypeObject *__pyx_GeneratorType = 0;
1639 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1640 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1641  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1642 static PyObject *__Pyx_Generator_Next(PyObject *self);
1643 static int __pyx_Generator_init(void);
1644 
1645 /* CheckBinaryVersion.proto */
1646 static int __Pyx_check_binary_version(void);
1647 
1648 /* InitStrings.proto */
1649 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1650 
1651 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1652 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1653 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1654 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1655 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1656 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1657 
1658 /* Module declarations from 'libcpp.vector' */
1659 
1660 /* Module declarations from 'glucat' */
1661 
1662 /* Module declarations from 'PyClical' */
1663 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1664 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1665 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1666 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1667 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1668 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1669 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1670 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1671 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1672 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1673 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1674 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1675 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1676 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1677 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1678 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1679 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1680 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1681 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1682 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1683 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1685 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1686 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1687 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1690 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1691 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1692 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1693 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1694 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1695 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1696 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1697 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1698 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1699 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1700 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1702 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1703 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1704 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*/
1705 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1706 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1707 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1708 #define __Pyx_MODULE_NAME "PyClical"
1709 extern int __pyx_module_is_main_PyClical;
1710 int __pyx_module_is_main_PyClical = 0;
1711 
1712 /* Implementation of 'PyClical' */
1713 static PyObject *__pyx_builtin_IndexError;
1714 static PyObject *__pyx_builtin_RuntimeError;
1715 static PyObject *__pyx_builtin_TypeError;
1716 static PyObject *__pyx_builtin_ValueError;
1717 static PyObject *__pyx_builtin_NotImplemented;
1718 static PyObject *__pyx_builtin_range;
1719 static PyObject *__pyx_builtin_xrange;
1720 static const char __pyx_k_[] = ".";
1721 static const char __pyx_k_e[] = "e";
1722 static const char __pyx_k_i[] = "i";
1723 static const char __pyx_k_m[] = "m";
1724 static const char __pyx_k_p[] = "p";
1725 static const char __pyx_k_q[] = "q";
1726 static const char __pyx_k__2[] = " ";
1727 static const char __pyx_k__5[] = ":";
1728 static const char __pyx_k__6[] = "\n\t";
1729 static const char __pyx_k__7[] = " (";
1730 static const char __pyx_k__8[] = ", ";
1731 static const char __pyx_k__9[] = ").";
1732 static const char __pyx_k_cl[] = "cl";
1733 static const char __pyx_k_pi[] = "pi";
1734 static const char __pyx_k_cos[] = "cos";
1735 static const char __pyx_k_exp[] = "exp";
1736 static const char __pyx_k_frm[] = "frm";
1737 static const char __pyx_k_inv[] = "inv";
1738 static const char __pyx_k_ist[] = "ist";
1739 static const char __pyx_k_ixt[] = "ixt";
1740 static const char __pyx_k_lhs[] = "lhs";
1741 static const char __pyx_k_log[] = "log";
1742 static const char __pyx_k_max[] = "max";
1743 static const char __pyx_k_min[] = "min";
1744 static const char __pyx_k_obj[] = "obj";
1745 static const char __pyx_k_odd[] = "odd";
1746 static const char __pyx_k_pow[] = "pow";
1747 static const char __pyx_k_rhs[] = "rhs";
1748 static const char __pyx_k_sin[] = "sin";
1749 static const char __pyx_k_tan[] = "tan";
1750 static const char __pyx_k_tau[] = "tau";
1751 static const char __pyx_k_Real[] = "Real";
1752 static const char __pyx_k_acos[] = "acos";
1753 static const char __pyx_k_args[] = "args";
1754 static const char __pyx_k_asin[] = "asin";
1755 static const char __pyx_k_atan[] = "atan";
1756 static const char __pyx_k_conj[] = "conj";
1757 static const char __pyx_k_copy[] = "copy";
1758 static const char __pyx_k_cosh[] = "cosh";
1759 static const char __pyx_k_even[] = "even";
1760 static const char __pyx_k_fill[] = "fill";
1761 static const char __pyx_k_from[] = " from ";
1762 static const char __pyx_k_iter[] = "__iter__";
1763 static const char __pyx_k_main[] = "__main__";
1764 static const char __pyx_k_math[] = "math";
1765 static const char __pyx_k_name[] = "__name__";
1766 static const char __pyx_k_norm[] = "norm";
1767 static const char __pyx_k_pure[] = "pure";
1768 static const char __pyx_k_quad[] = "quad";
1769 static const char __pyx_k_send[] = "send";
1770 static const char __pyx_k_sinh[] = "sinh";
1771 static const char __pyx_k_sqrt[] = "sqrt";
1772 static const char __pyx_k_tanh[] = "tanh";
1773 static const char __pyx_k_test[] = "_test";
1774 static const char __pyx_k_0_8_2[] = "0.8.2";
1775 static const char __pyx_k_acosh[] = "acosh";
1776 static const char __pyx_k_asinh[] = "asinh";
1777 static const char __pyx_k_atanh[] = "atanh";
1778 static const char __pyx_k_close[] = "close";
1779 static const char __pyx_k_grade[] = "grade";
1780 static const char __pyx_k_istpq[] = "istpq";
1781 static const char __pyx_k_nbar3[] = "nbar3";
1782 static const char __pyx_k_ninf3[] = "ninf3";
1783 static const char __pyx_k_other[] = "other";
1784 static const char __pyx_k_range[] = "range";
1785 static const char __pyx_k_throw[] = "throw";
1786 static const char __pyx_k_using[] = " using (";
1787 static const char __pyx_k_value[] = " value ";
1788 static const char __pyx_k_import[] = "__import__";
1789 static const char __pyx_k_reduce[] = "__reduce__";
1790 static const char __pyx_k_scalar[] = "scalar";
1791 static const char __pyx_k_test_2[] = "__test__";
1792 static const char __pyx_k_xrange[] = "xrange";
1793 static const char __pyx_k_doctest[] = "doctest";
1794 static const char __pyx_k_invalid[] = " invalid ";
1795 static const char __pyx_k_numbers[] = "numbers";
1796 static const char __pyx_k_reverse[] = "reverse";
1797 static const char __pyx_k_testmod[] = "testmod";
1798 static const char __pyx_k_version[] = "__version__";
1799 static const char __pyx_k_Integral[] = "Integral";
1800 static const char __pyx_k_PyClical[] = "PyClical";
1801 static const char __pyx_k_Sequence[] = "Sequence";
1802 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1803 static const char __pyx_k_clifford[] = "clifford";
1804 static const char __pyx_k_getstate[] = "__getstate__";
1805 static const char __pyx_k_involute[] = "involute";
1806 static const char __pyx_k_setstate[] = "__setstate__";
1807 static const char __pyx_k_to_frame[] = " to frame ";
1808 static const char __pyx_k_TypeError[] = "TypeError";
1809 static const char __pyx_k_index_set[] = "index_set";
1810 static const char __pyx_k_outer_pow[] = "outer_pow";
1811 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1812 static const char __pyx_k_IndexError[] = "IndexError";
1813 static const char __pyx_k_ValueError[] = "ValueError";
1814 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1815 static const char __pyx_k_collections[] = "collections";
1816 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1817 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1818 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1819 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1820 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1821 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1822 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1823 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1824 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1825 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1826 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1827 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1828 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1829 static const char __pyx_k_using_invalid[] = " using invalid ";
1830 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1831 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1832 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1833 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1834 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1835 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1836 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1837 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1838 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1839 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1840 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1841 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1842 static const char __pyx_k_invalid_string[] = " invalid string ";
1843 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1844 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1845 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1846 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1847 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1848 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1849 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1850 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1851 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1852 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1853 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1854 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1855 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1856 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1857 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1858 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1859 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1860 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1861 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1862 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1863 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1864 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1865 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1866 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1867 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1868 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1869 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1870 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1871 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1872 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1873 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1874 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1875 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1876 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1877 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1878 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1879 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1880 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1881 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1882 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1883 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1884 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1885 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1886 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1887 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1888 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1889 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1890 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1891 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1892 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1893 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1894 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1895 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1896 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1897 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1898 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1899 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1900 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1901 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1902 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1903 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1904 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1905 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1906 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1907 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1908 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1909 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1910 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1911 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1912 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1913 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1914 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1915 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1916 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1917 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1918 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1919 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1920 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1921 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1922 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1923 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1924 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1925 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1926 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1927 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1928 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1929 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1930 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1931 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1932 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 ";
1933 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 ";
1934 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 ";
1935 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 ";
1936 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 ";
1937 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 ";
1938 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 ";
1939 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 ";
1940 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 ";
1941 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 ";
1942 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 ";
1943 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 ";
1944 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 ";
1945 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 ";
1946 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 ";
1947 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 ";
1948 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 ";
1949 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 ";
1950 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 ";
1951 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 ";
1952 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 ";
1953 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1954 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1955 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1956 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 ";
1957 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 ";
1958 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 ";
1959 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 ";
1960 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 ";
1961 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 ";
1962 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 ";
1963 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 ";
1964 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 ";
1965 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 ";
1966 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 ";
1967 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 ";
1968 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 ";
1969 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 ";
1970 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 ";
1971 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 ";
1972 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 ";
1973 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 ";
1974 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 ";
1975 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 ";
1976 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 ";
1977 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 ";
1978 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 ";
1979 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 ";
1980 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 ";
1981 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 ";
1982 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 ";
1983 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 ";
1984 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 ";
1985 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 ";
1986 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 ";
1987 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 ";
1988 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 ";
1989 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 ";
1990 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 ";
1991 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 ";
1992 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 ";
1993 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 ";
1994 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 ";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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 ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 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 ";
2016 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 ";
2017 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 ";
2018 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 ";
2019 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 ";
2020 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 ";
2021 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 ";
2022 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 ";
2023 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 ";
2024  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 ";
2025  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 ";
2026  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2027  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 ";
2028  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
2029  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 ";
2030  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2031  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2032  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 ";
2033  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 ";
2034  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 ";
2035  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 ";
2036  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 ";
2037  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
2038  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
2039  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
2040  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2041  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 ";
2042  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 ";
2043  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 ";
2044  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 ";
2045  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 ";
2046  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 ";
2047  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 ";
2048  static PyObject *__pyx_kp_s_;
2049  static PyObject *__pyx_kp_s_0_8_2;
2050  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2051  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2052  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2053  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2054  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
2055  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
2056  static PyObject *__pyx_kp_s_Cannot_reframe;
2057  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
2058  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2059  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2060  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2061  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2062  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2063  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2064  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2065  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2066  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2067  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2068  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2069  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2070  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2071  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2072  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2073  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2074  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2075  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2076  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2077  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2078  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2079  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2080  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2081  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2082  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2083  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2084  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2085  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2086  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2087  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2088  static PyObject *__pyx_n_s_IndexError;
2089  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2090  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2091  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2092  static PyObject *__pyx_n_s_Integral;
2093  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2094  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2095  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2096  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2097  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2098  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2099  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2100  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2101  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2102  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2103  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2104  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2105  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2106  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2107  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2108  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2109  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2110  static PyObject *__pyx_n_s_NotImplemented;
2111  static PyObject *__pyx_kp_s_Not_applicable;
2112  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2113  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2114  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2115  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2116  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2117  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2118  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2119  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2120  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2121  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2122  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2123  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2124  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2125  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2126  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2127  static PyObject *__pyx_n_s_PyClical;
2128  static PyObject *__pyx_kp_s_PyClical_pyx;
2129  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2130  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2131  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2132  static PyObject *__pyx_n_s_Real;
2133  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2134  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2135  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2136  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2137  static PyObject *__pyx_n_s_RuntimeError;
2138  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2139  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2140  static PyObject *__pyx_n_s_Sequence;
2141  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2142  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2143  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2144  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2145  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2146  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2147  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2148  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2149  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2150  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2151  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2152  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2153  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2154  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2155  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2156  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2157  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2158  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2159  static PyObject *__pyx_kp_u_The_informal_string_representat;
2160  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2161  static PyObject *__pyx_kp_u_The_official_string_representat;
2162  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2163  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2164  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2165  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2166  static PyObject *__pyx_n_s_TypeError;
2167  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2168  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2169  static PyObject *__pyx_n_s_ValueError;
2170  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2171  static PyObject *__pyx_kp_s__2;
2172  static PyObject *__pyx_kp_s__5;
2173  static PyObject *__pyx_kp_s__6;
2174  static PyObject *__pyx_kp_s__7;
2175  static PyObject *__pyx_kp_s__8;
2176  static PyObject *__pyx_kp_s__9;
2177  static PyObject *__pyx_kp_u_abs_line_1473;
2178  static PyObject *__pyx_n_s_acos;
2179  static PyObject *__pyx_kp_u_acos_line_1619;
2180  static PyObject *__pyx_n_s_acosh;
2181  static PyObject *__pyx_kp_u_acosh_line_1656;
2182  static PyObject *__pyx_kp_u_agc3_line_1844;
2183  static PyObject *__pyx_n_s_args;
2184  static PyObject *__pyx_kp_s_as_frame;
2185  static PyObject *__pyx_n_s_asin;
2186  static PyObject *__pyx_kp_u_asin_line_1698;
2187  static PyObject *__pyx_n_s_asinh;
2188  static PyObject *__pyx_kp_u_asinh_line_1733;
2189  static PyObject *__pyx_n_s_atan;
2190  static PyObject *__pyx_kp_u_atan_line_1769;
2191  static PyObject *__pyx_n_s_atanh;
2192  static PyObject *__pyx_kp_u_atanh_line_1798;
2193  static PyObject *__pyx_kp_u_cga3_line_1824;
2194  static PyObject *__pyx_kp_u_cga3std_line_1833;
2195  static PyObject *__pyx_n_s_cl;
2196  static PyObject *__pyx_n_s_clifford;
2197  static PyObject *__pyx_kp_u_clifford___add___line_739;
2198  static PyObject *__pyx_kp_u_clifford___and___line_835;
2199  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2200  static PyObject *__pyx_kp_u_clifford___div___line_895;
2201  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2202  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2203  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2204  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2205  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2206  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2207  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2208  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2209  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2210  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2211  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2212  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2213  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2214  static PyObject *__pyx_kp_u_clifford___or___line_938;
2215  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2216  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2217  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2218  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2219  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2220  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2221  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2222  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2223  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2224  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2225  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2226  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2227  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2228  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2229  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2230  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2231  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2232  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2233  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2234  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2235  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2236  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2237  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2238  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2239  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2240  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2241  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2242  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2243  static PyObject *__pyx_n_s_cline_in_traceback;
2244  static PyObject *__pyx_n_s_close;
2245  static PyObject *__pyx_n_s_collections;
2246  static PyObject *__pyx_kp_u_compare_line_490;
2247  static PyObject *__pyx_kp_u_complexifier_line_1527;
2248  static PyObject *__pyx_n_s_conj;
2249  static PyObject *__pyx_kp_u_conj_line_1436;
2250  static PyObject *__pyx_n_s_copy;
2251  static PyObject *__pyx_n_s_cos;
2252  static PyObject *__pyx_kp_u_cos_line_1602;
2253  static PyObject *__pyx_n_s_cosh;
2254  static PyObject *__pyx_kp_u_cosh_line_1640;
2255  static PyObject *__pyx_n_s_doctest;
2256  static PyObject *__pyx_n_s_e;
2257  static PyObject *__pyx_kp_u_e_line_1887;
2258  static PyObject *__pyx_n_s_even;
2259  static PyObject *__pyx_kp_u_even_line_1388;
2260  static PyObject *__pyx_n_s_exp;
2261  static PyObject *__pyx_kp_u_exp_line_1565;
2262  static PyObject *__pyx_n_s_fill;
2263  static PyObject *__pyx_n_s_frm;
2264  static PyObject *__pyx_kp_s_from;
2265  static PyObject *__pyx_n_s_getstate;
2266  static PyObject *__pyx_n_s_grade;
2267  static PyObject *__pyx_n_s_i;
2268  static PyObject *__pyx_kp_u_imag_line_1366;
2269  static PyObject *__pyx_n_s_import;
2270  static PyObject *__pyx_n_s_index_set;
2271  static PyObject *__pyx_kp_u_index_set___and___line_269;
2272  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2273  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2274  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2275  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2276  static PyObject *__pyx_n_s_index_set___iter;
2277  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2278  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2279  static PyObject *__pyx_kp_u_index_set___or___line_291;
2280  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2281  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2282  static PyObject *__pyx_kp_u_index_set___str___line_393;
2283  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2284  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2285  static PyObject *__pyx_kp_u_index_set_count_line_313;
2286  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2287  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2288  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2289  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2290  static PyObject *__pyx_kp_u_index_set_max_line_349;
2291  static PyObject *__pyx_kp_u_index_set_min_line_340;
2292  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2293  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2294  static PyObject *__pyx_n_s_inv;
2295  static PyObject *__pyx_kp_u_inv_line_1329;
2296  static PyObject *__pyx_kp_s_invalid;
2297  static PyObject *__pyx_kp_s_invalid_string;
2298  static PyObject *__pyx_n_s_involute;
2299  static PyObject *__pyx_kp_u_involute_line_1406;
2300  static PyObject *__pyx_n_s_ist;
2301  static PyObject *__pyx_n_s_istpq;
2302  static PyObject *__pyx_kp_u_istpq_line_1900;
2303  static PyObject *__pyx_n_s_iter;
2304  static PyObject *__pyx_n_s_ixt;
2305  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2306  static PyObject *__pyx_n_s_lhs;
2307  static PyObject *__pyx_n_s_log;
2308  static PyObject *__pyx_kp_u_log_line_1579;
2309  static PyObject *__pyx_n_s_m;
2310  static PyObject *__pyx_n_s_main;
2311  static PyObject *__pyx_n_s_math;
2312  static PyObject *__pyx_n_s_max;
2313  static PyObject *__pyx_kp_u_max_abs_line_1482;
2314  static PyObject *__pyx_kp_u_max_pos_line_511;
2315  static PyObject *__pyx_n_s_min;
2316  static PyObject *__pyx_kp_u_min_neg_line_502;
2317  static PyObject *__pyx_n_s_name;
2318  static PyObject *__pyx_n_s_nbar3;
2319  static PyObject *__pyx_n_s_ninf3;
2320  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2321  static PyObject *__pyx_n_s_norm;
2322  static PyObject *__pyx_kp_u_norm_line_1462;
2323  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2324  static PyObject *__pyx_n_s_numbers;
2325  static PyObject *__pyx_n_s_obj;
2326  static PyObject *__pyx_n_s_odd;
2327  static PyObject *__pyx_kp_u_odd_line_1397;
2328  static PyObject *__pyx_n_s_other;
2329  static PyObject *__pyx_n_s_outer_pow;
2330  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2331  static PyObject *__pyx_n_s_p;
2332  static PyObject *__pyx_n_s_pi;
2333  static PyObject *__pyx_n_s_pow;
2334  static PyObject *__pyx_kp_u_pow_line_1494;
2335  static PyObject *__pyx_n_s_pure;
2336  static PyObject *__pyx_kp_u_pure_line_1377;
2337  static PyObject *__pyx_n_s_pyx_vtable;
2338  static PyObject *__pyx_n_s_q;
2339  static PyObject *__pyx_n_s_quad;
2340  static PyObject *__pyx_kp_u_quad_line_1451;
2341  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2342  static PyObject *__pyx_n_s_range;
2343  static PyObject *__pyx_kp_u_real_line_1355;
2344  static PyObject *__pyx_n_s_reduce;
2345  static PyObject *__pyx_n_s_reduce_cython;
2346  static PyObject *__pyx_n_s_reduce_ex;
2347  static PyObject *__pyx_n_s_reverse;
2348  static PyObject *__pyx_kp_u_reverse_line_1421;
2349  static PyObject *__pyx_n_s_rhs;
2350  static PyObject *__pyx_n_s_scalar;
2351  static PyObject *__pyx_kp_u_scalar_line_1344;
2352  static PyObject *__pyx_n_s_send;
2353  static PyObject *__pyx_n_s_setstate;
2354  static PyObject *__pyx_n_s_setstate_cython;
2355  static PyObject *__pyx_n_s_sin;
2356  static PyObject *__pyx_kp_u_sin_line_1679;
2357  static PyObject *__pyx_n_s_sinh;
2358  static PyObject *__pyx_kp_u_sinh_line_1719;
2359  static PyObject *__pyx_n_s_sqrt;
2360  static PyObject *__pyx_kp_u_sqrt_line_1542;
2361  static PyObject *__pyx_n_s_tan;
2362  static PyObject *__pyx_kp_u_tan_line_1752;
2363  static PyObject *__pyx_n_s_tanh;
2364  static PyObject *__pyx_kp_u_tanh_line_1786;
2365  static PyObject *__pyx_n_s_tau;
2366  static PyObject *__pyx_n_s_test;
2367  static PyObject *__pyx_n_s_test_2;
2368  static PyObject *__pyx_n_s_testmod;
2369  static PyObject *__pyx_n_s_throw;
2370  static PyObject *__pyx_kp_s_to_frame;
2371  static PyObject *__pyx_kp_s_using;
2372  static PyObject *__pyx_kp_s_using_invalid;
2373  static PyObject *__pyx_kp_s_value;
2374  static PyObject *__pyx_n_s_version;
2375  static PyObject *__pyx_n_s_xrange;
2376 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2377 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2378 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2379 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 */
2380 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 */
2381 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2382 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2383 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2384 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2385 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2386 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2387 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2388 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2389 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2390 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2391 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2392 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2393 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2394 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2395 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2396 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2397 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2398 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2399 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2400 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2401 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2402 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 */
2403 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2404 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2405 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2406 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2407 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2408 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 */
2409 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2410 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 */
2411 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2412 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2413 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 */
2414 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2415 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2416 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2417 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2418 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2419 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2420 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2421 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2422 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2423 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2424 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2425 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2426 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2427 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2428 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2429 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2430 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2431 #endif
2432 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2433 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2434 #endif
2435 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2436 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2437 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2438 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2439 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2440 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2441 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2442 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2443 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2444 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2445 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2446 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2447 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2448 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2449 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2459 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2460 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 */
2461 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2464 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2465 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2470 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2476 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2477 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2478 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2481 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2482 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2493 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2494 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 */
2495 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2497 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2498 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2499 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2500 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2501 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2502 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2503 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2504 static PyObject *__pyx_float_0_0;
2505 static PyObject *__pyx_float_1_0;
2506 static PyObject *__pyx_float_2_0;
2507 static PyObject *__pyx_float_8_0;
2508 static PyObject *__pyx_int_0;
2509 static PyObject *__pyx_int_1;
2510 static PyObject *__pyx_int_4;
2511 static PyObject *__pyx_int_neg_1;
2512 static PyObject *__pyx_tuple__3;
2513 static PyObject *__pyx_tuple__4;
2514 static PyObject *__pyx_tuple__10;
2515 static PyObject *__pyx_tuple__11;
2516 static PyObject *__pyx_tuple__12;
2517 static PyObject *__pyx_tuple__15;
2518 static PyObject *__pyx_tuple__16;
2519 static PyObject *__pyx_tuple__18;
2520 static PyObject *__pyx_tuple__20;
2521 static PyObject *__pyx_tuple__21;
2522 static PyObject *__pyx_tuple__22;
2523 static PyObject *__pyx_codeobj__13;
2524 static PyObject *__pyx_codeobj__14;
2525 static PyObject *__pyx_codeobj__17;
2526 static PyObject *__pyx_codeobj__19;
2527 static PyObject *__pyx_codeobj__23;
2528 /* Late includes */
2529 
2530 /* "PyClical.pyx":39
2531  * cdef class index_set
2532  *
2533  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2534  * """
2535  * Return the C++ IndexSet instance wrapped by index_set(obj).
2536  */
2537 
2538 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2539  IndexSet __pyx_r;
2540  __Pyx_RefNannyDeclarations
2541  PyObject *__pyx_t_1 = NULL;
2542  __Pyx_RefNannySetupContext("toIndexSet", 0);
2543 
2544  /* "PyClical.pyx":43
2545  * Return the C++ IndexSet instance wrapped by index_set(obj).
2546  * """
2547  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2548  *
2549  * cdef class index_set:
2550  */
2551  __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)
2552  __Pyx_GOTREF(__pyx_t_1);
2553  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2554  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2555  goto __pyx_L0;
2556 
2557  /* "PyClical.pyx":39
2558  * cdef class index_set
2559  *
2560  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2561  * """
2562  * Return the C++ IndexSet instance wrapped by index_set(obj).
2563  */
2564 
2565  /* function exit code */
2566  __pyx_L1_error:;
2567  __Pyx_XDECREF(__pyx_t_1);
2568  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2569  __Pyx_pretend_to_initialize(&__pyx_r);
2570  __pyx_L0:;
2571  __Pyx_RefNannyFinishContext();
2572  return __pyx_r;
2573 }
2574 
2575 /* "PyClical.pyx":51
2576  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2577  *
2578  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2579  * """
2580  * Wrap an instance of the C++ class IndexSet.
2581  */
2582 
2583 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2584  PyObject *__pyx_r = NULL;
2585  __Pyx_RefNannyDeclarations
2586  __Pyx_RefNannySetupContext("wrap", 0);
2587 
2588  /* "PyClical.pyx":55
2589  * Wrap an instance of the C++ class IndexSet.
2590  * """
2591  * self.instance[0] = other # <<<<<<<<<<<<<<
2592  * return self
2593  *
2594  */
2595  (__pyx_v_self->instance[0]) = __pyx_v_other;
2596 
2597  /* "PyClical.pyx":56
2598  * """
2599  * self.instance[0] = other
2600  * return self # <<<<<<<<<<<<<<
2601  *
2602  * cdef inline IndexSet unwrap(index_set self):
2603  */
2604  __Pyx_XDECREF(__pyx_r);
2605  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2606  __pyx_r = ((PyObject *)__pyx_v_self);
2607  goto __pyx_L0;
2608 
2609  /* "PyClical.pyx":51
2610  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2611  *
2612  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2613  * """
2614  * Wrap an instance of the C++ class IndexSet.
2615  */
2616 
2617  /* function exit code */
2618  __pyx_L0:;
2619  __Pyx_XGIVEREF(__pyx_r);
2620  __Pyx_RefNannyFinishContext();
2621  return __pyx_r;
2622 }
2623 
2624 /* "PyClical.pyx":58
2625  * return self
2626  *
2627  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2628  * """
2629  * Return the wrapped C++ IndexSet instance.
2630  */
2631 
2632 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2633  IndexSet __pyx_r;
2634  __Pyx_RefNannyDeclarations
2635  __Pyx_RefNannySetupContext("unwrap", 0);
2636 
2637  /* "PyClical.pyx":62
2638  * Return the wrapped C++ IndexSet instance.
2639  * """
2640  * return self.instance[0] # <<<<<<<<<<<<<<
2641  *
2642  * cpdef copy(index_set self):
2643  */
2644  __pyx_r = (__pyx_v_self->instance[0]);
2645  goto __pyx_L0;
2646 
2647  /* "PyClical.pyx":58
2648  * return self
2649  *
2650  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2651  * """
2652  * Return the wrapped C++ IndexSet instance.
2653  */
2654 
2655  /* function exit code */
2656  __pyx_L0:;
2657  __Pyx_RefNannyFinishContext();
2658  return __pyx_r;
2659 }
2660 
2661 /* "PyClical.pyx":64
2662  * return self.instance[0]
2663  *
2664  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2665  * """
2666  * Copy this index_set object.
2667  */
2668 
2669 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2670 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2671  PyObject *__pyx_r = NULL;
2672  __Pyx_RefNannyDeclarations
2673  PyObject *__pyx_t_1 = NULL;
2674  PyObject *__pyx_t_2 = NULL;
2675  PyObject *__pyx_t_3 = NULL;
2676  PyObject *__pyx_t_4 = NULL;
2677  __Pyx_RefNannySetupContext("copy", 0);
2678  /* Check if called by wrapper */
2679  if (unlikely(__pyx_skip_dispatch)) ;
2680  /* Check if overridden in Python */
2681  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)))) {
2682  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2683  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2684  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2685  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2686  #endif
2687  __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)
2688  __Pyx_GOTREF(__pyx_t_1);
2689  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2690  __Pyx_XDECREF(__pyx_r);
2691  __Pyx_INCREF(__pyx_t_1);
2692  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2693  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2694  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2695  if (likely(__pyx_t_4)) {
2696  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2697  __Pyx_INCREF(__pyx_t_4);
2698  __Pyx_INCREF(function);
2699  __Pyx_DECREF_SET(__pyx_t_3, function);
2700  }
2701  }
2702  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2703  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2704  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2705  __Pyx_GOTREF(__pyx_t_2);
2706  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2707  __pyx_r = __pyx_t_2;
2708  __pyx_t_2 = 0;
2709  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2710  goto __pyx_L0;
2711  }
2712  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2713  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2714  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2715  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2716  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2717  }
2718  #endif
2719  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2720  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2721  }
2722  #endif
2723  }
2724 
2725  /* "PyClical.pyx":71
2726  * {1}
2727  * """
2728  * return index_set(self) # <<<<<<<<<<<<<<
2729  *
2730  * def __cinit__(self, other = 0):
2731  */
2732  __Pyx_XDECREF(__pyx_r);
2733  __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)
2734  __Pyx_GOTREF(__pyx_t_1);
2735  __pyx_r = __pyx_t_1;
2736  __pyx_t_1 = 0;
2737  goto __pyx_L0;
2738 
2739  /* "PyClical.pyx":64
2740  * return self.instance[0]
2741  *
2742  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2743  * """
2744  * Copy this index_set object.
2745  */
2746 
2747  /* function exit code */
2748  __pyx_L1_error:;
2749  __Pyx_XDECREF(__pyx_t_1);
2750  __Pyx_XDECREF(__pyx_t_2);
2751  __Pyx_XDECREF(__pyx_t_3);
2752  __Pyx_XDECREF(__pyx_t_4);
2753  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2754  __pyx_r = 0;
2755  __pyx_L0:;
2756  __Pyx_XGIVEREF(__pyx_r);
2757  __Pyx_RefNannyFinishContext();
2758  return __pyx_r;
2759 }
2760 
2761 /* Python wrapper */
2762 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2763 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 ";
2764 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2765  PyObject *__pyx_r = 0;
2766  __Pyx_RefNannyDeclarations
2767  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2768  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2769 
2770  /* function exit code */
2771  __Pyx_RefNannyFinishContext();
2772  return __pyx_r;
2773 }
2774 
2775 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2776  PyObject *__pyx_r = NULL;
2777  __Pyx_RefNannyDeclarations
2778  PyObject *__pyx_t_1 = NULL;
2779  __Pyx_RefNannySetupContext("copy", 0);
2780  __Pyx_XDECREF(__pyx_r);
2781  __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)
2782  __Pyx_GOTREF(__pyx_t_1);
2783  __pyx_r = __pyx_t_1;
2784  __pyx_t_1 = 0;
2785  goto __pyx_L0;
2786 
2787  /* function exit code */
2788  __pyx_L1_error:;
2789  __Pyx_XDECREF(__pyx_t_1);
2790  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2791  __pyx_r = NULL;
2792  __pyx_L0:;
2793  __Pyx_XGIVEREF(__pyx_r);
2794  __Pyx_RefNannyFinishContext();
2795  return __pyx_r;
2796 }
2797 
2798 /* "PyClical.pyx":73
2799  * return index_set(self)
2800  *
2801  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2802  * """
2803  * Construct an object of type index_set.
2804  */
2805 
2806 /* Python wrapper */
2807 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2808 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2809  PyObject *__pyx_v_other = 0;
2810  int __pyx_r;
2811  __Pyx_RefNannyDeclarations
2812  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2813  {
2814  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2815  PyObject* values[1] = {0};
2816  values[0] = ((PyObject *)__pyx_int_0);
2817  if (unlikely(__pyx_kwds)) {
2818  Py_ssize_t kw_args;
2819  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2820  switch (pos_args) {
2821  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2822  CYTHON_FALLTHROUGH;
2823  case 0: break;
2824  default: goto __pyx_L5_argtuple_error;
2825  }
2826  kw_args = PyDict_Size(__pyx_kwds);
2827  switch (pos_args) {
2828  case 0:
2829  if (kw_args > 0) {
2830  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2831  if (value) { values[0] = value; kw_args--; }
2832  }
2833  }
2834  if (unlikely(kw_args > 0)) {
2835  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2836  }
2837  } else {
2838  switch (PyTuple_GET_SIZE(__pyx_args)) {
2839  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2840  CYTHON_FALLTHROUGH;
2841  case 0: break;
2842  default: goto __pyx_L5_argtuple_error;
2843  }
2844  }
2845  __pyx_v_other = values[0];
2846  }
2847  goto __pyx_L4_argument_unpacking_done;
2848  __pyx_L5_argtuple_error:;
2849  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2850  __pyx_L3_error:;
2851  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2852  __Pyx_RefNannyFinishContext();
2853  return -1;
2854  __pyx_L4_argument_unpacking_done:;
2855  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2856 
2857  /* function exit code */
2858  __Pyx_RefNannyFinishContext();
2859  return __pyx_r;
2860 }
2861 
2862 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2863  PyObject *__pyx_v_error_msg_prefix = NULL;
2864  PyObject *__pyx_v_idx = NULL;
2865  int __pyx_r;
2866  __Pyx_RefNannyDeclarations
2867  int __pyx_t_1;
2868  int __pyx_t_2;
2869  IndexSet *__pyx_t_3;
2870  PyObject *__pyx_t_4 = NULL;
2871  PyObject *__pyx_t_5 = NULL;
2872  int __pyx_t_6;
2873  int __pyx_t_7;
2874  PyObject *__pyx_t_8 = NULL;
2875  PyObject *__pyx_t_9 = NULL;
2876  PyObject *__pyx_t_10 = NULL;
2877  Py_ssize_t __pyx_t_11;
2878  PyObject *(*__pyx_t_12)(PyObject *);
2879  PyObject *__pyx_t_13 = NULL;
2880  PyObject *__pyx_t_14 = NULL;
2881  PyObject *__pyx_t_15 = NULL;
2882  PyObject *__pyx_t_16 = NULL;
2883  char *__pyx_t_17;
2884  __Pyx_RefNannySetupContext("__cinit__", 0);
2885 
2886  /* "PyClical.pyx":92
2887  * {}
2888  * """
2889  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2890  * if isinstance(other, index_set):
2891  * self.instance = new IndexSet((<index_set>other).unwrap())
2892  */
2893  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2894  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2895 
2896  /* "PyClical.pyx":93
2897  * """
2898  * error_msg_prefix = "Cannot initialize index_set object from"
2899  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2900  * self.instance = new IndexSet((<index_set>other).unwrap())
2901  * elif isinstance(other, numbers.Integral):
2902  */
2903  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2904  __pyx_t_2 = (__pyx_t_1 != 0);
2905  if (__pyx_t_2) {
2906 
2907  /* "PyClical.pyx":94
2908  * error_msg_prefix = "Cannot initialize index_set object from"
2909  * if isinstance(other, index_set):
2910  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2911  * elif isinstance(other, numbers.Integral):
2912  * self.instance = new IndexSet(<int>other)
2913  */
2914  try {
2915  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2916  } catch(...) {
2917  __Pyx_CppExn2PyErr();
2918  __PYX_ERR(0, 94, __pyx_L1_error)
2919  }
2920  __pyx_v_self->instance = __pyx_t_3;
2921 
2922  /* "PyClical.pyx":93
2923  * """
2924  * error_msg_prefix = "Cannot initialize index_set object from"
2925  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2926  * self.instance = new IndexSet((<index_set>other).unwrap())
2927  * elif isinstance(other, numbers.Integral):
2928  */
2929  goto __pyx_L3;
2930  }
2931 
2932  /* "PyClical.pyx":95
2933  * if isinstance(other, index_set):
2934  * self.instance = new IndexSet((<index_set>other).unwrap())
2935  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2936  * self.instance = new IndexSet(<int>other)
2937  * elif isinstance(other, (set, frozenset)):
2938  */
2939  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2940  __Pyx_GOTREF(__pyx_t_4);
2941  __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)
2942  __Pyx_GOTREF(__pyx_t_5);
2943  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2944  __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)
2945  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2946  __pyx_t_1 = (__pyx_t_2 != 0);
2947  if (__pyx_t_1) {
2948 
2949  /* "PyClical.pyx":96
2950  * self.instance = new IndexSet((<index_set>other).unwrap())
2951  * elif isinstance(other, numbers.Integral):
2952  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2953  * elif isinstance(other, (set, frozenset)):
2954  * try:
2955  */
2956  __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)
2957  try {
2958  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2959  } catch(...) {
2960  __Pyx_CppExn2PyErr();
2961  __PYX_ERR(0, 96, __pyx_L1_error)
2962  }
2963  __pyx_v_self->instance = __pyx_t_3;
2964 
2965  /* "PyClical.pyx":95
2966  * if isinstance(other, index_set):
2967  * self.instance = new IndexSet((<index_set>other).unwrap())
2968  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2969  * self.instance = new IndexSet(<int>other)
2970  * elif isinstance(other, (set, frozenset)):
2971  */
2972  goto __pyx_L3;
2973  }
2974 
2975  /* "PyClical.pyx":97
2976  * elif isinstance(other, numbers.Integral):
2977  * self.instance = new IndexSet(<int>other)
2978  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2979  * try:
2980  * self.instance = new IndexSet()
2981  */
2982  __pyx_t_2 = PySet_Check(__pyx_v_other);
2983  __pyx_t_7 = (__pyx_t_2 != 0);
2984  if (!__pyx_t_7) {
2985  } else {
2986  __pyx_t_1 = __pyx_t_7;
2987  goto __pyx_L4_bool_binop_done;
2988  }
2989  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2990  __pyx_t_2 = (__pyx_t_7 != 0);
2991  __pyx_t_1 = __pyx_t_2;
2992  __pyx_L4_bool_binop_done:;
2993  __pyx_t_2 = (__pyx_t_1 != 0);
2994  if (__pyx_t_2) {
2995 
2996  /* "PyClical.pyx":98
2997  * self.instance = new IndexSet(<int>other)
2998  * elif isinstance(other, (set, frozenset)):
2999  * try: # <<<<<<<<<<<<<<
3000  * self.instance = new IndexSet()
3001  * for idx in other:
3002  */
3003  {
3004  __Pyx_PyThreadState_declare
3005  __Pyx_PyThreadState_assign
3006  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3007  __Pyx_XGOTREF(__pyx_t_8);
3008  __Pyx_XGOTREF(__pyx_t_9);
3009  __Pyx_XGOTREF(__pyx_t_10);
3010  /*try:*/ {
3011 
3012  /* "PyClical.pyx":99
3013  * elif isinstance(other, (set, frozenset)):
3014  * try:
3015  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3016  * for idx in other:
3017  * self[idx] = True
3018  */
3019  __pyx_t_3 = new IndexSet();
3020  __pyx_v_self->instance = __pyx_t_3;
3021 
3022  /* "PyClical.pyx":100
3023  * try:
3024  * self.instance = new IndexSet()
3025  * for idx in other: # <<<<<<<<<<<<<<
3026  * self[idx] = True
3027  * except IndexError:
3028  */
3029  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3030  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3031  __pyx_t_12 = NULL;
3032  } else {
3033  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
3034  __Pyx_GOTREF(__pyx_t_5);
3035  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
3036  }
3037  for (;;) {
3038  if (likely(!__pyx_t_12)) {
3039  if (likely(PyList_CheckExact(__pyx_t_5))) {
3040  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3041  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3042  __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)
3043  #else
3044  __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)
3045  __Pyx_GOTREF(__pyx_t_4);
3046  #endif
3047  } else {
3048  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3049  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3050  __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)
3051  #else
3052  __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)
3053  __Pyx_GOTREF(__pyx_t_4);
3054  #endif
3055  }
3056  } else {
3057  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3058  if (unlikely(!__pyx_t_4)) {
3059  PyObject* exc_type = PyErr_Occurred();
3060  if (exc_type) {
3061  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3062  else __PYX_ERR(0, 100, __pyx_L6_error)
3063  }
3064  break;
3065  }
3066  __Pyx_GOTREF(__pyx_t_4);
3067  }
3068  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3069  __pyx_t_4 = 0;
3070 
3071  /* "PyClical.pyx":101
3072  * self.instance = new IndexSet()
3073  * for idx in other:
3074  * self[idx] = True # <<<<<<<<<<<<<<
3075  * except IndexError:
3076  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3077  */
3078  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
3079 
3080  /* "PyClical.pyx":100
3081  * try:
3082  * self.instance = new IndexSet()
3083  * for idx in other: # <<<<<<<<<<<<<<
3084  * self[idx] = True
3085  * except IndexError:
3086  */
3087  }
3088  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3089 
3090  /* "PyClical.pyx":98
3091  * self.instance = new IndexSet(<int>other)
3092  * elif isinstance(other, (set, frozenset)):
3093  * try: # <<<<<<<<<<<<<<
3094  * self.instance = new IndexSet()
3095  * for idx in other:
3096  */
3097  }
3098  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3099  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3100  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3101  goto __pyx_L11_try_end;
3102  __pyx_L6_error:;
3103  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3104  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3105 
3106  /* "PyClical.pyx":102
3107  * for idx in other:
3108  * self[idx] = True
3109  * except IndexError: # <<<<<<<<<<<<<<
3110  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3111  * except (RuntimeError, TypeError):
3112  */
3113  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3114  if (__pyx_t_6) {
3115  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3116  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
3117  __Pyx_GOTREF(__pyx_t_5);
3118  __Pyx_GOTREF(__pyx_t_4);
3119  __Pyx_GOTREF(__pyx_t_13);
3120 
3121  /* "PyClical.pyx":103
3122  * self[idx] = True
3123  * except IndexError:
3124  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3125  * except (RuntimeError, TypeError):
3126  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3127  */
3128  __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)
3129  __Pyx_GOTREF(__pyx_t_14);
3130  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3131  __Pyx_GOTREF(__pyx_t_15);
3132  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3133  __Pyx_GOTREF(__pyx_t_16);
3134  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3135  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3136  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3137  __Pyx_GOTREF(__pyx_t_15);
3138  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3139  __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)
3140  __Pyx_GOTREF(__pyx_t_16);
3141  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3142  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3143  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3144  __PYX_ERR(0, 103, __pyx_L8_except_error)
3145  }
3146 
3147  /* "PyClical.pyx":104
3148  * except IndexError:
3149  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3150  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3151  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3152  * elif isinstance(other, str):
3153  */
3154  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3155  if (__pyx_t_6) {
3156  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3157  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3158  __Pyx_GOTREF(__pyx_t_13);
3159  __Pyx_GOTREF(__pyx_t_4);
3160  __Pyx_GOTREF(__pyx_t_5);
3161 
3162  /* "PyClical.pyx":105
3163  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3164  * except (RuntimeError, TypeError):
3165  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3166  * elif isinstance(other, str):
3167  * try:
3168  */
3169  __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)
3170  __Pyx_GOTREF(__pyx_t_16);
3171  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3172  __Pyx_GOTREF(__pyx_t_15);
3173  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3174  __Pyx_GOTREF(__pyx_t_14);
3175  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3176  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3177  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3178  __Pyx_GOTREF(__pyx_t_15);
3179  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3180  __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)
3181  __Pyx_GOTREF(__pyx_t_14);
3182  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3183  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3184  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3185  __PYX_ERR(0, 105, __pyx_L8_except_error)
3186  }
3187  goto __pyx_L8_except_error;
3188  __pyx_L8_except_error:;
3189 
3190  /* "PyClical.pyx":98
3191  * self.instance = new IndexSet(<int>other)
3192  * elif isinstance(other, (set, frozenset)):
3193  * try: # <<<<<<<<<<<<<<
3194  * self.instance = new IndexSet()
3195  * for idx in other:
3196  */
3197  __Pyx_XGIVEREF(__pyx_t_8);
3198  __Pyx_XGIVEREF(__pyx_t_9);
3199  __Pyx_XGIVEREF(__pyx_t_10);
3200  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3201  goto __pyx_L1_error;
3202  __pyx_L11_try_end:;
3203  }
3204 
3205  /* "PyClical.pyx":97
3206  * elif isinstance(other, numbers.Integral):
3207  * self.instance = new IndexSet(<int>other)
3208  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3209  * try:
3210  * self.instance = new IndexSet()
3211  */
3212  goto __pyx_L3;
3213  }
3214 
3215  /* "PyClical.pyx":106
3216  * except (RuntimeError, TypeError):
3217  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3218  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3219  * try:
3220  * self.instance = new IndexSet(<char *>other)
3221  */
3222  __pyx_t_2 = PyString_Check(__pyx_v_other);
3223  __pyx_t_1 = (__pyx_t_2 != 0);
3224  if (likely(__pyx_t_1)) {
3225 
3226  /* "PyClical.pyx":107
3227  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3228  * elif isinstance(other, str):
3229  * try: # <<<<<<<<<<<<<<
3230  * self.instance = new IndexSet(<char *>other)
3231  * except RuntimeError:
3232  */
3233  {
3234  __Pyx_PyThreadState_declare
3235  __Pyx_PyThreadState_assign
3236  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3237  __Pyx_XGOTREF(__pyx_t_10);
3238  __Pyx_XGOTREF(__pyx_t_9);
3239  __Pyx_XGOTREF(__pyx_t_8);
3240  /*try:*/ {
3241 
3242  /* "PyClical.pyx":108
3243  * elif isinstance(other, str):
3244  * try:
3245  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3246  * except RuntimeError:
3247  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3248  */
3249  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3250  try {
3251  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3252  } catch(...) {
3253  __Pyx_CppExn2PyErr();
3254  __PYX_ERR(0, 108, __pyx_L18_error)
3255  }
3256  __pyx_v_self->instance = __pyx_t_3;
3257 
3258  /* "PyClical.pyx":107
3259  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3260  * elif isinstance(other, str):
3261  * try: # <<<<<<<<<<<<<<
3262  * self.instance = new IndexSet(<char *>other)
3263  * except RuntimeError:
3264  */
3265  }
3266  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3267  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3268  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3269  goto __pyx_L23_try_end;
3270  __pyx_L18_error:;
3271  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3272  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3273  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3274  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3275  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3276  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3277 
3278  /* "PyClical.pyx":109
3279  * try:
3280  * self.instance = new IndexSet(<char *>other)
3281  * except RuntimeError: # <<<<<<<<<<<<<<
3282  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3283  * else:
3284  */
3285  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3286  if (__pyx_t_6) {
3287  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3288  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3289  __Pyx_GOTREF(__pyx_t_5);
3290  __Pyx_GOTREF(__pyx_t_4);
3291  __Pyx_GOTREF(__pyx_t_13);
3292 
3293  /* "PyClical.pyx":110
3294  * self.instance = new IndexSet(<char *>other)
3295  * except RuntimeError:
3296  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3297  * else:
3298  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3299  */
3300  __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)
3301  __Pyx_GOTREF(__pyx_t_14);
3302  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3303  __Pyx_GOTREF(__pyx_t_15);
3304  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3305  __Pyx_GOTREF(__pyx_t_16);
3306  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3307  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3308  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3309  __Pyx_GOTREF(__pyx_t_15);
3310  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3311  __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)
3312  __Pyx_GOTREF(__pyx_t_16);
3313  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3314  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3315  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3316  __PYX_ERR(0, 110, __pyx_L20_except_error)
3317  }
3318  goto __pyx_L20_except_error;
3319  __pyx_L20_except_error:;
3320 
3321  /* "PyClical.pyx":107
3322  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3323  * elif isinstance(other, str):
3324  * try: # <<<<<<<<<<<<<<
3325  * self.instance = new IndexSet(<char *>other)
3326  * except RuntimeError:
3327  */
3328  __Pyx_XGIVEREF(__pyx_t_10);
3329  __Pyx_XGIVEREF(__pyx_t_9);
3330  __Pyx_XGIVEREF(__pyx_t_8);
3331  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3332  goto __pyx_L1_error;
3333  __pyx_L23_try_end:;
3334  }
3335 
3336  /* "PyClical.pyx":106
3337  * except (RuntimeError, TypeError):
3338  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3339  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3340  * try:
3341  * self.instance = new IndexSet(<char *>other)
3342  */
3343  goto __pyx_L3;
3344  }
3345 
3346  /* "PyClical.pyx":112
3347  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3348  * else:
3349  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3350  *
3351  * def __dealloc__(self):
3352  */
3353  /*else*/ {
3354  __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)
3355  __Pyx_GOTREF(__pyx_t_13);
3356  __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)
3357  __Pyx_GOTREF(__pyx_t_4);
3358  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3359  __Pyx_GOTREF(__pyx_t_5);
3360  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3361  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3362  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3363  __Pyx_GOTREF(__pyx_t_4);
3364  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3365  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3366  __Pyx_GOTREF(__pyx_t_5);
3367  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3368  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3369  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3370  __PYX_ERR(0, 112, __pyx_L1_error)
3371  }
3372  __pyx_L3:;
3373 
3374  /* "PyClical.pyx":73
3375  * return index_set(self)
3376  *
3377  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3378  * """
3379  * Construct an object of type index_set.
3380  */
3381 
3382  /* function exit code */
3383  __pyx_r = 0;
3384  goto __pyx_L0;
3385  __pyx_L1_error:;
3386  __Pyx_XDECREF(__pyx_t_4);
3387  __Pyx_XDECREF(__pyx_t_5);
3388  __Pyx_XDECREF(__pyx_t_13);
3389  __Pyx_XDECREF(__pyx_t_14);
3390  __Pyx_XDECREF(__pyx_t_15);
3391  __Pyx_XDECREF(__pyx_t_16);
3392  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3393  __pyx_r = -1;
3394  __pyx_L0:;
3395  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3396  __Pyx_XDECREF(__pyx_v_idx);
3397  __Pyx_RefNannyFinishContext();
3398  return __pyx_r;
3399 }
3400 
3401 /* "PyClical.pyx":114
3402  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3403  *
3404  * def __dealloc__(self): # <<<<<<<<<<<<<<
3405  * """
3406  * Clean up by deallocating the instance of C++ class IndexSet.
3407  */
3408 
3409 /* Python wrapper */
3410 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3411 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3412  __Pyx_RefNannyDeclarations
3413  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3414  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3415 
3416  /* function exit code */
3417  __Pyx_RefNannyFinishContext();
3418 }
3419 
3420 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3421  __Pyx_RefNannyDeclarations
3422  __Pyx_RefNannySetupContext("__dealloc__", 0);
3423 
3424  /* "PyClical.pyx":118
3425  * Clean up by deallocating the instance of C++ class IndexSet.
3426  * """
3427  * del self.instance # <<<<<<<<<<<<<<
3428  *
3429  * def __richcmp__(lhs, rhs, int op):
3430  */
3431  delete __pyx_v_self->instance;
3432 
3433  /* "PyClical.pyx":114
3434  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3435  *
3436  * def __dealloc__(self): # <<<<<<<<<<<<<<
3437  * """
3438  * Clean up by deallocating the instance of C++ class IndexSet.
3439  */
3440 
3441  /* function exit code */
3442  __Pyx_RefNannyFinishContext();
3443 }
3444 
3445 /* "PyClical.pyx":120
3446  * del self.instance
3447  *
3448  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3449  * """
3450  * Compare two objects of class index_set.
3451  */
3452 
3453 /* Python wrapper */
3454 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3455 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3456  PyObject *__pyx_r = 0;
3457  __Pyx_RefNannyDeclarations
3458  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3459  __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));
3460 
3461  /* function exit code */
3462  __Pyx_RefNannyFinishContext();
3463  return __pyx_r;
3464 }
3465 
3466 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) {
3467  PyObject *__pyx_v_eq = NULL;
3468  PyObject *__pyx_v_lt = NULL;
3469  PyObject *__pyx_r = NULL;
3470  __Pyx_RefNannyDeclarations
3471  int __pyx_t_1;
3472  int __pyx_t_2;
3473  int __pyx_t_3;
3474  PyObject *__pyx_t_4 = NULL;
3475  __Pyx_RefNannySetupContext("__richcmp__", 0);
3476 
3477  /* "PyClical.pyx":141
3478  * False
3479  * """
3480  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3481  * eq = bool(lhs is rhs)
3482  * if op == 2: # ==
3483  */
3484  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3485  __pyx_t_3 = (__pyx_t_2 != 0);
3486  if (!__pyx_t_3) {
3487  } else {
3488  __pyx_t_1 = __pyx_t_3;
3489  goto __pyx_L4_bool_binop_done;
3490  }
3491  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3492  __pyx_t_2 = (__pyx_t_3 != 0);
3493  __pyx_t_1 = __pyx_t_2;
3494  __pyx_L4_bool_binop_done:;
3495  if (__pyx_t_1) {
3496 
3497  /* "PyClical.pyx":142
3498  * """
3499  * if (lhs is None) or (rhs is None):
3500  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3501  * if op == 2: # ==
3502  * return eq
3503  */
3504  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3505  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3506  __Pyx_GOTREF(__pyx_t_4);
3507  __pyx_v_eq = __pyx_t_4;
3508  __pyx_t_4 = 0;
3509 
3510  /* "PyClical.pyx":143
3511  * if (lhs is None) or (rhs is None):
3512  * eq = bool(lhs is rhs)
3513  * if op == 2: # == # <<<<<<<<<<<<<<
3514  * return eq
3515  * elif op == 3: # !=
3516  */
3517  switch (__pyx_v_op) {
3518  case 2:
3519 
3520  /* "PyClical.pyx":144
3521  * eq = bool(lhs is rhs)
3522  * if op == 2: # ==
3523  * return eq # <<<<<<<<<<<<<<
3524  * elif op == 3: # !=
3525  * return not eq
3526  */
3527  __Pyx_XDECREF(__pyx_r);
3528  __Pyx_INCREF(__pyx_v_eq);
3529  __pyx_r = __pyx_v_eq;
3530  goto __pyx_L0;
3531 
3532  /* "PyClical.pyx":143
3533  * if (lhs is None) or (rhs is None):
3534  * eq = bool(lhs is rhs)
3535  * if op == 2: # == # <<<<<<<<<<<<<<
3536  * return eq
3537  * elif op == 3: # !=
3538  */
3539  break;
3540  case 3:
3541 
3542  /* "PyClical.pyx":146
3543  * return eq
3544  * elif op == 3: # !=
3545  * return not eq # <<<<<<<<<<<<<<
3546  * else:
3547  * if op == 0: # <
3548  */
3549  __Pyx_XDECREF(__pyx_r);
3550  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3551  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3552  __Pyx_GOTREF(__pyx_t_4);
3553  __pyx_r = __pyx_t_4;
3554  __pyx_t_4 = 0;
3555  goto __pyx_L0;
3556 
3557  /* "PyClical.pyx":145
3558  * if op == 2: # ==
3559  * return eq
3560  * elif op == 3: # != # <<<<<<<<<<<<<<
3561  * return not eq
3562  * else:
3563  */
3564  break;
3565  default:
3566 
3567  /* "PyClical.pyx":148
3568  * return not eq
3569  * else:
3570  * if op == 0: # < # <<<<<<<<<<<<<<
3571  * return False
3572  * elif op == 1: # <=
3573  */
3574  switch (__pyx_v_op) {
3575  case 0:
3576 
3577  /* "PyClical.pyx":149
3578  * else:
3579  * if op == 0: # <
3580  * return False # <<<<<<<<<<<<<<
3581  * elif op == 1: # <=
3582  * return eq
3583  */
3584  __Pyx_XDECREF(__pyx_r);
3585  __Pyx_INCREF(Py_False);
3586  __pyx_r = Py_False;
3587  goto __pyx_L0;
3588 
3589  /* "PyClical.pyx":148
3590  * return not eq
3591  * else:
3592  * if op == 0: # < # <<<<<<<<<<<<<<
3593  * return False
3594  * elif op == 1: # <=
3595  */
3596  break;
3597  case 1:
3598 
3599  /* "PyClical.pyx":151
3600  * return False
3601  * elif op == 1: # <=
3602  * return eq # <<<<<<<<<<<<<<
3603  * elif op == 4: # >
3604  * return False
3605  */
3606  __Pyx_XDECREF(__pyx_r);
3607  __Pyx_INCREF(__pyx_v_eq);
3608  __pyx_r = __pyx_v_eq;
3609  goto __pyx_L0;
3610 
3611  /* "PyClical.pyx":150
3612  * if op == 0: # <
3613  * return False
3614  * elif op == 1: # <= # <<<<<<<<<<<<<<
3615  * return eq
3616  * elif op == 4: # >
3617  */
3618  break;
3619  case 4:
3620 
3621  /* "PyClical.pyx":153
3622  * return eq
3623  * elif op == 4: # >
3624  * return False # <<<<<<<<<<<<<<
3625  * elif op == 5: # >=
3626  * return eq
3627  */
3628  __Pyx_XDECREF(__pyx_r);
3629  __Pyx_INCREF(Py_False);
3630  __pyx_r = Py_False;
3631  goto __pyx_L0;
3632 
3633  /* "PyClical.pyx":152
3634  * elif op == 1: # <=
3635  * return eq
3636  * elif op == 4: # > # <<<<<<<<<<<<<<
3637  * return False
3638  * elif op == 5: # >=
3639  */
3640  break;
3641  case 5:
3642 
3643  /* "PyClical.pyx":155
3644  * return False
3645  * elif op == 5: # >=
3646  * return eq # <<<<<<<<<<<<<<
3647  * else:
3648  * return NotImplemented
3649  */
3650  __Pyx_XDECREF(__pyx_r);
3651  __Pyx_INCREF(__pyx_v_eq);
3652  __pyx_r = __pyx_v_eq;
3653  goto __pyx_L0;
3654 
3655  /* "PyClical.pyx":154
3656  * elif op == 4: # >
3657  * return False
3658  * elif op == 5: # >= # <<<<<<<<<<<<<<
3659  * return eq
3660  * else:
3661  */
3662  break;
3663  default:
3664 
3665  /* "PyClical.pyx":157
3666  * return eq
3667  * else:
3668  * return NotImplemented # <<<<<<<<<<<<<<
3669  * else:
3670  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3671  */
3672  __Pyx_XDECREF(__pyx_r);
3673  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3674  __pyx_r = __pyx_builtin_NotImplemented;
3675  goto __pyx_L0;
3676  break;
3677  }
3678  break;
3679  }
3680 
3681  /* "PyClical.pyx":141
3682  * False
3683  * """
3684  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3685  * eq = bool(lhs is rhs)
3686  * if op == 2: # ==
3687  */
3688  }
3689 
3690  /* "PyClical.pyx":159
3691  * return NotImplemented
3692  * else:
3693  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3694  * if op == 2: # ==
3695  * return eq
3696  */
3697  /*else*/ {
3698  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3699  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3700  __Pyx_GOTREF(__pyx_t_4);
3701  __pyx_v_eq = __pyx_t_4;
3702  __pyx_t_4 = 0;
3703 
3704  /* "PyClical.pyx":160
3705  * else:
3706  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3707  * if op == 2: # == # <<<<<<<<<<<<<<
3708  * return eq
3709  * elif op == 3: # !=
3710  */
3711  switch (__pyx_v_op) {
3712  case 2:
3713 
3714  /* "PyClical.pyx":161
3715  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3716  * if op == 2: # ==
3717  * return eq # <<<<<<<<<<<<<<
3718  * elif op == 3: # !=
3719  * return not eq
3720  */
3721  __Pyx_XDECREF(__pyx_r);
3722  __Pyx_INCREF(__pyx_v_eq);
3723  __pyx_r = __pyx_v_eq;
3724  goto __pyx_L0;
3725 
3726  /* "PyClical.pyx":160
3727  * else:
3728  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3729  * if op == 2: # == # <<<<<<<<<<<<<<
3730  * return eq
3731  * elif op == 3: # !=
3732  */
3733  break;
3734  case 3:
3735 
3736  /* "PyClical.pyx":163
3737  * return eq
3738  * elif op == 3: # !=
3739  * return not eq # <<<<<<<<<<<<<<
3740  * else:
3741  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3742  */
3743  __Pyx_XDECREF(__pyx_r);
3744  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3745  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3746  __Pyx_GOTREF(__pyx_t_4);
3747  __pyx_r = __pyx_t_4;
3748  __pyx_t_4 = 0;
3749  goto __pyx_L0;
3750 
3751  /* "PyClical.pyx":162
3752  * if op == 2: # ==
3753  * return eq
3754  * elif op == 3: # != # <<<<<<<<<<<<<<
3755  * return not eq
3756  * else:
3757  */
3758  break;
3759  default:
3760 
3761  /* "PyClical.pyx":165
3762  * return not eq
3763  * else:
3764  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3765  * if op == 0: # <
3766  * return lt
3767  */
3768  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3769  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3770  __Pyx_GOTREF(__pyx_t_4);
3771  __pyx_v_lt = __pyx_t_4;
3772  __pyx_t_4 = 0;
3773 
3774  /* "PyClical.pyx":166
3775  * else:
3776  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3777  * if op == 0: # < # <<<<<<<<<<<<<<
3778  * return lt
3779  * elif op == 1: # <=
3780  */
3781  switch (__pyx_v_op) {
3782  case 0:
3783 
3784  /* "PyClical.pyx":167
3785  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3786  * if op == 0: # <
3787  * return lt # <<<<<<<<<<<<<<
3788  * elif op == 1: # <=
3789  * return lt or eq
3790  */
3791  __Pyx_XDECREF(__pyx_r);
3792  __Pyx_INCREF(__pyx_v_lt);
3793  __pyx_r = __pyx_v_lt;
3794  goto __pyx_L0;
3795 
3796  /* "PyClical.pyx":166
3797  * else:
3798  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3799  * if op == 0: # < # <<<<<<<<<<<<<<
3800  * return lt
3801  * elif op == 1: # <=
3802  */
3803  break;
3804  case 1:
3805 
3806  /* "PyClical.pyx":169
3807  * return lt
3808  * elif op == 1: # <=
3809  * return lt or eq # <<<<<<<<<<<<<<
3810  * elif op == 4: # >
3811  * return not (lt or eq)
3812  */
3813  __Pyx_XDECREF(__pyx_r);
3814  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3815  if (!__pyx_t_1) {
3816  } else {
3817  __Pyx_INCREF(__pyx_v_lt);
3818  __pyx_t_4 = __pyx_v_lt;
3819  goto __pyx_L6_bool_binop_done;
3820  }
3821  __Pyx_INCREF(__pyx_v_eq);
3822  __pyx_t_4 = __pyx_v_eq;
3823  __pyx_L6_bool_binop_done:;
3824  __pyx_r = __pyx_t_4;
3825  __pyx_t_4 = 0;
3826  goto __pyx_L0;
3827 
3828  /* "PyClical.pyx":168
3829  * if op == 0: # <
3830  * return lt
3831  * elif op == 1: # <= # <<<<<<<<<<<<<<
3832  * return lt or eq
3833  * elif op == 4: # >
3834  */
3835  break;
3836  case 4:
3837 
3838  /* "PyClical.pyx":171
3839  * return lt or eq
3840  * elif op == 4: # >
3841  * return not (lt or eq) # <<<<<<<<<<<<<<
3842  * elif op == 5: # >=
3843  * return not lt
3844  */
3845  __Pyx_XDECREF(__pyx_r);
3846  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3847  if (!__pyx_t_2) {
3848  } else {
3849  __pyx_t_1 = __pyx_t_2;
3850  goto __pyx_L8_bool_binop_done;
3851  }
3852  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3853  __pyx_t_1 = __pyx_t_2;
3854  __pyx_L8_bool_binop_done:;
3855  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3856  __Pyx_GOTREF(__pyx_t_4);
3857  __pyx_r = __pyx_t_4;
3858  __pyx_t_4 = 0;
3859  goto __pyx_L0;
3860 
3861  /* "PyClical.pyx":170
3862  * elif op == 1: # <=
3863  * return lt or eq
3864  * elif op == 4: # > # <<<<<<<<<<<<<<
3865  * return not (lt or eq)
3866  * elif op == 5: # >=
3867  */
3868  break;
3869  case 5:
3870 
3871  /* "PyClical.pyx":173
3872  * return not (lt or eq)
3873  * elif op == 5: # >=
3874  * return not lt # <<<<<<<<<<<<<<
3875  * else:
3876  * return NotImplemented
3877  */
3878  __Pyx_XDECREF(__pyx_r);
3879  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3880  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3881  __Pyx_GOTREF(__pyx_t_4);
3882  __pyx_r = __pyx_t_4;
3883  __pyx_t_4 = 0;
3884  goto __pyx_L0;
3885 
3886  /* "PyClical.pyx":172
3887  * elif op == 4: # >
3888  * return not (lt or eq)
3889  * elif op == 5: # >= # <<<<<<<<<<<<<<
3890  * return not lt
3891  * else:
3892  */
3893  break;
3894  default:
3895 
3896  /* "PyClical.pyx":175
3897  * return not lt
3898  * else:
3899  * return NotImplemented # <<<<<<<<<<<<<<
3900  *
3901  * def __setitem__(self, idx, val):
3902  */
3903  __Pyx_XDECREF(__pyx_r);
3904  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3905  __pyx_r = __pyx_builtin_NotImplemented;
3906  goto __pyx_L0;
3907  break;
3908  }
3909  break;
3910  }
3911  }
3912 
3913  /* "PyClical.pyx":120
3914  * del self.instance
3915  *
3916  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3917  * """
3918  * Compare two objects of class index_set.
3919  */
3920 
3921  /* function exit code */
3922  __pyx_L1_error:;
3923  __Pyx_XDECREF(__pyx_t_4);
3924  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3925  __pyx_r = NULL;
3926  __pyx_L0:;
3927  __Pyx_XDECREF(__pyx_v_eq);
3928  __Pyx_XDECREF(__pyx_v_lt);
3929  __Pyx_XGIVEREF(__pyx_r);
3930  __Pyx_RefNannyFinishContext();
3931  return __pyx_r;
3932 }
3933 
3934 /* "PyClical.pyx":177
3935  * return NotImplemented
3936  *
3937  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3938  * """
3939  * Set the value of an index_set object at index idx to value val.
3940  */
3941 
3942 /* Python wrapper */
3943 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3944 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 ";
3945 #if CYTHON_COMPILING_IN_CPYTHON
3946 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3947 #endif
3948 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3949  int __pyx_r;
3950  __Pyx_RefNannyDeclarations
3951  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3952  __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));
3953 
3954  /* function exit code */
3955  __Pyx_RefNannyFinishContext();
3956  return __pyx_r;
3957 }
3958 
3959 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) {
3960  int __pyx_r;
3961  __Pyx_RefNannyDeclarations
3962  int __pyx_t_1;
3963  int __pyx_t_2;
3964  __Pyx_RefNannySetupContext("__setitem__", 0);
3965 
3966  /* "PyClical.pyx":186
3967  * {2}
3968  * """
3969  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3970  * return
3971  *
3972  */
3973  __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)
3974  __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)
3975  try {
3976  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3977  } catch(...) {
3978  __Pyx_CppExn2PyErr();
3979  __PYX_ERR(0, 186, __pyx_L1_error)
3980  }
3981 
3982  /* "PyClical.pyx":187
3983  * """
3984  * self.instance.set(idx, val)
3985  * return # <<<<<<<<<<<<<<
3986  *
3987  * def __getitem__(self, idx):
3988  */
3989  __pyx_r = 0;
3990  goto __pyx_L0;
3991 
3992  /* "PyClical.pyx":177
3993  * return NotImplemented
3994  *
3995  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3996  * """
3997  * Set the value of an index_set object at index idx to value val.
3998  */
3999 
4000  /* function exit code */
4001  __pyx_L1_error:;
4002  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4003  __pyx_r = -1;
4004  __pyx_L0:;
4005  __Pyx_RefNannyFinishContext();
4006  return __pyx_r;
4007 }
4008 
4009 /* "PyClical.pyx":189
4010  * return
4011  *
4012  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4013  * """
4014  * Get the value of an index_set object at an index.
4015  */
4016 
4017 /* Python wrapper */
4018 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4019 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 ";
4020 #if CYTHON_COMPILING_IN_CPYTHON
4021 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4022 #endif
4023 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4024  PyObject *__pyx_r = 0;
4025  __Pyx_RefNannyDeclarations
4026  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4027  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4028 
4029  /* function exit code */
4030  __Pyx_RefNannyFinishContext();
4031  return __pyx_r;
4032 }
4033 
4034 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4035  PyObject *__pyx_r = NULL;
4036  __Pyx_RefNannyDeclarations
4037  int __pyx_t_1;
4038  PyObject *__pyx_t_2 = NULL;
4039  __Pyx_RefNannySetupContext("__getitem__", 0);
4040 
4041  /* "PyClical.pyx":206
4042  * False
4043  * """
4044  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4045  *
4046  * def __contains__(self, idx):
4047  */
4048  __Pyx_XDECREF(__pyx_r);
4049  __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)
4050  __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)
4051  __Pyx_GOTREF(__pyx_t_2);
4052  __pyx_r = __pyx_t_2;
4053  __pyx_t_2 = 0;
4054  goto __pyx_L0;
4055 
4056  /* "PyClical.pyx":189
4057  * return
4058  *
4059  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4060  * """
4061  * Get the value of an index_set object at an index.
4062  */
4063 
4064  /* function exit code */
4065  __pyx_L1_error:;
4066  __Pyx_XDECREF(__pyx_t_2);
4067  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4068  __pyx_r = NULL;
4069  __pyx_L0:;
4070  __Pyx_XGIVEREF(__pyx_r);
4071  __Pyx_RefNannyFinishContext();
4072  return __pyx_r;
4073 }
4074 
4075 /* "PyClical.pyx":208
4076  * return self.instance.getitem(idx)
4077  *
4078  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4079  * """
4080  * Check that an index_set object contains the index idx: idx in self.
4081  */
4082 
4083 /* Python wrapper */
4084 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4085 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 ";
4086 #if CYTHON_COMPILING_IN_CPYTHON
4087 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4088 #endif
4089 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4090  int __pyx_r;
4091  __Pyx_RefNannyDeclarations
4092  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4093  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4094 
4095  /* function exit code */
4096  __Pyx_RefNannyFinishContext();
4097  return __pyx_r;
4098 }
4099 
4100 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4101  int __pyx_r;
4102  __Pyx_RefNannyDeclarations
4103  int __pyx_t_1;
4104  __Pyx_RefNannySetupContext("__contains__", 0);
4105 
4106  /* "PyClical.pyx":225
4107  * False
4108  * """
4109  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4110  *
4111  * def __iter__(self):
4112  */
4113  __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)
4114  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4115  goto __pyx_L0;
4116 
4117  /* "PyClical.pyx":208
4118  * return self.instance.getitem(idx)
4119  *
4120  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4121  * """
4122  * Check that an index_set object contains the index idx: idx in self.
4123  */
4124 
4125  /* function exit code */
4126  __pyx_L1_error:;
4127  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4128  __pyx_r = -1;
4129  __pyx_L0:;
4130  __Pyx_RefNannyFinishContext();
4131  return __pyx_r;
4132 }
4133 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4134 
4135 /* "PyClical.pyx":227
4136  * return self.instance.getitem(idx)
4137  *
4138  * def __iter__(self): # <<<<<<<<<<<<<<
4139  * """
4140  * Iterate over the indices of an index_set.
4141  */
4142 
4143 /* Python wrapper */
4144 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4145 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 ";
4146 #if CYTHON_COMPILING_IN_CPYTHON
4147 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4148 #endif
4149 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4150  PyObject *__pyx_r = 0;
4151  __Pyx_RefNannyDeclarations
4152  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4153  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4154 
4155  /* function exit code */
4156  __Pyx_RefNannyFinishContext();
4157  return __pyx_r;
4158 }
4159 
4160 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4161  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4162  PyObject *__pyx_r = NULL;
4163  __Pyx_RefNannyDeclarations
4164  __Pyx_RefNannySetupContext("__iter__", 0);
4165  __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);
4166  if (unlikely(!__pyx_cur_scope)) {
4167  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4168  __Pyx_INCREF(Py_None);
4169  __PYX_ERR(0, 227, __pyx_L1_error)
4170  } else {
4171  __Pyx_GOTREF(__pyx_cur_scope);
4172  }
4173  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4174  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4175  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4176  {
4177  __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)
4178  __Pyx_DECREF(__pyx_cur_scope);
4179  __Pyx_RefNannyFinishContext();
4180  return (PyObject *) gen;
4181  }
4182 
4183  /* function exit code */
4184  __pyx_L1_error:;
4185  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4186  __pyx_r = NULL;
4187  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4188  __Pyx_XGIVEREF(__pyx_r);
4189  __Pyx_RefNannyFinishContext();
4190  return __pyx_r;
4191 }
4192 
4193 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4194 {
4195  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4196  PyObject *__pyx_r = NULL;
4197  PyObject *__pyx_t_1 = NULL;
4198  PyObject *__pyx_t_2 = NULL;
4199  PyObject *__pyx_t_3 = NULL;
4200  PyObject *__pyx_t_4 = NULL;
4201  Py_ssize_t __pyx_t_5;
4202  PyObject *(*__pyx_t_6)(PyObject *);
4203  int __pyx_t_7;
4204  int __pyx_t_8;
4205  __Pyx_RefNannyDeclarations
4206  __Pyx_RefNannySetupContext("__iter__", 0);
4207  switch (__pyx_generator->resume_label) {
4208  case 0: goto __pyx_L3_first_run;
4209  case 1: goto __pyx_L7_resume_from_yield;
4210  default: /* CPython raises the right error here */
4211  __Pyx_RefNannyFinishContext();
4212  return NULL;
4213  }
4214  __pyx_L3_first_run:;
4215  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4216 
4217  /* "PyClical.pyx":234
4218  * -3 4 7
4219  * """
4220  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4221  * if idx in self:
4222  * yield idx
4223  */
4224  __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)
4225  __Pyx_GOTREF(__pyx_t_2);
4226  __pyx_t_3 = NULL;
4227  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4228  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4229  if (likely(__pyx_t_3)) {
4230  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4231  __Pyx_INCREF(__pyx_t_3);
4232  __Pyx_INCREF(function);
4233  __Pyx_DECREF_SET(__pyx_t_2, function);
4234  }
4235  }
4236  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4237  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4238  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4239  __Pyx_GOTREF(__pyx_t_1);
4240  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4241  __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)
4242  __Pyx_GOTREF(__pyx_t_3);
4243  __pyx_t_4 = NULL;
4244  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4245  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4246  if (likely(__pyx_t_4)) {
4247  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4248  __Pyx_INCREF(__pyx_t_4);
4249  __Pyx_INCREF(function);
4250  __Pyx_DECREF_SET(__pyx_t_3, function);
4251  }
4252  }
4253  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4254  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4255  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4256  __Pyx_GOTREF(__pyx_t_2);
4257  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4258  __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)
4259  __Pyx_GOTREF(__pyx_t_3);
4260  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4261  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4262  __Pyx_GOTREF(__pyx_t_2);
4263  __Pyx_GIVEREF(__pyx_t_1);
4264  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4265  __Pyx_GIVEREF(__pyx_t_3);
4266  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4267  __pyx_t_1 = 0;
4268  __pyx_t_3 = 0;
4269  __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)
4270  __Pyx_GOTREF(__pyx_t_3);
4271  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4272  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4273  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4274  __pyx_t_6 = NULL;
4275  } else {
4276  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4277  __Pyx_GOTREF(__pyx_t_2);
4278  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4279  }
4280  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4281  for (;;) {
4282  if (likely(!__pyx_t_6)) {
4283  if (likely(PyList_CheckExact(__pyx_t_2))) {
4284  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4285  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4286  __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)
4287  #else
4288  __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)
4289  __Pyx_GOTREF(__pyx_t_3);
4290  #endif
4291  } else {
4292  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4293  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4294  __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)
4295  #else
4296  __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)
4297  __Pyx_GOTREF(__pyx_t_3);
4298  #endif
4299  }
4300  } else {
4301  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4302  if (unlikely(!__pyx_t_3)) {
4303  PyObject* exc_type = PyErr_Occurred();
4304  if (exc_type) {
4305  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4306  else __PYX_ERR(0, 234, __pyx_L1_error)
4307  }
4308  break;
4309  }
4310  __Pyx_GOTREF(__pyx_t_3);
4311  }
4312  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4313  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4314  __Pyx_GIVEREF(__pyx_t_3);
4315  __pyx_t_3 = 0;
4316 
4317  /* "PyClical.pyx":235
4318  * """
4319  * for idx in range(self.min(), self.max()+1):
4320  * if idx in self: # <<<<<<<<<<<<<<
4321  * yield idx
4322  *
4323  */
4324  __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)
4325  __pyx_t_8 = (__pyx_t_7 != 0);
4326  if (__pyx_t_8) {
4327 
4328  /* "PyClical.pyx":236
4329  * for idx in range(self.min(), self.max()+1):
4330  * if idx in self:
4331  * yield idx # <<<<<<<<<<<<<<
4332  *
4333  * def __invert__(self):
4334  */
4335  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4336  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4337  __Pyx_XGIVEREF(__pyx_t_2);
4338  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4339  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4340  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4341  __Pyx_XGIVEREF(__pyx_r);
4342  __Pyx_RefNannyFinishContext();
4343  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4344  /* return from generator, yielding value */
4345  __pyx_generator->resume_label = 1;
4346  return __pyx_r;
4347  __pyx_L7_resume_from_yield:;
4348  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4349  __pyx_cur_scope->__pyx_t_0 = 0;
4350  __Pyx_XGOTREF(__pyx_t_2);
4351  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4352  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4353  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4354 
4355  /* "PyClical.pyx":235
4356  * """
4357  * for idx in range(self.min(), self.max()+1):
4358  * if idx in self: # <<<<<<<<<<<<<<
4359  * yield idx
4360  *
4361  */
4362  }
4363 
4364  /* "PyClical.pyx":234
4365  * -3 4 7
4366  * """
4367  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4368  * if idx in self:
4369  * yield idx
4370  */
4371  }
4372  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4373  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4374 
4375  /* "PyClical.pyx":227
4376  * return self.instance.getitem(idx)
4377  *
4378  * def __iter__(self): # <<<<<<<<<<<<<<
4379  * """
4380  * Iterate over the indices of an index_set.
4381  */
4382 
4383  /* function exit code */
4384  PyErr_SetNone(PyExc_StopIteration);
4385  goto __pyx_L0;
4386  __pyx_L1_error:;
4387  __Pyx_XDECREF(__pyx_t_1);
4388  __Pyx_XDECREF(__pyx_t_2);
4389  __Pyx_XDECREF(__pyx_t_3);
4390  __Pyx_XDECREF(__pyx_t_4);
4391  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4392  __pyx_L0:;
4393  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4394  #if !CYTHON_USE_EXC_INFO_STACK
4395  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4396  #endif
4397  __pyx_generator->resume_label = -1;
4398  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4399  __Pyx_RefNannyFinishContext();
4400  return __pyx_r;
4401 }
4402 
4403 /* "PyClical.pyx":238
4404  * yield idx
4405  *
4406  * def __invert__(self): # <<<<<<<<<<<<<<
4407  * """
4408  * Set complement: not.
4409  */
4410 
4411 /* Python wrapper */
4412 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4413 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 ";
4414 #if CYTHON_COMPILING_IN_CPYTHON
4415 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4416 #endif
4417 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4418  PyObject *__pyx_r = 0;
4419  __Pyx_RefNannyDeclarations
4420  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4421  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4422 
4423  /* function exit code */
4424  __Pyx_RefNannyFinishContext();
4425  return __pyx_r;
4426 }
4427 
4428 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4429  PyObject *__pyx_r = NULL;
4430  __Pyx_RefNannyDeclarations
4431  PyObject *__pyx_t_1 = NULL;
4432  PyObject *__pyx_t_2 = NULL;
4433  __Pyx_RefNannySetupContext("__invert__", 0);
4434 
4435  /* "PyClical.pyx":245
4436  * {-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}
4437  * """
4438  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4439  *
4440  * def __xor__(lhs, rhs):
4441  */
4442  __Pyx_XDECREF(__pyx_r);
4443  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4444  __Pyx_GOTREF(__pyx_t_1);
4445  __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)
4446  __Pyx_GOTREF(__pyx_t_2);
4447  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4448  __pyx_r = __pyx_t_2;
4449  __pyx_t_2 = 0;
4450  goto __pyx_L0;
4451 
4452  /* "PyClical.pyx":238
4453  * yield idx
4454  *
4455  * def __invert__(self): # <<<<<<<<<<<<<<
4456  * """
4457  * Set complement: not.
4458  */
4459 
4460  /* function exit code */
4461  __pyx_L1_error:;
4462  __Pyx_XDECREF(__pyx_t_1);
4463  __Pyx_XDECREF(__pyx_t_2);
4464  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4465  __pyx_r = NULL;
4466  __pyx_L0:;
4467  __Pyx_XGIVEREF(__pyx_r);
4468  __Pyx_RefNannyFinishContext();
4469  return __pyx_r;
4470 }
4471 
4472 /* "PyClical.pyx":247
4473  * return index_set().wrap( self.instance.invert() )
4474  *
4475  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4476  * """
4477  * Symmetric set difference: exclusive or.
4478  */
4479 
4480 /* Python wrapper */
4481 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4482 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 ";
4483 #if CYTHON_COMPILING_IN_CPYTHON
4484 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4485 #endif
4486 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4487  PyObject *__pyx_r = 0;
4488  __Pyx_RefNannyDeclarations
4489  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4490  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4491 
4492  /* function exit code */
4493  __Pyx_RefNannyFinishContext();
4494  return __pyx_r;
4495 }
4496 
4497 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4498  PyObject *__pyx_r = NULL;
4499  __Pyx_RefNannyDeclarations
4500  PyObject *__pyx_t_1 = NULL;
4501  PyObject *__pyx_t_2 = NULL;
4502  __Pyx_RefNannySetupContext("__xor__", 0);
4503 
4504  /* "PyClical.pyx":256
4505  * {1}
4506  * """
4507  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4508  *
4509  * def __ixor__(self, rhs):
4510  */
4511  __Pyx_XDECREF(__pyx_r);
4512  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4513  __Pyx_GOTREF(__pyx_t_1);
4514  __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)
4515  __Pyx_GOTREF(__pyx_t_2);
4516  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4517  __pyx_r = __pyx_t_2;
4518  __pyx_t_2 = 0;
4519  goto __pyx_L0;
4520 
4521  /* "PyClical.pyx":247
4522  * return index_set().wrap( self.instance.invert() )
4523  *
4524  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4525  * """
4526  * Symmetric set difference: exclusive or.
4527  */
4528 
4529  /* function exit code */
4530  __pyx_L1_error:;
4531  __Pyx_XDECREF(__pyx_t_1);
4532  __Pyx_XDECREF(__pyx_t_2);
4533  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4534  __pyx_r = NULL;
4535  __pyx_L0:;
4536  __Pyx_XGIVEREF(__pyx_r);
4537  __Pyx_RefNannyFinishContext();
4538  return __pyx_r;
4539 }
4540 
4541 /* "PyClical.pyx":258
4542  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4543  *
4544  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4545  * """
4546  * Symmetric set difference: exclusive or.
4547  */
4548 
4549 /* Python wrapper */
4550 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4551 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 ";
4552 #if CYTHON_COMPILING_IN_CPYTHON
4553 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4554 #endif
4555 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4556  PyObject *__pyx_r = 0;
4557  __Pyx_RefNannyDeclarations
4558  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4559  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4560 
4561  /* function exit code */
4562  __Pyx_RefNannyFinishContext();
4563  return __pyx_r;
4564 }
4565 
4566 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4567  PyObject *__pyx_r = NULL;
4568  __Pyx_RefNannyDeclarations
4569  PyObject *__pyx_t_1 = NULL;
4570  __Pyx_RefNannySetupContext("__ixor__", 0);
4571 
4572  /* "PyClical.pyx":267
4573  * {1}
4574  * """
4575  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4576  *
4577  * def __and__(lhs, rhs):
4578  */
4579  __Pyx_XDECREF(__pyx_r);
4580  __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)
4581  __Pyx_GOTREF(__pyx_t_1);
4582  __pyx_r = __pyx_t_1;
4583  __pyx_t_1 = 0;
4584  goto __pyx_L0;
4585 
4586  /* "PyClical.pyx":258
4587  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4588  *
4589  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4590  * """
4591  * Symmetric set difference: exclusive or.
4592  */
4593 
4594  /* function exit code */
4595  __pyx_L1_error:;
4596  __Pyx_XDECREF(__pyx_t_1);
4597  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4598  __pyx_r = NULL;
4599  __pyx_L0:;
4600  __Pyx_XGIVEREF(__pyx_r);
4601  __Pyx_RefNannyFinishContext();
4602  return __pyx_r;
4603 }
4604 
4605 /* "PyClical.pyx":269
4606  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4607  *
4608  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4609  * """
4610  * Set intersection: and.
4611  */
4612 
4613 /* Python wrapper */
4614 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4615 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 ";
4616 #if CYTHON_COMPILING_IN_CPYTHON
4617 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4618 #endif
4619 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4620  PyObject *__pyx_r = 0;
4621  __Pyx_RefNannyDeclarations
4622  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4623  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4624 
4625  /* function exit code */
4626  __Pyx_RefNannyFinishContext();
4627  return __pyx_r;
4628 }
4629 
4630 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4631  PyObject *__pyx_r = NULL;
4632  __Pyx_RefNannyDeclarations
4633  PyObject *__pyx_t_1 = NULL;
4634  PyObject *__pyx_t_2 = NULL;
4635  __Pyx_RefNannySetupContext("__and__", 0);
4636 
4637  /* "PyClical.pyx":278
4638  * {2}
4639  * """
4640  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4641  *
4642  * def __iand__(self, rhs):
4643  */
4644  __Pyx_XDECREF(__pyx_r);
4645  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4646  __Pyx_GOTREF(__pyx_t_1);
4647  __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)
4648  __Pyx_GOTREF(__pyx_t_2);
4649  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4650  __pyx_r = __pyx_t_2;
4651  __pyx_t_2 = 0;
4652  goto __pyx_L0;
4653 
4654  /* "PyClical.pyx":269
4655  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4656  *
4657  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4658  * """
4659  * Set intersection: and.
4660  */
4661 
4662  /* function exit code */
4663  __pyx_L1_error:;
4664  __Pyx_XDECREF(__pyx_t_1);
4665  __Pyx_XDECREF(__pyx_t_2);
4666  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4667  __pyx_r = NULL;
4668  __pyx_L0:;
4669  __Pyx_XGIVEREF(__pyx_r);
4670  __Pyx_RefNannyFinishContext();
4671  return __pyx_r;
4672 }
4673 
4674 /* "PyClical.pyx":280
4675  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4676  *
4677  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4678  * """
4679  * Set intersection: and.
4680  */
4681 
4682 /* Python wrapper */
4683 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4684 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 ";
4685 #if CYTHON_COMPILING_IN_CPYTHON
4686 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4687 #endif
4688 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4689  PyObject *__pyx_r = 0;
4690  __Pyx_RefNannyDeclarations
4691  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4692  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4693 
4694  /* function exit code */
4695  __Pyx_RefNannyFinishContext();
4696  return __pyx_r;
4697 }
4698 
4699 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4700  PyObject *__pyx_r = NULL;
4701  __Pyx_RefNannyDeclarations
4702  PyObject *__pyx_t_1 = NULL;
4703  __Pyx_RefNannySetupContext("__iand__", 0);
4704 
4705  /* "PyClical.pyx":289
4706  * {2}
4707  * """
4708  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4709  *
4710  * def __or__(lhs, rhs):
4711  */
4712  __Pyx_XDECREF(__pyx_r);
4713  __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)
4714  __Pyx_GOTREF(__pyx_t_1);
4715  __pyx_r = __pyx_t_1;
4716  __pyx_t_1 = 0;
4717  goto __pyx_L0;
4718 
4719  /* "PyClical.pyx":280
4720  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4721  *
4722  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4723  * """
4724  * Set intersection: and.
4725  */
4726 
4727  /* function exit code */
4728  __pyx_L1_error:;
4729  __Pyx_XDECREF(__pyx_t_1);
4730  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4731  __pyx_r = NULL;
4732  __pyx_L0:;
4733  __Pyx_XGIVEREF(__pyx_r);
4734  __Pyx_RefNannyFinishContext();
4735  return __pyx_r;
4736 }
4737 
4738 /* "PyClical.pyx":291
4739  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4740  *
4741  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4742  * """
4743  * Set union: or.
4744  */
4745 
4746 /* Python wrapper */
4747 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4748 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 ";
4749 #if CYTHON_COMPILING_IN_CPYTHON
4750 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4751 #endif
4752 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4753  PyObject *__pyx_r = 0;
4754  __Pyx_RefNannyDeclarations
4755  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4756  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4757 
4758  /* function exit code */
4759  __Pyx_RefNannyFinishContext();
4760  return __pyx_r;
4761 }
4762 
4763 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4764  PyObject *__pyx_r = NULL;
4765  __Pyx_RefNannyDeclarations
4766  PyObject *__pyx_t_1 = NULL;
4767  PyObject *__pyx_t_2 = NULL;
4768  __Pyx_RefNannySetupContext("__or__", 0);
4769 
4770  /* "PyClical.pyx":300
4771  * {1,2}
4772  * """
4773  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4774  *
4775  * def __ior__(self, rhs):
4776  */
4777  __Pyx_XDECREF(__pyx_r);
4778  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4779  __Pyx_GOTREF(__pyx_t_1);
4780  __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)
4781  __Pyx_GOTREF(__pyx_t_2);
4782  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4783  __pyx_r = __pyx_t_2;
4784  __pyx_t_2 = 0;
4785  goto __pyx_L0;
4786 
4787  /* "PyClical.pyx":291
4788  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4789  *
4790  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4791  * """
4792  * Set union: or.
4793  */
4794 
4795  /* function exit code */
4796  __pyx_L1_error:;
4797  __Pyx_XDECREF(__pyx_t_1);
4798  __Pyx_XDECREF(__pyx_t_2);
4799  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4800  __pyx_r = NULL;
4801  __pyx_L0:;
4802  __Pyx_XGIVEREF(__pyx_r);
4803  __Pyx_RefNannyFinishContext();
4804  return __pyx_r;
4805 }
4806 
4807 /* "PyClical.pyx":302
4808  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4809  *
4810  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4811  * """
4812  * Set union: or.
4813  */
4814 
4815 /* Python wrapper */
4816 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4817 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 ";
4818 #if CYTHON_COMPILING_IN_CPYTHON
4819 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4820 #endif
4821 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4822  PyObject *__pyx_r = 0;
4823  __Pyx_RefNannyDeclarations
4824  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4825  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4826 
4827  /* function exit code */
4828  __Pyx_RefNannyFinishContext();
4829  return __pyx_r;
4830 }
4831 
4832 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4833  PyObject *__pyx_r = NULL;
4834  __Pyx_RefNannyDeclarations
4835  PyObject *__pyx_t_1 = NULL;
4836  __Pyx_RefNannySetupContext("__ior__", 0);
4837 
4838  /* "PyClical.pyx":311
4839  * {1,2}
4840  * """
4841  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4842  *
4843  * def count(self):
4844  */
4845  __Pyx_XDECREF(__pyx_r);
4846  __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)
4847  __Pyx_GOTREF(__pyx_t_1);
4848  __pyx_r = __pyx_t_1;
4849  __pyx_t_1 = 0;
4850  goto __pyx_L0;
4851 
4852  /* "PyClical.pyx":302
4853  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4854  *
4855  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4856  * """
4857  * Set union: or.
4858  */
4859 
4860  /* function exit code */
4861  __pyx_L1_error:;
4862  __Pyx_XDECREF(__pyx_t_1);
4863  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4864  __pyx_r = NULL;
4865  __pyx_L0:;
4866  __Pyx_XGIVEREF(__pyx_r);
4867  __Pyx_RefNannyFinishContext();
4868  return __pyx_r;
4869 }
4870 
4871 /* "PyClical.pyx":313
4872  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4873  *
4874  * def count(self): # <<<<<<<<<<<<<<
4875  * """
4876  * Cardinality: Number of indices included in set.
4877  */
4878 
4879 /* Python wrapper */
4880 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4881 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 ";
4882 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4883  PyObject *__pyx_r = 0;
4884  __Pyx_RefNannyDeclarations
4885  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4886  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4887 
4888  /* function exit code */
4889  __Pyx_RefNannyFinishContext();
4890  return __pyx_r;
4891 }
4892 
4893 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4894  PyObject *__pyx_r = NULL;
4895  __Pyx_RefNannyDeclarations
4896  PyObject *__pyx_t_1 = NULL;
4897  __Pyx_RefNannySetupContext("count", 0);
4898 
4899  /* "PyClical.pyx":320
4900  * 3
4901  * """
4902  * return self.instance.count() # <<<<<<<<<<<<<<
4903  *
4904  * def count_neg(self):
4905  */
4906  __Pyx_XDECREF(__pyx_r);
4907  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4908  __Pyx_GOTREF(__pyx_t_1);
4909  __pyx_r = __pyx_t_1;
4910  __pyx_t_1 = 0;
4911  goto __pyx_L0;
4912 
4913  /* "PyClical.pyx":313
4914  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4915  *
4916  * def count(self): # <<<<<<<<<<<<<<
4917  * """
4918  * Cardinality: Number of indices included in set.
4919  */
4920 
4921  /* function exit code */
4922  __pyx_L1_error:;
4923  __Pyx_XDECREF(__pyx_t_1);
4924  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4925  __pyx_r = NULL;
4926  __pyx_L0:;
4927  __Pyx_XGIVEREF(__pyx_r);
4928  __Pyx_RefNannyFinishContext();
4929  return __pyx_r;
4930 }
4931 
4932 /* "PyClical.pyx":322
4933  * return self.instance.count()
4934  *
4935  * def count_neg(self): # <<<<<<<<<<<<<<
4936  * """
4937  * Number of negative indices included in set.
4938  */
4939 
4940 /* Python wrapper */
4941 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4942 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 ";
4943 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4944  PyObject *__pyx_r = 0;
4945  __Pyx_RefNannyDeclarations
4946  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4947  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4948 
4949  /* function exit code */
4950  __Pyx_RefNannyFinishContext();
4951  return __pyx_r;
4952 }
4953 
4954 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4955  PyObject *__pyx_r = NULL;
4956  __Pyx_RefNannyDeclarations
4957  PyObject *__pyx_t_1 = NULL;
4958  __Pyx_RefNannySetupContext("count_neg", 0);
4959 
4960  /* "PyClical.pyx":329
4961  * 1
4962  * """
4963  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4964  *
4965  * def count_pos(self):
4966  */
4967  __Pyx_XDECREF(__pyx_r);
4968  __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)
4969  __Pyx_GOTREF(__pyx_t_1);
4970  __pyx_r = __pyx_t_1;
4971  __pyx_t_1 = 0;
4972  goto __pyx_L0;
4973 
4974  /* "PyClical.pyx":322
4975  * return self.instance.count()
4976  *
4977  * def count_neg(self): # <<<<<<<<<<<<<<
4978  * """
4979  * Number of negative indices included in set.
4980  */
4981 
4982  /* function exit code */
4983  __pyx_L1_error:;
4984  __Pyx_XDECREF(__pyx_t_1);
4985  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4986  __pyx_r = NULL;
4987  __pyx_L0:;
4988  __Pyx_XGIVEREF(__pyx_r);
4989  __Pyx_RefNannyFinishContext();
4990  return __pyx_r;
4991 }
4992 
4993 /* "PyClical.pyx":331
4994  * return self.instance.count_neg()
4995  *
4996  * def count_pos(self): # <<<<<<<<<<<<<<
4997  * """
4998  * Number of positive indices included in set.
4999  */
5000 
5001 /* Python wrapper */
5002 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5003 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 ";
5004 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5005  PyObject *__pyx_r = 0;
5006  __Pyx_RefNannyDeclarations
5007  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5008  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5009 
5010  /* function exit code */
5011  __Pyx_RefNannyFinishContext();
5012  return __pyx_r;
5013 }
5014 
5015 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5016  PyObject *__pyx_r = NULL;
5017  __Pyx_RefNannyDeclarations
5018  PyObject *__pyx_t_1 = NULL;
5019  __Pyx_RefNannySetupContext("count_pos", 0);
5020 
5021  /* "PyClical.pyx":338
5022  * 2
5023  * """
5024  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5025  *
5026  * def min(self):
5027  */
5028  __Pyx_XDECREF(__pyx_r);
5029  __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)
5030  __Pyx_GOTREF(__pyx_t_1);
5031  __pyx_r = __pyx_t_1;
5032  __pyx_t_1 = 0;
5033  goto __pyx_L0;
5034 
5035  /* "PyClical.pyx":331
5036  * return self.instance.count_neg()
5037  *
5038  * def count_pos(self): # <<<<<<<<<<<<<<
5039  * """
5040  * Number of positive indices included in set.
5041  */
5042 
5043  /* function exit code */
5044  __pyx_L1_error:;
5045  __Pyx_XDECREF(__pyx_t_1);
5046  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5047  __pyx_r = NULL;
5048  __pyx_L0:;
5049  __Pyx_XGIVEREF(__pyx_r);
5050  __Pyx_RefNannyFinishContext();
5051  return __pyx_r;
5052 }
5053 
5054 /* "PyClical.pyx":340
5055  * return self.instance.count_pos()
5056  *
5057  * def min(self): # <<<<<<<<<<<<<<
5058  * """
5059  * Minimum member.
5060  */
5061 
5062 /* Python wrapper */
5063 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5064 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5065 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5066  PyObject *__pyx_r = 0;
5067  __Pyx_RefNannyDeclarations
5068  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5069  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5070 
5071  /* function exit code */
5072  __Pyx_RefNannyFinishContext();
5073  return __pyx_r;
5074 }
5075 
5076 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5077  PyObject *__pyx_r = NULL;
5078  __Pyx_RefNannyDeclarations
5079  PyObject *__pyx_t_1 = NULL;
5080  __Pyx_RefNannySetupContext("min", 0);
5081 
5082  /* "PyClical.pyx":347
5083  * -1
5084  * """
5085  * return self.instance.min() # <<<<<<<<<<<<<<
5086  *
5087  * def max(self):
5088  */
5089  __Pyx_XDECREF(__pyx_r);
5090  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5091  __Pyx_GOTREF(__pyx_t_1);
5092  __pyx_r = __pyx_t_1;
5093  __pyx_t_1 = 0;
5094  goto __pyx_L0;
5095 
5096  /* "PyClical.pyx":340
5097  * return self.instance.count_pos()
5098  *
5099  * def min(self): # <<<<<<<<<<<<<<
5100  * """
5101  * Minimum member.
5102  */
5103 
5104  /* function exit code */
5105  __pyx_L1_error:;
5106  __Pyx_XDECREF(__pyx_t_1);
5107  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5108  __pyx_r = NULL;
5109  __pyx_L0:;
5110  __Pyx_XGIVEREF(__pyx_r);
5111  __Pyx_RefNannyFinishContext();
5112  return __pyx_r;
5113 }
5114 
5115 /* "PyClical.pyx":349
5116  * return self.instance.min()
5117  *
5118  * def max(self): # <<<<<<<<<<<<<<
5119  * """
5120  * Maximum member.
5121  */
5122 
5123 /* Python wrapper */
5124 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5125 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5126 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5127  PyObject *__pyx_r = 0;
5128  __Pyx_RefNannyDeclarations
5129  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5130  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5131 
5132  /* function exit code */
5133  __Pyx_RefNannyFinishContext();
5134  return __pyx_r;
5135 }
5136 
5137 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5138  PyObject *__pyx_r = NULL;
5139  __Pyx_RefNannyDeclarations
5140  PyObject *__pyx_t_1 = NULL;
5141  __Pyx_RefNannySetupContext("max", 0);
5142 
5143  /* "PyClical.pyx":356
5144  * 2
5145  * """
5146  * return self.instance.max() # <<<<<<<<<<<<<<
5147  *
5148  * def hash_fn(self):
5149  */
5150  __Pyx_XDECREF(__pyx_r);
5151  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5152  __Pyx_GOTREF(__pyx_t_1);
5153  __pyx_r = __pyx_t_1;
5154  __pyx_t_1 = 0;
5155  goto __pyx_L0;
5156 
5157  /* "PyClical.pyx":349
5158  * return self.instance.min()
5159  *
5160  * def max(self): # <<<<<<<<<<<<<<
5161  * """
5162  * Maximum member.
5163  */
5164 
5165  /* function exit code */
5166  __pyx_L1_error:;
5167  __Pyx_XDECREF(__pyx_t_1);
5168  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5169  __pyx_r = NULL;
5170  __pyx_L0:;
5171  __Pyx_XGIVEREF(__pyx_r);
5172  __Pyx_RefNannyFinishContext();
5173  return __pyx_r;
5174 }
5175 
5176 /* "PyClical.pyx":358
5177  * return self.instance.max()
5178  *
5179  * def hash_fn(self): # <<<<<<<<<<<<<<
5180  * """
5181  * Hash function.
5182  */
5183 
5184 /* Python wrapper */
5185 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5186 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5187 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5188  PyObject *__pyx_r = 0;
5189  __Pyx_RefNannyDeclarations
5190  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5191  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5192 
5193  /* function exit code */
5194  __Pyx_RefNannyFinishContext();
5195  return __pyx_r;
5196 }
5197 
5198 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5199  PyObject *__pyx_r = NULL;
5200  __Pyx_RefNannyDeclarations
5201  PyObject *__pyx_t_1 = NULL;
5202  __Pyx_RefNannySetupContext("hash_fn", 0);
5203 
5204  /* "PyClical.pyx":362
5205  * Hash function.
5206  * """
5207  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5208  *
5209  * def sign_of_mult(self, rhs):
5210  */
5211  __Pyx_XDECREF(__pyx_r);
5212  __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)
5213  __Pyx_GOTREF(__pyx_t_1);
5214  __pyx_r = __pyx_t_1;
5215  __pyx_t_1 = 0;
5216  goto __pyx_L0;
5217 
5218  /* "PyClical.pyx":358
5219  * return self.instance.max()
5220  *
5221  * def hash_fn(self): # <<<<<<<<<<<<<<
5222  * """
5223  * Hash function.
5224  */
5225 
5226  /* function exit code */
5227  __pyx_L1_error:;
5228  __Pyx_XDECREF(__pyx_t_1);
5229  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5230  __pyx_r = NULL;
5231  __pyx_L0:;
5232  __Pyx_XGIVEREF(__pyx_r);
5233  __Pyx_RefNannyFinishContext();
5234  return __pyx_r;
5235 }
5236 
5237 /* "PyClical.pyx":364
5238  * return self.instance.hash_fn()
5239  *
5240  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5241  * """
5242  * Sign of geometric product of two Clifford basis elements.
5243  */
5244 
5245 /* Python wrapper */
5246 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5247 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 ";
5248 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5249  PyObject *__pyx_r = 0;
5250  __Pyx_RefNannyDeclarations
5251  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5252  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5253 
5254  /* function exit code */
5255  __Pyx_RefNannyFinishContext();
5256  return __pyx_r;
5257 }
5258 
5259 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5260  PyObject *__pyx_r = NULL;
5261  __Pyx_RefNannyDeclarations
5262  PyObject *__pyx_t_1 = NULL;
5263  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5264 
5265  /* "PyClical.pyx":371
5266  * 1
5267  * """
5268  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5269  *
5270  * def sign_of_square(self):
5271  */
5272  __Pyx_XDECREF(__pyx_r);
5273  __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)
5274  __Pyx_GOTREF(__pyx_t_1);
5275  __pyx_r = __pyx_t_1;
5276  __pyx_t_1 = 0;
5277  goto __pyx_L0;
5278 
5279  /* "PyClical.pyx":364
5280  * return self.instance.hash_fn()
5281  *
5282  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5283  * """
5284  * Sign of geometric product of two Clifford basis elements.
5285  */
5286 
5287  /* function exit code */
5288  __pyx_L1_error:;
5289  __Pyx_XDECREF(__pyx_t_1);
5290  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5291  __pyx_r = NULL;
5292  __pyx_L0:;
5293  __Pyx_XGIVEREF(__pyx_r);
5294  __Pyx_RefNannyFinishContext();
5295  return __pyx_r;
5296 }
5297 
5298 /* "PyClical.pyx":373
5299  * return self.instance.sign_of_mult(toIndexSet(rhs))
5300  *
5301  * def sign_of_square(self): # <<<<<<<<<<<<<<
5302  * """
5303  * Sign of geometric square of a Clifford basis element.
5304  */
5305 
5306 /* Python wrapper */
5307 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5308 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 ";
5309 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5310  PyObject *__pyx_r = 0;
5311  __Pyx_RefNannyDeclarations
5312  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5313  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5314 
5315  /* function exit code */
5316  __Pyx_RefNannyFinishContext();
5317  return __pyx_r;
5318 }
5319 
5320 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5321  PyObject *__pyx_r = NULL;
5322  __Pyx_RefNannyDeclarations
5323  PyObject *__pyx_t_1 = NULL;
5324  __Pyx_RefNannySetupContext("sign_of_square", 0);
5325 
5326  /* "PyClical.pyx":380
5327  * -1
5328  * """
5329  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5330  *
5331  * def __repr__(self):
5332  */
5333  __Pyx_XDECREF(__pyx_r);
5334  __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)
5335  __Pyx_GOTREF(__pyx_t_1);
5336  __pyx_r = __pyx_t_1;
5337  __pyx_t_1 = 0;
5338  goto __pyx_L0;
5339 
5340  /* "PyClical.pyx":373
5341  * return self.instance.sign_of_mult(toIndexSet(rhs))
5342  *
5343  * def sign_of_square(self): # <<<<<<<<<<<<<<
5344  * """
5345  * Sign of geometric square of a Clifford basis element.
5346  */
5347 
5348  /* function exit code */
5349  __pyx_L1_error:;
5350  __Pyx_XDECREF(__pyx_t_1);
5351  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5352  __pyx_r = NULL;
5353  __pyx_L0:;
5354  __Pyx_XGIVEREF(__pyx_r);
5355  __Pyx_RefNannyFinishContext();
5356  return __pyx_r;
5357 }
5358 
5359 /* "PyClical.pyx":382
5360  * return self.instance.sign_of_square()
5361  *
5362  * def __repr__(self): # <<<<<<<<<<<<<<
5363  * """
5364  * The official string representation of self.
5365  */
5366 
5367 /* Python wrapper */
5368 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5369 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 ";
5370 #if CYTHON_COMPILING_IN_CPYTHON
5371 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5372 #endif
5373 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5374  PyObject *__pyx_r = 0;
5375  __Pyx_RefNannyDeclarations
5376  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5377  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5378 
5379  /* function exit code */
5380  __Pyx_RefNannyFinishContext();
5381  return __pyx_r;
5382 }
5383 
5384 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5385  PyObject *__pyx_r = NULL;
5386  __Pyx_RefNannyDeclarations
5387  PyObject *__pyx_t_1 = NULL;
5388  __Pyx_RefNannySetupContext("__repr__", 0);
5389 
5390  /* "PyClical.pyx":391
5391  * 'index_set({1,2})'
5392  * """
5393  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5394  *
5395  * def __str__(self):
5396  */
5397  __Pyx_XDECREF(__pyx_r);
5398  __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)
5399  __Pyx_GOTREF(__pyx_t_1);
5400  __pyx_r = __pyx_t_1;
5401  __pyx_t_1 = 0;
5402  goto __pyx_L0;
5403 
5404  /* "PyClical.pyx":382
5405  * return self.instance.sign_of_square()
5406  *
5407  * def __repr__(self): # <<<<<<<<<<<<<<
5408  * """
5409  * The official string representation of self.
5410  */
5411 
5412  /* function exit code */
5413  __pyx_L1_error:;
5414  __Pyx_XDECREF(__pyx_t_1);
5415  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5416  __pyx_r = NULL;
5417  __pyx_L0:;
5418  __Pyx_XGIVEREF(__pyx_r);
5419  __Pyx_RefNannyFinishContext();
5420  return __pyx_r;
5421 }
5422 
5423 /* "PyClical.pyx":393
5424  * return index_set_to_repr( self.unwrap() ).c_str()
5425  *
5426  * def __str__(self): # <<<<<<<<<<<<<<
5427  * """
5428  * The informal string representation of self.
5429  */
5430 
5431 /* Python wrapper */
5432 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5433 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 ";
5434 #if CYTHON_COMPILING_IN_CPYTHON
5435 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5436 #endif
5437 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5438  PyObject *__pyx_r = 0;
5439  __Pyx_RefNannyDeclarations
5440  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5441  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5442 
5443  /* function exit code */
5444  __Pyx_RefNannyFinishContext();
5445  return __pyx_r;
5446 }
5447 
5448 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5449  PyObject *__pyx_r = NULL;
5450  __Pyx_RefNannyDeclarations
5451  PyObject *__pyx_t_1 = NULL;
5452  __Pyx_RefNannySetupContext("__str__", 0);
5453 
5454  /* "PyClical.pyx":402
5455  * '{1,2}'
5456  * """
5457  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5458  *
5459  * def index_set_hidden_doctests():
5460  */
5461  __Pyx_XDECREF(__pyx_r);
5462  __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)
5463  __Pyx_GOTREF(__pyx_t_1);
5464  __pyx_r = __pyx_t_1;
5465  __pyx_t_1 = 0;
5466  goto __pyx_L0;
5467 
5468  /* "PyClical.pyx":393
5469  * return index_set_to_repr( self.unwrap() ).c_str()
5470  *
5471  * def __str__(self): # <<<<<<<<<<<<<<
5472  * """
5473  * The informal string representation of self.
5474  */
5475 
5476  /* function exit code */
5477  __pyx_L1_error:;
5478  __Pyx_XDECREF(__pyx_t_1);
5479  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5480  __pyx_r = NULL;
5481  __pyx_L0:;
5482  __Pyx_XGIVEREF(__pyx_r);
5483  __Pyx_RefNannyFinishContext();
5484  return __pyx_r;
5485 }
5486 
5487 /* "(tree fragment)":1
5488  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5489  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5490  * def __setstate_cython__(self, __pyx_state):
5491  */
5492 
5493 /* Python wrapper */
5494 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5495 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5496  PyObject *__pyx_r = 0;
5497  __Pyx_RefNannyDeclarations
5498  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5499  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5500 
5501  /* function exit code */
5502  __Pyx_RefNannyFinishContext();
5503  return __pyx_r;
5504 }
5505 
5506 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5507  PyObject *__pyx_r = NULL;
5508  __Pyx_RefNannyDeclarations
5509  PyObject *__pyx_t_1 = NULL;
5510  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5511 
5512  /* "(tree fragment)":2
5513  * def __reduce_cython__(self):
5514  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5515  * def __setstate_cython__(self, __pyx_state):
5516  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5517  */
5518  __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)
5519  __Pyx_GOTREF(__pyx_t_1);
5520  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5522  __PYX_ERR(1, 2, __pyx_L1_error)
5523 
5524  /* "(tree fragment)":1
5525  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5526  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5527  * def __setstate_cython__(self, __pyx_state):
5528  */
5529 
5530  /* function exit code */
5531  __pyx_L1_error:;
5532  __Pyx_XDECREF(__pyx_t_1);
5533  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5534  __pyx_r = NULL;
5535  __Pyx_XGIVEREF(__pyx_r);
5536  __Pyx_RefNannyFinishContext();
5537  return __pyx_r;
5538 }
5539 
5540 /* "(tree fragment)":3
5541  * def __reduce_cython__(self):
5542  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5543  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5544  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5545  */
5546 
5547 /* Python wrapper */
5548 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5549 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5550  PyObject *__pyx_r = 0;
5551  __Pyx_RefNannyDeclarations
5552  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5553  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5554 
5555  /* function exit code */
5556  __Pyx_RefNannyFinishContext();
5557  return __pyx_r;
5558 }
5559 
5560 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) {
5561  PyObject *__pyx_r = NULL;
5562  __Pyx_RefNannyDeclarations
5563  PyObject *__pyx_t_1 = NULL;
5564  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5565 
5566  /* "(tree fragment)":4
5567  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5568  * def __setstate_cython__(self, __pyx_state):
5569  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5570  */
5571  __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)
5572  __Pyx_GOTREF(__pyx_t_1);
5573  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5574  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5575  __PYX_ERR(1, 4, __pyx_L1_error)
5576 
5577  /* "(tree fragment)":3
5578  * def __reduce_cython__(self):
5579  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5580  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5581  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5582  */
5583 
5584  /* function exit code */
5585  __pyx_L1_error:;
5586  __Pyx_XDECREF(__pyx_t_1);
5587  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5588  __pyx_r = NULL;
5589  __Pyx_XGIVEREF(__pyx_r);
5590  __Pyx_RefNannyFinishContext();
5591  return __pyx_r;
5592 }
5593 
5594 /* "PyClical.pyx":404
5595  * return index_set_to_str( self.unwrap() ).c_str()
5596  *
5597  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5598  * """
5599  * Tests for functions that Doctest cannot see.
5600  */
5601 
5602 /* Python wrapper */
5603 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5604 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 ";
5605  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};
5606  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5607  PyObject *__pyx_r = 0;
5608  __Pyx_RefNannyDeclarations
5609  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5610  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5611 
5612  /* function exit code */
5613  __Pyx_RefNannyFinishContext();
5614  return __pyx_r;
5615  }
5616 
5617  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5618  PyObject *__pyx_r = NULL;
5619  __Pyx_RefNannyDeclarations
5620  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5621 
5622  /* "PyClical.pyx":488
5623  * False
5624  * """
5625  * return # <<<<<<<<<<<<<<
5626  *
5627  * cpdef inline compare(lhs,rhs):
5628  */
5629  __Pyx_XDECREF(__pyx_r);
5630  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5631  goto __pyx_L0;
5632 
5633  /* "PyClical.pyx":404
5634  * return index_set_to_str( self.unwrap() ).c_str()
5635  *
5636  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5637  * """
5638  * Tests for functions that Doctest cannot see.
5639  */
5640 
5641  /* function exit code */
5642  __pyx_L0:;
5643  __Pyx_XGIVEREF(__pyx_r);
5644  __Pyx_RefNannyFinishContext();
5645  return __pyx_r;
5646  }
5647 
5648  /* "PyClical.pyx":490
5649  * return
5650  *
5651  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5652  * """
5653  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5654  */
5655 
5656  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5657  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5658  PyObject *__pyx_r = NULL;
5659  __Pyx_RefNannyDeclarations
5660  PyObject *__pyx_t_1 = NULL;
5661  __Pyx_RefNannySetupContext("compare", 0);
5662 
5663  /* "PyClical.pyx":500
5664  * 1
5665  * """
5666  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5667  *
5668  * cpdef inline min_neg(obj):
5669  */
5670  __Pyx_XDECREF(__pyx_r);
5671  __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)
5672  __Pyx_GOTREF(__pyx_t_1);
5673  __pyx_r = __pyx_t_1;
5674  __pyx_t_1 = 0;
5675  goto __pyx_L0;
5676 
5677  /* "PyClical.pyx":490
5678  * return
5679  *
5680  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5681  * """
5682  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5683  */
5684 
5685  /* function exit code */
5686  __pyx_L1_error:;
5687  __Pyx_XDECREF(__pyx_t_1);
5688  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5689  __pyx_r = 0;
5690  __pyx_L0:;
5691  __Pyx_XGIVEREF(__pyx_r);
5692  __Pyx_RefNannyFinishContext();
5693  return __pyx_r;
5694  }
5695 
5696  /* Python wrapper */
5697  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5698  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 ";
5699  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5700  PyObject *__pyx_v_lhs = 0;
5701  PyObject *__pyx_v_rhs = 0;
5702  PyObject *__pyx_r = 0;
5703  __Pyx_RefNannyDeclarations
5704  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5705  {
5706  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5707  PyObject* values[2] = {0,0};
5708  if (unlikely(__pyx_kwds)) {
5709  Py_ssize_t kw_args;
5710  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5711  switch (pos_args) {
5712  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5713  CYTHON_FALLTHROUGH;
5714  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5715  CYTHON_FALLTHROUGH;
5716  case 0: break;
5717  default: goto __pyx_L5_argtuple_error;
5718  }
5719  kw_args = PyDict_Size(__pyx_kwds);
5720  switch (pos_args) {
5721  case 0:
5722  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5723  else goto __pyx_L5_argtuple_error;
5724  CYTHON_FALLTHROUGH;
5725  case 1:
5726  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5727  else {
5728  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5729  }
5730  }
5731  if (unlikely(kw_args > 0)) {
5732  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5733  }
5734  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5735  goto __pyx_L5_argtuple_error;
5736  } else {
5737  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5738  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5739  }
5740  __pyx_v_lhs = values[0];
5741  __pyx_v_rhs = values[1];
5742  }
5743  goto __pyx_L4_argument_unpacking_done;
5744  __pyx_L5_argtuple_error:;
5745  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5746  __pyx_L3_error:;
5747  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5748  __Pyx_RefNannyFinishContext();
5749  return NULL;
5750  __pyx_L4_argument_unpacking_done:;
5751  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5752 
5753  /* function exit code */
5754  __Pyx_RefNannyFinishContext();
5755  return __pyx_r;
5756  }
5757 
5758  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5759  PyObject *__pyx_r = NULL;
5760  __Pyx_RefNannyDeclarations
5761  PyObject *__pyx_t_1 = NULL;
5762  __Pyx_RefNannySetupContext("compare", 0);
5763  __Pyx_XDECREF(__pyx_r);
5764  __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)
5765  __Pyx_GOTREF(__pyx_t_1);
5766  __pyx_r = __pyx_t_1;
5767  __pyx_t_1 = 0;
5768  goto __pyx_L0;
5769 
5770  /* function exit code */
5771  __pyx_L1_error:;
5772  __Pyx_XDECREF(__pyx_t_1);
5773  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5774  __pyx_r = NULL;
5775  __pyx_L0:;
5776  __Pyx_XGIVEREF(__pyx_r);
5777  __Pyx_RefNannyFinishContext();
5778  return __pyx_r;
5779  }
5780 
5781  /* "PyClical.pyx":502
5782  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5783  *
5784  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5785  * """
5786  * Minimum negative index, or 0 if none.
5787  */
5788 
5789  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5790  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5791  PyObject *__pyx_r = NULL;
5792  __Pyx_RefNannyDeclarations
5793  PyObject *__pyx_t_1 = NULL;
5794  __Pyx_RefNannySetupContext("min_neg", 0);
5795 
5796  /* "PyClical.pyx":509
5797  * 0
5798  * """
5799  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5800  *
5801  * cpdef inline max_pos(obj):
5802  */
5803  __Pyx_XDECREF(__pyx_r);
5804  __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)
5805  __Pyx_GOTREF(__pyx_t_1);
5806  __pyx_r = __pyx_t_1;
5807  __pyx_t_1 = 0;
5808  goto __pyx_L0;
5809 
5810  /* "PyClical.pyx":502
5811  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5812  *
5813  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5814  * """
5815  * Minimum negative index, or 0 if none.
5816  */
5817 
5818  /* function exit code */
5819  __pyx_L1_error:;
5820  __Pyx_XDECREF(__pyx_t_1);
5821  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5822  __pyx_r = 0;
5823  __pyx_L0:;
5824  __Pyx_XGIVEREF(__pyx_r);
5825  __Pyx_RefNannyFinishContext();
5826  return __pyx_r;
5827  }
5828 
5829  /* Python wrapper */
5830  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5831  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 ";
5832  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5833  PyObject *__pyx_r = 0;
5834  __Pyx_RefNannyDeclarations
5835  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5836  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5837 
5838  /* function exit code */
5839  __Pyx_RefNannyFinishContext();
5840  return __pyx_r;
5841  }
5842 
5843  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5844  PyObject *__pyx_r = NULL;
5845  __Pyx_RefNannyDeclarations
5846  PyObject *__pyx_t_1 = NULL;
5847  __Pyx_RefNannySetupContext("min_neg", 0);
5848  __Pyx_XDECREF(__pyx_r);
5849  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5850  __Pyx_GOTREF(__pyx_t_1);
5851  __pyx_r = __pyx_t_1;
5852  __pyx_t_1 = 0;
5853  goto __pyx_L0;
5854 
5855  /* function exit code */
5856  __pyx_L1_error:;
5857  __Pyx_XDECREF(__pyx_t_1);
5858  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5859  __pyx_r = NULL;
5860  __pyx_L0:;
5861  __Pyx_XGIVEREF(__pyx_r);
5862  __Pyx_RefNannyFinishContext();
5863  return __pyx_r;
5864  }
5865 
5866  /* "PyClical.pyx":511
5867  * return glucat.min_neg( toIndexSet(obj) )
5868  *
5869  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5870  * """
5871  * Maximum positive index, or 0 if none.
5872  */
5873 
5874  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5875  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5876  PyObject *__pyx_r = NULL;
5877  __Pyx_RefNannyDeclarations
5878  PyObject *__pyx_t_1 = NULL;
5879  __Pyx_RefNannySetupContext("max_pos", 0);
5880 
5881  /* "PyClical.pyx":518
5882  * 2
5883  * """
5884  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5885  *
5886  * cdef inline vector[scalar_t] list_to_vector(lst):
5887  */
5888  __Pyx_XDECREF(__pyx_r);
5889  __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)
5890  __Pyx_GOTREF(__pyx_t_1);
5891  __pyx_r = __pyx_t_1;
5892  __pyx_t_1 = 0;
5893  goto __pyx_L0;
5894 
5895  /* "PyClical.pyx":511
5896  * return glucat.min_neg( toIndexSet(obj) )
5897  *
5898  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5899  * """
5900  * Maximum positive index, or 0 if none.
5901  */
5902 
5903  /* function exit code */
5904  __pyx_L1_error:;
5905  __Pyx_XDECREF(__pyx_t_1);
5906  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5907  __pyx_r = 0;
5908  __pyx_L0:;
5909  __Pyx_XGIVEREF(__pyx_r);
5910  __Pyx_RefNannyFinishContext();
5911  return __pyx_r;
5912  }
5913 
5914  /* Python wrapper */
5915  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5916  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 ";
5917  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5918  PyObject *__pyx_r = 0;
5919  __Pyx_RefNannyDeclarations
5920  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5921  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5922 
5923  /* function exit code */
5924  __Pyx_RefNannyFinishContext();
5925  return __pyx_r;
5926  }
5927 
5928  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5929  PyObject *__pyx_r = NULL;
5930  __Pyx_RefNannyDeclarations
5931  PyObject *__pyx_t_1 = NULL;
5932  __Pyx_RefNannySetupContext("max_pos", 0);
5933  __Pyx_XDECREF(__pyx_r);
5934  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5935  __Pyx_GOTREF(__pyx_t_1);
5936  __pyx_r = __pyx_t_1;
5937  __pyx_t_1 = 0;
5938  goto __pyx_L0;
5939 
5940  /* function exit code */
5941  __pyx_L1_error:;
5942  __Pyx_XDECREF(__pyx_t_1);
5943  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5944  __pyx_r = NULL;
5945  __pyx_L0:;
5946  __Pyx_XGIVEREF(__pyx_r);
5947  __Pyx_RefNannyFinishContext();
5948  return __pyx_r;
5949  }
5950 
5951  /* "PyClical.pyx":520
5952  * return glucat.max_pos( toIndexSet(obj) )
5953  *
5954  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5955  * """
5956  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5957  */
5958 
5959  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5960  std::vector<scalar_t> __pyx_v_v;
5961  PyObject *__pyx_v_s = NULL;
5962  std::vector<scalar_t> __pyx_r;
5963  __Pyx_RefNannyDeclarations
5964  PyObject *__pyx_t_1 = NULL;
5965  Py_ssize_t __pyx_t_2;
5966  PyObject *(*__pyx_t_3)(PyObject *);
5967  PyObject *__pyx_t_4 = NULL;
5968  scalar_t __pyx_t_5;
5969  __Pyx_RefNannySetupContext("list_to_vector", 0);
5970 
5971  /* "PyClical.pyx":525
5972  * """
5973  * cdef vector[scalar_t] v
5974  * for s in lst: # <<<<<<<<<<<<<<
5975  * v.push_back(<scalar_t>s)
5976  * return v
5977  */
5978  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5979  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5980  __pyx_t_3 = NULL;
5981  } else {
5982  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5983  __Pyx_GOTREF(__pyx_t_1);
5984  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5985  }
5986  for (;;) {
5987  if (likely(!__pyx_t_3)) {
5988  if (likely(PyList_CheckExact(__pyx_t_1))) {
5989  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5990  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5991  __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)
5992  #else
5993  __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)
5994  __Pyx_GOTREF(__pyx_t_4);
5995  #endif
5996  } else {
5997  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5998  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5999  __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)
6000  #else
6001  __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)
6002  __Pyx_GOTREF(__pyx_t_4);
6003  #endif
6004  }
6005  } else {
6006  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6007  if (unlikely(!__pyx_t_4)) {
6008  PyObject* exc_type = PyErr_Occurred();
6009  if (exc_type) {
6010  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6011  else __PYX_ERR(0, 525, __pyx_L1_error)
6012  }
6013  break;
6014  }
6015  __Pyx_GOTREF(__pyx_t_4);
6016  }
6017  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6018  __pyx_t_4 = 0;
6019 
6020  /* "PyClical.pyx":526
6021  * cdef vector[scalar_t] v
6022  * for s in lst:
6023  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6024  * return v
6025  *
6026  */
6027  __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)
6028  try {
6029  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6030  } catch(...) {
6031  __Pyx_CppExn2PyErr();
6032  __PYX_ERR(0, 526, __pyx_L1_error)
6033  }
6034 
6035  /* "PyClical.pyx":525
6036  * """
6037  * cdef vector[scalar_t] v
6038  * for s in lst: # <<<<<<<<<<<<<<
6039  * v.push_back(<scalar_t>s)
6040  * return v
6041  */
6042  }
6043  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6044 
6045  /* "PyClical.pyx":527
6046  * for s in lst:
6047  * v.push_back(<scalar_t>s)
6048  * return v # <<<<<<<<<<<<<<
6049  *
6050  * # Forward reference.
6051  */
6052  __pyx_r = __pyx_v_v;
6053  goto __pyx_L0;
6054 
6055  /* "PyClical.pyx":520
6056  * return glucat.max_pos( toIndexSet(obj) )
6057  *
6058  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6059  * """
6060  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6061  */
6062 
6063  /* function exit code */
6064  __pyx_L1_error:;
6065  __Pyx_XDECREF(__pyx_t_1);
6066  __Pyx_XDECREF(__pyx_t_4);
6067  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6068  __Pyx_pretend_to_initialize(&__pyx_r);
6069  __pyx_L0:;
6070  __Pyx_XDECREF(__pyx_v_s);
6071  __Pyx_RefNannyFinishContext();
6072  return __pyx_r;
6073  }
6074 
6075  /* "PyClical.pyx":532
6076  * cdef class clifford
6077  *
6078  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6079  * return clifford(obj).instance[0]
6080  *
6081  */
6082 
6083  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6084  Clifford __pyx_r;
6085  __Pyx_RefNannyDeclarations
6086  PyObject *__pyx_t_1 = NULL;
6087  __Pyx_RefNannySetupContext("toClifford", 0);
6088 
6089  /* "PyClical.pyx":533
6090  *
6091  * cdef inline Clifford toClifford(obj):
6092  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6093  *
6094  * cdef class clifford:
6095  */
6096  __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)
6097  __Pyx_GOTREF(__pyx_t_1);
6098  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6099  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6100  goto __pyx_L0;
6101 
6102  /* "PyClical.pyx":532
6103  * cdef class clifford
6104  *
6105  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6106  * return clifford(obj).instance[0]
6107  *
6108  */
6109 
6110  /* function exit code */
6111  __pyx_L1_error:;
6112  __Pyx_XDECREF(__pyx_t_1);
6113  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6114  __Pyx_pretend_to_initialize(&__pyx_r);
6115  __pyx_L0:;
6116  __Pyx_RefNannyFinishContext();
6117  return __pyx_r;
6118  }
6119 
6120  /* "PyClical.pyx":541
6121  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6122  *
6123  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6124  * """
6125  * Wrap an instance of the C++ class Clifford.
6126  */
6127 
6128  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6129  PyObject *__pyx_r = NULL;
6130  __Pyx_RefNannyDeclarations
6131  __Pyx_RefNannySetupContext("wrap", 0);
6132 
6133  /* "PyClical.pyx":545
6134  * Wrap an instance of the C++ class Clifford.
6135  * """
6136  * self.instance[0] = other # <<<<<<<<<<<<<<
6137  * return self
6138  *
6139  */
6140  (__pyx_v_self->instance[0]) = __pyx_v_other;
6141 
6142  /* "PyClical.pyx":546
6143  * """
6144  * self.instance[0] = other
6145  * return self # <<<<<<<<<<<<<<
6146  *
6147  * cdef inline Clifford unwrap(clifford self):
6148  */
6149  __Pyx_XDECREF(__pyx_r);
6150  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6151  __pyx_r = ((PyObject *)__pyx_v_self);
6152  goto __pyx_L0;
6153 
6154  /* "PyClical.pyx":541
6155  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6156  *
6157  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6158  * """
6159  * Wrap an instance of the C++ class Clifford.
6160  */
6161 
6162  /* function exit code */
6163  __pyx_L0:;
6164  __Pyx_XGIVEREF(__pyx_r);
6165  __Pyx_RefNannyFinishContext();
6166  return __pyx_r;
6167  }
6168 
6169  /* "PyClical.pyx":548
6170  * return self
6171  *
6172  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6173  * """
6174  * Return the wrapped C++ Clifford instance.
6175  */
6176 
6177  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6178  Clifford __pyx_r;
6179  __Pyx_RefNannyDeclarations
6180  __Pyx_RefNannySetupContext("unwrap", 0);
6181 
6182  /* "PyClical.pyx":552
6183  * Return the wrapped C++ Clifford instance.
6184  * """
6185  * return self.instance[0] # <<<<<<<<<<<<<<
6186  *
6187  * cpdef copy(clifford self):
6188  */
6189  __pyx_r = (__pyx_v_self->instance[0]);
6190  goto __pyx_L0;
6191 
6192  /* "PyClical.pyx":548
6193  * return self
6194  *
6195  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6196  * """
6197  * Return the wrapped C++ Clifford instance.
6198  */
6199 
6200  /* function exit code */
6201  __pyx_L0:;
6202  __Pyx_RefNannyFinishContext();
6203  return __pyx_r;
6204  }
6205 
6206  /* "PyClical.pyx":554
6207  * return self.instance[0]
6208  *
6209  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6210  * """
6211  * Copy this clifford object.
6212  */
6213 
6214  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6215  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6216  PyObject *__pyx_r = NULL;
6217  __Pyx_RefNannyDeclarations
6218  PyObject *__pyx_t_1 = NULL;
6219  PyObject *__pyx_t_2 = NULL;
6220  PyObject *__pyx_t_3 = NULL;
6221  PyObject *__pyx_t_4 = NULL;
6222  __Pyx_RefNannySetupContext("copy", 0);
6223  /* Check if called by wrapper */
6224  if (unlikely(__pyx_skip_dispatch)) ;
6225  /* Check if overridden in Python */
6226  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)))) {
6227  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6228  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6229  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6230  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6231  #endif
6232  __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)
6233  __Pyx_GOTREF(__pyx_t_1);
6234  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6235  __Pyx_XDECREF(__pyx_r);
6236  __Pyx_INCREF(__pyx_t_1);
6237  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6238  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6239  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6240  if (likely(__pyx_t_4)) {
6241  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6242  __Pyx_INCREF(__pyx_t_4);
6243  __Pyx_INCREF(function);
6244  __Pyx_DECREF_SET(__pyx_t_3, function);
6245  }
6246  }
6247  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6248  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6249  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6250  __Pyx_GOTREF(__pyx_t_2);
6251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6252  __pyx_r = __pyx_t_2;
6253  __pyx_t_2 = 0;
6254  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6255  goto __pyx_L0;
6256  }
6257  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6258  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6259  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6260  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6261  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6262  }
6263  #endif
6264  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6265  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6266  }
6267  #endif
6268  }
6269 
6270  /* "PyClical.pyx":561
6271  * {2}
6272  * """
6273  * return clifford(self) # <<<<<<<<<<<<<<
6274  *
6275  * def __cinit__(self, other = 0, ixt = None):
6276  */
6277  __Pyx_XDECREF(__pyx_r);
6278  __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)
6279  __Pyx_GOTREF(__pyx_t_1);
6280  __pyx_r = __pyx_t_1;
6281  __pyx_t_1 = 0;
6282  goto __pyx_L0;
6283 
6284  /* "PyClical.pyx":554
6285  * return self.instance[0]
6286  *
6287  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6288  * """
6289  * Copy this clifford object.
6290  */
6291 
6292  /* function exit code */
6293  __pyx_L1_error:;
6294  __Pyx_XDECREF(__pyx_t_1);
6295  __Pyx_XDECREF(__pyx_t_2);
6296  __Pyx_XDECREF(__pyx_t_3);
6297  __Pyx_XDECREF(__pyx_t_4);
6298  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6299  __pyx_r = 0;
6300  __pyx_L0:;
6301  __Pyx_XGIVEREF(__pyx_r);
6302  __Pyx_RefNannyFinishContext();
6303  return __pyx_r;
6304  }
6305 
6306  /* Python wrapper */
6307  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6308  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 ";
6309  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6310  PyObject *__pyx_r = 0;
6311  __Pyx_RefNannyDeclarations
6312  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6313  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6314 
6315  /* function exit code */
6316  __Pyx_RefNannyFinishContext();
6317  return __pyx_r;
6318  }
6319 
6320  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6321  PyObject *__pyx_r = NULL;
6322  __Pyx_RefNannyDeclarations
6323  PyObject *__pyx_t_1 = NULL;
6324  __Pyx_RefNannySetupContext("copy", 0);
6325  __Pyx_XDECREF(__pyx_r);
6326  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6327  __Pyx_GOTREF(__pyx_t_1);
6328  __pyx_r = __pyx_t_1;
6329  __pyx_t_1 = 0;
6330  goto __pyx_L0;
6331 
6332  /* function exit code */
6333  __pyx_L1_error:;
6334  __Pyx_XDECREF(__pyx_t_1);
6335  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6336  __pyx_r = NULL;
6337  __pyx_L0:;
6338  __Pyx_XGIVEREF(__pyx_r);
6339  __Pyx_RefNannyFinishContext();
6340  return __pyx_r;
6341  }
6342 
6343  /* "PyClical.pyx":563
6344  * return clifford(self)
6345  *
6346  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6347  * """
6348  * Construct an object of type clifford.
6349  */
6350 
6351  /* Python wrapper */
6352  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6353  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6354  PyObject *__pyx_v_other = 0;
6355  PyObject *__pyx_v_ixt = 0;
6356  int __pyx_r;
6357  __Pyx_RefNannyDeclarations
6358  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6359  {
6360  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6361  PyObject* values[2] = {0,0};
6362  values[0] = ((PyObject *)__pyx_int_0);
6363  values[1] = ((PyObject *)Py_None);
6364  if (unlikely(__pyx_kwds)) {
6365  Py_ssize_t kw_args;
6366  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6367  switch (pos_args) {
6368  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6369  CYTHON_FALLTHROUGH;
6370  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6371  CYTHON_FALLTHROUGH;
6372  case 0: break;
6373  default: goto __pyx_L5_argtuple_error;
6374  }
6375  kw_args = PyDict_Size(__pyx_kwds);
6376  switch (pos_args) {
6377  case 0:
6378  if (kw_args > 0) {
6379  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6380  if (value) { values[0] = value; kw_args--; }
6381  }
6382  CYTHON_FALLTHROUGH;
6383  case 1:
6384  if (kw_args > 0) {
6385  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6386  if (value) { values[1] = value; kw_args--; }
6387  }
6388  }
6389  if (unlikely(kw_args > 0)) {
6390  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6391  }
6392  } else {
6393  switch (PyTuple_GET_SIZE(__pyx_args)) {
6394  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6395  CYTHON_FALLTHROUGH;
6396  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6397  CYTHON_FALLTHROUGH;
6398  case 0: break;
6399  default: goto __pyx_L5_argtuple_error;
6400  }
6401  }
6402  __pyx_v_other = values[0];
6403  __pyx_v_ixt = values[1];
6404  }
6405  goto __pyx_L4_argument_unpacking_done;
6406  __pyx_L5_argtuple_error:;
6407  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6408  __pyx_L3_error:;
6409  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6410  __Pyx_RefNannyFinishContext();
6411  return -1;
6412  __pyx_L4_argument_unpacking_done:;
6413  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6414 
6415  /* function exit code */
6416  __Pyx_RefNannyFinishContext();
6417  return __pyx_r;
6418  }
6419 
6420  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6421  PyObject *__pyx_v_error_msg_prefix = NULL;
6422  PyObject *__pyx_v_err = NULL;
6423  int __pyx_r;
6424  __Pyx_RefNannyDeclarations
6425  int __pyx_t_1;
6426  int __pyx_t_2;
6427  PyObject *__pyx_t_3 = NULL;
6428  PyObject *__pyx_t_4 = NULL;
6429  PyObject *__pyx_t_5 = NULL;
6430  Clifford *__pyx_t_6;
6431  PyObject *__pyx_t_7 = NULL;
6432  PyObject *__pyx_t_8 = NULL;
6433  scalar_t __pyx_t_9;
6434  PyObject *__pyx_t_10 = NULL;
6435  PyObject *__pyx_t_11 = NULL;
6436  PyObject *__pyx_t_12 = NULL;
6437  char *__pyx_t_13;
6438  int __pyx_t_14;
6439  PyObject *__pyx_t_15 = NULL;
6440  PyObject *__pyx_t_16 = NULL;
6441  PyObject *__pyx_t_17 = NULL;
6442  PyObject *__pyx_t_18 = NULL;
6443  __Pyx_RefNannySetupContext("__cinit__", 0);
6444 
6445  /* "PyClical.pyx":588
6446  * 2{1}+3{2}
6447  * """
6448  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6449  * if ixt is None:
6450  * try:
6451  */
6452  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6453  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6454 
6455  /* "PyClical.pyx":589
6456  * """
6457  * error_msg_prefix = "Cannot initialize clifford object from"
6458  * if ixt is None: # <<<<<<<<<<<<<<
6459  * try:
6460  * if isinstance(other, clifford):
6461  */
6462  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6463  __pyx_t_2 = (__pyx_t_1 != 0);
6464  if (__pyx_t_2) {
6465 
6466  /* "PyClical.pyx":590
6467  * error_msg_prefix = "Cannot initialize clifford object from"
6468  * if ixt is None:
6469  * try: # <<<<<<<<<<<<<<
6470  * if isinstance(other, clifford):
6471  * self.instance = new Clifford((<clifford>other).unwrap())
6472  */
6473  {
6474  __Pyx_PyThreadState_declare
6475  __Pyx_PyThreadState_assign
6476  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6477  __Pyx_XGOTREF(__pyx_t_3);
6478  __Pyx_XGOTREF(__pyx_t_4);
6479  __Pyx_XGOTREF(__pyx_t_5);
6480  /*try:*/ {
6481 
6482  /* "PyClical.pyx":591
6483  * if ixt is None:
6484  * try:
6485  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6486  * self.instance = new Clifford((<clifford>other).unwrap())
6487  * elif isinstance(other, index_set):
6488  */
6489  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6490  __pyx_t_1 = (__pyx_t_2 != 0);
6491  if (__pyx_t_1) {
6492 
6493  /* "PyClical.pyx":592
6494  * try:
6495  * if isinstance(other, clifford):
6496  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6497  * elif isinstance(other, index_set):
6498  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6499  */
6500  try {
6501  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6502  } catch(...) {
6503  __Pyx_CppExn2PyErr();
6504  __PYX_ERR(0, 592, __pyx_L4_error)
6505  }
6506  __pyx_v_self->instance = __pyx_t_6;
6507 
6508  /* "PyClical.pyx":591
6509  * if ixt is None:
6510  * try:
6511  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6512  * self.instance = new Clifford((<clifford>other).unwrap())
6513  * elif isinstance(other, index_set):
6514  */
6515  goto __pyx_L10;
6516  }
6517 
6518  /* "PyClical.pyx":593
6519  * if isinstance(other, clifford):
6520  * self.instance = new Clifford((<clifford>other).unwrap())
6521  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6522  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6523  * elif isinstance(other, numbers.Real):
6524  */
6525  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6526  __pyx_t_2 = (__pyx_t_1 != 0);
6527  if (__pyx_t_2) {
6528 
6529  /* "PyClical.pyx":594
6530  * self.instance = new Clifford((<clifford>other).unwrap())
6531  * elif isinstance(other, index_set):
6532  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6533  * elif isinstance(other, numbers.Real):
6534  * self.instance = new Clifford(<scalar_t>other)
6535  */
6536  try {
6537  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6538  } catch(...) {
6539  __Pyx_CppExn2PyErr();
6540  __PYX_ERR(0, 594, __pyx_L4_error)
6541  }
6542  __pyx_v_self->instance = __pyx_t_6;
6543 
6544  /* "PyClical.pyx":593
6545  * if isinstance(other, clifford):
6546  * self.instance = new Clifford((<clifford>other).unwrap())
6547  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6548  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6549  * elif isinstance(other, numbers.Real):
6550  */
6551  goto __pyx_L10;
6552  }
6553 
6554  /* "PyClical.pyx":595
6555  * elif isinstance(other, index_set):
6556  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6557  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6558  * self.instance = new Clifford(<scalar_t>other)
6559  * elif isinstance(other, str):
6560  */
6561  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6562  __Pyx_GOTREF(__pyx_t_7);
6563  __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)
6564  __Pyx_GOTREF(__pyx_t_8);
6565  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6566  __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)
6567  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6568  __pyx_t_1 = (__pyx_t_2 != 0);
6569  if (__pyx_t_1) {
6570 
6571  /* "PyClical.pyx":596
6572  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6573  * elif isinstance(other, numbers.Real):
6574  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6575  * elif isinstance(other, str):
6576  * try:
6577  */
6578  __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)
6579  try {
6580  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6581  } catch(...) {
6582  __Pyx_CppExn2PyErr();
6583  __PYX_ERR(0, 596, __pyx_L4_error)
6584  }
6585  __pyx_v_self->instance = __pyx_t_6;
6586 
6587  /* "PyClical.pyx":595
6588  * elif isinstance(other, index_set):
6589  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6590  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6591  * self.instance = new Clifford(<scalar_t>other)
6592  * elif isinstance(other, str):
6593  */
6594  goto __pyx_L10;
6595  }
6596 
6597  /* "PyClical.pyx":597
6598  * elif isinstance(other, numbers.Real):
6599  * self.instance = new Clifford(<scalar_t>other)
6600  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6601  * try:
6602  * self.instance = new Clifford(<char *>other)
6603  */
6604  __pyx_t_1 = PyString_Check(__pyx_v_other);
6605  __pyx_t_2 = (__pyx_t_1 != 0);
6606  if (likely(__pyx_t_2)) {
6607 
6608  /* "PyClical.pyx":598
6609  * self.instance = new Clifford(<scalar_t>other)
6610  * elif isinstance(other, str):
6611  * try: # <<<<<<<<<<<<<<
6612  * self.instance = new Clifford(<char *>other)
6613  * except RuntimeError:
6614  */
6615  {
6616  __Pyx_PyThreadState_declare
6617  __Pyx_PyThreadState_assign
6618  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6619  __Pyx_XGOTREF(__pyx_t_10);
6620  __Pyx_XGOTREF(__pyx_t_11);
6621  __Pyx_XGOTREF(__pyx_t_12);
6622  /*try:*/ {
6623 
6624  /* "PyClical.pyx":599
6625  * elif isinstance(other, str):
6626  * try:
6627  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6628  * except RuntimeError:
6629  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6630  */
6631  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6632  try {
6633  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6634  } catch(...) {
6635  __Pyx_CppExn2PyErr();
6636  __PYX_ERR(0, 599, __pyx_L11_error)
6637  }
6638  __pyx_v_self->instance = __pyx_t_6;
6639 
6640  /* "PyClical.pyx":598
6641  * self.instance = new Clifford(<scalar_t>other)
6642  * elif isinstance(other, str):
6643  * try: # <<<<<<<<<<<<<<
6644  * self.instance = new Clifford(<char *>other)
6645  * except RuntimeError:
6646  */
6647  }
6648  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6649  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6650  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6651  goto __pyx_L16_try_end;
6652  __pyx_L11_error:;
6653  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6654  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6655 
6656  /* "PyClical.pyx":600
6657  * try:
6658  * self.instance = new Clifford(<char *>other)
6659  * except RuntimeError: # <<<<<<<<<<<<<<
6660  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6661  * else:
6662  */
6663  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6664  if (__pyx_t_14) {
6665  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6666  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6667  __Pyx_GOTREF(__pyx_t_8);
6668  __Pyx_GOTREF(__pyx_t_7);
6669  __Pyx_GOTREF(__pyx_t_15);
6670 
6671  /* "PyClical.pyx":601
6672  * self.instance = new Clifford(<char *>other)
6673  * except RuntimeError:
6674  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6675  * else:
6676  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6677  */
6678  __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)
6679  __Pyx_GOTREF(__pyx_t_16);
6680  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6681  __Pyx_GOTREF(__pyx_t_17);
6682  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6683  __Pyx_GOTREF(__pyx_t_18);
6684  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6685  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6686  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6687  __Pyx_GOTREF(__pyx_t_17);
6688  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6689  __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)
6690  __Pyx_GOTREF(__pyx_t_18);
6691  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6692  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6693  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6694  __PYX_ERR(0, 601, __pyx_L13_except_error)
6695  }
6696  goto __pyx_L13_except_error;
6697  __pyx_L13_except_error:;
6698 
6699  /* "PyClical.pyx":598
6700  * self.instance = new Clifford(<scalar_t>other)
6701  * elif isinstance(other, str):
6702  * try: # <<<<<<<<<<<<<<
6703  * self.instance = new Clifford(<char *>other)
6704  * except RuntimeError:
6705  */
6706  __Pyx_XGIVEREF(__pyx_t_10);
6707  __Pyx_XGIVEREF(__pyx_t_11);
6708  __Pyx_XGIVEREF(__pyx_t_12);
6709  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6710  goto __pyx_L4_error;
6711  __pyx_L16_try_end:;
6712  }
6713 
6714  /* "PyClical.pyx":597
6715  * elif isinstance(other, numbers.Real):
6716  * self.instance = new Clifford(<scalar_t>other)
6717  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6718  * try:
6719  * self.instance = new Clifford(<char *>other)
6720  */
6721  goto __pyx_L10;
6722  }
6723 
6724  /* "PyClical.pyx":603
6725  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6726  * else:
6727  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6728  * except RuntimeError as err:
6729  * raise ValueError(error_msg_prefix + " " + str(type(other))
6730  */
6731  /*else*/ {
6732  __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)
6733  __Pyx_GOTREF(__pyx_t_15);
6734  __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)
6735  __Pyx_GOTREF(__pyx_t_7);
6736  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6737  __Pyx_GOTREF(__pyx_t_8);
6738  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6739  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6740  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6741  __Pyx_GOTREF(__pyx_t_7);
6742  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6743  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6744  __Pyx_GOTREF(__pyx_t_8);
6745  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6746  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6747  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6748  __PYX_ERR(0, 603, __pyx_L4_error)
6749  }
6750  __pyx_L10:;
6751 
6752  /* "PyClical.pyx":590
6753  * error_msg_prefix = "Cannot initialize clifford object from"
6754  * if ixt is None:
6755  * try: # <<<<<<<<<<<<<<
6756  * if isinstance(other, clifford):
6757  * self.instance = new Clifford((<clifford>other).unwrap())
6758  */
6759  }
6760  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6761  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6762  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6763  goto __pyx_L9_try_end;
6764  __pyx_L4_error:;
6765  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6766  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6767  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6768  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6769  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6770  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6771 
6772  /* "PyClical.pyx":604
6773  * else:
6774  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6775  * except RuntimeError as err: # <<<<<<<<<<<<<<
6776  * raise ValueError(error_msg_prefix + " " + str(type(other))
6777  * + " value " + repr(other) + ":"
6778  */
6779  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6780  if (__pyx_t_14) {
6781  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6782  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6783  __Pyx_GOTREF(__pyx_t_8);
6784  __Pyx_GOTREF(__pyx_t_7);
6785  __Pyx_GOTREF(__pyx_t_15);
6786  __Pyx_INCREF(__pyx_t_7);
6787  __pyx_v_err = __pyx_t_7;
6788 
6789  /* "PyClical.pyx":605
6790  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6791  * except RuntimeError as err:
6792  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6793  * + " value " + repr(other) + ":"
6794  * + "\n\t" + str(err))
6795  */
6796  __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)
6797  __Pyx_GOTREF(__pyx_t_18);
6798  __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)
6799  __Pyx_GOTREF(__pyx_t_17);
6800  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6801  __Pyx_GOTREF(__pyx_t_16);
6802  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6803  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6804 
6805  /* "PyClical.pyx":606
6806  * except RuntimeError as err:
6807  * raise ValueError(error_msg_prefix + " " + str(type(other))
6808  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6809  * + "\n\t" + str(err))
6810  * elif isinstance(ixt, index_set):
6811  */
6812  __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)
6813  __Pyx_GOTREF(__pyx_t_17);
6814  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6815  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6816  __Pyx_GOTREF(__pyx_t_16);
6817  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6818  __Pyx_GOTREF(__pyx_t_18);
6819  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6820  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6821  __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)
6822  __Pyx_GOTREF(__pyx_t_16);
6823  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6824 
6825  /* "PyClical.pyx":607
6826  * raise ValueError(error_msg_prefix + " " + str(type(other))
6827  * + " value " + repr(other) + ":"
6828  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6829  * elif isinstance(ixt, index_set):
6830  * if isinstance(other, numbers.Real):
6831  */
6832  __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)
6833  __Pyx_GOTREF(__pyx_t_18);
6834  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6835  __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)
6836  __Pyx_GOTREF(__pyx_t_16);
6837  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6838  __Pyx_GOTREF(__pyx_t_17);
6839  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6840  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6841 
6842  /* "PyClical.pyx":605
6843  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6844  * except RuntimeError as err:
6845  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6846  * + " value " + repr(other) + ":"
6847  * + "\n\t" + str(err))
6848  */
6849  __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)
6850  __Pyx_GOTREF(__pyx_t_16);
6851  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6852  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6853  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6854  __PYX_ERR(0, 605, __pyx_L6_except_error)
6855  }
6856  goto __pyx_L6_except_error;
6857  __pyx_L6_except_error:;
6858 
6859  /* "PyClical.pyx":590
6860  * error_msg_prefix = "Cannot initialize clifford object from"
6861  * if ixt is None:
6862  * try: # <<<<<<<<<<<<<<
6863  * if isinstance(other, clifford):
6864  * self.instance = new Clifford((<clifford>other).unwrap())
6865  */
6866  __Pyx_XGIVEREF(__pyx_t_3);
6867  __Pyx_XGIVEREF(__pyx_t_4);
6868  __Pyx_XGIVEREF(__pyx_t_5);
6869  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6870  goto __pyx_L1_error;
6871  __pyx_L9_try_end:;
6872  }
6873 
6874  /* "PyClical.pyx":589
6875  * """
6876  * error_msg_prefix = "Cannot initialize clifford object from"
6877  * if ixt is None: # <<<<<<<<<<<<<<
6878  * try:
6879  * if isinstance(other, clifford):
6880  */
6881  goto __pyx_L3;
6882  }
6883 
6884  /* "PyClical.pyx":608
6885  * + " value " + repr(other) + ":"
6886  * + "\n\t" + str(err))
6887  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6888  * if isinstance(other, numbers.Real):
6889  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6890  */
6891  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6892  __pyx_t_1 = (__pyx_t_2 != 0);
6893  if (likely(__pyx_t_1)) {
6894 
6895  /* "PyClical.pyx":609
6896  * + "\n\t" + str(err))
6897  * elif isinstance(ixt, index_set):
6898  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6899  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6900  * elif isinstance(other, collections.Sequence):
6901  */
6902  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6903  __Pyx_GOTREF(__pyx_t_15);
6904  __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)
6905  __Pyx_GOTREF(__pyx_t_7);
6906  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6907  __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)
6908  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6909  __pyx_t_2 = (__pyx_t_1 != 0);
6910  if (__pyx_t_2) {
6911 
6912  /* "PyClical.pyx":610
6913  * elif isinstance(ixt, index_set):
6914  * if isinstance(other, numbers.Real):
6915  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6916  * elif isinstance(other, collections.Sequence):
6917  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6918  */
6919  __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)
6920  try {
6921  __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));
6922  } catch(...) {
6923  __Pyx_CppExn2PyErr();
6924  __PYX_ERR(0, 610, __pyx_L1_error)
6925  }
6926  __pyx_v_self->instance = __pyx_t_6;
6927 
6928  /* "PyClical.pyx":609
6929  * + "\n\t" + str(err))
6930  * elif isinstance(ixt, index_set):
6931  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6932  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6933  * elif isinstance(other, collections.Sequence):
6934  */
6935  goto __pyx_L21;
6936  }
6937 
6938  /* "PyClical.pyx":611
6939  * if isinstance(other, numbers.Real):
6940  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6941  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6942  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6943  * else:
6944  */
6945  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6946  __Pyx_GOTREF(__pyx_t_7);
6947  __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)
6948  __Pyx_GOTREF(__pyx_t_15);
6949  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6950  __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)
6951  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6952  __pyx_t_1 = (__pyx_t_2 != 0);
6953  if (likely(__pyx_t_1)) {
6954 
6955  /* "PyClical.pyx":612
6956  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6957  * elif isinstance(other, collections.Sequence):
6958  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6959  * else:
6960  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6961  */
6962  try {
6963  __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)));
6964  } catch(...) {
6965  __Pyx_CppExn2PyErr();
6966  __PYX_ERR(0, 612, __pyx_L1_error)
6967  }
6968  __pyx_v_self->instance = __pyx_t_6;
6969 
6970  /* "PyClical.pyx":611
6971  * if isinstance(other, numbers.Real):
6972  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6973  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6974  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6975  * else:
6976  */
6977  goto __pyx_L21;
6978  }
6979 
6980  /* "PyClical.pyx":614
6981  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6982  * else:
6983  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6984  * + ", " + repr(ixt) + ").")
6985  * else:
6986  */
6987  /*else*/ {
6988  __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)
6989  __Pyx_GOTREF(__pyx_t_15);
6990  __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)
6991  __Pyx_GOTREF(__pyx_t_7);
6992  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6993  __Pyx_GOTREF(__pyx_t_8);
6994  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6995  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6996 
6997  /* "PyClical.pyx":615
6998  * else:
6999  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7000  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7001  * else:
7002  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7003  */
7004  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7005  __Pyx_GOTREF(__pyx_t_7);
7006  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7007  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7008  __Pyx_GOTREF(__pyx_t_8);
7009  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
7010  __Pyx_GOTREF(__pyx_t_15);
7011  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7012  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7013  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7014  __Pyx_GOTREF(__pyx_t_8);
7015  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7016 
7017  /* "PyClical.pyx":614
7018  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7019  * else:
7020  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7021  * + ", " + repr(ixt) + ").")
7022  * else:
7023  */
7024  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7025  __Pyx_GOTREF(__pyx_t_15);
7026  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7027  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7028  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7029  __PYX_ERR(0, 614, __pyx_L1_error)
7030  }
7031  __pyx_L21:;
7032 
7033  /* "PyClical.pyx":608
7034  * + " value " + repr(other) + ":"
7035  * + "\n\t" + str(err))
7036  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7037  * if isinstance(other, numbers.Real):
7038  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7039  */
7040  goto __pyx_L3;
7041  }
7042 
7043  /* "PyClical.pyx":617
7044  * + ", " + repr(ixt) + ").")
7045  * else:
7046  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7047  * + ", " + str(type(ixt)) + ").")
7048  *
7049  */
7050  /*else*/ {
7051  __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)
7052  __Pyx_GOTREF(__pyx_t_15);
7053  __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)
7054  __Pyx_GOTREF(__pyx_t_8);
7055  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7056  __Pyx_GOTREF(__pyx_t_7);
7057  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7058  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7059 
7060  /* "PyClical.pyx":618
7061  * else:
7062  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7063  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7064  *
7065  * def __dealloc__(self):
7066  */
7067  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7068  __Pyx_GOTREF(__pyx_t_8);
7069  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7070  __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)
7071  __Pyx_GOTREF(__pyx_t_7);
7072  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7073  __Pyx_GOTREF(__pyx_t_15);
7074  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7075  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7076  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7077  __Pyx_GOTREF(__pyx_t_7);
7078  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7079 
7080  /* "PyClical.pyx":617
7081  * + ", " + repr(ixt) + ").")
7082  * else:
7083  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7084  * + ", " + str(type(ixt)) + ").")
7085  *
7086  */
7087  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7088  __Pyx_GOTREF(__pyx_t_15);
7089  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7090  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7091  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7092  __PYX_ERR(0, 617, __pyx_L1_error)
7093  }
7094  __pyx_L3:;
7095 
7096  /* "PyClical.pyx":563
7097  * return clifford(self)
7098  *
7099  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7100  * """
7101  * Construct an object of type clifford.
7102  */
7103 
7104  /* function exit code */
7105  __pyx_r = 0;
7106  goto __pyx_L0;
7107  __pyx_L1_error:;
7108  __Pyx_XDECREF(__pyx_t_7);
7109  __Pyx_XDECREF(__pyx_t_8);
7110  __Pyx_XDECREF(__pyx_t_15);
7111  __Pyx_XDECREF(__pyx_t_16);
7112  __Pyx_XDECREF(__pyx_t_17);
7113  __Pyx_XDECREF(__pyx_t_18);
7114  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7115  __pyx_r = -1;
7116  __pyx_L0:;
7117  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7118  __Pyx_XDECREF(__pyx_v_err);
7119  __Pyx_RefNannyFinishContext();
7120  return __pyx_r;
7121  }
7122 
7123  /* "PyClical.pyx":620
7124  * + ", " + str(type(ixt)) + ").")
7125  *
7126  * def __dealloc__(self): # <<<<<<<<<<<<<<
7127  * """
7128  * Clean up by deallocating the instance of C++ class Clifford.
7129  */
7130 
7131  /* Python wrapper */
7132  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7133  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7134  __Pyx_RefNannyDeclarations
7135  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7136  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7137 
7138  /* function exit code */
7139  __Pyx_RefNannyFinishContext();
7140  }
7141 
7142  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7143  __Pyx_RefNannyDeclarations
7144  __Pyx_RefNannySetupContext("__dealloc__", 0);
7145 
7146  /* "PyClical.pyx":624
7147  * Clean up by deallocating the instance of C++ class Clifford.
7148  * """
7149  * del self.instance # <<<<<<<<<<<<<<
7150  *
7151  * def __contains__(self, x):
7152  */
7153  delete __pyx_v_self->instance;
7154 
7155  /* "PyClical.pyx":620
7156  * + ", " + str(type(ixt)) + ").")
7157  *
7158  * def __dealloc__(self): # <<<<<<<<<<<<<<
7159  * """
7160  * Clean up by deallocating the instance of C++ class Clifford.
7161  */
7162 
7163  /* function exit code */
7164  __Pyx_RefNannyFinishContext();
7165  }
7166 
7167  /* "PyClical.pyx":626
7168  * del self.instance
7169  *
7170  * def __contains__(self, x): # <<<<<<<<<<<<<<
7171  * """
7172  * Not applicable.
7173  */
7174 
7175  /* Python wrapper */
7176  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7177  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 ";
7178  #if CYTHON_COMPILING_IN_CPYTHON
7179  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7180  #endif
7181  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7182  int __pyx_r;
7183  __Pyx_RefNannyDeclarations
7184  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7185  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7186 
7187  /* function exit code */
7188  __Pyx_RefNannyFinishContext();
7189  return __pyx_r;
7190  }
7191 
7192  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7193  int __pyx_r;
7194  __Pyx_RefNannyDeclarations
7195  PyObject *__pyx_t_1 = NULL;
7196  __Pyx_RefNannySetupContext("__contains__", 0);
7197 
7198  /* "PyClical.pyx":635
7199  * TypeError: Not applicable.
7200  * """
7201  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7202  *
7203  * def __iter__(self):
7204  */
7205  __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)
7206  __Pyx_GOTREF(__pyx_t_1);
7207  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7208  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7209  __PYX_ERR(0, 635, __pyx_L1_error)
7210 
7211  /* "PyClical.pyx":626
7212  * del self.instance
7213  *
7214  * def __contains__(self, x): # <<<<<<<<<<<<<<
7215  * """
7216  * Not applicable.
7217  */
7218 
7219  /* function exit code */
7220  __pyx_L1_error:;
7221  __Pyx_XDECREF(__pyx_t_1);
7222  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7223  __pyx_r = -1;
7224  __Pyx_RefNannyFinishContext();
7225  return __pyx_r;
7226  }
7227 
7228  /* "PyClical.pyx":637
7229  * raise TypeError("Not applicable.")
7230  *
7231  * def __iter__(self): # <<<<<<<<<<<<<<
7232  * """
7233  * Not applicable.
7234  */
7235 
7236  /* Python wrapper */
7237  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7238  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 ";
7239  #if CYTHON_COMPILING_IN_CPYTHON
7240  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7241  #endif
7242  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7243  PyObject *__pyx_r = 0;
7244  __Pyx_RefNannyDeclarations
7245  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7246  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7247 
7248  /* function exit code */
7249  __Pyx_RefNannyFinishContext();
7250  return __pyx_r;
7251  }
7252 
7253  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7254  PyObject *__pyx_r = NULL;
7255  __Pyx_RefNannyDeclarations
7256  PyObject *__pyx_t_1 = NULL;
7257  __Pyx_RefNannySetupContext("__iter__", 0);
7258 
7259  /* "PyClical.pyx":646
7260  * TypeError: Not applicable.
7261  * """
7262  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7263  *
7264  * def reframe(self, ixt):
7265  */
7266  __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)
7267  __Pyx_GOTREF(__pyx_t_1);
7268  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7269  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7270  __PYX_ERR(0, 646, __pyx_L1_error)
7271 
7272  /* "PyClical.pyx":637
7273  * raise TypeError("Not applicable.")
7274  *
7275  * def __iter__(self): # <<<<<<<<<<<<<<
7276  * """
7277  * Not applicable.
7278  */
7279 
7280  /* function exit code */
7281  __pyx_L1_error:;
7282  __Pyx_XDECREF(__pyx_t_1);
7283  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7284  __pyx_r = NULL;
7285  __Pyx_XGIVEREF(__pyx_r);
7286  __Pyx_RefNannyFinishContext();
7287  return __pyx_r;
7288  }
7289 
7290  /* "PyClical.pyx":648
7291  * raise TypeError("Not applicable.")
7292  *
7293  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7294  * """
7295  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7296  */
7297 
7298  /* Python wrapper */
7299  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7300  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 ";
7301  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7302  PyObject *__pyx_r = 0;
7303  __Pyx_RefNannyDeclarations
7304  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7305  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7306 
7307  /* function exit code */
7308  __Pyx_RefNannyFinishContext();
7309  return __pyx_r;
7310  }
7311 
7312  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7313  PyObject *__pyx_v_error_msg_prefix = NULL;
7314  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7315  PyObject *__pyx_v_err = NULL;
7316  PyObject *__pyx_r = NULL;
7317  __Pyx_RefNannyDeclarations
7318  int __pyx_t_1;
7319  int __pyx_t_2;
7320  PyObject *__pyx_t_3 = NULL;
7321  PyObject *__pyx_t_4 = NULL;
7322  PyObject *__pyx_t_5 = NULL;
7323  PyObject *__pyx_t_6 = NULL;
7324  Clifford *__pyx_t_7;
7325  int __pyx_t_8;
7326  PyObject *__pyx_t_9 = NULL;
7327  PyObject *__pyx_t_10 = NULL;
7328  PyObject *__pyx_t_11 = NULL;
7329  PyObject *__pyx_t_12 = NULL;
7330  PyObject *__pyx_t_13 = NULL;
7331  __Pyx_RefNannySetupContext("reframe", 0);
7332 
7333  /* "PyClical.pyx":658
7334  * True
7335  * """
7336  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7337  * if isinstance(ixt, index_set):
7338  * try:
7339  */
7340  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7341  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7342 
7343  /* "PyClical.pyx":659
7344  * """
7345  * error_msg_prefix = "Cannot reframe"
7346  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7347  * try:
7348  * result = clifford()
7349  */
7350  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7351  __pyx_t_2 = (__pyx_t_1 != 0);
7352  if (likely(__pyx_t_2)) {
7353 
7354  /* "PyClical.pyx":660
7355  * error_msg_prefix = "Cannot reframe"
7356  * if isinstance(ixt, index_set):
7357  * try: # <<<<<<<<<<<<<<
7358  * result = clifford()
7359  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7360  */
7361  {
7362  __Pyx_PyThreadState_declare
7363  __Pyx_PyThreadState_assign
7364  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7365  __Pyx_XGOTREF(__pyx_t_3);
7366  __Pyx_XGOTREF(__pyx_t_4);
7367  __Pyx_XGOTREF(__pyx_t_5);
7368  /*try:*/ {
7369 
7370  /* "PyClical.pyx":661
7371  * if isinstance(ixt, index_set):
7372  * try:
7373  * result = clifford() # <<<<<<<<<<<<<<
7374  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7375  * except RuntimeError as err:
7376  */
7377  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7378  __Pyx_GOTREF(__pyx_t_6);
7379  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7380  __pyx_t_6 = 0;
7381 
7382  /* "PyClical.pyx":662
7383  * try:
7384  * result = clifford()
7385  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7386  * except RuntimeError as err:
7387  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7388  */
7389  try {
7390  __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)));
7391  } catch(...) {
7392  __Pyx_CppExn2PyErr();
7393  __PYX_ERR(0, 662, __pyx_L4_error)
7394  }
7395  __pyx_v_result->instance = __pyx_t_7;
7396 
7397  /* "PyClical.pyx":660
7398  * error_msg_prefix = "Cannot reframe"
7399  * if isinstance(ixt, index_set):
7400  * try: # <<<<<<<<<<<<<<
7401  * result = clifford()
7402  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7403  */
7404  }
7405  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7406  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7407  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7408  goto __pyx_L9_try_end;
7409  __pyx_L4_error:;
7410  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7411 
7412  /* "PyClical.pyx":663
7413  * result = clifford()
7414  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7415  * except RuntimeError as err: # <<<<<<<<<<<<<<
7416  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7417  * + str(ixt) + ":"
7418  */
7419  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7420  if (__pyx_t_8) {
7421  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7422  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7423  __Pyx_GOTREF(__pyx_t_6);
7424  __Pyx_GOTREF(__pyx_t_9);
7425  __Pyx_GOTREF(__pyx_t_10);
7426  __Pyx_INCREF(__pyx_t_9);
7427  __pyx_v_err = __pyx_t_9;
7428 
7429  /* "PyClical.pyx":664
7430  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7431  * except RuntimeError as err:
7432  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7433  * + str(ixt) + ":"
7434  * + "\n\t" + str(err))
7435  */
7436  __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)
7437  __Pyx_GOTREF(__pyx_t_11);
7438  __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)
7439  __Pyx_GOTREF(__pyx_t_12);
7440  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7441  __Pyx_GOTREF(__pyx_t_13);
7442  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7443  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7444  __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)
7445  __Pyx_GOTREF(__pyx_t_12);
7446  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7447 
7448  /* "PyClical.pyx":665
7449  * except RuntimeError as err:
7450  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7451  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7452  * + "\n\t" + str(err))
7453  * else:
7454  */
7455  __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)
7456  __Pyx_GOTREF(__pyx_t_13);
7457  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7458  __Pyx_GOTREF(__pyx_t_11);
7459  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7460  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7461  __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)
7462  __Pyx_GOTREF(__pyx_t_13);
7463  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7464 
7465  /* "PyClical.pyx":666
7466  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7467  * + str(ixt) + ":"
7468  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7469  * else:
7470  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7471  */
7472  __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)
7473  __Pyx_GOTREF(__pyx_t_11);
7474  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7475  __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)
7476  __Pyx_GOTREF(__pyx_t_13);
7477  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7478  __Pyx_GOTREF(__pyx_t_12);
7479  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7480  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7481 
7482  /* "PyClical.pyx":664
7483  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7484  * except RuntimeError as err:
7485  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7486  * + str(ixt) + ":"
7487  * + "\n\t" + str(err))
7488  */
7489  __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)
7490  __Pyx_GOTREF(__pyx_t_13);
7491  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7492  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7493  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7494  __PYX_ERR(0, 664, __pyx_L6_except_error)
7495  }
7496  goto __pyx_L6_except_error;
7497  __pyx_L6_except_error:;
7498 
7499  /* "PyClical.pyx":660
7500  * error_msg_prefix = "Cannot reframe"
7501  * if isinstance(ixt, index_set):
7502  * try: # <<<<<<<<<<<<<<
7503  * result = clifford()
7504  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7505  */
7506  __Pyx_XGIVEREF(__pyx_t_3);
7507  __Pyx_XGIVEREF(__pyx_t_4);
7508  __Pyx_XGIVEREF(__pyx_t_5);
7509  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7510  goto __pyx_L1_error;
7511  __pyx_L9_try_end:;
7512  }
7513 
7514  /* "PyClical.pyx":659
7515  * """
7516  * error_msg_prefix = "Cannot reframe"
7517  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7518  * try:
7519  * result = clifford()
7520  */
7521  goto __pyx_L3;
7522  }
7523 
7524  /* "PyClical.pyx":668
7525  * + "\n\t" + str(err))
7526  * else:
7527  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7528  * return result
7529  *
7530  */
7531  /*else*/ {
7532  __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)
7533  __Pyx_GOTREF(__pyx_t_10);
7534  __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)
7535  __Pyx_GOTREF(__pyx_t_9);
7536  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7537  __Pyx_GOTREF(__pyx_t_6);
7538  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7539  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7540  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7541  __Pyx_GOTREF(__pyx_t_9);
7542  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7543  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7544  __Pyx_GOTREF(__pyx_t_6);
7545  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7546  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7547  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7548  __PYX_ERR(0, 668, __pyx_L1_error)
7549  }
7550  __pyx_L3:;
7551 
7552  /* "PyClical.pyx":669
7553  * else:
7554  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7555  * return result # <<<<<<<<<<<<<<
7556  *
7557  * def __richcmp__(lhs, rhs, int op):
7558  */
7559  __Pyx_XDECREF(__pyx_r);
7560  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7561  __pyx_r = ((PyObject *)__pyx_v_result);
7562  goto __pyx_L0;
7563 
7564  /* "PyClical.pyx":648
7565  * raise TypeError("Not applicable.")
7566  *
7567  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7568  * """
7569  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7570  */
7571 
7572  /* function exit code */
7573  __pyx_L1_error:;
7574  __Pyx_XDECREF(__pyx_t_6);
7575  __Pyx_XDECREF(__pyx_t_9);
7576  __Pyx_XDECREF(__pyx_t_10);
7577  __Pyx_XDECREF(__pyx_t_11);
7578  __Pyx_XDECREF(__pyx_t_12);
7579  __Pyx_XDECREF(__pyx_t_13);
7580  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7581  __pyx_r = NULL;
7582  __pyx_L0:;
7583  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7584  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7585  __Pyx_XDECREF(__pyx_v_err);
7586  __Pyx_XGIVEREF(__pyx_r);
7587  __Pyx_RefNannyFinishContext();
7588  return __pyx_r;
7589  }
7590 
7591  /* "PyClical.pyx":671
7592  * return result
7593  *
7594  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7595  * """
7596  * Compare objects of type clifford.
7597  */
7598 
7599  /* Python wrapper */
7600  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7601  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7602  PyObject *__pyx_r = 0;
7603  __Pyx_RefNannyDeclarations
7604  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7605  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7606 
7607  /* function exit code */
7608  __Pyx_RefNannyFinishContext();
7609  return __pyx_r;
7610  }
7611 
7612  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7613  PyObject *__pyx_r = NULL;
7614  __Pyx_RefNannyDeclarations
7615  int __pyx_t_1;
7616  int __pyx_t_2;
7617  int __pyx_t_3;
7618  PyObject *__pyx_t_4 = NULL;
7619  PyObject *__pyx_t_5 = NULL;
7620  PyObject *__pyx_t_6 = NULL;
7621  __Pyx_RefNannySetupContext("__richcmp__", 0);
7622 
7623  /* "PyClical.pyx":690
7624  * True
7625  * """
7626  * if op == 2: # == # <<<<<<<<<<<<<<
7627  * if (lhs is None) or (rhs is None):
7628  * return bool(lhs is rhs)
7629  */
7630  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7631  if (__pyx_t_1) {
7632 
7633  /* "PyClical.pyx":691
7634  * """
7635  * if op == 2: # ==
7636  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7637  * return bool(lhs is rhs)
7638  * else:
7639  */
7640  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7641  __pyx_t_3 = (__pyx_t_2 != 0);
7642  if (!__pyx_t_3) {
7643  } else {
7644  __pyx_t_1 = __pyx_t_3;
7645  goto __pyx_L5_bool_binop_done;
7646  }
7647  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7648  __pyx_t_2 = (__pyx_t_3 != 0);
7649  __pyx_t_1 = __pyx_t_2;
7650  __pyx_L5_bool_binop_done:;
7651  if (__pyx_t_1) {
7652 
7653  /* "PyClical.pyx":692
7654  * if op == 2: # ==
7655  * if (lhs is None) or (rhs is None):
7656  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7657  * else:
7658  * return bool( toClifford(lhs) == toClifford(rhs) )
7659  */
7660  __Pyx_XDECREF(__pyx_r);
7661  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7662  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7663  __Pyx_GOTREF(__pyx_t_4);
7664  __pyx_r = __pyx_t_4;
7665  __pyx_t_4 = 0;
7666  goto __pyx_L0;
7667 
7668  /* "PyClical.pyx":691
7669  * """
7670  * if op == 2: # ==
7671  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7672  * return bool(lhs is rhs)
7673  * else:
7674  */
7675  }
7676 
7677  /* "PyClical.pyx":694
7678  * return bool(lhs is rhs)
7679  * else:
7680  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7681  * elif op == 3: # !=
7682  * if (lhs is None) or (rhs is None):
7683  */
7684  /*else*/ {
7685  __Pyx_XDECREF(__pyx_r);
7686  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7687  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7688  __Pyx_GOTREF(__pyx_t_4);
7689  __pyx_r = __pyx_t_4;
7690  __pyx_t_4 = 0;
7691  goto __pyx_L0;
7692  }
7693 
7694  /* "PyClical.pyx":690
7695  * True
7696  * """
7697  * if op == 2: # == # <<<<<<<<<<<<<<
7698  * if (lhs is None) or (rhs is None):
7699  * return bool(lhs is rhs)
7700  */
7701  }
7702 
7703  /* "PyClical.pyx":695
7704  * else:
7705  * return bool( toClifford(lhs) == toClifford(rhs) )
7706  * elif op == 3: # != # <<<<<<<<<<<<<<
7707  * if (lhs is None) or (rhs is None):
7708  * return not bool(lhs is rhs)
7709  */
7710  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7711  if (__pyx_t_1) {
7712 
7713  /* "PyClical.pyx":696
7714  * return bool( toClifford(lhs) == toClifford(rhs) )
7715  * elif op == 3: # !=
7716  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7717  * return not bool(lhs is rhs)
7718  * else:
7719  */
7720  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7721  __pyx_t_3 = (__pyx_t_2 != 0);
7722  if (!__pyx_t_3) {
7723  } else {
7724  __pyx_t_1 = __pyx_t_3;
7725  goto __pyx_L8_bool_binop_done;
7726  }
7727  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7728  __pyx_t_2 = (__pyx_t_3 != 0);
7729  __pyx_t_1 = __pyx_t_2;
7730  __pyx_L8_bool_binop_done:;
7731  if (__pyx_t_1) {
7732 
7733  /* "PyClical.pyx":697
7734  * elif op == 3: # !=
7735  * if (lhs is None) or (rhs is None):
7736  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7737  * else:
7738  * return bool( toClifford(lhs) != toClifford(rhs) )
7739  */
7740  __Pyx_XDECREF(__pyx_r);
7741  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7742  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7743  __Pyx_GOTREF(__pyx_t_4);
7744  __pyx_r = __pyx_t_4;
7745  __pyx_t_4 = 0;
7746  goto __pyx_L0;
7747 
7748  /* "PyClical.pyx":696
7749  * return bool( toClifford(lhs) == toClifford(rhs) )
7750  * elif op == 3: # !=
7751  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7752  * return not bool(lhs is rhs)
7753  * else:
7754  */
7755  }
7756 
7757  /* "PyClical.pyx":699
7758  * return not bool(lhs is rhs)
7759  * else:
7760  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7761  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7762  * raise TypeError("This comparison operator is not implemented for "
7763  */
7764  /*else*/ {
7765  __Pyx_XDECREF(__pyx_r);
7766  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7767  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7768  __Pyx_GOTREF(__pyx_t_4);
7769  __pyx_r = __pyx_t_4;
7770  __pyx_t_4 = 0;
7771  goto __pyx_L0;
7772  }
7773 
7774  /* "PyClical.pyx":695
7775  * else:
7776  * return bool( toClifford(lhs) == toClifford(rhs) )
7777  * elif op == 3: # != # <<<<<<<<<<<<<<
7778  * if (lhs is None) or (rhs is None):
7779  * return not bool(lhs is rhs)
7780  */
7781  }
7782 
7783  /* "PyClical.pyx":700
7784  * else:
7785  * return bool( toClifford(lhs) != toClifford(rhs) )
7786  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7787  * raise TypeError("This comparison operator is not implemented for "
7788  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7789  */
7790  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7791  __pyx_t_3 = (__pyx_t_2 != 0);
7792  if (!__pyx_t_3) {
7793  } else {
7794  __pyx_t_1 = __pyx_t_3;
7795  goto __pyx_L10_bool_binop_done;
7796  }
7797  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7798  __pyx_t_2 = (__pyx_t_3 != 0);
7799  __pyx_t_1 = __pyx_t_2;
7800  __pyx_L10_bool_binop_done:;
7801  if (unlikely(__pyx_t_1)) {
7802 
7803  /* "PyClical.pyx":702
7804  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7805  * raise TypeError("This comparison operator is not implemented for "
7806  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7807  * else:
7808  * return NotImplemented
7809  */
7810  __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)
7811  __Pyx_GOTREF(__pyx_t_4);
7812  __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)
7813  __Pyx_GOTREF(__pyx_t_5);
7814  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7815  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7816  __Pyx_GOTREF(__pyx_t_4);
7817  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7818  __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)
7819  __Pyx_GOTREF(__pyx_t_5);
7820  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7821  __Pyx_GOTREF(__pyx_t_6);
7822  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7823  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7824  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7825  __Pyx_GOTREF(__pyx_t_5);
7826  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7827 
7828  /* "PyClical.pyx":701
7829  * return bool( toClifford(lhs) != toClifford(rhs) )
7830  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7831  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7832  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7833  * else:
7834  */
7835  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7836  __Pyx_GOTREF(__pyx_t_6);
7837  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7838  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7839  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7840  __PYX_ERR(0, 701, __pyx_L1_error)
7841 
7842  /* "PyClical.pyx":700
7843  * else:
7844  * return bool( toClifford(lhs) != toClifford(rhs) )
7845  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7846  * raise TypeError("This comparison operator is not implemented for "
7847  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7848  */
7849  }
7850 
7851  /* "PyClical.pyx":704
7852  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7853  * else:
7854  * return NotImplemented # <<<<<<<<<<<<<<
7855  *
7856  * def __getitem__(self, ixt):
7857  */
7858  /*else*/ {
7859  __Pyx_XDECREF(__pyx_r);
7860  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7861  __pyx_r = __pyx_builtin_NotImplemented;
7862  goto __pyx_L0;
7863  }
7864 
7865  /* "PyClical.pyx":671
7866  * return result
7867  *
7868  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7869  * """
7870  * Compare objects of type clifford.
7871  */
7872 
7873  /* function exit code */
7874  __pyx_L1_error:;
7875  __Pyx_XDECREF(__pyx_t_4);
7876  __Pyx_XDECREF(__pyx_t_5);
7877  __Pyx_XDECREF(__pyx_t_6);
7878  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7879  __pyx_r = NULL;
7880  __pyx_L0:;
7881  __Pyx_XGIVEREF(__pyx_r);
7882  __Pyx_RefNannyFinishContext();
7883  return __pyx_r;
7884  }
7885 
7886  /* "PyClical.pyx":706
7887  * return NotImplemented
7888  *
7889  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7890  * """
7891  * Subscripting: map from index set to scalar coordinate.
7892  */
7893 
7894  /* Python wrapper */
7895  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7896  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 ";
7897  #if CYTHON_COMPILING_IN_CPYTHON
7898  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7899  #endif
7900  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7901  PyObject *__pyx_r = 0;
7902  __Pyx_RefNannyDeclarations
7903  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7904  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7905 
7906  /* function exit code */
7907  __Pyx_RefNannyFinishContext();
7908  return __pyx_r;
7909  }
7910 
7911  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7912  PyObject *__pyx_r = NULL;
7913  __Pyx_RefNannyDeclarations
7914  PyObject *__pyx_t_1 = NULL;
7915  __Pyx_RefNannySetupContext("__getitem__", 0);
7916 
7917  /* "PyClical.pyx":719
7918  * 2.0
7919  * """
7920  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7921  *
7922  * def __neg__(self):
7923  */
7924  __Pyx_XDECREF(__pyx_r);
7925  __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)
7926  __Pyx_GOTREF(__pyx_t_1);
7927  __pyx_r = __pyx_t_1;
7928  __pyx_t_1 = 0;
7929  goto __pyx_L0;
7930 
7931  /* "PyClical.pyx":706
7932  * return NotImplemented
7933  *
7934  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7935  * """
7936  * Subscripting: map from index set to scalar coordinate.
7937  */
7938 
7939  /* function exit code */
7940  __pyx_L1_error:;
7941  __Pyx_XDECREF(__pyx_t_1);
7942  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7943  __pyx_r = NULL;
7944  __pyx_L0:;
7945  __Pyx_XGIVEREF(__pyx_r);
7946  __Pyx_RefNannyFinishContext();
7947  return __pyx_r;
7948  }
7949 
7950  /* "PyClical.pyx":721
7951  * return self.instance.getitem(toIndexSet(ixt))
7952  *
7953  * def __neg__(self): # <<<<<<<<<<<<<<
7954  * """
7955  * Unary -.
7956  */
7957 
7958  /* Python wrapper */
7959  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7960  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7961  #if CYTHON_COMPILING_IN_CPYTHON
7962  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7963  #endif
7964  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7965  PyObject *__pyx_r = 0;
7966  __Pyx_RefNannyDeclarations
7967  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7968  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7969 
7970  /* function exit code */
7971  __Pyx_RefNannyFinishContext();
7972  return __pyx_r;
7973  }
7974 
7975  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7976  PyObject *__pyx_r = NULL;
7977  __Pyx_RefNannyDeclarations
7978  PyObject *__pyx_t_1 = NULL;
7979  PyObject *__pyx_t_2 = NULL;
7980  __Pyx_RefNannySetupContext("__neg__", 0);
7981 
7982  /* "PyClical.pyx":728
7983  * -{1}
7984  * """
7985  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7986  *
7987  * def __pos__(self):
7988  */
7989  __Pyx_XDECREF(__pyx_r);
7990  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7991  __Pyx_GOTREF(__pyx_t_1);
7992  __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)
7993  __Pyx_GOTREF(__pyx_t_2);
7994  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7995  __pyx_r = __pyx_t_2;
7996  __pyx_t_2 = 0;
7997  goto __pyx_L0;
7998 
7999  /* "PyClical.pyx":721
8000  * return self.instance.getitem(toIndexSet(ixt))
8001  *
8002  * def __neg__(self): # <<<<<<<<<<<<<<
8003  * """
8004  * Unary -.
8005  */
8006 
8007  /* function exit code */
8008  __pyx_L1_error:;
8009  __Pyx_XDECREF(__pyx_t_1);
8010  __Pyx_XDECREF(__pyx_t_2);
8011  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8012  __pyx_r = NULL;
8013  __pyx_L0:;
8014  __Pyx_XGIVEREF(__pyx_r);
8015  __Pyx_RefNannyFinishContext();
8016  return __pyx_r;
8017  }
8018 
8019  /* "PyClical.pyx":730
8020  * return clifford().wrap( self.instance.neg() )
8021  *
8022  * def __pos__(self): # <<<<<<<<<<<<<<
8023  * """
8024  * Unary +.
8025  */
8026 
8027  /* Python wrapper */
8028  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8029  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8030  #if CYTHON_COMPILING_IN_CPYTHON
8031  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8032  #endif
8033  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8034  PyObject *__pyx_r = 0;
8035  __Pyx_RefNannyDeclarations
8036  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8037  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8038 
8039  /* function exit code */
8040  __Pyx_RefNannyFinishContext();
8041  return __pyx_r;
8042  }
8043 
8044  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8045  PyObject *__pyx_r = NULL;
8046  __Pyx_RefNannyDeclarations
8047  PyObject *__pyx_t_1 = NULL;
8048  __Pyx_RefNannySetupContext("__pos__", 0);
8049 
8050  /* "PyClical.pyx":737
8051  * {1}
8052  * """
8053  * return clifford(self) # <<<<<<<<<<<<<<
8054  *
8055  * def __add__(lhs, rhs):
8056  */
8057  __Pyx_XDECREF(__pyx_r);
8058  __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)
8059  __Pyx_GOTREF(__pyx_t_1);
8060  __pyx_r = __pyx_t_1;
8061  __pyx_t_1 = 0;
8062  goto __pyx_L0;
8063 
8064  /* "PyClical.pyx":730
8065  * return clifford().wrap( self.instance.neg() )
8066  *
8067  * def __pos__(self): # <<<<<<<<<<<<<<
8068  * """
8069  * Unary +.
8070  */
8071 
8072  /* function exit code */
8073  __pyx_L1_error:;
8074  __Pyx_XDECREF(__pyx_t_1);
8075  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8076  __pyx_r = NULL;
8077  __pyx_L0:;
8078  __Pyx_XGIVEREF(__pyx_r);
8079  __Pyx_RefNannyFinishContext();
8080  return __pyx_r;
8081  }
8082 
8083  /* "PyClical.pyx":739
8084  * return clifford(self)
8085  *
8086  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8087  * """
8088  * Geometric sum.
8089  */
8090 
8091  /* Python wrapper */
8092  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8093  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 ";
8094  #if CYTHON_COMPILING_IN_CPYTHON
8095  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8096  #endif
8097  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8098  PyObject *__pyx_r = 0;
8099  __Pyx_RefNannyDeclarations
8100  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8101  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8102 
8103  /* function exit code */
8104  __Pyx_RefNannyFinishContext();
8105  return __pyx_r;
8106  }
8107 
8108  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8109  PyObject *__pyx_r = NULL;
8110  __Pyx_RefNannyDeclarations
8111  PyObject *__pyx_t_1 = NULL;
8112  PyObject *__pyx_t_2 = NULL;
8113  __Pyx_RefNannySetupContext("__add__", 0);
8114 
8115  /* "PyClical.pyx":748
8116  * {1}+{2}
8117  * """
8118  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8119  *
8120  * def __iadd__(self, rhs):
8121  */
8122  __Pyx_XDECREF(__pyx_r);
8123  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8124  __Pyx_GOTREF(__pyx_t_1);
8125  __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)
8126  __Pyx_GOTREF(__pyx_t_2);
8127  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8128  __pyx_r = __pyx_t_2;
8129  __pyx_t_2 = 0;
8130  goto __pyx_L0;
8131 
8132  /* "PyClical.pyx":739
8133  * return clifford(self)
8134  *
8135  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8136  * """
8137  * Geometric sum.
8138  */
8139 
8140  /* function exit code */
8141  __pyx_L1_error:;
8142  __Pyx_XDECREF(__pyx_t_1);
8143  __Pyx_XDECREF(__pyx_t_2);
8144  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8145  __pyx_r = NULL;
8146  __pyx_L0:;
8147  __Pyx_XGIVEREF(__pyx_r);
8148  __Pyx_RefNannyFinishContext();
8149  return __pyx_r;
8150  }
8151 
8152  /* "PyClical.pyx":750
8153  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8154  *
8155  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8156  * """
8157  * Geometric sum.
8158  */
8159 
8160  /* Python wrapper */
8161  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8162  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 ";
8163  #if CYTHON_COMPILING_IN_CPYTHON
8164  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8165  #endif
8166  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8167  PyObject *__pyx_r = 0;
8168  __Pyx_RefNannyDeclarations
8169  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8170  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8171 
8172  /* function exit code */
8173  __Pyx_RefNannyFinishContext();
8174  return __pyx_r;
8175  }
8176 
8177  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8178  PyObject *__pyx_r = NULL;
8179  __Pyx_RefNannyDeclarations
8180  PyObject *__pyx_t_1 = NULL;
8181  __Pyx_RefNannySetupContext("__iadd__", 0);
8182 
8183  /* "PyClical.pyx":757
8184  * 1+{2}
8185  * """
8186  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8187  *
8188  * def __sub__(lhs, rhs):
8189  */
8190  __Pyx_XDECREF(__pyx_r);
8191  __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)
8192  __Pyx_GOTREF(__pyx_t_1);
8193  __pyx_r = __pyx_t_1;
8194  __pyx_t_1 = 0;
8195  goto __pyx_L0;
8196 
8197  /* "PyClical.pyx":750
8198  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8199  *
8200  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8201  * """
8202  * Geometric sum.
8203  */
8204 
8205  /* function exit code */
8206  __pyx_L1_error:;
8207  __Pyx_XDECREF(__pyx_t_1);
8208  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8209  __pyx_r = NULL;
8210  __pyx_L0:;
8211  __Pyx_XGIVEREF(__pyx_r);
8212  __Pyx_RefNannyFinishContext();
8213  return __pyx_r;
8214  }
8215 
8216  /* "PyClical.pyx":759
8217  * return self.wrap( self.unwrap() + toClifford(rhs) )
8218  *
8219  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8220  * """
8221  * Geometric difference.
8222  */
8223 
8224  /* Python wrapper */
8225  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8226  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 ";
8227  #if CYTHON_COMPILING_IN_CPYTHON
8228  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8229  #endif
8230  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8231  PyObject *__pyx_r = 0;
8232  __Pyx_RefNannyDeclarations
8233  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8234  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8235 
8236  /* function exit code */
8237  __Pyx_RefNannyFinishContext();
8238  return __pyx_r;
8239  }
8240 
8241  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8242  PyObject *__pyx_r = NULL;
8243  __Pyx_RefNannyDeclarations
8244  PyObject *__pyx_t_1 = NULL;
8245  PyObject *__pyx_t_2 = NULL;
8246  __Pyx_RefNannySetupContext("__sub__", 0);
8247 
8248  /* "PyClical.pyx":768
8249  * {1}-{2}
8250  * """
8251  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8252  *
8253  * def __isub__(self, rhs):
8254  */
8255  __Pyx_XDECREF(__pyx_r);
8256  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8257  __Pyx_GOTREF(__pyx_t_1);
8258  __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)
8259  __Pyx_GOTREF(__pyx_t_2);
8260  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8261  __pyx_r = __pyx_t_2;
8262  __pyx_t_2 = 0;
8263  goto __pyx_L0;
8264 
8265  /* "PyClical.pyx":759
8266  * return self.wrap( self.unwrap() + toClifford(rhs) )
8267  *
8268  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8269  * """
8270  * Geometric difference.
8271  */
8272 
8273  /* function exit code */
8274  __pyx_L1_error:;
8275  __Pyx_XDECREF(__pyx_t_1);
8276  __Pyx_XDECREF(__pyx_t_2);
8277  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8278  __pyx_r = NULL;
8279  __pyx_L0:;
8280  __Pyx_XGIVEREF(__pyx_r);
8281  __Pyx_RefNannyFinishContext();
8282  return __pyx_r;
8283  }
8284 
8285  /* "PyClical.pyx":770
8286  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8287  *
8288  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8289  * """
8290  * Geometric difference.
8291  */
8292 
8293  /* Python wrapper */
8294  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8295  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 ";
8296  #if CYTHON_COMPILING_IN_CPYTHON
8297  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8298  #endif
8299  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8300  PyObject *__pyx_r = 0;
8301  __Pyx_RefNannyDeclarations
8302  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8303  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8304 
8305  /* function exit code */
8306  __Pyx_RefNannyFinishContext();
8307  return __pyx_r;
8308  }
8309 
8310  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8311  PyObject *__pyx_r = NULL;
8312  __Pyx_RefNannyDeclarations
8313  PyObject *__pyx_t_1 = NULL;
8314  __Pyx_RefNannySetupContext("__isub__", 0);
8315 
8316  /* "PyClical.pyx":777
8317  * 1-{2}
8318  * """
8319  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8320  *
8321  * def __mul__(lhs, rhs):
8322  */
8323  __Pyx_XDECREF(__pyx_r);
8324  __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)
8325  __Pyx_GOTREF(__pyx_t_1);
8326  __pyx_r = __pyx_t_1;
8327  __pyx_t_1 = 0;
8328  goto __pyx_L0;
8329 
8330  /* "PyClical.pyx":770
8331  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8332  *
8333  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8334  * """
8335  * Geometric difference.
8336  */
8337 
8338  /* function exit code */
8339  __pyx_L1_error:;
8340  __Pyx_XDECREF(__pyx_t_1);
8341  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8342  __pyx_r = NULL;
8343  __pyx_L0:;
8344  __Pyx_XGIVEREF(__pyx_r);
8345  __Pyx_RefNannyFinishContext();
8346  return __pyx_r;
8347  }
8348 
8349  /* "PyClical.pyx":779
8350  * return self.wrap( self.unwrap() - toClifford(rhs) )
8351  *
8352  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8353  * """
8354  * Geometric product.
8355  */
8356 
8357  /* Python wrapper */
8358  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8359  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 ";
8360  #if CYTHON_COMPILING_IN_CPYTHON
8361  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8362  #endif
8363  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8364  PyObject *__pyx_r = 0;
8365  __Pyx_RefNannyDeclarations
8366  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8367  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8368 
8369  /* function exit code */
8370  __Pyx_RefNannyFinishContext();
8371  return __pyx_r;
8372  }
8373 
8374  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8375  PyObject *__pyx_r = NULL;
8376  __Pyx_RefNannyDeclarations
8377  PyObject *__pyx_t_1 = NULL;
8378  PyObject *__pyx_t_2 = NULL;
8379  __Pyx_RefNannySetupContext("__mul__", 0);
8380 
8381  /* "PyClical.pyx":790
8382  * {2}
8383  * """
8384  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8385  *
8386  * def __imul__(self, rhs):
8387  */
8388  __Pyx_XDECREF(__pyx_r);
8389  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8390  __Pyx_GOTREF(__pyx_t_1);
8391  __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)
8392  __Pyx_GOTREF(__pyx_t_2);
8393  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8394  __pyx_r = __pyx_t_2;
8395  __pyx_t_2 = 0;
8396  goto __pyx_L0;
8397 
8398  /* "PyClical.pyx":779
8399  * return self.wrap( self.unwrap() - toClifford(rhs) )
8400  *
8401  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8402  * """
8403  * Geometric product.
8404  */
8405 
8406  /* function exit code */
8407  __pyx_L1_error:;
8408  __Pyx_XDECREF(__pyx_t_1);
8409  __Pyx_XDECREF(__pyx_t_2);
8410  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8411  __pyx_r = NULL;
8412  __pyx_L0:;
8413  __Pyx_XGIVEREF(__pyx_r);
8414  __Pyx_RefNannyFinishContext();
8415  return __pyx_r;
8416  }
8417 
8418  /* "PyClical.pyx":792
8419  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8420  *
8421  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8422  * """
8423  * Geometric product.
8424  */
8425 
8426  /* Python wrapper */
8427  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8428  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 ";
8429  #if CYTHON_COMPILING_IN_CPYTHON
8430  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8431  #endif
8432  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8433  PyObject *__pyx_r = 0;
8434  __Pyx_RefNannyDeclarations
8435  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8436  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8437 
8438  /* function exit code */
8439  __Pyx_RefNannyFinishContext();
8440  return __pyx_r;
8441  }
8442 
8443  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8444  PyObject *__pyx_r = NULL;
8445  __Pyx_RefNannyDeclarations
8446  PyObject *__pyx_t_1 = NULL;
8447  __Pyx_RefNannySetupContext("__imul__", 0);
8448 
8449  /* "PyClical.pyx":803
8450  * {2}
8451  * """
8452  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8453  *
8454  * def __mod__(lhs, rhs):
8455  */
8456  __Pyx_XDECREF(__pyx_r);
8457  __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)
8458  __Pyx_GOTREF(__pyx_t_1);
8459  __pyx_r = __pyx_t_1;
8460  __pyx_t_1 = 0;
8461  goto __pyx_L0;
8462 
8463  /* "PyClical.pyx":792
8464  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8465  *
8466  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8467  * """
8468  * Geometric product.
8469  */
8470 
8471  /* function exit code */
8472  __pyx_L1_error:;
8473  __Pyx_XDECREF(__pyx_t_1);
8474  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8475  __pyx_r = NULL;
8476  __pyx_L0:;
8477  __Pyx_XGIVEREF(__pyx_r);
8478  __Pyx_RefNannyFinishContext();
8479  return __pyx_r;
8480  }
8481 
8482  /* "PyClical.pyx":805
8483  * return self.wrap( self.unwrap() * toClifford(rhs) )
8484  *
8485  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8486  * """
8487  * Contraction.
8488  */
8489 
8490  /* Python wrapper */
8491  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8492  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 ";
8493  #if CYTHON_COMPILING_IN_CPYTHON
8494  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8495  #endif
8496  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8497  PyObject *__pyx_r = 0;
8498  __Pyx_RefNannyDeclarations
8499  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8500  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8501 
8502  /* function exit code */
8503  __Pyx_RefNannyFinishContext();
8504  return __pyx_r;
8505  }
8506 
8507  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8508  PyObject *__pyx_r = NULL;
8509  __Pyx_RefNannyDeclarations
8510  PyObject *__pyx_t_1 = NULL;
8511  PyObject *__pyx_t_2 = NULL;
8512  __Pyx_RefNannySetupContext("__mod__", 0);
8513 
8514  /* "PyClical.pyx":818
8515  * {2}
8516  * """
8517  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8518  *
8519  * def __imod__(self, rhs):
8520  */
8521  __Pyx_XDECREF(__pyx_r);
8522  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8523  __Pyx_GOTREF(__pyx_t_1);
8524  __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)
8525  __Pyx_GOTREF(__pyx_t_2);
8526  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8527  __pyx_r = __pyx_t_2;
8528  __pyx_t_2 = 0;
8529  goto __pyx_L0;
8530 
8531  /* "PyClical.pyx":805
8532  * return self.wrap( self.unwrap() * toClifford(rhs) )
8533  *
8534  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8535  * """
8536  * Contraction.
8537  */
8538 
8539  /* function exit code */
8540  __pyx_L1_error:;
8541  __Pyx_XDECREF(__pyx_t_1);
8542  __Pyx_XDECREF(__pyx_t_2);
8543  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8544  __pyx_r = NULL;
8545  __pyx_L0:;
8546  __Pyx_XGIVEREF(__pyx_r);
8547  __Pyx_RefNannyFinishContext();
8548  return __pyx_r;
8549  }
8550 
8551  /* "PyClical.pyx":820
8552  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8553  *
8554  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8555  * """
8556  * Contraction.
8557  */
8558 
8559  /* Python wrapper */
8560  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8561  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 ";
8562  #if CYTHON_COMPILING_IN_CPYTHON
8563  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8564  #endif
8565  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8566  PyObject *__pyx_r = 0;
8567  __Pyx_RefNannyDeclarations
8568  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8569  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8570 
8571  /* function exit code */
8572  __Pyx_RefNannyFinishContext();
8573  return __pyx_r;
8574  }
8575 
8576  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8577  PyObject *__pyx_r = NULL;
8578  __Pyx_RefNannyDeclarations
8579  PyObject *__pyx_t_1 = NULL;
8580  __Pyx_RefNannySetupContext("__imod__", 0);
8581 
8582  /* "PyClical.pyx":833
8583  * {2}
8584  * """
8585  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8586  *
8587  * def __and__(lhs, rhs):
8588  */
8589  __Pyx_XDECREF(__pyx_r);
8590  __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)
8591  __Pyx_GOTREF(__pyx_t_1);
8592  __pyx_r = __pyx_t_1;
8593  __pyx_t_1 = 0;
8594  goto __pyx_L0;
8595 
8596  /* "PyClical.pyx":820
8597  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8598  *
8599  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8600  * """
8601  * Contraction.
8602  */
8603 
8604  /* function exit code */
8605  __pyx_L1_error:;
8606  __Pyx_XDECREF(__pyx_t_1);
8607  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8608  __pyx_r = NULL;
8609  __pyx_L0:;
8610  __Pyx_XGIVEREF(__pyx_r);
8611  __Pyx_RefNannyFinishContext();
8612  return __pyx_r;
8613  }
8614 
8615  /* "PyClical.pyx":835
8616  * return self.wrap( self.unwrap() % toClifford(rhs) )
8617  *
8618  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8619  * """
8620  * Inner product.
8621  */
8622 
8623  /* Python wrapper */
8624  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8625  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 ";
8626  #if CYTHON_COMPILING_IN_CPYTHON
8627  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8628  #endif
8629  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8630  PyObject *__pyx_r = 0;
8631  __Pyx_RefNannyDeclarations
8632  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8633  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8634 
8635  /* function exit code */
8636  __Pyx_RefNannyFinishContext();
8637  return __pyx_r;
8638  }
8639 
8640  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8641  PyObject *__pyx_r = NULL;
8642  __Pyx_RefNannyDeclarations
8643  PyObject *__pyx_t_1 = NULL;
8644  PyObject *__pyx_t_2 = NULL;
8645  __Pyx_RefNannySetupContext("__and__", 0);
8646 
8647  /* "PyClical.pyx":848
8648  * {2}
8649  * """
8650  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8651  *
8652  * def __iand__(self, rhs):
8653  */
8654  __Pyx_XDECREF(__pyx_r);
8655  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8656  __Pyx_GOTREF(__pyx_t_1);
8657  __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)
8658  __Pyx_GOTREF(__pyx_t_2);
8659  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8660  __pyx_r = __pyx_t_2;
8661  __pyx_t_2 = 0;
8662  goto __pyx_L0;
8663 
8664  /* "PyClical.pyx":835
8665  * return self.wrap( self.unwrap() % toClifford(rhs) )
8666  *
8667  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8668  * """
8669  * Inner product.
8670  */
8671 
8672  /* function exit code */
8673  __pyx_L1_error:;
8674  __Pyx_XDECREF(__pyx_t_1);
8675  __Pyx_XDECREF(__pyx_t_2);
8676  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8677  __pyx_r = NULL;
8678  __pyx_L0:;
8679  __Pyx_XGIVEREF(__pyx_r);
8680  __Pyx_RefNannyFinishContext();
8681  return __pyx_r;
8682  }
8683 
8684  /* "PyClical.pyx":850
8685  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8686  *
8687  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8688  * """
8689  * Inner product.
8690  */
8691 
8692  /* Python wrapper */
8693  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8694  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 ";
8695  #if CYTHON_COMPILING_IN_CPYTHON
8696  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8697  #endif
8698  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8699  PyObject *__pyx_r = 0;
8700  __Pyx_RefNannyDeclarations
8701  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8702  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8703 
8704  /* function exit code */
8705  __Pyx_RefNannyFinishContext();
8706  return __pyx_r;
8707  }
8708 
8709  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8710  PyObject *__pyx_r = NULL;
8711  __Pyx_RefNannyDeclarations
8712  PyObject *__pyx_t_1 = NULL;
8713  __Pyx_RefNannySetupContext("__iand__", 0);
8714 
8715  /* "PyClical.pyx":863
8716  * {2}
8717  * """
8718  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8719  *
8720  * def __xor__(lhs, rhs):
8721  */
8722  __Pyx_XDECREF(__pyx_r);
8723  __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)
8724  __Pyx_GOTREF(__pyx_t_1);
8725  __pyx_r = __pyx_t_1;
8726  __pyx_t_1 = 0;
8727  goto __pyx_L0;
8728 
8729  /* "PyClical.pyx":850
8730  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8731  *
8732  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8733  * """
8734  * Inner product.
8735  */
8736 
8737  /* function exit code */
8738  __pyx_L1_error:;
8739  __Pyx_XDECREF(__pyx_t_1);
8740  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8741  __pyx_r = NULL;
8742  __pyx_L0:;
8743  __Pyx_XGIVEREF(__pyx_r);
8744  __Pyx_RefNannyFinishContext();
8745  return __pyx_r;
8746  }
8747 
8748  /* "PyClical.pyx":865
8749  * return self.wrap( self.unwrap() & toClifford(rhs) )
8750  *
8751  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8752  * """
8753  * Outer product.
8754  */
8755 
8756  /* Python wrapper */
8757  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8758  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 ";
8759  #if CYTHON_COMPILING_IN_CPYTHON
8760  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8761  #endif
8762  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8763  PyObject *__pyx_r = 0;
8764  __Pyx_RefNannyDeclarations
8765  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8766  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8767 
8768  /* function exit code */
8769  __Pyx_RefNannyFinishContext();
8770  return __pyx_r;
8771  }
8772 
8773  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8774  PyObject *__pyx_r = NULL;
8775  __Pyx_RefNannyDeclarations
8776  PyObject *__pyx_t_1 = NULL;
8777  PyObject *__pyx_t_2 = NULL;
8778  __Pyx_RefNannySetupContext("__xor__", 0);
8779 
8780  /* "PyClical.pyx":878
8781  * 0
8782  * """
8783  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8784  *
8785  * def __ixor__(self, rhs):
8786  */
8787  __Pyx_XDECREF(__pyx_r);
8788  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8789  __Pyx_GOTREF(__pyx_t_1);
8790  __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)
8791  __Pyx_GOTREF(__pyx_t_2);
8792  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8793  __pyx_r = __pyx_t_2;
8794  __pyx_t_2 = 0;
8795  goto __pyx_L0;
8796 
8797  /* "PyClical.pyx":865
8798  * return self.wrap( self.unwrap() & toClifford(rhs) )
8799  *
8800  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8801  * """
8802  * Outer product.
8803  */
8804 
8805  /* function exit code */
8806  __pyx_L1_error:;
8807  __Pyx_XDECREF(__pyx_t_1);
8808  __Pyx_XDECREF(__pyx_t_2);
8809  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8810  __pyx_r = NULL;
8811  __pyx_L0:;
8812  __Pyx_XGIVEREF(__pyx_r);
8813  __Pyx_RefNannyFinishContext();
8814  return __pyx_r;
8815  }
8816 
8817  /* "PyClical.pyx":880
8818  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8819  *
8820  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8821  * """
8822  * Outer product.
8823  */
8824 
8825  /* Python wrapper */
8826  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8827  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 ";
8828  #if CYTHON_COMPILING_IN_CPYTHON
8829  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8830  #endif
8831  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8832  PyObject *__pyx_r = 0;
8833  __Pyx_RefNannyDeclarations
8834  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8835  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8836 
8837  /* function exit code */
8838  __Pyx_RefNannyFinishContext();
8839  return __pyx_r;
8840  }
8841 
8842  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8843  PyObject *__pyx_r = NULL;
8844  __Pyx_RefNannyDeclarations
8845  PyObject *__pyx_t_1 = NULL;
8846  __Pyx_RefNannySetupContext("__ixor__", 0);
8847 
8848  /* "PyClical.pyx":893
8849  * 0
8850  * """
8851  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8852  *
8853  * def __div__(lhs, rhs):
8854  */
8855  __Pyx_XDECREF(__pyx_r);
8856  __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)
8857  __Pyx_GOTREF(__pyx_t_1);
8858  __pyx_r = __pyx_t_1;
8859  __pyx_t_1 = 0;
8860  goto __pyx_L0;
8861 
8862  /* "PyClical.pyx":880
8863  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8864  *
8865  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8866  * """
8867  * Outer product.
8868  */
8869 
8870  /* function exit code */
8871  __pyx_L1_error:;
8872  __Pyx_XDECREF(__pyx_t_1);
8873  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8874  __pyx_r = NULL;
8875  __pyx_L0:;
8876  __Pyx_XGIVEREF(__pyx_r);
8877  __Pyx_RefNannyFinishContext();
8878  return __pyx_r;
8879  }
8880 
8881  /* "PyClical.pyx":895
8882  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8883  *
8884  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8885  * """
8886  * Geometric quotient.
8887  */
8888 
8889  /* Python wrapper */
8890  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8891  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8892  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 ";
8893  #if CYTHON_COMPILING_IN_CPYTHON
8894  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8895  #endif
8896  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8897  PyObject *__pyx_r = 0;
8898  __Pyx_RefNannyDeclarations
8899  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8900  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8901 
8902  /* function exit code */
8903  __Pyx_RefNannyFinishContext();
8904  return __pyx_r;
8905  }
8906  #endif
8908  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8909  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8910  PyObject *__pyx_r = NULL;
8911  __Pyx_RefNannyDeclarations
8912  PyObject *__pyx_t_1 = NULL;
8913  PyObject *__pyx_t_2 = NULL;
8914  __Pyx_RefNannySetupContext("__div__", 0);
8915 
8916  /* "PyClical.pyx":908
8917  * -{2}
8918  * """
8919  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8920  *
8921  * def __idiv__(self, rhs):
8922  */
8923  __Pyx_XDECREF(__pyx_r);
8924  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8925  __Pyx_GOTREF(__pyx_t_1);
8926  __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)
8927  __Pyx_GOTREF(__pyx_t_2);
8928  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8929  __pyx_r = __pyx_t_2;
8930  __pyx_t_2 = 0;
8931  goto __pyx_L0;
8932 
8933  /* "PyClical.pyx":895
8934  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8935  *
8936  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8937  * """
8938  * Geometric quotient.
8939  */
8940 
8941  /* function exit code */
8942  __pyx_L1_error:;
8943  __Pyx_XDECREF(__pyx_t_1);
8944  __Pyx_XDECREF(__pyx_t_2);
8945  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8946  __pyx_r = NULL;
8947  __pyx_L0:;
8948  __Pyx_XGIVEREF(__pyx_r);
8949  __Pyx_RefNannyFinishContext();
8950  return __pyx_r;
8951  }
8952  #endif
8954  /* "PyClical.pyx":910
8955  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8956  *
8957  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8958  * """
8959  * Geometric quotient.
8960  */
8961 
8962  /* Python wrapper */
8963  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8964  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8965  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 ";
8966  #if CYTHON_COMPILING_IN_CPYTHON
8967  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8968  #endif
8969  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8970  PyObject *__pyx_r = 0;
8971  __Pyx_RefNannyDeclarations
8972  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8973  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8974 
8975  /* function exit code */
8976  __Pyx_RefNannyFinishContext();
8977  return __pyx_r;
8978  }
8979  #endif
8981  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8982  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8983  PyObject *__pyx_r = NULL;
8984  __Pyx_RefNannyDeclarations
8985  PyObject *__pyx_t_1 = NULL;
8986  __Pyx_RefNannySetupContext("__idiv__", 0);
8987 
8988  /* "PyClical.pyx":923
8989  * -{2}
8990  * """
8991  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8992  *
8993  * def inv(self):
8994  */
8995  __Pyx_XDECREF(__pyx_r);
8996  __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)
8997  __Pyx_GOTREF(__pyx_t_1);
8998  __pyx_r = __pyx_t_1;
8999  __pyx_t_1 = 0;
9000  goto __pyx_L0;
9001 
9002  /* "PyClical.pyx":910
9003  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9004  *
9005  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9006  * """
9007  * Geometric quotient.
9008  */
9009 
9010  /* function exit code */
9011  __pyx_L1_error:;
9012  __Pyx_XDECREF(__pyx_t_1);
9013  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9014  __pyx_r = NULL;
9015  __pyx_L0:;
9016  __Pyx_XGIVEREF(__pyx_r);
9017  __Pyx_RefNannyFinishContext();
9018  return __pyx_r;
9019  }
9020  #endif
9022  /* "PyClical.pyx":925
9023  * return self.wrap( self.unwrap() / toClifford(rhs) )
9024  *
9025  * def inv(self): # <<<<<<<<<<<<<<
9026  * """
9027  * Geometric multiplicative inverse.
9028  */
9029 
9030  /* Python wrapper */
9031  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9032  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 ";
9033  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9034  PyObject *__pyx_r = 0;
9035  __Pyx_RefNannyDeclarations
9036  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9037  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9038 
9039  /* function exit code */
9040  __Pyx_RefNannyFinishContext();
9041  return __pyx_r;
9042  }
9043 
9044  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9045  PyObject *__pyx_r = NULL;
9046  __Pyx_RefNannyDeclarations
9047  PyObject *__pyx_t_1 = NULL;
9048  PyObject *__pyx_t_2 = NULL;
9049  __Pyx_RefNannySetupContext("inv", 0);
9050 
9051  /* "PyClical.pyx":936
9052  * -{1,2}
9053  * """
9054  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9055  *
9056  * def __or__(lhs, rhs):
9057  */
9058  __Pyx_XDECREF(__pyx_r);
9059  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
9060  __Pyx_GOTREF(__pyx_t_1);
9061  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->inv()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
9062  __Pyx_GOTREF(__pyx_t_2);
9063  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9064  __pyx_r = __pyx_t_2;
9065  __pyx_t_2 = 0;
9066  goto __pyx_L0;
9067 
9068  /* "PyClical.pyx":925
9069  * return self.wrap( self.unwrap() / toClifford(rhs) )
9070  *
9071  * def inv(self): # <<<<<<<<<<<<<<
9072  * """
9073  * Geometric multiplicative inverse.
9074  */
9075 
9076  /* function exit code */
9077  __pyx_L1_error:;
9078  __Pyx_XDECREF(__pyx_t_1);
9079  __Pyx_XDECREF(__pyx_t_2);
9080  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9081  __pyx_r = NULL;
9082  __pyx_L0:;
9083  __Pyx_XGIVEREF(__pyx_r);
9084  __Pyx_RefNannyFinishContext();
9085  return __pyx_r;
9086  }
9087 
9088  /* "PyClical.pyx":938
9089  * return clifford().wrap( self.instance.inv() )
9090  *
9091  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9092  * """
9093  * Transform left hand side, using right hand side as a transformation.
9094  */
9095 
9096  /* Python wrapper */
9097  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9098  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 ";
9099  #if CYTHON_COMPILING_IN_CPYTHON
9100  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9101  #endif
9102  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9103  PyObject *__pyx_r = 0;
9104  __Pyx_RefNannyDeclarations
9105  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9106  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9107 
9108  /* function exit code */
9109  __Pyx_RefNannyFinishContext();
9110  return __pyx_r;
9111  }
9112 
9113  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9114  PyObject *__pyx_r = NULL;
9115  __Pyx_RefNannyDeclarations
9116  PyObject *__pyx_t_1 = NULL;
9117  PyObject *__pyx_t_2 = NULL;
9118  __Pyx_RefNannySetupContext("__or__", 0);
9119 
9120  /* "PyClical.pyx":947
9121  * -{1}
9122  * """
9123  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9124  *
9125  * def __ior__(self, rhs):
9126  */
9127  __Pyx_XDECREF(__pyx_r);
9128  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9129  __Pyx_GOTREF(__pyx_t_1);
9130  __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)
9131  __Pyx_GOTREF(__pyx_t_2);
9132  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9133  __pyx_r = __pyx_t_2;
9134  __pyx_t_2 = 0;
9135  goto __pyx_L0;
9136 
9137  /* "PyClical.pyx":938
9138  * return clifford().wrap( self.instance.inv() )
9139  *
9140  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9141  * """
9142  * Transform left hand side, using right hand side as a transformation.
9143  */
9144 
9145  /* function exit code */
9146  __pyx_L1_error:;
9147  __Pyx_XDECREF(__pyx_t_1);
9148  __Pyx_XDECREF(__pyx_t_2);
9149  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9150  __pyx_r = NULL;
9151  __pyx_L0:;
9152  __Pyx_XGIVEREF(__pyx_r);
9153  __Pyx_RefNannyFinishContext();
9154  return __pyx_r;
9155  }
9156 
9157  /* "PyClical.pyx":949
9158  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9159  *
9160  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9161  * """
9162  * Transform left hand side, using right hand side as a transformation.
9163  */
9164 
9165  /* Python wrapper */
9166  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9167  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 ";
9168  #if CYTHON_COMPILING_IN_CPYTHON
9169  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9170  #endif
9171  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9172  PyObject *__pyx_r = 0;
9173  __Pyx_RefNannyDeclarations
9174  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9175  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9176 
9177  /* function exit code */
9178  __Pyx_RefNannyFinishContext();
9179  return __pyx_r;
9180  }
9181 
9182  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9183  PyObject *__pyx_r = NULL;
9184  __Pyx_RefNannyDeclarations
9185  PyObject *__pyx_t_1 = NULL;
9186  __Pyx_RefNannySetupContext("__ior__", 0);
9187 
9188  /* "PyClical.pyx":958
9189  * -{1}
9190  * """
9191  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9192  *
9193  * def __pow__(self, m, dummy):
9194  */
9195  __Pyx_XDECREF(__pyx_r);
9196  __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)
9197  __Pyx_GOTREF(__pyx_t_1);
9198  __pyx_r = __pyx_t_1;
9199  __pyx_t_1 = 0;
9200  goto __pyx_L0;
9201 
9202  /* "PyClical.pyx":949
9203  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9204  *
9205  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9206  * """
9207  * Transform left hand side, using right hand side as a transformation.
9208  */
9209 
9210  /* function exit code */
9211  __pyx_L1_error:;
9212  __Pyx_XDECREF(__pyx_t_1);
9213  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9214  __pyx_r = NULL;
9215  __pyx_L0:;
9216  __Pyx_XGIVEREF(__pyx_r);
9217  __Pyx_RefNannyFinishContext();
9218  return __pyx_r;
9219  }
9220 
9221  /* "PyClical.pyx":960
9222  * return self.wrap( self.unwrap() | toClifford(rhs) )
9223  *
9224  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9225  * """
9226  * Power: self to the m.
9227  */
9228 
9229  /* Python wrapper */
9230  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9231  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 ";
9232  #if CYTHON_COMPILING_IN_CPYTHON
9233  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9234  #endif
9235  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9236  PyObject *__pyx_r = 0;
9237  __Pyx_RefNannyDeclarations
9238  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9239  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9240 
9241  /* function exit code */
9242  __Pyx_RefNannyFinishContext();
9243  return __pyx_r;
9244  }
9245 
9246  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9247  PyObject *__pyx_r = NULL;
9248  __Pyx_RefNannyDeclarations
9249  PyObject *__pyx_t_1 = NULL;
9250  __Pyx_RefNannySetupContext("__pow__", 0);
9251 
9252  /* "PyClical.pyx":977
9253  * 1
9254  * """
9255  * return pow(self, m) # <<<<<<<<<<<<<<
9256  *
9257  * def pow(self, m):
9258  */
9259  __Pyx_XDECREF(__pyx_r);
9260  __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)
9261  __Pyx_GOTREF(__pyx_t_1);
9262  __pyx_r = __pyx_t_1;
9263  __pyx_t_1 = 0;
9264  goto __pyx_L0;
9265 
9266  /* "PyClical.pyx":960
9267  * return self.wrap( self.unwrap() | toClifford(rhs) )
9268  *
9269  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9270  * """
9271  * Power: self to the m.
9272  */
9273 
9274  /* function exit code */
9275  __pyx_L1_error:;
9276  __Pyx_XDECREF(__pyx_t_1);
9277  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9278  __pyx_r = NULL;
9279  __pyx_L0:;
9280  __Pyx_XGIVEREF(__pyx_r);
9281  __Pyx_RefNannyFinishContext();
9282  return __pyx_r;
9283  }
9284 
9285  /* "PyClical.pyx":979
9286  * return pow(self, m)
9287  *
9288  * def pow(self, m): # <<<<<<<<<<<<<<
9289  * """
9290  * Power: self to the m.
9291  */
9292 
9293  /* Python wrapper */
9294  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9295  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 ";
9296  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9297  PyObject *__pyx_r = 0;
9298  __Pyx_RefNannyDeclarations
9299  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9300  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9301 
9302  /* function exit code */
9303  __Pyx_RefNannyFinishContext();
9304  return __pyx_r;
9305  }
9306 
9307  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9308  PyObject *__pyx_r = NULL;
9309  __Pyx_RefNannyDeclarations
9310  PyObject *__pyx_t_1 = NULL;
9311  PyObject *__pyx_t_2 = NULL;
9312  int __pyx_t_3;
9313  int __pyx_t_4;
9314  int __pyx_t_5;
9315  __Pyx_RefNannySetupContext("pow", 0);
9316 
9317  /* "PyClical.pyx":998
9318  * 1
9319  * """
9320  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9321  * return clifford().wrap( self.instance.pow(m) )
9322  * else:
9323  */
9324  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9325  __Pyx_GOTREF(__pyx_t_1);
9326  __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)
9327  __Pyx_GOTREF(__pyx_t_2);
9328  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9329  __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)
9330  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9331  __pyx_t_4 = (__pyx_t_3 != 0);
9332  if (__pyx_t_4) {
9333 
9334  /* "PyClical.pyx":999
9335  * """
9336  * if isinstance(m, numbers.Integral):
9337  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9338  * else:
9339  * return exp(m * log(self))
9340  */
9341  __Pyx_XDECREF(__pyx_r);
9342  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9343  __Pyx_GOTREF(__pyx_t_2);
9344  __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)
9345  __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)
9346  __Pyx_GOTREF(__pyx_t_1);
9347  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9348  __pyx_r = __pyx_t_1;
9349  __pyx_t_1 = 0;
9350  goto __pyx_L0;
9351 
9352  /* "PyClical.pyx":998
9353  * 1
9354  * """
9355  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9356  * return clifford().wrap( self.instance.pow(m) )
9357  * else:
9358  */
9359  }
9360 
9361  /* "PyClical.pyx":1001
9362  * return clifford().wrap( self.instance.pow(m) )
9363  * else:
9364  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9365  *
9366  * def outer_pow(self, m):
9367  */
9368  /*else*/ {
9369  __Pyx_XDECREF(__pyx_r);
9370  __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)
9371  __Pyx_GOTREF(__pyx_t_1);
9372  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9373  __Pyx_GOTREF(__pyx_t_2);
9374  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9375  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9376  __Pyx_GOTREF(__pyx_t_1);
9377  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9378  __pyx_r = __pyx_t_1;
9379  __pyx_t_1 = 0;
9380  goto __pyx_L0;
9381  }
9382 
9383  /* "PyClical.pyx":979
9384  * return pow(self, m)
9385  *
9386  * def pow(self, m): # <<<<<<<<<<<<<<
9387  * """
9388  * Power: self to the m.
9389  */
9390 
9391  /* function exit code */
9392  __pyx_L1_error:;
9393  __Pyx_XDECREF(__pyx_t_1);
9394  __Pyx_XDECREF(__pyx_t_2);
9395  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9396  __pyx_r = NULL;
9397  __pyx_L0:;
9398  __Pyx_XGIVEREF(__pyx_r);
9399  __Pyx_RefNannyFinishContext();
9400  return __pyx_r;
9401  }
9402 
9403  /* "PyClical.pyx":1003
9404  * return exp(m * log(self))
9405  *
9406  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9407  * """
9408  * Outer product power.
9409  */
9410 
9411  /* Python wrapper */
9412  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9413  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 ";
9414  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9415  PyObject *__pyx_r = 0;
9416  __Pyx_RefNannyDeclarations
9417  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9418  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9419 
9420  /* function exit code */
9421  __Pyx_RefNannyFinishContext();
9422  return __pyx_r;
9423  }
9424 
9425  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9426  PyObject *__pyx_r = NULL;
9427  __Pyx_RefNannyDeclarations
9428  PyObject *__pyx_t_1 = NULL;
9429  int __pyx_t_2;
9430  PyObject *__pyx_t_3 = NULL;
9431  __Pyx_RefNannySetupContext("outer_pow", 0);
9432 
9433  /* "PyClical.pyx":1017
9434  *
9435  * """
9436  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9437  *
9438  * def __call__(self, grade):
9439  */
9440  __Pyx_XDECREF(__pyx_r);
9441  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9442  __Pyx_GOTREF(__pyx_t_1);
9443  __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)
9444  __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)
9445  __Pyx_GOTREF(__pyx_t_3);
9446  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9447  __pyx_r = __pyx_t_3;
9448  __pyx_t_3 = 0;
9449  goto __pyx_L0;
9450 
9451  /* "PyClical.pyx":1003
9452  * return exp(m * log(self))
9453  *
9454  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9455  * """
9456  * Outer product power.
9457  */
9458 
9459  /* function exit code */
9460  __pyx_L1_error:;
9461  __Pyx_XDECREF(__pyx_t_1);
9462  __Pyx_XDECREF(__pyx_t_3);
9463  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9464  __pyx_r = NULL;
9465  __pyx_L0:;
9466  __Pyx_XGIVEREF(__pyx_r);
9467  __Pyx_RefNannyFinishContext();
9468  return __pyx_r;
9469  }
9470 
9471  /* "PyClical.pyx":1019
9472  * return clifford().wrap( self.instance.outer_pow(m) )
9473  *
9474  * def __call__(self, grade): # <<<<<<<<<<<<<<
9475  * """
9476  * Pure grade-vector part.
9477  */
9478 
9479  /* Python wrapper */
9480  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9481  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 ";
9482  #if CYTHON_COMPILING_IN_CPYTHON
9483  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9484  #endif
9485  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9486  PyObject *__pyx_v_grade = 0;
9487  PyObject *__pyx_r = 0;
9488  __Pyx_RefNannyDeclarations
9489  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9490  {
9491  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9492  PyObject* values[1] = {0};
9493  if (unlikely(__pyx_kwds)) {
9494  Py_ssize_t kw_args;
9495  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9496  switch (pos_args) {
9497  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9498  CYTHON_FALLTHROUGH;
9499  case 0: break;
9500  default: goto __pyx_L5_argtuple_error;
9501  }
9502  kw_args = PyDict_Size(__pyx_kwds);
9503  switch (pos_args) {
9504  case 0:
9505  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9506  else goto __pyx_L5_argtuple_error;
9507  }
9508  if (unlikely(kw_args > 0)) {
9509  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9510  }
9511  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9512  goto __pyx_L5_argtuple_error;
9513  } else {
9514  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9515  }
9516  __pyx_v_grade = values[0];
9517  }
9518  goto __pyx_L4_argument_unpacking_done;
9519  __pyx_L5_argtuple_error:;
9520  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9521  __pyx_L3_error:;
9522  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9523  __Pyx_RefNannyFinishContext();
9524  return NULL;
9525  __pyx_L4_argument_unpacking_done:;
9526  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9527 
9528  /* function exit code */
9529  __Pyx_RefNannyFinishContext();
9530  return __pyx_r;
9531  }
9532 
9533  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9534  PyObject *__pyx_r = NULL;
9535  __Pyx_RefNannyDeclarations
9536  PyObject *__pyx_t_1 = NULL;
9537  int __pyx_t_2;
9538  PyObject *__pyx_t_3 = NULL;
9539  __Pyx_RefNannySetupContext("__call__", 0);
9540 
9541  /* "PyClical.pyx":1036
9542  * 0
9543  * """
9544  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9545  *
9546  * def scalar(self):
9547  */
9548  __Pyx_XDECREF(__pyx_r);
9549  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9550  __Pyx_GOTREF(__pyx_t_1);
9551  __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)
9552  __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)
9553  __Pyx_GOTREF(__pyx_t_3);
9554  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9555  __pyx_r = __pyx_t_3;
9556  __pyx_t_3 = 0;
9557  goto __pyx_L0;
9558 
9559  /* "PyClical.pyx":1019
9560  * return clifford().wrap( self.instance.outer_pow(m) )
9561  *
9562  * def __call__(self, grade): # <<<<<<<<<<<<<<
9563  * """
9564  * Pure grade-vector part.
9565  */
9566 
9567  /* function exit code */
9568  __pyx_L1_error:;
9569  __Pyx_XDECREF(__pyx_t_1);
9570  __Pyx_XDECREF(__pyx_t_3);
9571  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9572  __pyx_r = NULL;
9573  __pyx_L0:;
9574  __Pyx_XGIVEREF(__pyx_r);
9575  __Pyx_RefNannyFinishContext();
9576  return __pyx_r;
9577  }
9578 
9579  /* "PyClical.pyx":1038
9580  * return clifford().wrap( self.instance.call(grade) )
9581  *
9582  * def scalar(self): # <<<<<<<<<<<<<<
9583  * """
9584  * Scalar part.
9585  */
9586 
9587  /* Python wrapper */
9588  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9589  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 ";
9590  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9591  PyObject *__pyx_r = 0;
9592  __Pyx_RefNannyDeclarations
9593  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9594  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9595 
9596  /* function exit code */
9597  __Pyx_RefNannyFinishContext();
9598  return __pyx_r;
9599  }
9600 
9601  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9602  PyObject *__pyx_r = NULL;
9603  __Pyx_RefNannyDeclarations
9604  PyObject *__pyx_t_1 = NULL;
9605  __Pyx_RefNannySetupContext("scalar", 0);
9606 
9607  /* "PyClical.pyx":1047
9608  * 0.0
9609  * """
9610  * return self.instance.scalar() # <<<<<<<<<<<<<<
9611  *
9612  * def pure(self):
9613  */
9614  __Pyx_XDECREF(__pyx_r);
9615  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9616  __Pyx_GOTREF(__pyx_t_1);
9617  __pyx_r = __pyx_t_1;
9618  __pyx_t_1 = 0;
9619  goto __pyx_L0;
9620 
9621  /* "PyClical.pyx":1038
9622  * return clifford().wrap( self.instance.call(grade) )
9623  *
9624  * def scalar(self): # <<<<<<<<<<<<<<
9625  * """
9626  * Scalar part.
9627  */
9628 
9629  /* function exit code */
9630  __pyx_L1_error:;
9631  __Pyx_XDECREF(__pyx_t_1);
9632  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9633  __pyx_r = NULL;
9634  __pyx_L0:;
9635  __Pyx_XGIVEREF(__pyx_r);
9636  __Pyx_RefNannyFinishContext();
9637  return __pyx_r;
9638  }
9639 
9640  /* "PyClical.pyx":1049
9641  * return self.instance.scalar()
9642  *
9643  * def pure(self): # <<<<<<<<<<<<<<
9644  * """
9645  * Pure part.
9646  */
9647 
9648  /* Python wrapper */
9649  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9650  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 ";
9651  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9652  PyObject *__pyx_r = 0;
9653  __Pyx_RefNannyDeclarations
9654  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9655  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9656 
9657  /* function exit code */
9658  __Pyx_RefNannyFinishContext();
9659  return __pyx_r;
9660  }
9661 
9662  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9663  PyObject *__pyx_r = NULL;
9664  __Pyx_RefNannyDeclarations
9665  PyObject *__pyx_t_1 = NULL;
9666  PyObject *__pyx_t_2 = NULL;
9667  __Pyx_RefNannySetupContext("pure", 0);
9668 
9669  /* "PyClical.pyx":1058
9670  * {1,2}
9671  * """
9672  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9673  *
9674  * def even(self):
9675  */
9676  __Pyx_XDECREF(__pyx_r);
9677  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9678  __Pyx_GOTREF(__pyx_t_1);
9679  __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)
9680  __Pyx_GOTREF(__pyx_t_2);
9681  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9682  __pyx_r = __pyx_t_2;
9683  __pyx_t_2 = 0;
9684  goto __pyx_L0;
9685 
9686  /* "PyClical.pyx":1049
9687  * return self.instance.scalar()
9688  *
9689  * def pure(self): # <<<<<<<<<<<<<<
9690  * """
9691  * Pure part.
9692  */
9693 
9694  /* function exit code */
9695  __pyx_L1_error:;
9696  __Pyx_XDECREF(__pyx_t_1);
9697  __Pyx_XDECREF(__pyx_t_2);
9698  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9699  __pyx_r = NULL;
9700  __pyx_L0:;
9701  __Pyx_XGIVEREF(__pyx_r);
9702  __Pyx_RefNannyFinishContext();
9703  return __pyx_r;
9704  }
9705 
9706  /* "PyClical.pyx":1060
9707  * return clifford().wrap( self.instance.pure() )
9708  *
9709  * def even(self): # <<<<<<<<<<<<<<
9710  * """
9711  * Even part of multivector, sum of even grade terms.
9712  */
9713 
9714  /* Python wrapper */
9715  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9716  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 ";
9717  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9718  PyObject *__pyx_r = 0;
9719  __Pyx_RefNannyDeclarations
9720  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9721  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9722 
9723  /* function exit code */
9724  __Pyx_RefNannyFinishContext();
9725  return __pyx_r;
9726  }
9727 
9728  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9729  PyObject *__pyx_r = NULL;
9730  __Pyx_RefNannyDeclarations
9731  PyObject *__pyx_t_1 = NULL;
9732  PyObject *__pyx_t_2 = NULL;
9733  __Pyx_RefNannySetupContext("even", 0);
9734 
9735  /* "PyClical.pyx":1067
9736  * 1+{1,2}
9737  * """
9738  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9739  *
9740  * def odd(self):
9741  */
9742  __Pyx_XDECREF(__pyx_r);
9743  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9744  __Pyx_GOTREF(__pyx_t_1);
9745  __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)
9746  __Pyx_GOTREF(__pyx_t_2);
9747  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9748  __pyx_r = __pyx_t_2;
9749  __pyx_t_2 = 0;
9750  goto __pyx_L0;
9751 
9752  /* "PyClical.pyx":1060
9753  * return clifford().wrap( self.instance.pure() )
9754  *
9755  * def even(self): # <<<<<<<<<<<<<<
9756  * """
9757  * Even part of multivector, sum of even grade terms.
9758  */
9759 
9760  /* function exit code */
9761  __pyx_L1_error:;
9762  __Pyx_XDECREF(__pyx_t_1);
9763  __Pyx_XDECREF(__pyx_t_2);
9764  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9765  __pyx_r = NULL;
9766  __pyx_L0:;
9767  __Pyx_XGIVEREF(__pyx_r);
9768  __Pyx_RefNannyFinishContext();
9769  return __pyx_r;
9770  }
9771 
9772  /* "PyClical.pyx":1069
9773  * return clifford().wrap( self.instance.even() )
9774  *
9775  * def odd(self): # <<<<<<<<<<<<<<
9776  * """
9777  * Odd part of multivector, sum of odd grade terms.
9778  */
9779 
9780  /* Python wrapper */
9781  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9782  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 ";
9783  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9784  PyObject *__pyx_r = 0;
9785  __Pyx_RefNannyDeclarations
9786  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9787  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9788 
9789  /* function exit code */
9790  __Pyx_RefNannyFinishContext();
9791  return __pyx_r;
9792  }
9793 
9794  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9795  PyObject *__pyx_r = NULL;
9796  __Pyx_RefNannyDeclarations
9797  PyObject *__pyx_t_1 = NULL;
9798  PyObject *__pyx_t_2 = NULL;
9799  __Pyx_RefNannySetupContext("odd", 0);
9800 
9801  /* "PyClical.pyx":1076
9802  * {1}
9803  * """
9804  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9805  *
9806  * def vector_part(self, frm = None):
9807  */
9808  __Pyx_XDECREF(__pyx_r);
9809  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9810  __Pyx_GOTREF(__pyx_t_1);
9811  __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)
9812  __Pyx_GOTREF(__pyx_t_2);
9813  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9814  __pyx_r = __pyx_t_2;
9815  __pyx_t_2 = 0;
9816  goto __pyx_L0;
9817 
9818  /* "PyClical.pyx":1069
9819  * return clifford().wrap( self.instance.even() )
9820  *
9821  * def odd(self): # <<<<<<<<<<<<<<
9822  * """
9823  * Odd part of multivector, sum of odd grade terms.
9824  */
9825 
9826  /* function exit code */
9827  __pyx_L1_error:;
9828  __Pyx_XDECREF(__pyx_t_1);
9829  __Pyx_XDECREF(__pyx_t_2);
9830  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9831  __pyx_r = NULL;
9832  __pyx_L0:;
9833  __Pyx_XGIVEREF(__pyx_r);
9834  __Pyx_RefNannyFinishContext();
9835  return __pyx_r;
9836  }
9837 
9838  /* "PyClical.pyx":1078
9839  * return clifford().wrap( self.instance.odd() )
9840  *
9841  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9842  * """
9843  * Vector part of multivector, as a Python list, with respect to frm.
9844  */
9845 
9846  /* Python wrapper */
9847  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9848  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 ";
9849  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9850  PyObject *__pyx_v_frm = 0;
9851  PyObject *__pyx_r = 0;
9852  __Pyx_RefNannyDeclarations
9853  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9854  {
9855  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9856  PyObject* values[1] = {0};
9857  values[0] = ((PyObject *)Py_None);
9858  if (unlikely(__pyx_kwds)) {
9859  Py_ssize_t kw_args;
9860  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9861  switch (pos_args) {
9862  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9863  CYTHON_FALLTHROUGH;
9864  case 0: break;
9865  default: goto __pyx_L5_argtuple_error;
9866  }
9867  kw_args = PyDict_Size(__pyx_kwds);
9868  switch (pos_args) {
9869  case 0:
9870  if (kw_args > 0) {
9871  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9872  if (value) { values[0] = value; kw_args--; }
9873  }
9874  }
9875  if (unlikely(kw_args > 0)) {
9876  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9877  }
9878  } else {
9879  switch (PyTuple_GET_SIZE(__pyx_args)) {
9880  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9881  CYTHON_FALLTHROUGH;
9882  case 0: break;
9883  default: goto __pyx_L5_argtuple_error;
9884  }
9885  }
9886  __pyx_v_frm = values[0];
9887  }
9888  goto __pyx_L4_argument_unpacking_done;
9889  __pyx_L5_argtuple_error:;
9890  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9891  __pyx_L3_error:;
9892  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9893  __Pyx_RefNannyFinishContext();
9894  return NULL;
9895  __pyx_L4_argument_unpacking_done:;
9896  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9897 
9898  /* function exit code */
9899  __Pyx_RefNannyFinishContext();
9900  return __pyx_r;
9901  }
9902 
9903  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9904  PyObject *__pyx_v_error_msg_prefix = NULL;
9905  std::vector<scalar_t> __pyx_v_vec;
9906  int __pyx_v_n;
9907  int __pyx_v_i;
9908  PyObject *__pyx_v_lst = NULL;
9909  PyObject *__pyx_v_err = NULL;
9910  PyObject *__pyx_r = NULL;
9911  __Pyx_RefNannyDeclarations
9912  PyObject *__pyx_t_1 = NULL;
9913  PyObject *__pyx_t_2 = NULL;
9914  PyObject *__pyx_t_3 = NULL;
9915  int __pyx_t_4;
9916  int __pyx_t_5;
9917  std::vector<scalar_t> __pyx_t_6;
9918  PyObject *__pyx_t_7 = NULL;
9919  int __pyx_t_8;
9920  int __pyx_t_9;
9921  int __pyx_t_10;
9922  PyObject *__pyx_t_11 = NULL;
9923  PyObject *__pyx_t_12 = NULL;
9924  PyObject *__pyx_t_13 = NULL;
9925  PyObject *__pyx_t_14 = NULL;
9926  PyObject *__pyx_t_15 = NULL;
9927  __Pyx_RefNannySetupContext("vector_part", 0);
9928 
9929  /* "PyClical.pyx":1087
9930  * [0.0, 2.0, 3.0]
9931  * """
9932  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9933  * cdef vector[scalar_t] vec
9934  * cdef int n
9935  */
9936  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9937  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9938 
9939  /* "PyClical.pyx":1091
9940  * cdef int n
9941  * cdef int i
9942  * try: # <<<<<<<<<<<<<<
9943  * if frm is None:
9944  * vec = self.instance.vector_part()
9945  */
9946  {
9947  __Pyx_PyThreadState_declare
9948  __Pyx_PyThreadState_assign
9949  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9950  __Pyx_XGOTREF(__pyx_t_1);
9951  __Pyx_XGOTREF(__pyx_t_2);
9952  __Pyx_XGOTREF(__pyx_t_3);
9953  /*try:*/ {
9954 
9955  /* "PyClical.pyx":1092
9956  * cdef int i
9957  * try:
9958  * if frm is None: # <<<<<<<<<<<<<<
9959  * vec = self.instance.vector_part()
9960  * else:
9961  */
9962  __pyx_t_4 = (__pyx_v_frm == Py_None);
9963  __pyx_t_5 = (__pyx_t_4 != 0);
9964  if (__pyx_t_5) {
9965 
9966  /* "PyClical.pyx":1093
9967  * try:
9968  * if frm is None:
9969  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9970  * else:
9971  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9972  */
9973  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9974  __pyx_v_vec = __pyx_t_6;
9975 
9976  /* "PyClical.pyx":1092
9977  * cdef int i
9978  * try:
9979  * if frm is None: # <<<<<<<<<<<<<<
9980  * vec = self.instance.vector_part()
9981  * else:
9982  */
9983  goto __pyx_L9;
9984  }
9985 
9986  /* "PyClical.pyx":1095
9987  * vec = self.instance.vector_part()
9988  * else:
9989  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9990  * n = vec.size()
9991  * lst = [0.0]*n
9992  */
9993  /*else*/ {
9994  try {
9995  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9996  } catch(...) {
9997  __Pyx_CppExn2PyErr();
9998  __PYX_ERR(0, 1095, __pyx_L3_error)
9999  }
10000  __pyx_v_vec = __pyx_t_6;
10001  }
10002  __pyx_L9:;
10003 
10004  /* "PyClical.pyx":1096
10005  * else:
10006  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10007  * n = vec.size() # <<<<<<<<<<<<<<
10008  * lst = [0.0]*n
10009  * for i in xrange(n):
10010  */
10011  __pyx_v_n = __pyx_v_vec.size();
10012 
10013  /* "PyClical.pyx":1097
10014  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10015  * n = vec.size()
10016  * lst = [0.0]*n # <<<<<<<<<<<<<<
10017  * for i in xrange(n):
10018  * lst[i] = vec[i]
10019  */
10020  __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)
10021  __Pyx_GOTREF(__pyx_t_7);
10022  { Py_ssize_t __pyx_temp;
10023  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10024  __Pyx_INCREF(__pyx_float_0_0);
10025  __Pyx_GIVEREF(__pyx_float_0_0);
10026  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10027  }
10028  }
10029  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10030  __pyx_t_7 = 0;
10031 
10032  /* "PyClical.pyx":1098
10033  * n = vec.size()
10034  * lst = [0.0]*n
10035  * for i in xrange(n): # <<<<<<<<<<<<<<
10036  * lst[i] = vec[i]
10037  * return lst
10038  */
10039  __pyx_t_8 = __pyx_v_n;
10040  __pyx_t_9 = __pyx_t_8;
10041  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10042  __pyx_v_i = __pyx_t_10;
10043 
10044  /* "PyClical.pyx":1099
10045  * lst = [0.0]*n
10046  * for i in xrange(n):
10047  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10048  * return lst
10049  * except RuntimeError as err:
10050  */
10051  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10052  __Pyx_GOTREF(__pyx_t_7);
10053  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)
10054  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10055  }
10056 
10057  /* "PyClical.pyx":1100
10058  * for i in xrange(n):
10059  * lst[i] = vec[i]
10060  * return lst # <<<<<<<<<<<<<<
10061  * except RuntimeError as err:
10062  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10063  */
10064  __Pyx_XDECREF(__pyx_r);
10065  __Pyx_INCREF(__pyx_v_lst);
10066  __pyx_r = __pyx_v_lst;
10067  goto __pyx_L7_try_return;
10068 
10069  /* "PyClical.pyx":1091
10070  * cdef int n
10071  * cdef int i
10072  * try: # <<<<<<<<<<<<<<
10073  * if frm is None:
10074  * vec = self.instance.vector_part()
10075  */
10076  }
10077  __pyx_L3_error:;
10078  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10079 
10080  /* "PyClical.pyx":1101
10081  * lst[i] = vec[i]
10082  * return lst
10083  * except RuntimeError as err: # <<<<<<<<<<<<<<
10084  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10085  * + repr(frm) + " as frame:\n\t"
10086  */
10087  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10088  if (__pyx_t_8) {
10089  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10090  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10091  __Pyx_GOTREF(__pyx_t_7);
10092  __Pyx_GOTREF(__pyx_t_11);
10093  __Pyx_GOTREF(__pyx_t_12);
10094  __Pyx_INCREF(__pyx_t_11);
10095  __pyx_v_err = __pyx_t_11;
10096 
10097  /* "PyClical.pyx":1102
10098  * return lst
10099  * except RuntimeError as err:
10100  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10101  * + repr(frm) + " as frame:\n\t"
10102  * + str(err))
10103  */
10104  __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)
10105  __Pyx_GOTREF(__pyx_t_13);
10106  __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)
10107  __Pyx_GOTREF(__pyx_t_14);
10108  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10109  __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)
10110  __Pyx_GOTREF(__pyx_t_13);
10111  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10112 
10113  /* "PyClical.pyx":1103
10114  * except RuntimeError as err:
10115  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10116  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10117  * + str(err))
10118  *
10119  */
10120  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10121  __Pyx_GOTREF(__pyx_t_14);
10122  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10123  __Pyx_GOTREF(__pyx_t_15);
10124  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10125  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10126  __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)
10127  __Pyx_GOTREF(__pyx_t_14);
10128  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10129 
10130  /* "PyClical.pyx":1104
10131  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10132  * + repr(frm) + " as frame:\n\t"
10133  * + str(err)) # <<<<<<<<<<<<<<
10134  *
10135  * def involute(self):
10136  */
10137  __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)
10138  __Pyx_GOTREF(__pyx_t_15);
10139  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10140  __Pyx_GOTREF(__pyx_t_13);
10141  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10142  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10143 
10144  /* "PyClical.pyx":1102
10145  * return lst
10146  * except RuntimeError as err:
10147  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10148  * + repr(frm) + " as frame:\n\t"
10149  * + str(err))
10150  */
10151  __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)
10152  __Pyx_GOTREF(__pyx_t_15);
10153  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10154  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10155  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10156  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10157  }
10158  goto __pyx_L5_except_error;
10159  __pyx_L5_except_error:;
10160 
10161  /* "PyClical.pyx":1091
10162  * cdef int n
10163  * cdef int i
10164  * try: # <<<<<<<<<<<<<<
10165  * if frm is None:
10166  * vec = self.instance.vector_part()
10167  */
10168  __Pyx_XGIVEREF(__pyx_t_1);
10169  __Pyx_XGIVEREF(__pyx_t_2);
10170  __Pyx_XGIVEREF(__pyx_t_3);
10171  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10172  goto __pyx_L1_error;
10173  __pyx_L7_try_return:;
10174  __Pyx_XGIVEREF(__pyx_t_1);
10175  __Pyx_XGIVEREF(__pyx_t_2);
10176  __Pyx_XGIVEREF(__pyx_t_3);
10177  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10178  goto __pyx_L0;
10179  }
10180 
10181  /* "PyClical.pyx":1078
10182  * return clifford().wrap( self.instance.odd() )
10183  *
10184  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10185  * """
10186  * Vector part of multivector, as a Python list, with respect to frm.
10187  */
10188 
10189  /* function exit code */
10190  __pyx_L1_error:;
10191  __Pyx_XDECREF(__pyx_t_7);
10192  __Pyx_XDECREF(__pyx_t_11);
10193  __Pyx_XDECREF(__pyx_t_12);
10194  __Pyx_XDECREF(__pyx_t_13);
10195  __Pyx_XDECREF(__pyx_t_14);
10196  __Pyx_XDECREF(__pyx_t_15);
10197  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10198  __pyx_r = NULL;
10199  __pyx_L0:;
10200  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10201  __Pyx_XDECREF(__pyx_v_lst);
10202  __Pyx_XDECREF(__pyx_v_err);
10203  __Pyx_XGIVEREF(__pyx_r);
10204  __Pyx_RefNannyFinishContext();
10205  return __pyx_r;
10206  }
10207 
10208  /* "PyClical.pyx":1106
10209  * + str(err))
10210  *
10211  * def involute(self): # <<<<<<<<<<<<<<
10212  * """
10213  * Main involution, each {i} is replaced by -{i} in each term,
10214  */
10215 
10216  /* Python wrapper */
10217  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10218  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 ";
10219  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10220  PyObject *__pyx_r = 0;
10221  __Pyx_RefNannyDeclarations
10222  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10223  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10224 
10225  /* function exit code */
10226  __Pyx_RefNannyFinishContext();
10227  return __pyx_r;
10228  }
10229 
10230  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10231  PyObject *__pyx_r = NULL;
10232  __Pyx_RefNannyDeclarations
10233  PyObject *__pyx_t_1 = NULL;
10234  PyObject *__pyx_t_2 = NULL;
10235  __Pyx_RefNannySetupContext("involute", 0);
10236 
10237  /* "PyClical.pyx":1120
10238  * 1-{1}+{1,2}
10239  * """
10240  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10241  *
10242  * def reverse(self):
10243  */
10244  __Pyx_XDECREF(__pyx_r);
10245  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10246  __Pyx_GOTREF(__pyx_t_1);
10247  __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)
10248  __Pyx_GOTREF(__pyx_t_2);
10249  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10250  __pyx_r = __pyx_t_2;
10251  __pyx_t_2 = 0;
10252  goto __pyx_L0;
10253 
10254  /* "PyClical.pyx":1106
10255  * + str(err))
10256  *
10257  * def involute(self): # <<<<<<<<<<<<<<
10258  * """
10259  * Main involution, each {i} is replaced by -{i} in each term,
10260  */
10261 
10262  /* function exit code */
10263  __pyx_L1_error:;
10264  __Pyx_XDECREF(__pyx_t_1);
10265  __Pyx_XDECREF(__pyx_t_2);
10266  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10267  __pyx_r = NULL;
10268  __pyx_L0:;
10269  __Pyx_XGIVEREF(__pyx_r);
10270  __Pyx_RefNannyFinishContext();
10271  return __pyx_r;
10272  }
10273 
10274  /* "PyClical.pyx":1122
10275  * return clifford().wrap( self.instance.involute() )
10276  *
10277  * def reverse(self): # <<<<<<<<<<<<<<
10278  * """
10279  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10280  */
10281 
10282  /* Python wrapper */
10283  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10284  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 ";
10285  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10286  PyObject *__pyx_r = 0;
10287  __Pyx_RefNannyDeclarations
10288  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10289  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10290 
10291  /* function exit code */
10292  __Pyx_RefNannyFinishContext();
10293  return __pyx_r;
10294  }
10295 
10296  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10297  PyObject *__pyx_r = NULL;
10298  __Pyx_RefNannyDeclarations
10299  PyObject *__pyx_t_1 = NULL;
10300  PyObject *__pyx_t_2 = NULL;
10301  __Pyx_RefNannySetupContext("reverse", 0);
10302 
10303  /* "PyClical.pyx":1135
10304  * 1+{1}-{1,2}
10305  * """
10306  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10307  *
10308  * def conj(self):
10309  */
10310  __Pyx_XDECREF(__pyx_r);
10311  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10312  __Pyx_GOTREF(__pyx_t_1);
10313  __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)
10314  __Pyx_GOTREF(__pyx_t_2);
10315  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10316  __pyx_r = __pyx_t_2;
10317  __pyx_t_2 = 0;
10318  goto __pyx_L0;
10319 
10320  /* "PyClical.pyx":1122
10321  * return clifford().wrap( self.instance.involute() )
10322  *
10323  * def reverse(self): # <<<<<<<<<<<<<<
10324  * """
10325  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10326  */
10327 
10328  /* function exit code */
10329  __pyx_L1_error:;
10330  __Pyx_XDECREF(__pyx_t_1);
10331  __Pyx_XDECREF(__pyx_t_2);
10332  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10333  __pyx_r = NULL;
10334  __pyx_L0:;
10335  __Pyx_XGIVEREF(__pyx_r);
10336  __Pyx_RefNannyFinishContext();
10337  return __pyx_r;
10338  }
10339 
10340  /* "PyClical.pyx":1137
10341  * return clifford().wrap( self.instance.reverse() )
10342  *
10343  * def conj(self): # <<<<<<<<<<<<<<
10344  * """
10345  * Conjugation, reverse o involute == involute o reverse.
10346  */
10347 
10348  /* Python wrapper */
10349  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10350  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 ";
10351  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10352  PyObject *__pyx_r = 0;
10353  __Pyx_RefNannyDeclarations
10354  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10355  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10356 
10357  /* function exit code */
10358  __Pyx_RefNannyFinishContext();
10359  return __pyx_r;
10360  }
10361 
10362  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10363  PyObject *__pyx_r = NULL;
10364  __Pyx_RefNannyDeclarations
10365  PyObject *__pyx_t_1 = NULL;
10366  PyObject *__pyx_t_2 = NULL;
10367  __Pyx_RefNannySetupContext("conj", 0);
10368 
10369  /* "PyClical.pyx":1150
10370  * 1-{1}-{1,2}
10371  * """
10372  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10373  *
10374  * def quad(self):
10375  */
10376  __Pyx_XDECREF(__pyx_r);
10377  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10378  __Pyx_GOTREF(__pyx_t_1);
10379  __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)
10380  __Pyx_GOTREF(__pyx_t_2);
10381  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10382  __pyx_r = __pyx_t_2;
10383  __pyx_t_2 = 0;
10384  goto __pyx_L0;
10385 
10386  /* "PyClical.pyx":1137
10387  * return clifford().wrap( self.instance.reverse() )
10388  *
10389  * def conj(self): # <<<<<<<<<<<<<<
10390  * """
10391  * Conjugation, reverse o involute == involute o reverse.
10392  */
10393 
10394  /* function exit code */
10395  __pyx_L1_error:;
10396  __Pyx_XDECREF(__pyx_t_1);
10397  __Pyx_XDECREF(__pyx_t_2);
10398  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10399  __pyx_r = NULL;
10400  __pyx_L0:;
10401  __Pyx_XGIVEREF(__pyx_r);
10402  __Pyx_RefNannyFinishContext();
10403  return __pyx_r;
10404  }
10405 
10406  /* "PyClical.pyx":1152
10407  * return clifford().wrap( self.instance.conj() )
10408  *
10409  * def quad(self): # <<<<<<<<<<<<<<
10410  * """
10411  * Quadratic form == (rev(x)*x)(0).
10412  */
10413 
10414  /* Python wrapper */
10415  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10416  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 ";
10417  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10418  PyObject *__pyx_r = 0;
10419  __Pyx_RefNannyDeclarations
10420  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10421  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10422 
10423  /* function exit code */
10424  __Pyx_RefNannyFinishContext();
10425  return __pyx_r;
10426  }
10427 
10428  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10429  PyObject *__pyx_r = NULL;
10430  __Pyx_RefNannyDeclarations
10431  PyObject *__pyx_t_1 = NULL;
10432  __Pyx_RefNannySetupContext("quad", 0);
10433 
10434  /* "PyClical.pyx":1161
10435  * 2.0
10436  * """
10437  * return self.instance.quad() # <<<<<<<<<<<<<<
10438  *
10439  * def norm(self):
10440  */
10441  __Pyx_XDECREF(__pyx_r);
10442  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10443  __Pyx_GOTREF(__pyx_t_1);
10444  __pyx_r = __pyx_t_1;
10445  __pyx_t_1 = 0;
10446  goto __pyx_L0;
10447 
10448  /* "PyClical.pyx":1152
10449  * return clifford().wrap( self.instance.conj() )
10450  *
10451  * def quad(self): # <<<<<<<<<<<<<<
10452  * """
10453  * Quadratic form == (rev(x)*x)(0).
10454  */
10455 
10456  /* function exit code */
10457  __pyx_L1_error:;
10458  __Pyx_XDECREF(__pyx_t_1);
10459  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10460  __pyx_r = NULL;
10461  __pyx_L0:;
10462  __Pyx_XGIVEREF(__pyx_r);
10463  __Pyx_RefNannyFinishContext();
10464  return __pyx_r;
10465  }
10466 
10467  /* "PyClical.pyx":1163
10468  * return self.instance.quad()
10469  *
10470  * def norm(self): # <<<<<<<<<<<<<<
10471  * """
10472  * Norm == sum of squares of coordinates.
10473  */
10474 
10475  /* Python wrapper */
10476  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10477  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 ";
10478  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10479  PyObject *__pyx_r = 0;
10480  __Pyx_RefNannyDeclarations
10481  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10482  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10483 
10484  /* function exit code */
10485  __Pyx_RefNannyFinishContext();
10486  return __pyx_r;
10487  }
10488 
10489  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10490  PyObject *__pyx_r = NULL;
10491  __Pyx_RefNannyDeclarations
10492  PyObject *__pyx_t_1 = NULL;
10493  __Pyx_RefNannySetupContext("norm", 0);
10494 
10495  /* "PyClical.pyx":1172
10496  * 4.0
10497  * """
10498  * return self.instance.norm() # <<<<<<<<<<<<<<
10499  *
10500  * def abs(self):
10501  */
10502  __Pyx_XDECREF(__pyx_r);
10503  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10504  __Pyx_GOTREF(__pyx_t_1);
10505  __pyx_r = __pyx_t_1;
10506  __pyx_t_1 = 0;
10507  goto __pyx_L0;
10508 
10509  /* "PyClical.pyx":1163
10510  * return self.instance.quad()
10511  *
10512  * def norm(self): # <<<<<<<<<<<<<<
10513  * """
10514  * Norm == sum of squares of coordinates.
10515  */
10516 
10517  /* function exit code */
10518  __pyx_L1_error:;
10519  __Pyx_XDECREF(__pyx_t_1);
10520  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10521  __pyx_r = NULL;
10522  __pyx_L0:;
10523  __Pyx_XGIVEREF(__pyx_r);
10524  __Pyx_RefNannyFinishContext();
10525  return __pyx_r;
10526  }
10527 
10528  /* "PyClical.pyx":1174
10529  * return self.instance.norm()
10530  *
10531  * def abs(self): # <<<<<<<<<<<<<<
10532  * """
10533  * Absolute value: square root of norm.
10534  */
10535 
10536  /* Python wrapper */
10537  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10538  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 ";
10539  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10540  PyObject *__pyx_r = 0;
10541  __Pyx_RefNannyDeclarations
10542  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10543  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10544 
10545  /* function exit code */
10546  __Pyx_RefNannyFinishContext();
10547  return __pyx_r;
10548  }
10549 
10550  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10551  PyObject *__pyx_r = NULL;
10552  __Pyx_RefNannyDeclarations
10553  PyObject *__pyx_t_1 = NULL;
10554  __Pyx_RefNannySetupContext("abs", 0);
10555 
10556  /* "PyClical.pyx":1181
10557  * 2.0
10558  * """
10559  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10560  *
10561  * def max_abs(self):
10562  */
10563  __Pyx_XDECREF(__pyx_r);
10564  __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)
10565  __Pyx_GOTREF(__pyx_t_1);
10566  __pyx_r = __pyx_t_1;
10567  __pyx_t_1 = 0;
10568  goto __pyx_L0;
10569 
10570  /* "PyClical.pyx":1174
10571  * return self.instance.norm()
10572  *
10573  * def abs(self): # <<<<<<<<<<<<<<
10574  * """
10575  * Absolute value: square root of norm.
10576  */
10577 
10578  /* function exit code */
10579  __pyx_L1_error:;
10580  __Pyx_XDECREF(__pyx_t_1);
10581  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10582  __pyx_r = NULL;
10583  __pyx_L0:;
10584  __Pyx_XGIVEREF(__pyx_r);
10585  __Pyx_RefNannyFinishContext();
10586  return __pyx_r;
10587  }
10588 
10589  /* "PyClical.pyx":1183
10590  * return glucat.abs( self.unwrap() )
10591  *
10592  * def max_abs(self): # <<<<<<<<<<<<<<
10593  * """
10594  * Maximum of absolute values of components of multivector: multivector infinity norm.
10595  */
10596 
10597  /* Python wrapper */
10598  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10599  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 ";
10600  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10601  PyObject *__pyx_r = 0;
10602  __Pyx_RefNannyDeclarations
10603  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10604  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10605 
10606  /* function exit code */
10607  __Pyx_RefNannyFinishContext();
10608  return __pyx_r;
10609  }
10610 
10611  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10612  PyObject *__pyx_r = NULL;
10613  __Pyx_RefNannyDeclarations
10614  PyObject *__pyx_t_1 = NULL;
10615  __Pyx_RefNannySetupContext("max_abs", 0);
10616 
10617  /* "PyClical.pyx":1192
10618  * 3.0
10619  * """
10620  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10621  *
10622  * def truncated(self, limit):
10623  */
10624  __Pyx_XDECREF(__pyx_r);
10625  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10626  __Pyx_GOTREF(__pyx_t_1);
10627  __pyx_r = __pyx_t_1;
10628  __pyx_t_1 = 0;
10629  goto __pyx_L0;
10630 
10631  /* "PyClical.pyx":1183
10632  * return glucat.abs( self.unwrap() )
10633  *
10634  * def max_abs(self): # <<<<<<<<<<<<<<
10635  * """
10636  * Maximum of absolute values of components of multivector: multivector infinity norm.
10637  */
10638 
10639  /* function exit code */
10640  __pyx_L1_error:;
10641  __Pyx_XDECREF(__pyx_t_1);
10642  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10643  __pyx_r = NULL;
10644  __pyx_L0:;
10645  __Pyx_XGIVEREF(__pyx_r);
10646  __Pyx_RefNannyFinishContext();
10647  return __pyx_r;
10648  }
10649 
10650  /* "PyClical.pyx":1194
10651  * return self.instance.max_abs()
10652  *
10653  * def truncated(self, limit): # <<<<<<<<<<<<<<
10654  * """
10655  * Remove all terms of self with relative size smaller than limit.
10656  */
10657 
10658  /* Python wrapper */
10659  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10660  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 ";
10661  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10662  PyObject *__pyx_r = 0;
10663  __Pyx_RefNannyDeclarations
10664  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10665  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10666 
10667  /* function exit code */
10668  __Pyx_RefNannyFinishContext();
10669  return __pyx_r;
10670  }
10671 
10672  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10673  PyObject *__pyx_r = NULL;
10674  __Pyx_RefNannyDeclarations
10675  PyObject *__pyx_t_1 = NULL;
10676  scalar_t __pyx_t_2;
10677  PyObject *__pyx_t_3 = NULL;
10678  __Pyx_RefNannySetupContext("truncated", 0);
10679 
10680  /* "PyClical.pyx":1203
10681  * clifford("10000+{1}")
10682  * """
10683  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10684  *
10685  * def isnan(self):
10686  */
10687  __Pyx_XDECREF(__pyx_r);
10688  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10689  __Pyx_GOTREF(__pyx_t_1);
10690  __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)
10691  __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)
10692  __Pyx_GOTREF(__pyx_t_3);
10693  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10694  __pyx_r = __pyx_t_3;
10695  __pyx_t_3 = 0;
10696  goto __pyx_L0;
10697 
10698  /* "PyClical.pyx":1194
10699  * return self.instance.max_abs()
10700  *
10701  * def truncated(self, limit): # <<<<<<<<<<<<<<
10702  * """
10703  * Remove all terms of self with relative size smaller than limit.
10704  */
10705 
10706  /* function exit code */
10707  __pyx_L1_error:;
10708  __Pyx_XDECREF(__pyx_t_1);
10709  __Pyx_XDECREF(__pyx_t_3);
10710  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10711  __pyx_r = NULL;
10712  __pyx_L0:;
10713  __Pyx_XGIVEREF(__pyx_r);
10714  __Pyx_RefNannyFinishContext();
10715  return __pyx_r;
10716  }
10717 
10718  /* "PyClical.pyx":1205
10719  * return clifford().wrap( self.instance.truncated(limit) )
10720  *
10721  * def isnan(self): # <<<<<<<<<<<<<<
10722  * """
10723  * Check if a multivector contains any IEEE NaN values.
10724  */
10725 
10726  /* Python wrapper */
10727  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10728  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10729  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10730  PyObject *__pyx_r = 0;
10731  __Pyx_RefNannyDeclarations
10732  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10733  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10734 
10735  /* function exit code */
10736  __Pyx_RefNannyFinishContext();
10737  return __pyx_r;
10738  }
10739 
10740  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10741  PyObject *__pyx_r = NULL;
10742  __Pyx_RefNannyDeclarations
10743  PyObject *__pyx_t_1 = NULL;
10744  __Pyx_RefNannySetupContext("isnan", 0);
10745 
10746  /* "PyClical.pyx":1212
10747  * False
10748  * """
10749  * return self.instance.isnan() # <<<<<<<<<<<<<<
10750  *
10751  * def frame(self):
10752  */
10753  __Pyx_XDECREF(__pyx_r);
10754  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10755  __Pyx_GOTREF(__pyx_t_1);
10756  __pyx_r = __pyx_t_1;
10757  __pyx_t_1 = 0;
10758  goto __pyx_L0;
10759 
10760  /* "PyClical.pyx":1205
10761  * return clifford().wrap( self.instance.truncated(limit) )
10762  *
10763  * def isnan(self): # <<<<<<<<<<<<<<
10764  * """
10765  * Check if a multivector contains any IEEE NaN values.
10766  */
10767 
10768  /* function exit code */
10769  __pyx_L1_error:;
10770  __Pyx_XDECREF(__pyx_t_1);
10771  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10772  __pyx_r = NULL;
10773  __pyx_L0:;
10774  __Pyx_XGIVEREF(__pyx_r);
10775  __Pyx_RefNannyFinishContext();
10776  return __pyx_r;
10777  }
10778 
10779  /* "PyClical.pyx":1214
10780  * return self.instance.isnan()
10781  *
10782  * def frame(self): # <<<<<<<<<<<<<<
10783  * """
10784  * Subalgebra generated by all generators of terms of given multivector.
10785  */
10786 
10787  /* Python wrapper */
10788  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10789  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 ";
10790  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10791  PyObject *__pyx_r = 0;
10792  __Pyx_RefNannyDeclarations
10793  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10794  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10795 
10796  /* function exit code */
10797  __Pyx_RefNannyFinishContext();
10798  return __pyx_r;
10799  }
10800 
10801  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10802  PyObject *__pyx_r = NULL;
10803  __Pyx_RefNannyDeclarations
10804  PyObject *__pyx_t_1 = NULL;
10805  PyObject *__pyx_t_2 = NULL;
10806  __Pyx_RefNannySetupContext("frame", 0);
10807 
10808  /* "PyClical.pyx":1223
10809  * <type 'PyClical.index_set'>
10810  * """
10811  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10812  *
10813  * def __repr__(self):
10814  */
10815  __Pyx_XDECREF(__pyx_r);
10816  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10817  __Pyx_GOTREF(__pyx_t_1);
10818  __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)
10819  __Pyx_GOTREF(__pyx_t_2);
10820  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10821  __pyx_r = __pyx_t_2;
10822  __pyx_t_2 = 0;
10823  goto __pyx_L0;
10824 
10825  /* "PyClical.pyx":1214
10826  * return self.instance.isnan()
10827  *
10828  * def frame(self): # <<<<<<<<<<<<<<
10829  * """
10830  * Subalgebra generated by all generators of terms of given multivector.
10831  */
10832 
10833  /* function exit code */
10834  __pyx_L1_error:;
10835  __Pyx_XDECREF(__pyx_t_1);
10836  __Pyx_XDECREF(__pyx_t_2);
10837  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10838  __pyx_r = NULL;
10839  __pyx_L0:;
10840  __Pyx_XGIVEREF(__pyx_r);
10841  __Pyx_RefNannyFinishContext();
10842  return __pyx_r;
10843  }
10844 
10845  /* "PyClical.pyx":1225
10846  * return index_set().wrap( self.instance.frame() )
10847  *
10848  * def __repr__(self): # <<<<<<<<<<<<<<
10849  * """
10850  * The official string representation of self.
10851  */
10852 
10853  /* Python wrapper */
10854  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10855  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 ";
10856  #if CYTHON_COMPILING_IN_CPYTHON
10857  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10858  #endif
10859  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10860  PyObject *__pyx_r = 0;
10861  __Pyx_RefNannyDeclarations
10862  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10863  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10864 
10865  /* function exit code */
10866  __Pyx_RefNannyFinishContext();
10867  return __pyx_r;
10868  }
10869 
10870  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10871  PyObject *__pyx_r = NULL;
10872  __Pyx_RefNannyDeclarations
10873  PyObject *__pyx_t_1 = NULL;
10874  __Pyx_RefNannySetupContext("__repr__", 0);
10875 
10876  /* "PyClical.pyx":1232
10877  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10878  * """
10879  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10880  *
10881  * def __str__(self):
10882  */
10883  __Pyx_XDECREF(__pyx_r);
10884  __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)
10885  __Pyx_GOTREF(__pyx_t_1);
10886  __pyx_r = __pyx_t_1;
10887  __pyx_t_1 = 0;
10888  goto __pyx_L0;
10889 
10890  /* "PyClical.pyx":1225
10891  * return index_set().wrap( self.instance.frame() )
10892  *
10893  * def __repr__(self): # <<<<<<<<<<<<<<
10894  * """
10895  * The official string representation of self.
10896  */
10897 
10898  /* function exit code */
10899  __pyx_L1_error:;
10900  __Pyx_XDECREF(__pyx_t_1);
10901  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10902  __pyx_r = NULL;
10903  __pyx_L0:;
10904  __Pyx_XGIVEREF(__pyx_r);
10905  __Pyx_RefNannyFinishContext();
10906  return __pyx_r;
10907  }
10908 
10909  /* "PyClical.pyx":1234
10910  * return clifford_to_repr( self.unwrap() ).c_str()
10911  *
10912  * def __str__(self): # <<<<<<<<<<<<<<
10913  * """
10914  * The informal string representation of self.
10915  */
10916 
10917  /* Python wrapper */
10918  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10919  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 ";
10920  #if CYTHON_COMPILING_IN_CPYTHON
10921  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10922  #endif
10923  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10924  PyObject *__pyx_r = 0;
10925  __Pyx_RefNannyDeclarations
10926  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10927  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10928 
10929  /* function exit code */
10930  __Pyx_RefNannyFinishContext();
10931  return __pyx_r;
10932  }
10933 
10934  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10935  PyObject *__pyx_r = NULL;
10936  __Pyx_RefNannyDeclarations
10937  PyObject *__pyx_t_1 = NULL;
10938  __Pyx_RefNannySetupContext("__str__", 0);
10939 
10940  /* "PyClical.pyx":1241
10941  * '1+3{-1}+2{1,2}+4{-2,7}'
10942  * """
10943  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10944  *
10945  * def clifford_hidden_doctests():
10946  */
10947  __Pyx_XDECREF(__pyx_r);
10948  __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)
10949  __Pyx_GOTREF(__pyx_t_1);
10950  __pyx_r = __pyx_t_1;
10951  __pyx_t_1 = 0;
10952  goto __pyx_L0;
10953 
10954  /* "PyClical.pyx":1234
10955  * return clifford_to_repr( self.unwrap() ).c_str()
10956  *
10957  * def __str__(self): # <<<<<<<<<<<<<<
10958  * """
10959  * The informal string representation of self.
10960  */
10961 
10962  /* function exit code */
10963  __pyx_L1_error:;
10964  __Pyx_XDECREF(__pyx_t_1);
10965  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10966  __pyx_r = NULL;
10967  __pyx_L0:;
10968  __Pyx_XGIVEREF(__pyx_r);
10969  __Pyx_RefNannyFinishContext();
10970  return __pyx_r;
10971  }
10972 
10973  /* "(tree fragment)":1
10974  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10975  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10976  * def __setstate_cython__(self, __pyx_state):
10977  */
10978 
10979  /* Python wrapper */
10980  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10981  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10982  PyObject *__pyx_r = 0;
10983  __Pyx_RefNannyDeclarations
10984  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10985  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10986 
10987  /* function exit code */
10988  __Pyx_RefNannyFinishContext();
10989  return __pyx_r;
10990  }
10991 
10992  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10993  PyObject *__pyx_r = NULL;
10994  __Pyx_RefNannyDeclarations
10995  PyObject *__pyx_t_1 = NULL;
10996  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10997 
10998  /* "(tree fragment)":2
10999  * def __reduce_cython__(self):
11000  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11001  * def __setstate_cython__(self, __pyx_state):
11002  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11003  */
11004  __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)
11005  __Pyx_GOTREF(__pyx_t_1);
11006  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11007  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11008  __PYX_ERR(1, 2, __pyx_L1_error)
11009 
11010  /* "(tree fragment)":1
11011  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11012  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11013  * def __setstate_cython__(self, __pyx_state):
11014  */
11015 
11016  /* function exit code */
11017  __pyx_L1_error:;
11018  __Pyx_XDECREF(__pyx_t_1);
11019  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11020  __pyx_r = NULL;
11021  __Pyx_XGIVEREF(__pyx_r);
11022  __Pyx_RefNannyFinishContext();
11023  return __pyx_r;
11024  }
11025 
11026  /* "(tree fragment)":3
11027  * def __reduce_cython__(self):
11028  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11029  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11030  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11031  */
11032 
11033  /* Python wrapper */
11034  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11035  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11036  PyObject *__pyx_r = 0;
11037  __Pyx_RefNannyDeclarations
11038  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11039  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11040 
11041  /* function exit code */
11042  __Pyx_RefNannyFinishContext();
11043  return __pyx_r;
11044  }
11045 
11046  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) {
11047  PyObject *__pyx_r = NULL;
11048  __Pyx_RefNannyDeclarations
11049  PyObject *__pyx_t_1 = NULL;
11050  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11051 
11052  /* "(tree fragment)":4
11053  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11054  * def __setstate_cython__(self, __pyx_state):
11055  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11056  */
11057  __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)
11058  __Pyx_GOTREF(__pyx_t_1);
11059  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11060  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11061  __PYX_ERR(1, 4, __pyx_L1_error)
11062 
11063  /* "(tree fragment)":3
11064  * def __reduce_cython__(self):
11065  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11066  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11067  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11068  */
11069 
11070  /* function exit code */
11071  __pyx_L1_error:;
11072  __Pyx_XDECREF(__pyx_t_1);
11073  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11074  __pyx_r = NULL;
11075  __Pyx_XGIVEREF(__pyx_r);
11076  __Pyx_RefNannyFinishContext();
11077  return __pyx_r;
11078  }
11079 
11080  /* "PyClical.pyx":1243
11081  * return clifford_to_str( self.unwrap() ).c_str()
11082  *
11083  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11084  * """
11085  * Tests for functions that Doctest cannot see.
11086  */
11087 
11088  /* Python wrapper */
11089  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11090  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 ";
11091  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};
11092  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11093  PyObject *__pyx_r = 0;
11094  __Pyx_RefNannyDeclarations
11095  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11096  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11097 
11098  /* function exit code */
11099  __Pyx_RefNannyFinishContext();
11100  return __pyx_r;
11101  }
11102 
11103  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11104  PyObject *__pyx_r = NULL;
11105  __Pyx_RefNannyDeclarations
11106  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11107 
11108  /* "PyClical.pyx":1327
11109  * True
11110  * """
11111  * return # <<<<<<<<<<<<<<
11112  *
11113  * cpdef inline inv(obj):
11114  */
11115  __Pyx_XDECREF(__pyx_r);
11116  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11117  goto __pyx_L0;
11118 
11119  /* "PyClical.pyx":1243
11120  * return clifford_to_str( self.unwrap() ).c_str()
11121  *
11122  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11123  * """
11124  * Tests for functions that Doctest cannot see.
11125  */
11126 
11127  /* function exit code */
11128  __pyx_L0:;
11129  __Pyx_XGIVEREF(__pyx_r);
11130  __Pyx_RefNannyFinishContext();
11131  return __pyx_r;
11132  }
11133 
11134  /* "PyClical.pyx":1329
11135  * return
11136  *
11137  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11138  * """
11139  * Geometric multiplicative inverse.
11140  */
11141 
11142  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11143  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11144  PyObject *__pyx_r = NULL;
11145  __Pyx_RefNannyDeclarations
11146  PyObject *__pyx_t_1 = NULL;
11147  PyObject *__pyx_t_2 = NULL;
11148  PyObject *__pyx_t_3 = NULL;
11149  __Pyx_RefNannySetupContext("inv", 0);
11150 
11151  /* "PyClical.pyx":1342
11152  * nan
11153  * """
11154  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11155  *
11156  * cpdef inline scalar(obj):
11157  */
11158  __Pyx_XDECREF(__pyx_r);
11159  __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)
11160  __Pyx_GOTREF(__pyx_t_2);
11161  __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)
11162  __Pyx_GOTREF(__pyx_t_3);
11163  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11164  __pyx_t_2 = NULL;
11165  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11166  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11167  if (likely(__pyx_t_2)) {
11168  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11169  __Pyx_INCREF(__pyx_t_2);
11170  __Pyx_INCREF(function);
11171  __Pyx_DECREF_SET(__pyx_t_3, function);
11172  }
11173  }
11174  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11175  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11176  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11177  __Pyx_GOTREF(__pyx_t_1);
11178  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11179  __pyx_r = __pyx_t_1;
11180  __pyx_t_1 = 0;
11181  goto __pyx_L0;
11182 
11183  /* "PyClical.pyx":1329
11184  * return
11185  *
11186  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11187  * """
11188  * Geometric multiplicative inverse.
11189  */
11190 
11191  /* function exit code */
11192  __pyx_L1_error:;
11193  __Pyx_XDECREF(__pyx_t_1);
11194  __Pyx_XDECREF(__pyx_t_2);
11195  __Pyx_XDECREF(__pyx_t_3);
11196  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11197  __pyx_r = 0;
11198  __pyx_L0:;
11199  __Pyx_XGIVEREF(__pyx_r);
11200  __Pyx_RefNannyFinishContext();
11201  return __pyx_r;
11202  }
11203 
11204  /* Python wrapper */
11205  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11206  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 ";
11207  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11208  PyObject *__pyx_r = 0;
11209  __Pyx_RefNannyDeclarations
11210  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11211  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11212 
11213  /* function exit code */
11214  __Pyx_RefNannyFinishContext();
11215  return __pyx_r;
11216  }
11217 
11218  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11219  PyObject *__pyx_r = NULL;
11220  __Pyx_RefNannyDeclarations
11221  PyObject *__pyx_t_1 = NULL;
11222  __Pyx_RefNannySetupContext("inv", 0);
11223  __Pyx_XDECREF(__pyx_r);
11224  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11225  __Pyx_GOTREF(__pyx_t_1);
11226  __pyx_r = __pyx_t_1;
11227  __pyx_t_1 = 0;
11228  goto __pyx_L0;
11229 
11230  /* function exit code */
11231  __pyx_L1_error:;
11232  __Pyx_XDECREF(__pyx_t_1);
11233  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11234  __pyx_r = NULL;
11235  __pyx_L0:;
11236  __Pyx_XGIVEREF(__pyx_r);
11237  __Pyx_RefNannyFinishContext();
11238  return __pyx_r;
11239  }
11240 
11241  /* "PyClical.pyx":1344
11242  * return clifford(obj).inv()
11243  *
11244  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11245  * """
11246  * Scalar part.
11247  */
11248 
11249  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11250  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11251  PyObject *__pyx_r = NULL;
11252  __Pyx_RefNannyDeclarations
11253  PyObject *__pyx_t_1 = NULL;
11254  PyObject *__pyx_t_2 = NULL;
11255  PyObject *__pyx_t_3 = NULL;
11256  __Pyx_RefNannySetupContext("scalar", 0);
11257 
11258  /* "PyClical.pyx":1353
11259  * 0.0
11260  * """
11261  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11262  *
11263  * cpdef inline real(obj):
11264  */
11265  __Pyx_XDECREF(__pyx_r);
11266  __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)
11267  __Pyx_GOTREF(__pyx_t_2);
11268  __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)
11269  __Pyx_GOTREF(__pyx_t_3);
11270  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11271  __pyx_t_2 = NULL;
11272  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11273  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11274  if (likely(__pyx_t_2)) {
11275  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11276  __Pyx_INCREF(__pyx_t_2);
11277  __Pyx_INCREF(function);
11278  __Pyx_DECREF_SET(__pyx_t_3, function);
11279  }
11280  }
11281  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11282  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11283  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11284  __Pyx_GOTREF(__pyx_t_1);
11285  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11286  __pyx_r = __pyx_t_1;
11287  __pyx_t_1 = 0;
11288  goto __pyx_L0;
11289 
11290  /* "PyClical.pyx":1344
11291  * return clifford(obj).inv()
11292  *
11293  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11294  * """
11295  * Scalar part.
11296  */
11297 
11298  /* function exit code */
11299  __pyx_L1_error:;
11300  __Pyx_XDECREF(__pyx_t_1);
11301  __Pyx_XDECREF(__pyx_t_2);
11302  __Pyx_XDECREF(__pyx_t_3);
11303  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11304  __pyx_r = 0;
11305  __pyx_L0:;
11306  __Pyx_XGIVEREF(__pyx_r);
11307  __Pyx_RefNannyFinishContext();
11308  return __pyx_r;
11309  }
11310 
11311  /* Python wrapper */
11312  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11313  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 ";
11314  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11315  PyObject *__pyx_r = 0;
11316  __Pyx_RefNannyDeclarations
11317  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11318  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11319 
11320  /* function exit code */
11321  __Pyx_RefNannyFinishContext();
11322  return __pyx_r;
11323  }
11324 
11325  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11326  PyObject *__pyx_r = NULL;
11327  __Pyx_RefNannyDeclarations
11328  PyObject *__pyx_t_1 = NULL;
11329  __Pyx_RefNannySetupContext("scalar", 0);
11330  __Pyx_XDECREF(__pyx_r);
11331  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11332  __Pyx_GOTREF(__pyx_t_1);
11333  __pyx_r = __pyx_t_1;
11334  __pyx_t_1 = 0;
11335  goto __pyx_L0;
11336 
11337  /* function exit code */
11338  __pyx_L1_error:;
11339  __Pyx_XDECREF(__pyx_t_1);
11340  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11341  __pyx_r = NULL;
11342  __pyx_L0:;
11343  __Pyx_XGIVEREF(__pyx_r);
11344  __Pyx_RefNannyFinishContext();
11345  return __pyx_r;
11346  }
11347 
11348  /* "PyClical.pyx":1355
11349  * return clifford(obj).scalar()
11350  *
11351  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11352  * """
11353  * Real part: synonym for scalar part.
11354  */
11355 
11356  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11357  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11358  PyObject *__pyx_r = NULL;
11359  __Pyx_RefNannyDeclarations
11360  PyObject *__pyx_t_1 = NULL;
11361  PyObject *__pyx_t_2 = NULL;
11362  PyObject *__pyx_t_3 = NULL;
11363  __Pyx_RefNannySetupContext("real", 0);
11364 
11365  /* "PyClical.pyx":1364
11366  * 0.0
11367  * """
11368  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11369  *
11370  * cpdef inline imag(obj):
11371  */
11372  __Pyx_XDECREF(__pyx_r);
11373  __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)
11374  __Pyx_GOTREF(__pyx_t_2);
11375  __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)
11376  __Pyx_GOTREF(__pyx_t_3);
11377  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11378  __pyx_t_2 = NULL;
11379  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11380  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11381  if (likely(__pyx_t_2)) {
11382  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11383  __Pyx_INCREF(__pyx_t_2);
11384  __Pyx_INCREF(function);
11385  __Pyx_DECREF_SET(__pyx_t_3, function);
11386  }
11387  }
11388  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11389  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11390  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11391  __Pyx_GOTREF(__pyx_t_1);
11392  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11393  __pyx_r = __pyx_t_1;
11394  __pyx_t_1 = 0;
11395  goto __pyx_L0;
11396 
11397  /* "PyClical.pyx":1355
11398  * return clifford(obj).scalar()
11399  *
11400  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11401  * """
11402  * Real part: synonym for scalar part.
11403  */
11404 
11405  /* function exit code */
11406  __pyx_L1_error:;
11407  __Pyx_XDECREF(__pyx_t_1);
11408  __Pyx_XDECREF(__pyx_t_2);
11409  __Pyx_XDECREF(__pyx_t_3);
11410  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11411  __pyx_r = 0;
11412  __pyx_L0:;
11413  __Pyx_XGIVEREF(__pyx_r);
11414  __Pyx_RefNannyFinishContext();
11415  return __pyx_r;
11416  }
11417 
11418  /* Python wrapper */
11419  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11420  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 ";
11421  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11422  PyObject *__pyx_r = 0;
11423  __Pyx_RefNannyDeclarations
11424  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11425  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11426 
11427  /* function exit code */
11428  __Pyx_RefNannyFinishContext();
11429  return __pyx_r;
11430  }
11431 
11432  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11433  PyObject *__pyx_r = NULL;
11434  __Pyx_RefNannyDeclarations
11435  PyObject *__pyx_t_1 = NULL;
11436  __Pyx_RefNannySetupContext("real", 0);
11437  __Pyx_XDECREF(__pyx_r);
11438  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11439  __Pyx_GOTREF(__pyx_t_1);
11440  __pyx_r = __pyx_t_1;
11441  __pyx_t_1 = 0;
11442  goto __pyx_L0;
11443 
11444  /* function exit code */
11445  __pyx_L1_error:;
11446  __Pyx_XDECREF(__pyx_t_1);
11447  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11448  __pyx_r = NULL;
11449  __pyx_L0:;
11450  __Pyx_XGIVEREF(__pyx_r);
11451  __Pyx_RefNannyFinishContext();
11452  return __pyx_r;
11453  }
11454 
11455  /* "PyClical.pyx":1366
11456  * return clifford(obj).scalar()
11457  *
11458  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11459  * """
11460  * Imaginary part: deprecated (always 0).
11461  */
11462 
11463  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11464  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11465  PyObject *__pyx_r = NULL;
11466  __Pyx_RefNannyDeclarations
11467  __Pyx_RefNannySetupContext("imag", 0);
11468 
11469  /* "PyClical.pyx":1375
11470  * 0.0
11471  * """
11472  * return 0.0 # <<<<<<<<<<<<<<
11473  *
11474  * cpdef inline pure(obj):
11475  */
11476  __Pyx_XDECREF(__pyx_r);
11477  __Pyx_INCREF(__pyx_float_0_0);
11478  __pyx_r = __pyx_float_0_0;
11479  goto __pyx_L0;
11480 
11481  /* "PyClical.pyx":1366
11482  * return clifford(obj).scalar()
11483  *
11484  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11485  * """
11486  * Imaginary part: deprecated (always 0).
11487  */
11488 
11489  /* function exit code */
11490  __pyx_L0:;
11491  __Pyx_XGIVEREF(__pyx_r);
11492  __Pyx_RefNannyFinishContext();
11493  return __pyx_r;
11494  }
11495 
11496  /* Python wrapper */
11497  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11498  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 ";
11499  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11500  PyObject *__pyx_r = 0;
11501  __Pyx_RefNannyDeclarations
11502  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11503  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11504 
11505  /* function exit code */
11506  __Pyx_RefNannyFinishContext();
11507  return __pyx_r;
11508  }
11509 
11510  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11511  PyObject *__pyx_r = NULL;
11512  __Pyx_RefNannyDeclarations
11513  PyObject *__pyx_t_1 = NULL;
11514  __Pyx_RefNannySetupContext("imag", 0);
11515  __Pyx_XDECREF(__pyx_r);
11516  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11517  __Pyx_GOTREF(__pyx_t_1);
11518  __pyx_r = __pyx_t_1;
11519  __pyx_t_1 = 0;
11520  goto __pyx_L0;
11521 
11522  /* function exit code */
11523  __pyx_L1_error:;
11524  __Pyx_XDECREF(__pyx_t_1);
11525  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11526  __pyx_r = NULL;
11527  __pyx_L0:;
11528  __Pyx_XGIVEREF(__pyx_r);
11529  __Pyx_RefNannyFinishContext();
11530  return __pyx_r;
11531  }
11532 
11533  /* "PyClical.pyx":1377
11534  * return 0.0
11535  *
11536  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11537  * """
11538  * Pure part
11539  */
11540 
11541  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11542  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11543  PyObject *__pyx_r = NULL;
11544  __Pyx_RefNannyDeclarations
11545  PyObject *__pyx_t_1 = NULL;
11546  PyObject *__pyx_t_2 = NULL;
11547  PyObject *__pyx_t_3 = NULL;
11548  __Pyx_RefNannySetupContext("pure", 0);
11549 
11550  /* "PyClical.pyx":1386
11551  * {1,2}
11552  * """
11553  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11554  *
11555  * cpdef inline even(obj):
11556  */
11557  __Pyx_XDECREF(__pyx_r);
11558  __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)
11559  __Pyx_GOTREF(__pyx_t_2);
11560  __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)
11561  __Pyx_GOTREF(__pyx_t_3);
11562  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11563  __pyx_t_2 = NULL;
11564  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11565  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11566  if (likely(__pyx_t_2)) {
11567  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11568  __Pyx_INCREF(__pyx_t_2);
11569  __Pyx_INCREF(function);
11570  __Pyx_DECREF_SET(__pyx_t_3, function);
11571  }
11572  }
11573  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11574  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11575  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11576  __Pyx_GOTREF(__pyx_t_1);
11577  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11578  __pyx_r = __pyx_t_1;
11579  __pyx_t_1 = 0;
11580  goto __pyx_L0;
11581 
11582  /* "PyClical.pyx":1377
11583  * return 0.0
11584  *
11585  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11586  * """
11587  * Pure part
11588  */
11589 
11590  /* function exit code */
11591  __pyx_L1_error:;
11592  __Pyx_XDECREF(__pyx_t_1);
11593  __Pyx_XDECREF(__pyx_t_2);
11594  __Pyx_XDECREF(__pyx_t_3);
11595  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11596  __pyx_r = 0;
11597  __pyx_L0:;
11598  __Pyx_XGIVEREF(__pyx_r);
11599  __Pyx_RefNannyFinishContext();
11600  return __pyx_r;
11601  }
11602 
11603  /* Python wrapper */
11604  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11605  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 ";
11606  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11607  PyObject *__pyx_r = 0;
11608  __Pyx_RefNannyDeclarations
11609  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11610  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11611 
11612  /* function exit code */
11613  __Pyx_RefNannyFinishContext();
11614  return __pyx_r;
11615  }
11616 
11617  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11618  PyObject *__pyx_r = NULL;
11619  __Pyx_RefNannyDeclarations
11620  PyObject *__pyx_t_1 = NULL;
11621  __Pyx_RefNannySetupContext("pure", 0);
11622  __Pyx_XDECREF(__pyx_r);
11623  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11624  __Pyx_GOTREF(__pyx_t_1);
11625  __pyx_r = __pyx_t_1;
11626  __pyx_t_1 = 0;
11627  goto __pyx_L0;
11628 
11629  /* function exit code */
11630  __pyx_L1_error:;
11631  __Pyx_XDECREF(__pyx_t_1);
11632  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11633  __pyx_r = NULL;
11634  __pyx_L0:;
11635  __Pyx_XGIVEREF(__pyx_r);
11636  __Pyx_RefNannyFinishContext();
11637  return __pyx_r;
11638  }
11639 
11640  /* "PyClical.pyx":1388
11641  * return clifford(obj).pure()
11642  *
11643  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11644  * """
11645  * Even part of multivector, sum of even grade terms.
11646  */
11647 
11648  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11649  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11650  PyObject *__pyx_r = NULL;
11651  __Pyx_RefNannyDeclarations
11652  PyObject *__pyx_t_1 = NULL;
11653  PyObject *__pyx_t_2 = NULL;
11654  PyObject *__pyx_t_3 = NULL;
11655  __Pyx_RefNannySetupContext("even", 0);
11656 
11657  /* "PyClical.pyx":1395
11658  * 1+{1,2}
11659  * """
11660  * return clifford(obj).even() # <<<<<<<<<<<<<<
11661  *
11662  * cpdef inline odd(obj):
11663  */
11664  __Pyx_XDECREF(__pyx_r);
11665  __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)
11666  __Pyx_GOTREF(__pyx_t_2);
11667  __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)
11668  __Pyx_GOTREF(__pyx_t_3);
11669  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11670  __pyx_t_2 = NULL;
11671  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11672  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11673  if (likely(__pyx_t_2)) {
11674  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11675  __Pyx_INCREF(__pyx_t_2);
11676  __Pyx_INCREF(function);
11677  __Pyx_DECREF_SET(__pyx_t_3, function);
11678  }
11679  }
11680  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11681  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11682  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11683  __Pyx_GOTREF(__pyx_t_1);
11684  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11685  __pyx_r = __pyx_t_1;
11686  __pyx_t_1 = 0;
11687  goto __pyx_L0;
11688 
11689  /* "PyClical.pyx":1388
11690  * return clifford(obj).pure()
11691  *
11692  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11693  * """
11694  * Even part of multivector, sum of even grade terms.
11695  */
11696 
11697  /* function exit code */
11698  __pyx_L1_error:;
11699  __Pyx_XDECREF(__pyx_t_1);
11700  __Pyx_XDECREF(__pyx_t_2);
11701  __Pyx_XDECREF(__pyx_t_3);
11702  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11703  __pyx_r = 0;
11704  __pyx_L0:;
11705  __Pyx_XGIVEREF(__pyx_r);
11706  __Pyx_RefNannyFinishContext();
11707  return __pyx_r;
11708  }
11709 
11710  /* Python wrapper */
11711  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11712  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 ";
11713  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11714  PyObject *__pyx_r = 0;
11715  __Pyx_RefNannyDeclarations
11716  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11717  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11718 
11719  /* function exit code */
11720  __Pyx_RefNannyFinishContext();
11721  return __pyx_r;
11722  }
11723 
11724  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11725  PyObject *__pyx_r = NULL;
11726  __Pyx_RefNannyDeclarations
11727  PyObject *__pyx_t_1 = NULL;
11728  __Pyx_RefNannySetupContext("even", 0);
11729  __Pyx_XDECREF(__pyx_r);
11730  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11731  __Pyx_GOTREF(__pyx_t_1);
11732  __pyx_r = __pyx_t_1;
11733  __pyx_t_1 = 0;
11734  goto __pyx_L0;
11735 
11736  /* function exit code */
11737  __pyx_L1_error:;
11738  __Pyx_XDECREF(__pyx_t_1);
11739  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11740  __pyx_r = NULL;
11741  __pyx_L0:;
11742  __Pyx_XGIVEREF(__pyx_r);
11743  __Pyx_RefNannyFinishContext();
11744  return __pyx_r;
11745  }
11746 
11747  /* "PyClical.pyx":1397
11748  * return clifford(obj).even()
11749  *
11750  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11751  * """
11752  * Odd part of multivector, sum of odd grade terms.
11753  */
11754 
11755  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11756  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11757  PyObject *__pyx_r = NULL;
11758  __Pyx_RefNannyDeclarations
11759  PyObject *__pyx_t_1 = NULL;
11760  PyObject *__pyx_t_2 = NULL;
11761  PyObject *__pyx_t_3 = NULL;
11762  __Pyx_RefNannySetupContext("odd", 0);
11763 
11764  /* "PyClical.pyx":1404
11765  * {1}
11766  * """
11767  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11768  *
11769  * cpdef inline involute(obj):
11770  */
11771  __Pyx_XDECREF(__pyx_r);
11772  __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)
11773  __Pyx_GOTREF(__pyx_t_2);
11774  __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)
11775  __Pyx_GOTREF(__pyx_t_3);
11776  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11777  __pyx_t_2 = NULL;
11778  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11779  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11780  if (likely(__pyx_t_2)) {
11781  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11782  __Pyx_INCREF(__pyx_t_2);
11783  __Pyx_INCREF(function);
11784  __Pyx_DECREF_SET(__pyx_t_3, function);
11785  }
11786  }
11787  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11788  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11789  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11790  __Pyx_GOTREF(__pyx_t_1);
11791  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11792  __pyx_r = __pyx_t_1;
11793  __pyx_t_1 = 0;
11794  goto __pyx_L0;
11795 
11796  /* "PyClical.pyx":1397
11797  * return clifford(obj).even()
11798  *
11799  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11800  * """
11801  * Odd part of multivector, sum of odd grade terms.
11802  */
11803 
11804  /* function exit code */
11805  __pyx_L1_error:;
11806  __Pyx_XDECREF(__pyx_t_1);
11807  __Pyx_XDECREF(__pyx_t_2);
11808  __Pyx_XDECREF(__pyx_t_3);
11809  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11810  __pyx_r = 0;
11811  __pyx_L0:;
11812  __Pyx_XGIVEREF(__pyx_r);
11813  __Pyx_RefNannyFinishContext();
11814  return __pyx_r;
11815  }
11816 
11817  /* Python wrapper */
11818  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11819  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 ";
11820  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11821  PyObject *__pyx_r = 0;
11822  __Pyx_RefNannyDeclarations
11823  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11824  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11825 
11826  /* function exit code */
11827  __Pyx_RefNannyFinishContext();
11828  return __pyx_r;
11829  }
11830 
11831  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11832  PyObject *__pyx_r = NULL;
11833  __Pyx_RefNannyDeclarations
11834  PyObject *__pyx_t_1 = NULL;
11835  __Pyx_RefNannySetupContext("odd", 0);
11836  __Pyx_XDECREF(__pyx_r);
11837  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11838  __Pyx_GOTREF(__pyx_t_1);
11839  __pyx_r = __pyx_t_1;
11840  __pyx_t_1 = 0;
11841  goto __pyx_L0;
11842 
11843  /* function exit code */
11844  __pyx_L1_error:;
11845  __Pyx_XDECREF(__pyx_t_1);
11846  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11847  __pyx_r = NULL;
11848  __pyx_L0:;
11849  __Pyx_XGIVEREF(__pyx_r);
11850  __Pyx_RefNannyFinishContext();
11851  return __pyx_r;
11852  }
11853 
11854  /* "PyClical.pyx":1406
11855  * return clifford(obj).odd()
11856  *
11857  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11858  * """
11859  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11860  */
11861 
11862  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11863  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11864  PyObject *__pyx_r = NULL;
11865  __Pyx_RefNannyDeclarations
11866  PyObject *__pyx_t_1 = NULL;
11867  PyObject *__pyx_t_2 = NULL;
11868  PyObject *__pyx_t_3 = NULL;
11869  __Pyx_RefNannySetupContext("involute", 0);
11870 
11871  /* "PyClical.pyx":1419
11872  * 1-{1}+{1,2}
11873  * """
11874  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11875  *
11876  * cpdef inline reverse(obj):
11877  */
11878  __Pyx_XDECREF(__pyx_r);
11879  __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)
11880  __Pyx_GOTREF(__pyx_t_2);
11881  __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)
11882  __Pyx_GOTREF(__pyx_t_3);
11883  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11884  __pyx_t_2 = NULL;
11885  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11886  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11887  if (likely(__pyx_t_2)) {
11888  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11889  __Pyx_INCREF(__pyx_t_2);
11890  __Pyx_INCREF(function);
11891  __Pyx_DECREF_SET(__pyx_t_3, function);
11892  }
11893  }
11894  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11895  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11896  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11897  __Pyx_GOTREF(__pyx_t_1);
11898  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11899  __pyx_r = __pyx_t_1;
11900  __pyx_t_1 = 0;
11901  goto __pyx_L0;
11902 
11903  /* "PyClical.pyx":1406
11904  * return clifford(obj).odd()
11905  *
11906  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11907  * """
11908  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11909  */
11910 
11911  /* function exit code */
11912  __pyx_L1_error:;
11913  __Pyx_XDECREF(__pyx_t_1);
11914  __Pyx_XDECREF(__pyx_t_2);
11915  __Pyx_XDECREF(__pyx_t_3);
11916  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11917  __pyx_r = 0;
11918  __pyx_L0:;
11919  __Pyx_XGIVEREF(__pyx_r);
11920  __Pyx_RefNannyFinishContext();
11921  return __pyx_r;
11922  }
11923 
11924  /* Python wrapper */
11925  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11926  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 ";
11927  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11928  PyObject *__pyx_r = 0;
11929  __Pyx_RefNannyDeclarations
11930  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11931  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11932 
11933  /* function exit code */
11934  __Pyx_RefNannyFinishContext();
11935  return __pyx_r;
11936  }
11937 
11938  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11939  PyObject *__pyx_r = NULL;
11940  __Pyx_RefNannyDeclarations
11941  PyObject *__pyx_t_1 = NULL;
11942  __Pyx_RefNannySetupContext("involute", 0);
11943  __Pyx_XDECREF(__pyx_r);
11944  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11945  __Pyx_GOTREF(__pyx_t_1);
11946  __pyx_r = __pyx_t_1;
11947  __pyx_t_1 = 0;
11948  goto __pyx_L0;
11949 
11950  /* function exit code */
11951  __pyx_L1_error:;
11952  __Pyx_XDECREF(__pyx_t_1);
11953  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11954  __pyx_r = NULL;
11955  __pyx_L0:;
11956  __Pyx_XGIVEREF(__pyx_r);
11957  __Pyx_RefNannyFinishContext();
11958  return __pyx_r;
11959  }
11960 
11961  /* "PyClical.pyx":1421
11962  * return clifford(obj).involute()
11963  *
11964  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11965  * """
11966  * Reversion, eg. {1}*{2} -> {2}*{1}
11967  */
11968 
11969  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11970  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11971  PyObject *__pyx_r = NULL;
11972  __Pyx_RefNannyDeclarations
11973  PyObject *__pyx_t_1 = NULL;
11974  PyObject *__pyx_t_2 = NULL;
11975  PyObject *__pyx_t_3 = NULL;
11976  __Pyx_RefNannySetupContext("reverse", 0);
11977 
11978  /* "PyClical.pyx":1434
11979  * 1+{1}-{1,2}
11980  * """
11981  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11982  *
11983  * cpdef inline conj(obj):
11984  */
11985  __Pyx_XDECREF(__pyx_r);
11986  __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)
11987  __Pyx_GOTREF(__pyx_t_2);
11988  __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)
11989  __Pyx_GOTREF(__pyx_t_3);
11990  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11991  __pyx_t_2 = NULL;
11992  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11993  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11994  if (likely(__pyx_t_2)) {
11995  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11996  __Pyx_INCREF(__pyx_t_2);
11997  __Pyx_INCREF(function);
11998  __Pyx_DECREF_SET(__pyx_t_3, function);
11999  }
12000  }
12001  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12002  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12003  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12004  __Pyx_GOTREF(__pyx_t_1);
12005  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12006  __pyx_r = __pyx_t_1;
12007  __pyx_t_1 = 0;
12008  goto __pyx_L0;
12009 
12010  /* "PyClical.pyx":1421
12011  * return clifford(obj).involute()
12012  *
12013  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12014  * """
12015  * Reversion, eg. {1}*{2} -> {2}*{1}
12016  */
12017 
12018  /* function exit code */
12019  __pyx_L1_error:;
12020  __Pyx_XDECREF(__pyx_t_1);
12021  __Pyx_XDECREF(__pyx_t_2);
12022  __Pyx_XDECREF(__pyx_t_3);
12023  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12024  __pyx_r = 0;
12025  __pyx_L0:;
12026  __Pyx_XGIVEREF(__pyx_r);
12027  __Pyx_RefNannyFinishContext();
12028  return __pyx_r;
12029  }
12030 
12031  /* Python wrapper */
12032  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12033  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 ";
12034  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12035  PyObject *__pyx_r = 0;
12036  __Pyx_RefNannyDeclarations
12037  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12038  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12039 
12040  /* function exit code */
12041  __Pyx_RefNannyFinishContext();
12042  return __pyx_r;
12043  }
12044 
12045  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12046  PyObject *__pyx_r = NULL;
12047  __Pyx_RefNannyDeclarations
12048  PyObject *__pyx_t_1 = NULL;
12049  __Pyx_RefNannySetupContext("reverse", 0);
12050  __Pyx_XDECREF(__pyx_r);
12051  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12052  __Pyx_GOTREF(__pyx_t_1);
12053  __pyx_r = __pyx_t_1;
12054  __pyx_t_1 = 0;
12055  goto __pyx_L0;
12056 
12057  /* function exit code */
12058  __pyx_L1_error:;
12059  __Pyx_XDECREF(__pyx_t_1);
12060  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12061  __pyx_r = NULL;
12062  __pyx_L0:;
12063  __Pyx_XGIVEREF(__pyx_r);
12064  __Pyx_RefNannyFinishContext();
12065  return __pyx_r;
12066  }
12067 
12068  /* "PyClical.pyx":1436
12069  * return clifford(obj).reverse()
12070  *
12071  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12072  * """
12073  * Conjugation, reverse o involute == involute o reverse.
12074  */
12075 
12076  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12077  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12078  PyObject *__pyx_r = NULL;
12079  __Pyx_RefNannyDeclarations
12080  PyObject *__pyx_t_1 = NULL;
12081  PyObject *__pyx_t_2 = NULL;
12082  PyObject *__pyx_t_3 = NULL;
12083  __Pyx_RefNannySetupContext("conj", 0);
12084 
12085  /* "PyClical.pyx":1449
12086  * 1-{1}-{1,2}
12087  * """
12088  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12089  *
12090  * cpdef inline quad(obj):
12091  */
12092  __Pyx_XDECREF(__pyx_r);
12093  __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)
12094  __Pyx_GOTREF(__pyx_t_2);
12095  __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)
12096  __Pyx_GOTREF(__pyx_t_3);
12097  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12098  __pyx_t_2 = NULL;
12099  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12100  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12101  if (likely(__pyx_t_2)) {
12102  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12103  __Pyx_INCREF(__pyx_t_2);
12104  __Pyx_INCREF(function);
12105  __Pyx_DECREF_SET(__pyx_t_3, function);
12106  }
12107  }
12108  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12109  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12110  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12111  __Pyx_GOTREF(__pyx_t_1);
12112  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12113  __pyx_r = __pyx_t_1;
12114  __pyx_t_1 = 0;
12115  goto __pyx_L0;
12116 
12117  /* "PyClical.pyx":1436
12118  * return clifford(obj).reverse()
12119  *
12120  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12121  * """
12122  * Conjugation, reverse o involute == involute o reverse.
12123  */
12124 
12125  /* function exit code */
12126  __pyx_L1_error:;
12127  __Pyx_XDECREF(__pyx_t_1);
12128  __Pyx_XDECREF(__pyx_t_2);
12129  __Pyx_XDECREF(__pyx_t_3);
12130  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12131  __pyx_r = 0;
12132  __pyx_L0:;
12133  __Pyx_XGIVEREF(__pyx_r);
12134  __Pyx_RefNannyFinishContext();
12135  return __pyx_r;
12136  }
12137 
12138  /* Python wrapper */
12139  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12140  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 ";
12141  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12142  PyObject *__pyx_r = 0;
12143  __Pyx_RefNannyDeclarations
12144  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12145  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12146 
12147  /* function exit code */
12148  __Pyx_RefNannyFinishContext();
12149  return __pyx_r;
12150  }
12151 
12152  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12153  PyObject *__pyx_r = NULL;
12154  __Pyx_RefNannyDeclarations
12155  PyObject *__pyx_t_1 = NULL;
12156  __Pyx_RefNannySetupContext("conj", 0);
12157  __Pyx_XDECREF(__pyx_r);
12158  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12159  __Pyx_GOTREF(__pyx_t_1);
12160  __pyx_r = __pyx_t_1;
12161  __pyx_t_1 = 0;
12162  goto __pyx_L0;
12163 
12164  /* function exit code */
12165  __pyx_L1_error:;
12166  __Pyx_XDECREF(__pyx_t_1);
12167  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12168  __pyx_r = NULL;
12169  __pyx_L0:;
12170  __Pyx_XGIVEREF(__pyx_r);
12171  __Pyx_RefNannyFinishContext();
12172  return __pyx_r;
12173  }
12174 
12175  /* "PyClical.pyx":1451
12176  * return clifford(obj).conj()
12177  *
12178  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12179  * """
12180  * Quadratic form == (rev(x)*x)(0).
12181  */
12182 
12183  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12184  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12185  PyObject *__pyx_r = NULL;
12186  __Pyx_RefNannyDeclarations
12187  PyObject *__pyx_t_1 = NULL;
12188  PyObject *__pyx_t_2 = NULL;
12189  PyObject *__pyx_t_3 = NULL;
12190  __Pyx_RefNannySetupContext("quad", 0);
12191 
12192  /* "PyClical.pyx":1460
12193  * 2.0
12194  * """
12195  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12196  *
12197  * cpdef inline norm(obj):
12198  */
12199  __Pyx_XDECREF(__pyx_r);
12200  __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)
12201  __Pyx_GOTREF(__pyx_t_2);
12202  __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)
12203  __Pyx_GOTREF(__pyx_t_3);
12204  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12205  __pyx_t_2 = NULL;
12206  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12207  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12208  if (likely(__pyx_t_2)) {
12209  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12210  __Pyx_INCREF(__pyx_t_2);
12211  __Pyx_INCREF(function);
12212  __Pyx_DECREF_SET(__pyx_t_3, function);
12213  }
12214  }
12215  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12216  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12217  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12218  __Pyx_GOTREF(__pyx_t_1);
12219  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12220  __pyx_r = __pyx_t_1;
12221  __pyx_t_1 = 0;
12222  goto __pyx_L0;
12223 
12224  /* "PyClical.pyx":1451
12225  * return clifford(obj).conj()
12226  *
12227  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12228  * """
12229  * Quadratic form == (rev(x)*x)(0).
12230  */
12231 
12232  /* function exit code */
12233  __pyx_L1_error:;
12234  __Pyx_XDECREF(__pyx_t_1);
12235  __Pyx_XDECREF(__pyx_t_2);
12236  __Pyx_XDECREF(__pyx_t_3);
12237  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12238  __pyx_r = 0;
12239  __pyx_L0:;
12240  __Pyx_XGIVEREF(__pyx_r);
12241  __Pyx_RefNannyFinishContext();
12242  return __pyx_r;
12243  }
12244 
12245  /* Python wrapper */
12246  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12247  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 ";
12248  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12249  PyObject *__pyx_r = 0;
12250  __Pyx_RefNannyDeclarations
12251  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12252  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12253 
12254  /* function exit code */
12255  __Pyx_RefNannyFinishContext();
12256  return __pyx_r;
12257  }
12258 
12259  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12260  PyObject *__pyx_r = NULL;
12261  __Pyx_RefNannyDeclarations
12262  PyObject *__pyx_t_1 = NULL;
12263  __Pyx_RefNannySetupContext("quad", 0);
12264  __Pyx_XDECREF(__pyx_r);
12265  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12266  __Pyx_GOTREF(__pyx_t_1);
12267  __pyx_r = __pyx_t_1;
12268  __pyx_t_1 = 0;
12269  goto __pyx_L0;
12270 
12271  /* function exit code */
12272  __pyx_L1_error:;
12273  __Pyx_XDECREF(__pyx_t_1);
12274  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12275  __pyx_r = NULL;
12276  __pyx_L0:;
12277  __Pyx_XGIVEREF(__pyx_r);
12278  __Pyx_RefNannyFinishContext();
12279  return __pyx_r;
12280  }
12281 
12282  /* "PyClical.pyx":1462
12283  * return clifford(obj).quad()
12284  *
12285  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12286  * """
12287  * norm == sum of squares of coordinates.
12288  */
12289 
12290  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12291  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12292  PyObject *__pyx_r = NULL;
12293  __Pyx_RefNannyDeclarations
12294  PyObject *__pyx_t_1 = NULL;
12295  PyObject *__pyx_t_2 = NULL;
12296  PyObject *__pyx_t_3 = NULL;
12297  __Pyx_RefNannySetupContext("norm", 0);
12298 
12299  /* "PyClical.pyx":1471
12300  * 4.0
12301  * """
12302  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12303  *
12304  * cpdef inline abs(obj):
12305  */
12306  __Pyx_XDECREF(__pyx_r);
12307  __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)
12308  __Pyx_GOTREF(__pyx_t_2);
12309  __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)
12310  __Pyx_GOTREF(__pyx_t_3);
12311  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12312  __pyx_t_2 = NULL;
12313  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12314  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12315  if (likely(__pyx_t_2)) {
12316  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12317  __Pyx_INCREF(__pyx_t_2);
12318  __Pyx_INCREF(function);
12319  __Pyx_DECREF_SET(__pyx_t_3, function);
12320  }
12321  }
12322  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12323  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12324  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12325  __Pyx_GOTREF(__pyx_t_1);
12326  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12327  __pyx_r = __pyx_t_1;
12328  __pyx_t_1 = 0;
12329  goto __pyx_L0;
12330 
12331  /* "PyClical.pyx":1462
12332  * return clifford(obj).quad()
12333  *
12334  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12335  * """
12336  * norm == sum of squares of coordinates.
12337  */
12338 
12339  /* function exit code */
12340  __pyx_L1_error:;
12341  __Pyx_XDECREF(__pyx_t_1);
12342  __Pyx_XDECREF(__pyx_t_2);
12343  __Pyx_XDECREF(__pyx_t_3);
12344  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12345  __pyx_r = 0;
12346  __pyx_L0:;
12347  __Pyx_XGIVEREF(__pyx_r);
12348  __Pyx_RefNannyFinishContext();
12349  return __pyx_r;
12350  }
12351 
12352  /* Python wrapper */
12353  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12354  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 ";
12355  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12356  PyObject *__pyx_r = 0;
12357  __Pyx_RefNannyDeclarations
12358  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12359  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12360 
12361  /* function exit code */
12362  __Pyx_RefNannyFinishContext();
12363  return __pyx_r;
12364  }
12365 
12366  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12367  PyObject *__pyx_r = NULL;
12368  __Pyx_RefNannyDeclarations
12369  PyObject *__pyx_t_1 = NULL;
12370  __Pyx_RefNannySetupContext("norm", 0);
12371  __Pyx_XDECREF(__pyx_r);
12372  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12373  __Pyx_GOTREF(__pyx_t_1);
12374  __pyx_r = __pyx_t_1;
12375  __pyx_t_1 = 0;
12376  goto __pyx_L0;
12377 
12378  /* function exit code */
12379  __pyx_L1_error:;
12380  __Pyx_XDECREF(__pyx_t_1);
12381  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12382  __pyx_r = NULL;
12383  __pyx_L0:;
12384  __Pyx_XGIVEREF(__pyx_r);
12385  __Pyx_RefNannyFinishContext();
12386  return __pyx_r;
12387  }
12388 
12389  /* "PyClical.pyx":1473
12390  * return clifford(obj).norm()
12391  *
12392  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12393  * """
12394  * Absolute value of multivector: multivector 2-norm.
12395  */
12396 
12397  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12398  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12399  PyObject *__pyx_r = NULL;
12400  __Pyx_RefNannyDeclarations
12401  PyObject *__pyx_t_1 = NULL;
12402  __Pyx_RefNannySetupContext("abs", 0);
12403 
12404  /* "PyClical.pyx":1480
12405  * 2.0
12406  * """
12407  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12408  *
12409  * cpdef inline max_abs(obj):
12410  */
12411  __Pyx_XDECREF(__pyx_r);
12412  __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)
12413  __Pyx_GOTREF(__pyx_t_1);
12414  __pyx_r = __pyx_t_1;
12415  __pyx_t_1 = 0;
12416  goto __pyx_L0;
12417 
12418  /* "PyClical.pyx":1473
12419  * return clifford(obj).norm()
12420  *
12421  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12422  * """
12423  * Absolute value of multivector: multivector 2-norm.
12424  */
12425 
12426  /* function exit code */
12427  __pyx_L1_error:;
12428  __Pyx_XDECREF(__pyx_t_1);
12429  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12430  __pyx_r = 0;
12431  __pyx_L0:;
12432  __Pyx_XGIVEREF(__pyx_r);
12433  __Pyx_RefNannyFinishContext();
12434  return __pyx_r;
12435  }
12436 
12437  /* Python wrapper */
12438  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12439  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 ";
12440  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12441  PyObject *__pyx_r = 0;
12442  __Pyx_RefNannyDeclarations
12443  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12444  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12445 
12446  /* function exit code */
12447  __Pyx_RefNannyFinishContext();
12448  return __pyx_r;
12449  }
12450 
12451  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12452  PyObject *__pyx_r = NULL;
12453  __Pyx_RefNannyDeclarations
12454  PyObject *__pyx_t_1 = NULL;
12455  __Pyx_RefNannySetupContext("abs", 0);
12456  __Pyx_XDECREF(__pyx_r);
12457  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12458  __Pyx_GOTREF(__pyx_t_1);
12459  __pyx_r = __pyx_t_1;
12460  __pyx_t_1 = 0;
12461  goto __pyx_L0;
12462 
12463  /* function exit code */
12464  __pyx_L1_error:;
12465  __Pyx_XDECREF(__pyx_t_1);
12466  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12467  __pyx_r = NULL;
12468  __pyx_L0:;
12469  __Pyx_XGIVEREF(__pyx_r);
12470  __Pyx_RefNannyFinishContext();
12471  return __pyx_r;
12472  }
12473 
12474  /* "PyClical.pyx":1482
12475  * return glucat.abs(toClifford(obj))
12476  *
12477  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12478  * """
12479  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12480  */
12481 
12482  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12483  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12484  PyObject *__pyx_r = NULL;
12485  __Pyx_RefNannyDeclarations
12486  PyObject *__pyx_t_1 = NULL;
12487  __Pyx_RefNannySetupContext("max_abs", 0);
12488 
12489  /* "PyClical.pyx":1492
12490  *
12491  * """
12492  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12493  *
12494  * cpdef inline pow(obj, m):
12495  */
12496  __Pyx_XDECREF(__pyx_r);
12497  __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)
12498  __Pyx_GOTREF(__pyx_t_1);
12499  __pyx_r = __pyx_t_1;
12500  __pyx_t_1 = 0;
12501  goto __pyx_L0;
12502 
12503  /* "PyClical.pyx":1482
12504  * return glucat.abs(toClifford(obj))
12505  *
12506  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12507  * """
12508  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12509  */
12510 
12511  /* function exit code */
12512  __pyx_L1_error:;
12513  __Pyx_XDECREF(__pyx_t_1);
12514  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12515  __pyx_r = 0;
12516  __pyx_L0:;
12517  __Pyx_XGIVEREF(__pyx_r);
12518  __Pyx_RefNannyFinishContext();
12519  return __pyx_r;
12520  }
12521 
12522  /* Python wrapper */
12523  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12524  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 ";
12525  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12526  PyObject *__pyx_r = 0;
12527  __Pyx_RefNannyDeclarations
12528  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12529  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12530 
12531  /* function exit code */
12532  __Pyx_RefNannyFinishContext();
12533  return __pyx_r;
12534  }
12535 
12536  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12537  PyObject *__pyx_r = NULL;
12538  __Pyx_RefNannyDeclarations
12539  PyObject *__pyx_t_1 = NULL;
12540  __Pyx_RefNannySetupContext("max_abs", 0);
12541  __Pyx_XDECREF(__pyx_r);
12542  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12543  __Pyx_GOTREF(__pyx_t_1);
12544  __pyx_r = __pyx_t_1;
12545  __pyx_t_1 = 0;
12546  goto __pyx_L0;
12547 
12548  /* function exit code */
12549  __pyx_L1_error:;
12550  __Pyx_XDECREF(__pyx_t_1);
12551  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12552  __pyx_r = NULL;
12553  __pyx_L0:;
12554  __Pyx_XGIVEREF(__pyx_r);
12555  __Pyx_RefNannyFinishContext();
12556  return __pyx_r;
12557  }
12558 
12559  /* "PyClical.pyx":1494
12560  * return glucat.max_abs(toClifford(obj))
12561  *
12562  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12563  * """
12564  * Integer power of multivector: obj to the m.
12565  */
12566 
12567  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12568  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12569  PyObject *__pyx_r = NULL;
12570  __Pyx_RefNannyDeclarations
12571  PyObject *__pyx_t_1 = NULL;
12572  PyObject *__pyx_t_2 = NULL;
12573  PyObject *__pyx_t_3 = NULL;
12574  PyObject *__pyx_t_4 = NULL;
12575  PyObject *__pyx_t_5 = NULL;
12576  PyObject *__pyx_t_6 = NULL;
12577  int __pyx_t_7;
12578  PyObject *__pyx_t_8 = NULL;
12579  PyObject *__pyx_t_9 = NULL;
12580  PyObject *__pyx_t_10 = NULL;
12581  __Pyx_RefNannySetupContext("pow", 0);
12582 
12583  /* "PyClical.pyx":1513
12584  * 1
12585  * """
12586  * try: # <<<<<<<<<<<<<<
12587  * math.pow(obj, m)
12588  * except:
12589  */
12590  {
12591  __Pyx_PyThreadState_declare
12592  __Pyx_PyThreadState_assign
12593  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12594  __Pyx_XGOTREF(__pyx_t_1);
12595  __Pyx_XGOTREF(__pyx_t_2);
12596  __Pyx_XGOTREF(__pyx_t_3);
12597  /*try:*/ {
12598 
12599  /* "PyClical.pyx":1514
12600  * """
12601  * try:
12602  * math.pow(obj, m) # <<<<<<<<<<<<<<
12603  * except:
12604  * return clifford(obj).pow(m)
12605  */
12606  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12607  __Pyx_GOTREF(__pyx_t_5);
12608  __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)
12609  __Pyx_GOTREF(__pyx_t_6);
12610  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12611  __pyx_t_5 = NULL;
12612  __pyx_t_7 = 0;
12613  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12614  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12615  if (likely(__pyx_t_5)) {
12616  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12617  __Pyx_INCREF(__pyx_t_5);
12618  __Pyx_INCREF(function);
12619  __Pyx_DECREF_SET(__pyx_t_6, function);
12620  __pyx_t_7 = 1;
12621  }
12622  }
12623  #if CYTHON_FAST_PYCALL
12624  if (PyFunction_Check(__pyx_t_6)) {
12625  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12626  __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)
12627  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12628  __Pyx_GOTREF(__pyx_t_4);
12629  } else
12630  #endif
12631  #if CYTHON_FAST_PYCCALL
12632  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12633  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12634  __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)
12635  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12636  __Pyx_GOTREF(__pyx_t_4);
12637  } else
12638  #endif
12639  {
12640  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12641  __Pyx_GOTREF(__pyx_t_8);
12642  if (__pyx_t_5) {
12643  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12644  }
12645  __Pyx_INCREF(__pyx_v_obj);
12646  __Pyx_GIVEREF(__pyx_v_obj);
12647  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12648  __Pyx_INCREF(__pyx_v_m);
12649  __Pyx_GIVEREF(__pyx_v_m);
12650  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12651  __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)
12652  __Pyx_GOTREF(__pyx_t_4);
12653  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12654  }
12655  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12656  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12657 
12658  /* "PyClical.pyx":1513
12659  * 1
12660  * """
12661  * try: # <<<<<<<<<<<<<<
12662  * math.pow(obj, m)
12663  * except:
12664  */
12665  }
12666  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12667  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12668  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12669  goto __pyx_L8_try_end;
12670  __pyx_L3_error:;
12671  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12672  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12673  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12674  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12675 
12676  /* "PyClical.pyx":1515
12677  * try:
12678  * math.pow(obj, m)
12679  * except: # <<<<<<<<<<<<<<
12680  * return clifford(obj).pow(m)
12681  *
12682  */
12683  /*except:*/ {
12684  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12685  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12686  __Pyx_GOTREF(__pyx_t_4);
12687  __Pyx_GOTREF(__pyx_t_6);
12688  __Pyx_GOTREF(__pyx_t_8);
12689 
12690  /* "PyClical.pyx":1516
12691  * math.pow(obj, m)
12692  * except:
12693  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12694  *
12695  * cpdef inline outer_pow(obj, m):
12696  */
12697  __Pyx_XDECREF(__pyx_r);
12698  __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)
12699  __Pyx_GOTREF(__pyx_t_9);
12700  __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)
12701  __Pyx_GOTREF(__pyx_t_10);
12702  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12703  __pyx_t_9 = NULL;
12704  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12705  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12706  if (likely(__pyx_t_9)) {
12707  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12708  __Pyx_INCREF(__pyx_t_9);
12709  __Pyx_INCREF(function);
12710  __Pyx_DECREF_SET(__pyx_t_10, function);
12711  }
12712  }
12713  __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);
12714  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12715  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12716  __Pyx_GOTREF(__pyx_t_5);
12717  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12718  __pyx_r = __pyx_t_5;
12719  __pyx_t_5 = 0;
12720  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12721  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12722  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12723  goto __pyx_L6_except_return;
12724  }
12725  __pyx_L5_except_error:;
12726 
12727  /* "PyClical.pyx":1513
12728  * 1
12729  * """
12730  * try: # <<<<<<<<<<<<<<
12731  * math.pow(obj, m)
12732  * except:
12733  */
12734  __Pyx_XGIVEREF(__pyx_t_1);
12735  __Pyx_XGIVEREF(__pyx_t_2);
12736  __Pyx_XGIVEREF(__pyx_t_3);
12737  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12738  goto __pyx_L1_error;
12739  __pyx_L6_except_return:;
12740  __Pyx_XGIVEREF(__pyx_t_1);
12741  __Pyx_XGIVEREF(__pyx_t_2);
12742  __Pyx_XGIVEREF(__pyx_t_3);
12743  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12744  goto __pyx_L0;
12745  __pyx_L8_try_end:;
12746  }
12747 
12748  /* "PyClical.pyx":1494
12749  * return glucat.max_abs(toClifford(obj))
12750  *
12751  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12752  * """
12753  * Integer power of multivector: obj to the m.
12754  */
12755 
12756  /* function exit code */
12757  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12758  goto __pyx_L0;
12759  __pyx_L1_error:;
12760  __Pyx_XDECREF(__pyx_t_4);
12761  __Pyx_XDECREF(__pyx_t_5);
12762  __Pyx_XDECREF(__pyx_t_6);
12763  __Pyx_XDECREF(__pyx_t_8);
12764  __Pyx_XDECREF(__pyx_t_9);
12765  __Pyx_XDECREF(__pyx_t_10);
12766  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12767  __pyx_r = 0;
12768  __pyx_L0:;
12769  __Pyx_XGIVEREF(__pyx_r);
12770  __Pyx_RefNannyFinishContext();
12771  return __pyx_r;
12772  }
12773 
12774  /* Python wrapper */
12775  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12776  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 ";
12777  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12778  PyObject *__pyx_v_obj = 0;
12779  PyObject *__pyx_v_m = 0;
12780  PyObject *__pyx_r = 0;
12781  __Pyx_RefNannyDeclarations
12782  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12783  {
12784  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12785  PyObject* values[2] = {0,0};
12786  if (unlikely(__pyx_kwds)) {
12787  Py_ssize_t kw_args;
12788  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12789  switch (pos_args) {
12790  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12791  CYTHON_FALLTHROUGH;
12792  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12793  CYTHON_FALLTHROUGH;
12794  case 0: break;
12795  default: goto __pyx_L5_argtuple_error;
12796  }
12797  kw_args = PyDict_Size(__pyx_kwds);
12798  switch (pos_args) {
12799  case 0:
12800  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12801  else goto __pyx_L5_argtuple_error;
12802  CYTHON_FALLTHROUGH;
12803  case 1:
12804  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12805  else {
12806  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12807  }
12808  }
12809  if (unlikely(kw_args > 0)) {
12810  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12811  }
12812  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12813  goto __pyx_L5_argtuple_error;
12814  } else {
12815  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12816  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12817  }
12818  __pyx_v_obj = values[0];
12819  __pyx_v_m = values[1];
12820  }
12821  goto __pyx_L4_argument_unpacking_done;
12822  __pyx_L5_argtuple_error:;
12823  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12824  __pyx_L3_error:;
12825  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12826  __Pyx_RefNannyFinishContext();
12827  return NULL;
12828  __pyx_L4_argument_unpacking_done:;
12829  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12830 
12831  /* function exit code */
12832  __Pyx_RefNannyFinishContext();
12833  return __pyx_r;
12834  }
12835 
12836  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12837  PyObject *__pyx_r = NULL;
12838  __Pyx_RefNannyDeclarations
12839  PyObject *__pyx_t_1 = NULL;
12840  __Pyx_RefNannySetupContext("pow", 0);
12841  __Pyx_XDECREF(__pyx_r);
12842  __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)
12843  __Pyx_GOTREF(__pyx_t_1);
12844  __pyx_r = __pyx_t_1;
12845  __pyx_t_1 = 0;
12846  goto __pyx_L0;
12847 
12848  /* function exit code */
12849  __pyx_L1_error:;
12850  __Pyx_XDECREF(__pyx_t_1);
12851  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12852  __pyx_r = NULL;
12853  __pyx_L0:;
12854  __Pyx_XGIVEREF(__pyx_r);
12855  __Pyx_RefNannyFinishContext();
12856  return __pyx_r;
12857  }
12858 
12859  /* "PyClical.pyx":1518
12860  * return clifford(obj).pow(m)
12861  *
12862  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12863  * """
12864  * Outer product power of multivector.
12865  */
12866 
12867  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12868  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12869  PyObject *__pyx_r = NULL;
12870  __Pyx_RefNannyDeclarations
12871  PyObject *__pyx_t_1 = NULL;
12872  PyObject *__pyx_t_2 = NULL;
12873  PyObject *__pyx_t_3 = NULL;
12874  __Pyx_RefNannySetupContext("outer_pow", 0);
12875 
12876  /* "PyClical.pyx":1525
12877  * 1+3{1}+3{1,2}
12878  * """
12879  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12880  *
12881  * cpdef inline complexifier(obj):
12882  */
12883  __Pyx_XDECREF(__pyx_r);
12884  __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)
12885  __Pyx_GOTREF(__pyx_t_2);
12886  __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)
12887  __Pyx_GOTREF(__pyx_t_3);
12888  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12889  __pyx_t_2 = NULL;
12890  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12891  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12892  if (likely(__pyx_t_2)) {
12893  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12894  __Pyx_INCREF(__pyx_t_2);
12895  __Pyx_INCREF(function);
12896  __Pyx_DECREF_SET(__pyx_t_3, function);
12897  }
12898  }
12899  __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);
12900  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12901  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12902  __Pyx_GOTREF(__pyx_t_1);
12903  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12904  __pyx_r = __pyx_t_1;
12905  __pyx_t_1 = 0;
12906  goto __pyx_L0;
12907 
12908  /* "PyClical.pyx":1518
12909  * return clifford(obj).pow(m)
12910  *
12911  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12912  * """
12913  * Outer product power of multivector.
12914  */
12915 
12916  /* function exit code */
12917  __pyx_L1_error:;
12918  __Pyx_XDECREF(__pyx_t_1);
12919  __Pyx_XDECREF(__pyx_t_2);
12920  __Pyx_XDECREF(__pyx_t_3);
12921  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12922  __pyx_r = 0;
12923  __pyx_L0:;
12924  __Pyx_XGIVEREF(__pyx_r);
12925  __Pyx_RefNannyFinishContext();
12926  return __pyx_r;
12927  }
12928 
12929  /* Python wrapper */
12930  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12931  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 ";
12932  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12933  PyObject *__pyx_v_obj = 0;
12934  PyObject *__pyx_v_m = 0;
12935  PyObject *__pyx_r = 0;
12936  __Pyx_RefNannyDeclarations
12937  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12938  {
12939  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12940  PyObject* values[2] = {0,0};
12941  if (unlikely(__pyx_kwds)) {
12942  Py_ssize_t kw_args;
12943  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12944  switch (pos_args) {
12945  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12946  CYTHON_FALLTHROUGH;
12947  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12948  CYTHON_FALLTHROUGH;
12949  case 0: break;
12950  default: goto __pyx_L5_argtuple_error;
12951  }
12952  kw_args = PyDict_Size(__pyx_kwds);
12953  switch (pos_args) {
12954  case 0:
12955  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12956  else goto __pyx_L5_argtuple_error;
12957  CYTHON_FALLTHROUGH;
12958  case 1:
12959  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12960  else {
12961  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12962  }
12963  }
12964  if (unlikely(kw_args > 0)) {
12965  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12966  }
12967  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12968  goto __pyx_L5_argtuple_error;
12969  } else {
12970  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12971  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12972  }
12973  __pyx_v_obj = values[0];
12974  __pyx_v_m = values[1];
12975  }
12976  goto __pyx_L4_argument_unpacking_done;
12977  __pyx_L5_argtuple_error:;
12978  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
12979  __pyx_L3_error:;
12980  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12981  __Pyx_RefNannyFinishContext();
12982  return NULL;
12983  __pyx_L4_argument_unpacking_done:;
12984  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12985 
12986  /* function exit code */
12987  __Pyx_RefNannyFinishContext();
12988  return __pyx_r;
12989  }
12990 
12991  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12992  PyObject *__pyx_r = NULL;
12993  __Pyx_RefNannyDeclarations
12994  PyObject *__pyx_t_1 = NULL;
12995  __Pyx_RefNannySetupContext("outer_pow", 0);
12996  __Pyx_XDECREF(__pyx_r);
12997  __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)
12998  __Pyx_GOTREF(__pyx_t_1);
12999  __pyx_r = __pyx_t_1;
13000  __pyx_t_1 = 0;
13001  goto __pyx_L0;
13002 
13003  /* function exit code */
13004  __pyx_L1_error:;
13005  __Pyx_XDECREF(__pyx_t_1);
13006  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13007  __pyx_r = NULL;
13008  __pyx_L0:;
13009  __Pyx_XGIVEREF(__pyx_r);
13010  __Pyx_RefNannyFinishContext();
13011  return __pyx_r;
13012  }
13013 
13014  /* "PyClical.pyx":1527
13015  * return clifford(obj).outer_pow(m)
13016  *
13017  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13018  * """
13019  * Square root of -1 which commutes with all members of the frame of the given multivector.
13020  */
13021 
13022  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13023  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13024  PyObject *__pyx_r = NULL;
13025  __Pyx_RefNannyDeclarations
13026  PyObject *__pyx_t_1 = NULL;
13027  PyObject *__pyx_t_2 = NULL;
13028  __Pyx_RefNannySetupContext("complexifier", 0);
13029 
13030  /* "PyClical.pyx":1540
13031  * {-1}
13032  * """
13033  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13034  *
13035  * cpdef inline sqrt(obj, i = None):
13036  */
13037  __Pyx_XDECREF(__pyx_r);
13038  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13039  __Pyx_GOTREF(__pyx_t_1);
13040  __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)
13041  __Pyx_GOTREF(__pyx_t_2);
13042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13043  __pyx_r = __pyx_t_2;
13044  __pyx_t_2 = 0;
13045  goto __pyx_L0;
13046 
13047  /* "PyClical.pyx":1527
13048  * return clifford(obj).outer_pow(m)
13049  *
13050  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13051  * """
13052  * Square root of -1 which commutes with all members of the frame of the given multivector.
13053  */
13054 
13055  /* function exit code */
13056  __pyx_L1_error:;
13057  __Pyx_XDECREF(__pyx_t_1);
13058  __Pyx_XDECREF(__pyx_t_2);
13059  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13060  __pyx_r = 0;
13061  __pyx_L0:;
13062  __Pyx_XGIVEREF(__pyx_r);
13063  __Pyx_RefNannyFinishContext();
13064  return __pyx_r;
13065  }
13066 
13067  /* Python wrapper */
13068  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13069  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 ";
13070  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13071  PyObject *__pyx_r = 0;
13072  __Pyx_RefNannyDeclarations
13073  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13074  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13075 
13076  /* function exit code */
13077  __Pyx_RefNannyFinishContext();
13078  return __pyx_r;
13079  }
13080 
13081  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13082  PyObject *__pyx_r = NULL;
13083  __Pyx_RefNannyDeclarations
13084  PyObject *__pyx_t_1 = NULL;
13085  __Pyx_RefNannySetupContext("complexifier", 0);
13086  __Pyx_XDECREF(__pyx_r);
13087  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13088  __Pyx_GOTREF(__pyx_t_1);
13089  __pyx_r = __pyx_t_1;
13090  __pyx_t_1 = 0;
13091  goto __pyx_L0;
13092 
13093  /* function exit code */
13094  __pyx_L1_error:;
13095  __Pyx_XDECREF(__pyx_t_1);
13096  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13097  __pyx_r = NULL;
13098  __pyx_L0:;
13099  __Pyx_XGIVEREF(__pyx_r);
13100  __Pyx_RefNannyFinishContext();
13101  return __pyx_r;
13102  }
13103 
13104  /* "PyClical.pyx":1542
13105  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13106  *
13107  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13108  * """
13109  * Square root of multivector with optional complexifier.
13110  */
13111 
13112  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13113  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) {
13114  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13115  PyObject *__pyx_r = NULL;
13116  __Pyx_RefNannyDeclarations
13117  int __pyx_t_1;
13118  int __pyx_t_2;
13119  PyObject *__pyx_t_3 = NULL;
13120  Clifford __pyx_t_4;
13121  PyObject *__pyx_t_5 = NULL;
13122  PyObject *__pyx_t_6 = NULL;
13123  PyObject *__pyx_t_7 = NULL;
13124  PyObject *__pyx_t_8 = NULL;
13125  PyObject *__pyx_t_9 = NULL;
13126  PyObject *__pyx_t_10 = NULL;
13127  PyObject *__pyx_t_11 = NULL;
13128  __Pyx_RefNannySetupContext("sqrt", 0);
13129  if (__pyx_optional_args) {
13130  if (__pyx_optional_args->__pyx_n > 0) {
13131  __pyx_v_i = __pyx_optional_args->i;
13132  }
13133  }
13134 
13135  /* "PyClical.pyx":1557
13136  * -1
13137  * """
13138  * if not (i is None): # <<<<<<<<<<<<<<
13139  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13140  * else:
13141  */
13142  __pyx_t_1 = (__pyx_v_i != Py_None);
13143  __pyx_t_2 = (__pyx_t_1 != 0);
13144  if (__pyx_t_2) {
13145 
13146  /* "PyClical.pyx":1558
13147  * """
13148  * if not (i is None):
13149  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13150  * else:
13151  * try:
13152  */
13153  __Pyx_XDECREF(__pyx_r);
13154  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13155  __Pyx_GOTREF(__pyx_t_3);
13156  try {
13157  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13158  } catch(...) {
13159  __Pyx_CppExn2PyErr();
13160  __PYX_ERR(0, 1558, __pyx_L1_error)
13161  }
13162  __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)
13163  __Pyx_GOTREF(__pyx_t_5);
13164  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13165  __pyx_r = __pyx_t_5;
13166  __pyx_t_5 = 0;
13167  goto __pyx_L0;
13168 
13169  /* "PyClical.pyx":1557
13170  * -1
13171  * """
13172  * if not (i is None): # <<<<<<<<<<<<<<
13173  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13174  * else:
13175  */
13176  }
13177 
13178  /* "PyClical.pyx":1560
13179  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13180  * else:
13181  * try: # <<<<<<<<<<<<<<
13182  * return math.sqrt(obj)
13183  * except:
13184  */
13185  /*else*/ {
13186  {
13187  __Pyx_PyThreadState_declare
13188  __Pyx_PyThreadState_assign
13189  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13190  __Pyx_XGOTREF(__pyx_t_6);
13191  __Pyx_XGOTREF(__pyx_t_7);
13192  __Pyx_XGOTREF(__pyx_t_8);
13193  /*try:*/ {
13194 
13195  /* "PyClical.pyx":1561
13196  * else:
13197  * try:
13198  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13199  * except:
13200  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13201  */
13202  __Pyx_XDECREF(__pyx_r);
13203  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13204  __Pyx_GOTREF(__pyx_t_3);
13205  __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)
13206  __Pyx_GOTREF(__pyx_t_9);
13207  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13208  __pyx_t_3 = NULL;
13209  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13210  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13211  if (likely(__pyx_t_3)) {
13212  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13213  __Pyx_INCREF(__pyx_t_3);
13214  __Pyx_INCREF(function);
13215  __Pyx_DECREF_SET(__pyx_t_9, function);
13216  }
13217  }
13218  __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);
13219  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13220  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13221  __Pyx_GOTREF(__pyx_t_5);
13222  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13223  __pyx_r = __pyx_t_5;
13224  __pyx_t_5 = 0;
13225  goto __pyx_L8_try_return;
13226 
13227  /* "PyClical.pyx":1560
13228  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13229  * else:
13230  * try: # <<<<<<<<<<<<<<
13231  * return math.sqrt(obj)
13232  * except:
13233  */
13234  }
13235  __pyx_L4_error:;
13236  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13237  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13238  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13239 
13240  /* "PyClical.pyx":1562
13241  * try:
13242  * return math.sqrt(obj)
13243  * except: # <<<<<<<<<<<<<<
13244  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13245  *
13246  */
13247  /*except:*/ {
13248  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13249  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13250  __Pyx_GOTREF(__pyx_t_5);
13251  __Pyx_GOTREF(__pyx_t_9);
13252  __Pyx_GOTREF(__pyx_t_3);
13253 
13254  /* "PyClical.pyx":1563
13255  * return math.sqrt(obj)
13256  * except:
13257  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13258  *
13259  * cpdef inline exp(obj):
13260  */
13261  __Pyx_XDECREF(__pyx_r);
13262  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13263  __Pyx_GOTREF(__pyx_t_10);
13264  __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)
13265  __Pyx_GOTREF(__pyx_t_11);
13266  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13267  __pyx_r = __pyx_t_11;
13268  __pyx_t_11 = 0;
13269  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13270  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13271  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13272  goto __pyx_L7_except_return;
13273  }
13274  __pyx_L6_except_error:;
13275 
13276  /* "PyClical.pyx":1560
13277  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13278  * else:
13279  * try: # <<<<<<<<<<<<<<
13280  * return math.sqrt(obj)
13281  * except:
13282  */
13283  __Pyx_XGIVEREF(__pyx_t_6);
13284  __Pyx_XGIVEREF(__pyx_t_7);
13285  __Pyx_XGIVEREF(__pyx_t_8);
13286  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13287  goto __pyx_L1_error;
13288  __pyx_L8_try_return:;
13289  __Pyx_XGIVEREF(__pyx_t_6);
13290  __Pyx_XGIVEREF(__pyx_t_7);
13291  __Pyx_XGIVEREF(__pyx_t_8);
13292  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13293  goto __pyx_L0;
13294  __pyx_L7_except_return:;
13295  __Pyx_XGIVEREF(__pyx_t_6);
13296  __Pyx_XGIVEREF(__pyx_t_7);
13297  __Pyx_XGIVEREF(__pyx_t_8);
13298  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13299  goto __pyx_L0;
13300  }
13301  }
13302 
13303  /* "PyClical.pyx":1542
13304  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13305  *
13306  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13307  * """
13308  * Square root of multivector with optional complexifier.
13309  */
13310 
13311  /* function exit code */
13312  __pyx_L1_error:;
13313  __Pyx_XDECREF(__pyx_t_3);
13314  __Pyx_XDECREF(__pyx_t_5);
13315  __Pyx_XDECREF(__pyx_t_9);
13316  __Pyx_XDECREF(__pyx_t_10);
13317  __Pyx_XDECREF(__pyx_t_11);
13318  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13319  __pyx_r = 0;
13320  __pyx_L0:;
13321  __Pyx_XGIVEREF(__pyx_r);
13322  __Pyx_RefNannyFinishContext();
13323  return __pyx_r;
13324  }
13325 
13326  /* Python wrapper */
13327  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13328  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 ";
13329  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13330  PyObject *__pyx_v_obj = 0;
13331  PyObject *__pyx_v_i = 0;
13332  PyObject *__pyx_r = 0;
13333  __Pyx_RefNannyDeclarations
13334  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13335  {
13336  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13337  PyObject* values[2] = {0,0};
13338  values[1] = ((PyObject *)Py_None);
13339  if (unlikely(__pyx_kwds)) {
13340  Py_ssize_t kw_args;
13341  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13342  switch (pos_args) {
13343  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13344  CYTHON_FALLTHROUGH;
13345  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13346  CYTHON_FALLTHROUGH;
13347  case 0: break;
13348  default: goto __pyx_L5_argtuple_error;
13349  }
13350  kw_args = PyDict_Size(__pyx_kwds);
13351  switch (pos_args) {
13352  case 0:
13353  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13354  else goto __pyx_L5_argtuple_error;
13355  CYTHON_FALLTHROUGH;
13356  case 1:
13357  if (kw_args > 0) {
13358  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13359  if (value) { values[1] = value; kw_args--; }
13360  }
13361  }
13362  if (unlikely(kw_args > 0)) {
13363  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13364  }
13365  } else {
13366  switch (PyTuple_GET_SIZE(__pyx_args)) {
13367  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13368  CYTHON_FALLTHROUGH;
13369  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13370  break;
13371  default: goto __pyx_L5_argtuple_error;
13372  }
13373  }
13374  __pyx_v_obj = values[0];
13375  __pyx_v_i = values[1];
13376  }
13377  goto __pyx_L4_argument_unpacking_done;
13378  __pyx_L5_argtuple_error:;
13379  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13380  __pyx_L3_error:;
13381  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13382  __Pyx_RefNannyFinishContext();
13383  return NULL;
13384  __pyx_L4_argument_unpacking_done:;
13385  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13386 
13387  /* function exit code */
13388  __Pyx_RefNannyFinishContext();
13389  return __pyx_r;
13390  }
13391 
13392  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13393  PyObject *__pyx_r = NULL;
13394  __Pyx_RefNannyDeclarations
13395  PyObject *__pyx_t_1 = NULL;
13396  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13397  __Pyx_RefNannySetupContext("sqrt", 0);
13398  __Pyx_XDECREF(__pyx_r);
13399  __pyx_t_2.__pyx_n = 1;
13400  __pyx_t_2.i = __pyx_v_i;
13401  __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)
13402  __Pyx_GOTREF(__pyx_t_1);
13403  __pyx_r = __pyx_t_1;
13404  __pyx_t_1 = 0;
13405  goto __pyx_L0;
13406 
13407  /* function exit code */
13408  __pyx_L1_error:;
13409  __Pyx_XDECREF(__pyx_t_1);
13410  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13411  __pyx_r = NULL;
13412  __pyx_L0:;
13413  __Pyx_XGIVEREF(__pyx_r);
13414  __Pyx_RefNannyFinishContext();
13415  return __pyx_r;
13416  }
13417 
13418  /* "PyClical.pyx":1565
13419  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13420  *
13421  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13422  * """
13423  * Exponential of multivector.
13424  */
13425 
13426  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13427  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13428  PyObject *__pyx_r = NULL;
13429  __Pyx_RefNannyDeclarations
13430  PyObject *__pyx_t_1 = NULL;
13431  PyObject *__pyx_t_2 = NULL;
13432  PyObject *__pyx_t_3 = NULL;
13433  PyObject *__pyx_t_4 = NULL;
13434  PyObject *__pyx_t_5 = NULL;
13435  PyObject *__pyx_t_6 = NULL;
13436  PyObject *__pyx_t_7 = NULL;
13437  PyObject *__pyx_t_8 = NULL;
13438  __Pyx_RefNannySetupContext("exp", 0);
13439 
13440  /* "PyClical.pyx":1574
13441  * {1,2}
13442  * """
13443  * try: # <<<<<<<<<<<<<<
13444  * return math.exp(obj)
13445  * except:
13446  */
13447  {
13448  __Pyx_PyThreadState_declare
13449  __Pyx_PyThreadState_assign
13450  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13451  __Pyx_XGOTREF(__pyx_t_1);
13452  __Pyx_XGOTREF(__pyx_t_2);
13453  __Pyx_XGOTREF(__pyx_t_3);
13454  /*try:*/ {
13455 
13456  /* "PyClical.pyx":1575
13457  * """
13458  * try:
13459  * return math.exp(obj) # <<<<<<<<<<<<<<
13460  * except:
13461  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13462  */
13463  __Pyx_XDECREF(__pyx_r);
13464  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13465  __Pyx_GOTREF(__pyx_t_5);
13466  __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)
13467  __Pyx_GOTREF(__pyx_t_6);
13468  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13469  __pyx_t_5 = NULL;
13470  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13471  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13472  if (likely(__pyx_t_5)) {
13473  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13474  __Pyx_INCREF(__pyx_t_5);
13475  __Pyx_INCREF(function);
13476  __Pyx_DECREF_SET(__pyx_t_6, function);
13477  }
13478  }
13479  __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);
13480  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13481  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13482  __Pyx_GOTREF(__pyx_t_4);
13483  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13484  __pyx_r = __pyx_t_4;
13485  __pyx_t_4 = 0;
13486  goto __pyx_L7_try_return;
13487 
13488  /* "PyClical.pyx":1574
13489  * {1,2}
13490  * """
13491  * try: # <<<<<<<<<<<<<<
13492  * return math.exp(obj)
13493  * except:
13494  */
13495  }
13496  __pyx_L3_error:;
13497  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13498  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13499  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13500 
13501  /* "PyClical.pyx":1576
13502  * try:
13503  * return math.exp(obj)
13504  * except: # <<<<<<<<<<<<<<
13505  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13506  *
13507  */
13508  /*except:*/ {
13509  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13510  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13511  __Pyx_GOTREF(__pyx_t_4);
13512  __Pyx_GOTREF(__pyx_t_6);
13513  __Pyx_GOTREF(__pyx_t_5);
13514 
13515  /* "PyClical.pyx":1577
13516  * return math.exp(obj)
13517  * except:
13518  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13519  *
13520  * cpdef inline log(obj,i = None):
13521  */
13522  __Pyx_XDECREF(__pyx_r);
13523  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13524  __Pyx_GOTREF(__pyx_t_7);
13525  __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)
13526  __Pyx_GOTREF(__pyx_t_8);
13527  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13528  __pyx_r = __pyx_t_8;
13529  __pyx_t_8 = 0;
13530  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13531  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13532  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13533  goto __pyx_L6_except_return;
13534  }
13535  __pyx_L5_except_error:;
13536 
13537  /* "PyClical.pyx":1574
13538  * {1,2}
13539  * """
13540  * try: # <<<<<<<<<<<<<<
13541  * return math.exp(obj)
13542  * except:
13543  */
13544  __Pyx_XGIVEREF(__pyx_t_1);
13545  __Pyx_XGIVEREF(__pyx_t_2);
13546  __Pyx_XGIVEREF(__pyx_t_3);
13547  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13548  goto __pyx_L1_error;
13549  __pyx_L7_try_return:;
13550  __Pyx_XGIVEREF(__pyx_t_1);
13551  __Pyx_XGIVEREF(__pyx_t_2);
13552  __Pyx_XGIVEREF(__pyx_t_3);
13553  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13554  goto __pyx_L0;
13555  __pyx_L6_except_return:;
13556  __Pyx_XGIVEREF(__pyx_t_1);
13557  __Pyx_XGIVEREF(__pyx_t_2);
13558  __Pyx_XGIVEREF(__pyx_t_3);
13559  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13560  goto __pyx_L0;
13561  }
13562 
13563  /* "PyClical.pyx":1565
13564  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13565  *
13566  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13567  * """
13568  * Exponential of multivector.
13569  */
13570 
13571  /* function exit code */
13572  __pyx_L1_error:;
13573  __Pyx_XDECREF(__pyx_t_4);
13574  __Pyx_XDECREF(__pyx_t_5);
13575  __Pyx_XDECREF(__pyx_t_6);
13576  __Pyx_XDECREF(__pyx_t_7);
13577  __Pyx_XDECREF(__pyx_t_8);
13578  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13579  __pyx_r = 0;
13580  __pyx_L0:;
13581  __Pyx_XGIVEREF(__pyx_r);
13582  __Pyx_RefNannyFinishContext();
13583  return __pyx_r;
13584  }
13585 
13586  /* Python wrapper */
13587  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13588  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 ";
13589  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13590  PyObject *__pyx_r = 0;
13591  __Pyx_RefNannyDeclarations
13592  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13593  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13594 
13595  /* function exit code */
13596  __Pyx_RefNannyFinishContext();
13597  return __pyx_r;
13598  }
13599 
13600  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13601  PyObject *__pyx_r = NULL;
13602  __Pyx_RefNannyDeclarations
13603  PyObject *__pyx_t_1 = NULL;
13604  __Pyx_RefNannySetupContext("exp", 0);
13605  __Pyx_XDECREF(__pyx_r);
13606  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13607  __Pyx_GOTREF(__pyx_t_1);
13608  __pyx_r = __pyx_t_1;
13609  __pyx_t_1 = 0;
13610  goto __pyx_L0;
13611 
13612  /* function exit code */
13613  __pyx_L1_error:;
13614  __Pyx_XDECREF(__pyx_t_1);
13615  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13616  __pyx_r = NULL;
13617  __pyx_L0:;
13618  __Pyx_XGIVEREF(__pyx_r);
13619  __Pyx_RefNannyFinishContext();
13620  return __pyx_r;
13621  }
13622 
13623  /* "PyClical.pyx":1579
13624  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13625  *
13626  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13627  * """
13628  * Natural logarithm of multivector with optional complexifier.
13629  */
13630 
13631  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13632  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) {
13633  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13634  PyObject *__pyx_r = NULL;
13635  __Pyx_RefNannyDeclarations
13636  int __pyx_t_1;
13637  int __pyx_t_2;
13638  PyObject *__pyx_t_3 = NULL;
13639  Clifford __pyx_t_4;
13640  PyObject *__pyx_t_5 = NULL;
13641  PyObject *__pyx_t_6 = NULL;
13642  PyObject *__pyx_t_7 = NULL;
13643  PyObject *__pyx_t_8 = NULL;
13644  PyObject *__pyx_t_9 = NULL;
13645  PyObject *__pyx_t_10 = NULL;
13646  PyObject *__pyx_t_11 = NULL;
13647  __Pyx_RefNannySetupContext("log", 0);
13648  if (__pyx_optional_args) {
13649  if (__pyx_optional_args->__pyx_n > 0) {
13650  __pyx_v_i = __pyx_optional_args->i;
13651  }
13652  }
13653 
13654  /* "PyClical.pyx":1594
13655  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13656  * """
13657  * if not (i is None): # <<<<<<<<<<<<<<
13658  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13659  * else:
13660  */
13661  __pyx_t_1 = (__pyx_v_i != Py_None);
13662  __pyx_t_2 = (__pyx_t_1 != 0);
13663  if (__pyx_t_2) {
13664 
13665  /* "PyClical.pyx":1595
13666  * """
13667  * if not (i is None):
13668  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13669  * else:
13670  * try:
13671  */
13672  __Pyx_XDECREF(__pyx_r);
13673  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13674  __Pyx_GOTREF(__pyx_t_3);
13675  try {
13676  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13677  } catch(...) {
13678  __Pyx_CppExn2PyErr();
13679  __PYX_ERR(0, 1595, __pyx_L1_error)
13680  }
13681  __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)
13682  __Pyx_GOTREF(__pyx_t_5);
13683  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13684  __pyx_r = __pyx_t_5;
13685  __pyx_t_5 = 0;
13686  goto __pyx_L0;
13687 
13688  /* "PyClical.pyx":1594
13689  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13690  * """
13691  * if not (i is None): # <<<<<<<<<<<<<<
13692  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13693  * else:
13694  */
13695  }
13696 
13697  /* "PyClical.pyx":1597
13698  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13699  * else:
13700  * try: # <<<<<<<<<<<<<<
13701  * return math.log(obj)
13702  * except:
13703  */
13704  /*else*/ {
13705  {
13706  __Pyx_PyThreadState_declare
13707  __Pyx_PyThreadState_assign
13708  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13709  __Pyx_XGOTREF(__pyx_t_6);
13710  __Pyx_XGOTREF(__pyx_t_7);
13711  __Pyx_XGOTREF(__pyx_t_8);
13712  /*try:*/ {
13713 
13714  /* "PyClical.pyx":1598
13715  * else:
13716  * try:
13717  * return math.log(obj) # <<<<<<<<<<<<<<
13718  * except:
13719  * return clifford().wrap( glucat.log(toClifford(obj)) )
13720  */
13721  __Pyx_XDECREF(__pyx_r);
13722  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13723  __Pyx_GOTREF(__pyx_t_3);
13724  __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)
13725  __Pyx_GOTREF(__pyx_t_9);
13726  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13727  __pyx_t_3 = NULL;
13728  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13729  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13730  if (likely(__pyx_t_3)) {
13731  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13732  __Pyx_INCREF(__pyx_t_3);
13733  __Pyx_INCREF(function);
13734  __Pyx_DECREF_SET(__pyx_t_9, function);
13735  }
13736  }
13737  __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);
13738  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13739  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13740  __Pyx_GOTREF(__pyx_t_5);
13741  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13742  __pyx_r = __pyx_t_5;
13743  __pyx_t_5 = 0;
13744  goto __pyx_L8_try_return;
13745 
13746  /* "PyClical.pyx":1597
13747  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13748  * else:
13749  * try: # <<<<<<<<<<<<<<
13750  * return math.log(obj)
13751  * except:
13752  */
13753  }
13754  __pyx_L4_error:;
13755  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13756  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13757  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13758 
13759  /* "PyClical.pyx":1599
13760  * try:
13761  * return math.log(obj)
13762  * except: # <<<<<<<<<<<<<<
13763  * return clifford().wrap( glucat.log(toClifford(obj)) )
13764  *
13765  */
13766  /*except:*/ {
13767  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13768  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13769  __Pyx_GOTREF(__pyx_t_5);
13770  __Pyx_GOTREF(__pyx_t_9);
13771  __Pyx_GOTREF(__pyx_t_3);
13772 
13773  /* "PyClical.pyx":1600
13774  * return math.log(obj)
13775  * except:
13776  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13777  *
13778  * cpdef inline cos(obj,i = None):
13779  */
13780  __Pyx_XDECREF(__pyx_r);
13781  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13782  __Pyx_GOTREF(__pyx_t_10);
13783  __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)
13784  __Pyx_GOTREF(__pyx_t_11);
13785  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13786  __pyx_r = __pyx_t_11;
13787  __pyx_t_11 = 0;
13788  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13789  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13790  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13791  goto __pyx_L7_except_return;
13792  }
13793  __pyx_L6_except_error:;
13794 
13795  /* "PyClical.pyx":1597
13796  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13797  * else:
13798  * try: # <<<<<<<<<<<<<<
13799  * return math.log(obj)
13800  * except:
13801  */
13802  __Pyx_XGIVEREF(__pyx_t_6);
13803  __Pyx_XGIVEREF(__pyx_t_7);
13804  __Pyx_XGIVEREF(__pyx_t_8);
13805  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13806  goto __pyx_L1_error;
13807  __pyx_L8_try_return:;
13808  __Pyx_XGIVEREF(__pyx_t_6);
13809  __Pyx_XGIVEREF(__pyx_t_7);
13810  __Pyx_XGIVEREF(__pyx_t_8);
13811  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13812  goto __pyx_L0;
13813  __pyx_L7_except_return:;
13814  __Pyx_XGIVEREF(__pyx_t_6);
13815  __Pyx_XGIVEREF(__pyx_t_7);
13816  __Pyx_XGIVEREF(__pyx_t_8);
13817  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13818  goto __pyx_L0;
13819  }
13820  }
13821 
13822  /* "PyClical.pyx":1579
13823  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13824  *
13825  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13826  * """
13827  * Natural logarithm of multivector with optional complexifier.
13828  */
13829 
13830  /* function exit code */
13831  __pyx_L1_error:;
13832  __Pyx_XDECREF(__pyx_t_3);
13833  __Pyx_XDECREF(__pyx_t_5);
13834  __Pyx_XDECREF(__pyx_t_9);
13835  __Pyx_XDECREF(__pyx_t_10);
13836  __Pyx_XDECREF(__pyx_t_11);
13837  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13838  __pyx_r = 0;
13839  __pyx_L0:;
13840  __Pyx_XGIVEREF(__pyx_r);
13841  __Pyx_RefNannyFinishContext();
13842  return __pyx_r;
13843  }
13844 
13845  /* Python wrapper */
13846  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13847  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 ";
13848  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13849  PyObject *__pyx_v_obj = 0;
13850  PyObject *__pyx_v_i = 0;
13851  PyObject *__pyx_r = 0;
13852  __Pyx_RefNannyDeclarations
13853  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13854  {
13855  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13856  PyObject* values[2] = {0,0};
13857  values[1] = ((PyObject *)Py_None);
13858  if (unlikely(__pyx_kwds)) {
13859  Py_ssize_t kw_args;
13860  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13861  switch (pos_args) {
13862  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13863  CYTHON_FALLTHROUGH;
13864  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13865  CYTHON_FALLTHROUGH;
13866  case 0: break;
13867  default: goto __pyx_L5_argtuple_error;
13868  }
13869  kw_args = PyDict_Size(__pyx_kwds);
13870  switch (pos_args) {
13871  case 0:
13872  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13873  else goto __pyx_L5_argtuple_error;
13874  CYTHON_FALLTHROUGH;
13875  case 1:
13876  if (kw_args > 0) {
13877  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13878  if (value) { values[1] = value; kw_args--; }
13879  }
13880  }
13881  if (unlikely(kw_args > 0)) {
13882  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13883  }
13884  } else {
13885  switch (PyTuple_GET_SIZE(__pyx_args)) {
13886  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13887  CYTHON_FALLTHROUGH;
13888  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13889  break;
13890  default: goto __pyx_L5_argtuple_error;
13891  }
13892  }
13893  __pyx_v_obj = values[0];
13894  __pyx_v_i = values[1];
13895  }
13896  goto __pyx_L4_argument_unpacking_done;
13897  __pyx_L5_argtuple_error:;
13898  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
13899  __pyx_L3_error:;
13900  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13901  __Pyx_RefNannyFinishContext();
13902  return NULL;
13903  __pyx_L4_argument_unpacking_done:;
13904  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13905 
13906  /* function exit code */
13907  __Pyx_RefNannyFinishContext();
13908  return __pyx_r;
13909  }
13910 
13911  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13912  PyObject *__pyx_r = NULL;
13913  __Pyx_RefNannyDeclarations
13914  PyObject *__pyx_t_1 = NULL;
13915  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13916  __Pyx_RefNannySetupContext("log", 0);
13917  __Pyx_XDECREF(__pyx_r);
13918  __pyx_t_2.__pyx_n = 1;
13919  __pyx_t_2.i = __pyx_v_i;
13920  __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)
13921  __Pyx_GOTREF(__pyx_t_1);
13922  __pyx_r = __pyx_t_1;
13923  __pyx_t_1 = 0;
13924  goto __pyx_L0;
13925 
13926  /* function exit code */
13927  __pyx_L1_error:;
13928  __Pyx_XDECREF(__pyx_t_1);
13929  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13930  __pyx_r = NULL;
13931  __pyx_L0:;
13932  __Pyx_XGIVEREF(__pyx_r);
13933  __Pyx_RefNannyFinishContext();
13934  return __pyx_r;
13935  }
13936 
13937  /* "PyClical.pyx":1602
13938  * return clifford().wrap( glucat.log(toClifford(obj)) )
13939  *
13940  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13941  * """
13942  * Cosine of multivector with optional complexifier.
13943  */
13944 
13945  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13946  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) {
13947  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13948  PyObject *__pyx_r = NULL;
13949  __Pyx_RefNannyDeclarations
13950  int __pyx_t_1;
13951  int __pyx_t_2;
13952  PyObject *__pyx_t_3 = NULL;
13953  Clifford __pyx_t_4;
13954  PyObject *__pyx_t_5 = NULL;
13955  PyObject *__pyx_t_6 = NULL;
13956  PyObject *__pyx_t_7 = NULL;
13957  PyObject *__pyx_t_8 = NULL;
13958  PyObject *__pyx_t_9 = NULL;
13959  PyObject *__pyx_t_10 = NULL;
13960  PyObject *__pyx_t_11 = NULL;
13961  __Pyx_RefNannySetupContext("cos", 0);
13962  if (__pyx_optional_args) {
13963  if (__pyx_optional_args->__pyx_n > 0) {
13964  __pyx_v_i = __pyx_optional_args->i;
13965  }
13966  }
13967 
13968  /* "PyClical.pyx":1611
13969  * {1,2}
13970  * """
13971  * if not (i is None): # <<<<<<<<<<<<<<
13972  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13973  * else:
13974  */
13975  __pyx_t_1 = (__pyx_v_i != Py_None);
13976  __pyx_t_2 = (__pyx_t_1 != 0);
13977  if (__pyx_t_2) {
13978 
13979  /* "PyClical.pyx":1612
13980  * """
13981  * if not (i is None):
13982  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13983  * else:
13984  * try:
13985  */
13986  __Pyx_XDECREF(__pyx_r);
13987  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
13988  __Pyx_GOTREF(__pyx_t_3);
13989  try {
13990  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13991  } catch(...) {
13992  __Pyx_CppExn2PyErr();
13993  __PYX_ERR(0, 1612, __pyx_L1_error)
13994  }
13995  __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)
13996  __Pyx_GOTREF(__pyx_t_5);
13997  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13998  __pyx_r = __pyx_t_5;
13999  __pyx_t_5 = 0;
14000  goto __pyx_L0;
14001 
14002  /* "PyClical.pyx":1611
14003  * {1,2}
14004  * """
14005  * if not (i is None): # <<<<<<<<<<<<<<
14006  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14007  * else:
14008  */
14009  }
14010 
14011  /* "PyClical.pyx":1614
14012  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14013  * else:
14014  * try: # <<<<<<<<<<<<<<
14015  * return math.cos(obj)
14016  * except:
14017  */
14018  /*else*/ {
14019  {
14020  __Pyx_PyThreadState_declare
14021  __Pyx_PyThreadState_assign
14022  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14023  __Pyx_XGOTREF(__pyx_t_6);
14024  __Pyx_XGOTREF(__pyx_t_7);
14025  __Pyx_XGOTREF(__pyx_t_8);
14026  /*try:*/ {
14027 
14028  /* "PyClical.pyx":1615
14029  * else:
14030  * try:
14031  * return math.cos(obj) # <<<<<<<<<<<<<<
14032  * except:
14033  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14034  */
14035  __Pyx_XDECREF(__pyx_r);
14036  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14037  __Pyx_GOTREF(__pyx_t_3);
14038  __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)
14039  __Pyx_GOTREF(__pyx_t_9);
14040  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14041  __pyx_t_3 = NULL;
14042  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14043  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14044  if (likely(__pyx_t_3)) {
14045  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14046  __Pyx_INCREF(__pyx_t_3);
14047  __Pyx_INCREF(function);
14048  __Pyx_DECREF_SET(__pyx_t_9, function);
14049  }
14050  }
14051  __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);
14052  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14053  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14054  __Pyx_GOTREF(__pyx_t_5);
14055  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14056  __pyx_r = __pyx_t_5;
14057  __pyx_t_5 = 0;
14058  goto __pyx_L8_try_return;
14059 
14060  /* "PyClical.pyx":1614
14061  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14062  * else:
14063  * try: # <<<<<<<<<<<<<<
14064  * return math.cos(obj)
14065  * except:
14066  */
14067  }
14068  __pyx_L4_error:;
14069  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14070  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14071  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14072 
14073  /* "PyClical.pyx":1616
14074  * try:
14075  * return math.cos(obj)
14076  * except: # <<<<<<<<<<<<<<
14077  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14078  *
14079  */
14080  /*except:*/ {
14081  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14082  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14083  __Pyx_GOTREF(__pyx_t_5);
14084  __Pyx_GOTREF(__pyx_t_9);
14085  __Pyx_GOTREF(__pyx_t_3);
14086 
14087  /* "PyClical.pyx":1617
14088  * return math.cos(obj)
14089  * except:
14090  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14091  *
14092  * cpdef inline acos(obj,i = None):
14093  */
14094  __Pyx_XDECREF(__pyx_r);
14095  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14096  __Pyx_GOTREF(__pyx_t_10);
14097  __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)
14098  __Pyx_GOTREF(__pyx_t_11);
14099  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14100  __pyx_r = __pyx_t_11;
14101  __pyx_t_11 = 0;
14102  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14103  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14104  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14105  goto __pyx_L7_except_return;
14106  }
14107  __pyx_L6_except_error:;
14108 
14109  /* "PyClical.pyx":1614
14110  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14111  * else:
14112  * try: # <<<<<<<<<<<<<<
14113  * return math.cos(obj)
14114  * except:
14115  */
14116  __Pyx_XGIVEREF(__pyx_t_6);
14117  __Pyx_XGIVEREF(__pyx_t_7);
14118  __Pyx_XGIVEREF(__pyx_t_8);
14119  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14120  goto __pyx_L1_error;
14121  __pyx_L8_try_return:;
14122  __Pyx_XGIVEREF(__pyx_t_6);
14123  __Pyx_XGIVEREF(__pyx_t_7);
14124  __Pyx_XGIVEREF(__pyx_t_8);
14125  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14126  goto __pyx_L0;
14127  __pyx_L7_except_return:;
14128  __Pyx_XGIVEREF(__pyx_t_6);
14129  __Pyx_XGIVEREF(__pyx_t_7);
14130  __Pyx_XGIVEREF(__pyx_t_8);
14131  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14132  goto __pyx_L0;
14133  }
14134  }
14135 
14136  /* "PyClical.pyx":1602
14137  * return clifford().wrap( glucat.log(toClifford(obj)) )
14138  *
14139  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14140  * """
14141  * Cosine of multivector with optional complexifier.
14142  */
14143 
14144  /* function exit code */
14145  __pyx_L1_error:;
14146  __Pyx_XDECREF(__pyx_t_3);
14147  __Pyx_XDECREF(__pyx_t_5);
14148  __Pyx_XDECREF(__pyx_t_9);
14149  __Pyx_XDECREF(__pyx_t_10);
14150  __Pyx_XDECREF(__pyx_t_11);
14151  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14152  __pyx_r = 0;
14153  __pyx_L0:;
14154  __Pyx_XGIVEREF(__pyx_r);
14155  __Pyx_RefNannyFinishContext();
14156  return __pyx_r;
14157  }
14158 
14159  /* Python wrapper */
14160  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14161  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 ";
14162  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14163  PyObject *__pyx_v_obj = 0;
14164  PyObject *__pyx_v_i = 0;
14165  PyObject *__pyx_r = 0;
14166  __Pyx_RefNannyDeclarations
14167  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14168  {
14169  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14170  PyObject* values[2] = {0,0};
14171  values[1] = ((PyObject *)Py_None);
14172  if (unlikely(__pyx_kwds)) {
14173  Py_ssize_t kw_args;
14174  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14175  switch (pos_args) {
14176  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14177  CYTHON_FALLTHROUGH;
14178  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14179  CYTHON_FALLTHROUGH;
14180  case 0: break;
14181  default: goto __pyx_L5_argtuple_error;
14182  }
14183  kw_args = PyDict_Size(__pyx_kwds);
14184  switch (pos_args) {
14185  case 0:
14186  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14187  else goto __pyx_L5_argtuple_error;
14188  CYTHON_FALLTHROUGH;
14189  case 1:
14190  if (kw_args > 0) {
14191  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14192  if (value) { values[1] = value; kw_args--; }
14193  }
14194  }
14195  if (unlikely(kw_args > 0)) {
14196  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14197  }
14198  } else {
14199  switch (PyTuple_GET_SIZE(__pyx_args)) {
14200  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14201  CYTHON_FALLTHROUGH;
14202  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14203  break;
14204  default: goto __pyx_L5_argtuple_error;
14205  }
14206  }
14207  __pyx_v_obj = values[0];
14208  __pyx_v_i = values[1];
14209  }
14210  goto __pyx_L4_argument_unpacking_done;
14211  __pyx_L5_argtuple_error:;
14212  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14213  __pyx_L3_error:;
14214  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14215  __Pyx_RefNannyFinishContext();
14216  return NULL;
14217  __pyx_L4_argument_unpacking_done:;
14218  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14219 
14220  /* function exit code */
14221  __Pyx_RefNannyFinishContext();
14222  return __pyx_r;
14223  }
14224 
14225  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14226  PyObject *__pyx_r = NULL;
14227  __Pyx_RefNannyDeclarations
14228  PyObject *__pyx_t_1 = NULL;
14229  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14230  __Pyx_RefNannySetupContext("cos", 0);
14231  __Pyx_XDECREF(__pyx_r);
14232  __pyx_t_2.__pyx_n = 1;
14233  __pyx_t_2.i = __pyx_v_i;
14234  __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)
14235  __Pyx_GOTREF(__pyx_t_1);
14236  __pyx_r = __pyx_t_1;
14237  __pyx_t_1 = 0;
14238  goto __pyx_L0;
14239 
14240  /* function exit code */
14241  __pyx_L1_error:;
14242  __Pyx_XDECREF(__pyx_t_1);
14243  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14244  __pyx_r = NULL;
14245  __pyx_L0:;
14246  __Pyx_XGIVEREF(__pyx_r);
14247  __Pyx_RefNannyFinishContext();
14248  return __pyx_r;
14249  }
14250 
14251  /* "PyClical.pyx":1619
14252  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14253  *
14254  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14255  * """
14256  * Inverse cosine of multivector with optional complexifier.
14257  */
14258 
14259  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14260  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) {
14261  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14262  PyObject *__pyx_r = NULL;
14263  __Pyx_RefNannyDeclarations
14264  int __pyx_t_1;
14265  int __pyx_t_2;
14266  PyObject *__pyx_t_3 = NULL;
14267  Clifford __pyx_t_4;
14268  PyObject *__pyx_t_5 = NULL;
14269  PyObject *__pyx_t_6 = NULL;
14270  PyObject *__pyx_t_7 = NULL;
14271  PyObject *__pyx_t_8 = NULL;
14272  PyObject *__pyx_t_9 = NULL;
14273  PyObject *__pyx_t_10 = NULL;
14274  PyObject *__pyx_t_11 = NULL;
14275  __Pyx_RefNannySetupContext("acos", 0);
14276  if (__pyx_optional_args) {
14277  if (__pyx_optional_args->__pyx_n > 0) {
14278  __pyx_v_i = __pyx_optional_args->i;
14279  }
14280  }
14281 
14282  /* "PyClical.pyx":1632
14283  * {1,2}
14284  * """
14285  * if not (i is None): # <<<<<<<<<<<<<<
14286  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14287  * else:
14288  */
14289  __pyx_t_1 = (__pyx_v_i != Py_None);
14290  __pyx_t_2 = (__pyx_t_1 != 0);
14291  if (__pyx_t_2) {
14292 
14293  /* "PyClical.pyx":1633
14294  * """
14295  * if not (i is None):
14296  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14297  * else:
14298  * try:
14299  */
14300  __Pyx_XDECREF(__pyx_r);
14301  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14302  __Pyx_GOTREF(__pyx_t_3);
14303  try {
14304  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14305  } catch(...) {
14306  __Pyx_CppExn2PyErr();
14307  __PYX_ERR(0, 1633, __pyx_L1_error)
14308  }
14309  __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)
14310  __Pyx_GOTREF(__pyx_t_5);
14311  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14312  __pyx_r = __pyx_t_5;
14313  __pyx_t_5 = 0;
14314  goto __pyx_L0;
14315 
14316  /* "PyClical.pyx":1632
14317  * {1,2}
14318  * """
14319  * if not (i is None): # <<<<<<<<<<<<<<
14320  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14321  * else:
14322  */
14323  }
14324 
14325  /* "PyClical.pyx":1635
14326  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14327  * else:
14328  * try: # <<<<<<<<<<<<<<
14329  * return math.acos(obj)
14330  * except:
14331  */
14332  /*else*/ {
14333  {
14334  __Pyx_PyThreadState_declare
14335  __Pyx_PyThreadState_assign
14336  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14337  __Pyx_XGOTREF(__pyx_t_6);
14338  __Pyx_XGOTREF(__pyx_t_7);
14339  __Pyx_XGOTREF(__pyx_t_8);
14340  /*try:*/ {
14341 
14342  /* "PyClical.pyx":1636
14343  * else:
14344  * try:
14345  * return math.acos(obj) # <<<<<<<<<<<<<<
14346  * except:
14347  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14348  */
14349  __Pyx_XDECREF(__pyx_r);
14350  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14351  __Pyx_GOTREF(__pyx_t_3);
14352  __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)
14353  __Pyx_GOTREF(__pyx_t_9);
14354  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14355  __pyx_t_3 = NULL;
14356  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14357  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14358  if (likely(__pyx_t_3)) {
14359  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14360  __Pyx_INCREF(__pyx_t_3);
14361  __Pyx_INCREF(function);
14362  __Pyx_DECREF_SET(__pyx_t_9, function);
14363  }
14364  }
14365  __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);
14366  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14367  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14368  __Pyx_GOTREF(__pyx_t_5);
14369  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14370  __pyx_r = __pyx_t_5;
14371  __pyx_t_5 = 0;
14372  goto __pyx_L8_try_return;
14373 
14374  /* "PyClical.pyx":1635
14375  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14376  * else:
14377  * try: # <<<<<<<<<<<<<<
14378  * return math.acos(obj)
14379  * except:
14380  */
14381  }
14382  __pyx_L4_error:;
14383  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14384  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14385  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14386 
14387  /* "PyClical.pyx":1637
14388  * try:
14389  * return math.acos(obj)
14390  * except: # <<<<<<<<<<<<<<
14391  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14392  *
14393  */
14394  /*except:*/ {
14395  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14396  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14397  __Pyx_GOTREF(__pyx_t_5);
14398  __Pyx_GOTREF(__pyx_t_9);
14399  __Pyx_GOTREF(__pyx_t_3);
14400 
14401  /* "PyClical.pyx":1638
14402  * return math.acos(obj)
14403  * except:
14404  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14405  *
14406  * cpdef inline cosh(obj):
14407  */
14408  __Pyx_XDECREF(__pyx_r);
14409  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14410  __Pyx_GOTREF(__pyx_t_10);
14411  __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)
14412  __Pyx_GOTREF(__pyx_t_11);
14413  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14414  __pyx_r = __pyx_t_11;
14415  __pyx_t_11 = 0;
14416  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14417  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14418  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14419  goto __pyx_L7_except_return;
14420  }
14421  __pyx_L6_except_error:;
14422 
14423  /* "PyClical.pyx":1635
14424  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14425  * else:
14426  * try: # <<<<<<<<<<<<<<
14427  * return math.acos(obj)
14428  * except:
14429  */
14430  __Pyx_XGIVEREF(__pyx_t_6);
14431  __Pyx_XGIVEREF(__pyx_t_7);
14432  __Pyx_XGIVEREF(__pyx_t_8);
14433  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14434  goto __pyx_L1_error;
14435  __pyx_L8_try_return:;
14436  __Pyx_XGIVEREF(__pyx_t_6);
14437  __Pyx_XGIVEREF(__pyx_t_7);
14438  __Pyx_XGIVEREF(__pyx_t_8);
14439  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14440  goto __pyx_L0;
14441  __pyx_L7_except_return:;
14442  __Pyx_XGIVEREF(__pyx_t_6);
14443  __Pyx_XGIVEREF(__pyx_t_7);
14444  __Pyx_XGIVEREF(__pyx_t_8);
14445  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14446  goto __pyx_L0;
14447  }
14448  }
14449 
14450  /* "PyClical.pyx":1619
14451  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14452  *
14453  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14454  * """
14455  * Inverse cosine of multivector with optional complexifier.
14456  */
14457 
14458  /* function exit code */
14459  __pyx_L1_error:;
14460  __Pyx_XDECREF(__pyx_t_3);
14461  __Pyx_XDECREF(__pyx_t_5);
14462  __Pyx_XDECREF(__pyx_t_9);
14463  __Pyx_XDECREF(__pyx_t_10);
14464  __Pyx_XDECREF(__pyx_t_11);
14465  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14466  __pyx_r = 0;
14467  __pyx_L0:;
14468  __Pyx_XGIVEREF(__pyx_r);
14469  __Pyx_RefNannyFinishContext();
14470  return __pyx_r;
14471  }
14472 
14473  /* Python wrapper */
14474  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14475  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 ";
14476  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14477  PyObject *__pyx_v_obj = 0;
14478  PyObject *__pyx_v_i = 0;
14479  PyObject *__pyx_r = 0;
14480  __Pyx_RefNannyDeclarations
14481  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14482  {
14483  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14484  PyObject* values[2] = {0,0};
14485  values[1] = ((PyObject *)Py_None);
14486  if (unlikely(__pyx_kwds)) {
14487  Py_ssize_t kw_args;
14488  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14489  switch (pos_args) {
14490  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14491  CYTHON_FALLTHROUGH;
14492  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14493  CYTHON_FALLTHROUGH;
14494  case 0: break;
14495  default: goto __pyx_L5_argtuple_error;
14496  }
14497  kw_args = PyDict_Size(__pyx_kwds);
14498  switch (pos_args) {
14499  case 0:
14500  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14501  else goto __pyx_L5_argtuple_error;
14502  CYTHON_FALLTHROUGH;
14503  case 1:
14504  if (kw_args > 0) {
14505  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14506  if (value) { values[1] = value; kw_args--; }
14507  }
14508  }
14509  if (unlikely(kw_args > 0)) {
14510  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14511  }
14512  } else {
14513  switch (PyTuple_GET_SIZE(__pyx_args)) {
14514  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14515  CYTHON_FALLTHROUGH;
14516  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14517  break;
14518  default: goto __pyx_L5_argtuple_error;
14519  }
14520  }
14521  __pyx_v_obj = values[0];
14522  __pyx_v_i = values[1];
14523  }
14524  goto __pyx_L4_argument_unpacking_done;
14525  __pyx_L5_argtuple_error:;
14526  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14527  __pyx_L3_error:;
14528  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14529  __Pyx_RefNannyFinishContext();
14530  return NULL;
14531  __pyx_L4_argument_unpacking_done:;
14532  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14533 
14534  /* function exit code */
14535  __Pyx_RefNannyFinishContext();
14536  return __pyx_r;
14537  }
14538 
14539  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14540  PyObject *__pyx_r = NULL;
14541  __Pyx_RefNannyDeclarations
14542  PyObject *__pyx_t_1 = NULL;
14543  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14544  __Pyx_RefNannySetupContext("acos", 0);
14545  __Pyx_XDECREF(__pyx_r);
14546  __pyx_t_2.__pyx_n = 1;
14547  __pyx_t_2.i = __pyx_v_i;
14548  __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)
14549  __Pyx_GOTREF(__pyx_t_1);
14550  __pyx_r = __pyx_t_1;
14551  __pyx_t_1 = 0;
14552  goto __pyx_L0;
14553 
14554  /* function exit code */
14555  __pyx_L1_error:;
14556  __Pyx_XDECREF(__pyx_t_1);
14557  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14558  __pyx_r = NULL;
14559  __pyx_L0:;
14560  __Pyx_XGIVEREF(__pyx_r);
14561  __Pyx_RefNannyFinishContext();
14562  return __pyx_r;
14563  }
14564 
14565  /* "PyClical.pyx":1640
14566  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14567  *
14568  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14569  * """
14570  * Hyperbolic cosine of multivector.
14571  */
14572 
14573  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14574  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14575  PyObject *__pyx_r = NULL;
14576  __Pyx_RefNannyDeclarations
14577  PyObject *__pyx_t_1 = NULL;
14578  PyObject *__pyx_t_2 = NULL;
14579  PyObject *__pyx_t_3 = NULL;
14580  PyObject *__pyx_t_4 = NULL;
14581  PyObject *__pyx_t_5 = NULL;
14582  PyObject *__pyx_t_6 = NULL;
14583  PyObject *__pyx_t_7 = NULL;
14584  PyObject *__pyx_t_8 = NULL;
14585  __Pyx_RefNannySetupContext("cosh", 0);
14586 
14587  /* "PyClical.pyx":1651
14588  * {1,2}
14589  * """
14590  * try: # <<<<<<<<<<<<<<
14591  * return math.cosh(obj)
14592  * except:
14593  */
14594  {
14595  __Pyx_PyThreadState_declare
14596  __Pyx_PyThreadState_assign
14597  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14598  __Pyx_XGOTREF(__pyx_t_1);
14599  __Pyx_XGOTREF(__pyx_t_2);
14600  __Pyx_XGOTREF(__pyx_t_3);
14601  /*try:*/ {
14602 
14603  /* "PyClical.pyx":1652
14604  * """
14605  * try:
14606  * return math.cosh(obj) # <<<<<<<<<<<<<<
14607  * except:
14608  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14609  */
14610  __Pyx_XDECREF(__pyx_r);
14611  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14612  __Pyx_GOTREF(__pyx_t_5);
14613  __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)
14614  __Pyx_GOTREF(__pyx_t_6);
14615  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14616  __pyx_t_5 = NULL;
14617  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14618  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14619  if (likely(__pyx_t_5)) {
14620  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14621  __Pyx_INCREF(__pyx_t_5);
14622  __Pyx_INCREF(function);
14623  __Pyx_DECREF_SET(__pyx_t_6, function);
14624  }
14625  }
14626  __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);
14627  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14628  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14629  __Pyx_GOTREF(__pyx_t_4);
14630  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14631  __pyx_r = __pyx_t_4;
14632  __pyx_t_4 = 0;
14633  goto __pyx_L7_try_return;
14634 
14635  /* "PyClical.pyx":1651
14636  * {1,2}
14637  * """
14638  * try: # <<<<<<<<<<<<<<
14639  * return math.cosh(obj)
14640  * except:
14641  */
14642  }
14643  __pyx_L3_error:;
14644  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14645  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14646  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14647 
14648  /* "PyClical.pyx":1653
14649  * try:
14650  * return math.cosh(obj)
14651  * except: # <<<<<<<<<<<<<<
14652  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14653  *
14654  */
14655  /*except:*/ {
14656  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14657  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14658  __Pyx_GOTREF(__pyx_t_4);
14659  __Pyx_GOTREF(__pyx_t_6);
14660  __Pyx_GOTREF(__pyx_t_5);
14661 
14662  /* "PyClical.pyx":1654
14663  * return math.cosh(obj)
14664  * except:
14665  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14666  *
14667  * cpdef inline acosh(obj,i = None):
14668  */
14669  __Pyx_XDECREF(__pyx_r);
14670  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14671  __Pyx_GOTREF(__pyx_t_7);
14672  __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)
14673  __Pyx_GOTREF(__pyx_t_8);
14674  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14675  __pyx_r = __pyx_t_8;
14676  __pyx_t_8 = 0;
14677  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14678  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14679  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14680  goto __pyx_L6_except_return;
14681  }
14682  __pyx_L5_except_error:;
14683 
14684  /* "PyClical.pyx":1651
14685  * {1,2}
14686  * """
14687  * try: # <<<<<<<<<<<<<<
14688  * return math.cosh(obj)
14689  * except:
14690  */
14691  __Pyx_XGIVEREF(__pyx_t_1);
14692  __Pyx_XGIVEREF(__pyx_t_2);
14693  __Pyx_XGIVEREF(__pyx_t_3);
14694  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14695  goto __pyx_L1_error;
14696  __pyx_L7_try_return:;
14697  __Pyx_XGIVEREF(__pyx_t_1);
14698  __Pyx_XGIVEREF(__pyx_t_2);
14699  __Pyx_XGIVEREF(__pyx_t_3);
14700  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14701  goto __pyx_L0;
14702  __pyx_L6_except_return:;
14703  __Pyx_XGIVEREF(__pyx_t_1);
14704  __Pyx_XGIVEREF(__pyx_t_2);
14705  __Pyx_XGIVEREF(__pyx_t_3);
14706  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14707  goto __pyx_L0;
14708  }
14709 
14710  /* "PyClical.pyx":1640
14711  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14712  *
14713  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14714  * """
14715  * Hyperbolic cosine of multivector.
14716  */
14717 
14718  /* function exit code */
14719  __pyx_L1_error:;
14720  __Pyx_XDECREF(__pyx_t_4);
14721  __Pyx_XDECREF(__pyx_t_5);
14722  __Pyx_XDECREF(__pyx_t_6);
14723  __Pyx_XDECREF(__pyx_t_7);
14724  __Pyx_XDECREF(__pyx_t_8);
14725  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14726  __pyx_r = 0;
14727  __pyx_L0:;
14728  __Pyx_XGIVEREF(__pyx_r);
14729  __Pyx_RefNannyFinishContext();
14730  return __pyx_r;
14731  }
14732 
14733  /* Python wrapper */
14734  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14735  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 ";
14736  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14737  PyObject *__pyx_r = 0;
14738  __Pyx_RefNannyDeclarations
14739  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14740  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14741 
14742  /* function exit code */
14743  __Pyx_RefNannyFinishContext();
14744  return __pyx_r;
14745  }
14746 
14747  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14748  PyObject *__pyx_r = NULL;
14749  __Pyx_RefNannyDeclarations
14750  PyObject *__pyx_t_1 = NULL;
14751  __Pyx_RefNannySetupContext("cosh", 0);
14752  __Pyx_XDECREF(__pyx_r);
14753  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14754  __Pyx_GOTREF(__pyx_t_1);
14755  __pyx_r = __pyx_t_1;
14756  __pyx_t_1 = 0;
14757  goto __pyx_L0;
14758 
14759  /* function exit code */
14760  __pyx_L1_error:;
14761  __Pyx_XDECREF(__pyx_t_1);
14762  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14763  __pyx_r = NULL;
14764  __pyx_L0:;
14765  __Pyx_XGIVEREF(__pyx_r);
14766  __Pyx_RefNannyFinishContext();
14767  return __pyx_r;
14768  }
14769 
14770  /* "PyClical.pyx":1656
14771  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14772  *
14773  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14774  * """
14775  * Inverse hyperbolic cosine of multivector with optional complexifier.
14776  */
14777 
14778  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14779  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) {
14780  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14781  PyObject *__pyx_r = NULL;
14782  __Pyx_RefNannyDeclarations
14783  int __pyx_t_1;
14784  int __pyx_t_2;
14785  PyObject *__pyx_t_3 = NULL;
14786  Clifford __pyx_t_4;
14787  PyObject *__pyx_t_5 = NULL;
14788  PyObject *__pyx_t_6 = NULL;
14789  PyObject *__pyx_t_7 = NULL;
14790  PyObject *__pyx_t_8 = NULL;
14791  PyObject *__pyx_t_9 = NULL;
14792  PyObject *__pyx_t_10 = NULL;
14793  PyObject *__pyx_t_11 = NULL;
14794  __Pyx_RefNannySetupContext("acosh", 0);
14795  if (__pyx_optional_args) {
14796  if (__pyx_optional_args->__pyx_n > 0) {
14797  __pyx_v_i = __pyx_optional_args->i;
14798  }
14799  }
14800 
14801  /* "PyClical.pyx":1671
14802  * {1,2}
14803  * """
14804  * if not (i is None): # <<<<<<<<<<<<<<
14805  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14806  * else:
14807  */
14808  __pyx_t_1 = (__pyx_v_i != Py_None);
14809  __pyx_t_2 = (__pyx_t_1 != 0);
14810  if (__pyx_t_2) {
14811 
14812  /* "PyClical.pyx":1672
14813  * """
14814  * if not (i is None):
14815  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14816  * else:
14817  * try:
14818  */
14819  __Pyx_XDECREF(__pyx_r);
14820  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
14821  __Pyx_GOTREF(__pyx_t_3);
14822  try {
14823  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14824  } catch(...) {
14825  __Pyx_CppExn2PyErr();
14826  __PYX_ERR(0, 1672, __pyx_L1_error)
14827  }
14828  __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)
14829  __Pyx_GOTREF(__pyx_t_5);
14830  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14831  __pyx_r = __pyx_t_5;
14832  __pyx_t_5 = 0;
14833  goto __pyx_L0;
14834 
14835  /* "PyClical.pyx":1671
14836  * {1,2}
14837  * """
14838  * if not (i is None): # <<<<<<<<<<<<<<
14839  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14840  * else:
14841  */
14842  }
14843 
14844  /* "PyClical.pyx":1674
14845  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14846  * else:
14847  * try: # <<<<<<<<<<<<<<
14848  * return math.acosh(obj)
14849  * except:
14850  */
14851  /*else*/ {
14852  {
14853  __Pyx_PyThreadState_declare
14854  __Pyx_PyThreadState_assign
14855  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14856  __Pyx_XGOTREF(__pyx_t_6);
14857  __Pyx_XGOTREF(__pyx_t_7);
14858  __Pyx_XGOTREF(__pyx_t_8);
14859  /*try:*/ {
14860 
14861  /* "PyClical.pyx":1675
14862  * else:
14863  * try:
14864  * return math.acosh(obj) # <<<<<<<<<<<<<<
14865  * except:
14866  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14867  */
14868  __Pyx_XDECREF(__pyx_r);
14869  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
14870  __Pyx_GOTREF(__pyx_t_3);
14871  __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)
14872  __Pyx_GOTREF(__pyx_t_9);
14873  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14874  __pyx_t_3 = NULL;
14875  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14876  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14877  if (likely(__pyx_t_3)) {
14878  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14879  __Pyx_INCREF(__pyx_t_3);
14880  __Pyx_INCREF(function);
14881  __Pyx_DECREF_SET(__pyx_t_9, function);
14882  }
14883  }
14884  __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);
14885  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14886  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
14887  __Pyx_GOTREF(__pyx_t_5);
14888  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14889  __pyx_r = __pyx_t_5;
14890  __pyx_t_5 = 0;
14891  goto __pyx_L8_try_return;
14892 
14893  /* "PyClical.pyx":1674
14894  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14895  * else:
14896  * try: # <<<<<<<<<<<<<<
14897  * return math.acosh(obj)
14898  * except:
14899  */
14900  }
14901  __pyx_L4_error:;
14902  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14903  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14904  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14905 
14906  /* "PyClical.pyx":1676
14907  * try:
14908  * return math.acosh(obj)
14909  * except: # <<<<<<<<<<<<<<
14910  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14911  *
14912  */
14913  /*except:*/ {
14914  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14915  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
14916  __Pyx_GOTREF(__pyx_t_5);
14917  __Pyx_GOTREF(__pyx_t_9);
14918  __Pyx_GOTREF(__pyx_t_3);
14919 
14920  /* "PyClical.pyx":1677
14921  * return math.acosh(obj)
14922  * except:
14923  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14924  *
14925  * cpdef inline sin(obj,i = None):
14926  */
14927  __Pyx_XDECREF(__pyx_r);
14928  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14929  __Pyx_GOTREF(__pyx_t_10);
14930  __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)
14931  __Pyx_GOTREF(__pyx_t_11);
14932  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14933  __pyx_r = __pyx_t_11;
14934  __pyx_t_11 = 0;
14935  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14936  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14937  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14938  goto __pyx_L7_except_return;
14939  }
14940  __pyx_L6_except_error:;
14941 
14942  /* "PyClical.pyx":1674
14943  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14944  * else:
14945  * try: # <<<<<<<<<<<<<<
14946  * return math.acosh(obj)
14947  * except:
14948  */
14949  __Pyx_XGIVEREF(__pyx_t_6);
14950  __Pyx_XGIVEREF(__pyx_t_7);
14951  __Pyx_XGIVEREF(__pyx_t_8);
14952  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14953  goto __pyx_L1_error;
14954  __pyx_L8_try_return:;
14955  __Pyx_XGIVEREF(__pyx_t_6);
14956  __Pyx_XGIVEREF(__pyx_t_7);
14957  __Pyx_XGIVEREF(__pyx_t_8);
14958  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14959  goto __pyx_L0;
14960  __pyx_L7_except_return:;
14961  __Pyx_XGIVEREF(__pyx_t_6);
14962  __Pyx_XGIVEREF(__pyx_t_7);
14963  __Pyx_XGIVEREF(__pyx_t_8);
14964  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14965  goto __pyx_L0;
14966  }
14967  }
14968 
14969  /* "PyClical.pyx":1656
14970  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14971  *
14972  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14973  * """
14974  * Inverse hyperbolic cosine of multivector with optional complexifier.
14975  */
14976 
14977  /* function exit code */
14978  __pyx_L1_error:;
14979  __Pyx_XDECREF(__pyx_t_3);
14980  __Pyx_XDECREF(__pyx_t_5);
14981  __Pyx_XDECREF(__pyx_t_9);
14982  __Pyx_XDECREF(__pyx_t_10);
14983  __Pyx_XDECREF(__pyx_t_11);
14984  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14985  __pyx_r = 0;
14986  __pyx_L0:;
14987  __Pyx_XGIVEREF(__pyx_r);
14988  __Pyx_RefNannyFinishContext();
14989  return __pyx_r;
14990  }
14991 
14992  /* Python wrapper */
14993  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14994  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 ";
14995  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14996  PyObject *__pyx_v_obj = 0;
14997  PyObject *__pyx_v_i = 0;
14998  PyObject *__pyx_r = 0;
14999  __Pyx_RefNannyDeclarations
15000  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15001  {
15002  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15003  PyObject* values[2] = {0,0};
15004  values[1] = ((PyObject *)Py_None);
15005  if (unlikely(__pyx_kwds)) {
15006  Py_ssize_t kw_args;
15007  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15008  switch (pos_args) {
15009  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15010  CYTHON_FALLTHROUGH;
15011  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15012  CYTHON_FALLTHROUGH;
15013  case 0: break;
15014  default: goto __pyx_L5_argtuple_error;
15015  }
15016  kw_args = PyDict_Size(__pyx_kwds);
15017  switch (pos_args) {
15018  case 0:
15019  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15020  else goto __pyx_L5_argtuple_error;
15021  CYTHON_FALLTHROUGH;
15022  case 1:
15023  if (kw_args > 0) {
15024  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15025  if (value) { values[1] = value; kw_args--; }
15026  }
15027  }
15028  if (unlikely(kw_args > 0)) {
15029  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15030  }
15031  } else {
15032  switch (PyTuple_GET_SIZE(__pyx_args)) {
15033  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15034  CYTHON_FALLTHROUGH;
15035  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15036  break;
15037  default: goto __pyx_L5_argtuple_error;
15038  }
15039  }
15040  __pyx_v_obj = values[0];
15041  __pyx_v_i = values[1];
15042  }
15043  goto __pyx_L4_argument_unpacking_done;
15044  __pyx_L5_argtuple_error:;
15045  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15046  __pyx_L3_error:;
15047  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15048  __Pyx_RefNannyFinishContext();
15049  return NULL;
15050  __pyx_L4_argument_unpacking_done:;
15051  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15052 
15053  /* function exit code */
15054  __Pyx_RefNannyFinishContext();
15055  return __pyx_r;
15056  }
15057 
15058  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15059  PyObject *__pyx_r = NULL;
15060  __Pyx_RefNannyDeclarations
15061  PyObject *__pyx_t_1 = NULL;
15062  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15063  __Pyx_RefNannySetupContext("acosh", 0);
15064  __Pyx_XDECREF(__pyx_r);
15065  __pyx_t_2.__pyx_n = 1;
15066  __pyx_t_2.i = __pyx_v_i;
15067  __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)
15068  __Pyx_GOTREF(__pyx_t_1);
15069  __pyx_r = __pyx_t_1;
15070  __pyx_t_1 = 0;
15071  goto __pyx_L0;
15072 
15073  /* function exit code */
15074  __pyx_L1_error:;
15075  __Pyx_XDECREF(__pyx_t_1);
15076  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15077  __pyx_r = NULL;
15078  __pyx_L0:;
15079  __Pyx_XGIVEREF(__pyx_r);
15080  __Pyx_RefNannyFinishContext();
15081  return __pyx_r;
15082  }
15083 
15084  /* "PyClical.pyx":1679
15085  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15086  *
15087  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15088  * """
15089  * Sine of multivector with optional complexifier.
15090  */
15091 
15092  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15093  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) {
15094  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15095  PyObject *__pyx_r = NULL;
15096  __Pyx_RefNannyDeclarations
15097  int __pyx_t_1;
15098  int __pyx_t_2;
15099  PyObject *__pyx_t_3 = NULL;
15100  Clifford __pyx_t_4;
15101  PyObject *__pyx_t_5 = NULL;
15102  PyObject *__pyx_t_6 = NULL;
15103  PyObject *__pyx_t_7 = NULL;
15104  PyObject *__pyx_t_8 = NULL;
15105  PyObject *__pyx_t_9 = NULL;
15106  PyObject *__pyx_t_10 = NULL;
15107  PyObject *__pyx_t_11 = NULL;
15108  __Pyx_RefNannySetupContext("sin", 0);
15109  if (__pyx_optional_args) {
15110  if (__pyx_optional_args->__pyx_n > 0) {
15111  __pyx_v_i = __pyx_optional_args->i;
15112  }
15113  }
15114 
15115  /* "PyClical.pyx":1690
15116  * {1,2,3}
15117  * """
15118  * if not (i is None): # <<<<<<<<<<<<<<
15119  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15120  * else:
15121  */
15122  __pyx_t_1 = (__pyx_v_i != Py_None);
15123  __pyx_t_2 = (__pyx_t_1 != 0);
15124  if (__pyx_t_2) {
15125 
15126  /* "PyClical.pyx":1691
15127  * """
15128  * if not (i is None):
15129  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15130  * else:
15131  * try:
15132  */
15133  __Pyx_XDECREF(__pyx_r);
15134  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15135  __Pyx_GOTREF(__pyx_t_3);
15136  try {
15137  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15138  } catch(...) {
15139  __Pyx_CppExn2PyErr();
15140  __PYX_ERR(0, 1691, __pyx_L1_error)
15141  }
15142  __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)
15143  __Pyx_GOTREF(__pyx_t_5);
15144  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15145  __pyx_r = __pyx_t_5;
15146  __pyx_t_5 = 0;
15147  goto __pyx_L0;
15148 
15149  /* "PyClical.pyx":1690
15150  * {1,2,3}
15151  * """
15152  * if not (i is None): # <<<<<<<<<<<<<<
15153  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15154  * else:
15155  */
15156  }
15157 
15158  /* "PyClical.pyx":1693
15159  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15160  * else:
15161  * try: # <<<<<<<<<<<<<<
15162  * return math.sin(obj)
15163  * except:
15164  */
15165  /*else*/ {
15166  {
15167  __Pyx_PyThreadState_declare
15168  __Pyx_PyThreadState_assign
15169  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15170  __Pyx_XGOTREF(__pyx_t_6);
15171  __Pyx_XGOTREF(__pyx_t_7);
15172  __Pyx_XGOTREF(__pyx_t_8);
15173  /*try:*/ {
15174 
15175  /* "PyClical.pyx":1694
15176  * else:
15177  * try:
15178  * return math.sin(obj) # <<<<<<<<<<<<<<
15179  * except:
15180  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15181  */
15182  __Pyx_XDECREF(__pyx_r);
15183  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15184  __Pyx_GOTREF(__pyx_t_3);
15185  __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)
15186  __Pyx_GOTREF(__pyx_t_9);
15187  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15188  __pyx_t_3 = NULL;
15189  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15190  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15191  if (likely(__pyx_t_3)) {
15192  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15193  __Pyx_INCREF(__pyx_t_3);
15194  __Pyx_INCREF(function);
15195  __Pyx_DECREF_SET(__pyx_t_9, function);
15196  }
15197  }
15198  __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);
15199  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15200  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15201  __Pyx_GOTREF(__pyx_t_5);
15202  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15203  __pyx_r = __pyx_t_5;
15204  __pyx_t_5 = 0;
15205  goto __pyx_L8_try_return;
15206 
15207  /* "PyClical.pyx":1693
15208  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15209  * else:
15210  * try: # <<<<<<<<<<<<<<
15211  * return math.sin(obj)
15212  * except:
15213  */
15214  }
15215  __pyx_L4_error:;
15216  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15217  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15218  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15219 
15220  /* "PyClical.pyx":1695
15221  * try:
15222  * return math.sin(obj)
15223  * except: # <<<<<<<<<<<<<<
15224  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15225  *
15226  */
15227  /*except:*/ {
15228  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15229  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15230  __Pyx_GOTREF(__pyx_t_5);
15231  __Pyx_GOTREF(__pyx_t_9);
15232  __Pyx_GOTREF(__pyx_t_3);
15233 
15234  /* "PyClical.pyx":1696
15235  * return math.sin(obj)
15236  * except:
15237  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15238  *
15239  * cpdef inline asin(obj,i = None):
15240  */
15241  __Pyx_XDECREF(__pyx_r);
15242  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15243  __Pyx_GOTREF(__pyx_t_10);
15244  __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)
15245  __Pyx_GOTREF(__pyx_t_11);
15246  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15247  __pyx_r = __pyx_t_11;
15248  __pyx_t_11 = 0;
15249  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15250  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15251  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15252  goto __pyx_L7_except_return;
15253  }
15254  __pyx_L6_except_error:;
15255 
15256  /* "PyClical.pyx":1693
15257  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15258  * else:
15259  * try: # <<<<<<<<<<<<<<
15260  * return math.sin(obj)
15261  * except:
15262  */
15263  __Pyx_XGIVEREF(__pyx_t_6);
15264  __Pyx_XGIVEREF(__pyx_t_7);
15265  __Pyx_XGIVEREF(__pyx_t_8);
15266  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15267  goto __pyx_L1_error;
15268  __pyx_L8_try_return:;
15269  __Pyx_XGIVEREF(__pyx_t_6);
15270  __Pyx_XGIVEREF(__pyx_t_7);
15271  __Pyx_XGIVEREF(__pyx_t_8);
15272  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15273  goto __pyx_L0;
15274  __pyx_L7_except_return:;
15275  __Pyx_XGIVEREF(__pyx_t_6);
15276  __Pyx_XGIVEREF(__pyx_t_7);
15277  __Pyx_XGIVEREF(__pyx_t_8);
15278  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15279  goto __pyx_L0;
15280  }
15281  }
15282 
15283  /* "PyClical.pyx":1679
15284  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15285  *
15286  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15287  * """
15288  * Sine of multivector with optional complexifier.
15289  */
15290 
15291  /* function exit code */
15292  __pyx_L1_error:;
15293  __Pyx_XDECREF(__pyx_t_3);
15294  __Pyx_XDECREF(__pyx_t_5);
15295  __Pyx_XDECREF(__pyx_t_9);
15296  __Pyx_XDECREF(__pyx_t_10);
15297  __Pyx_XDECREF(__pyx_t_11);
15298  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15299  __pyx_r = 0;
15300  __pyx_L0:;
15301  __Pyx_XGIVEREF(__pyx_r);
15302  __Pyx_RefNannyFinishContext();
15303  return __pyx_r;
15304  }
15305 
15306  /* Python wrapper */
15307  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15308  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 ";
15309  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15310  PyObject *__pyx_v_obj = 0;
15311  PyObject *__pyx_v_i = 0;
15312  PyObject *__pyx_r = 0;
15313  __Pyx_RefNannyDeclarations
15314  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15315  {
15316  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15317  PyObject* values[2] = {0,0};
15318  values[1] = ((PyObject *)Py_None);
15319  if (unlikely(__pyx_kwds)) {
15320  Py_ssize_t kw_args;
15321  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15322  switch (pos_args) {
15323  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15324  CYTHON_FALLTHROUGH;
15325  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15326  CYTHON_FALLTHROUGH;
15327  case 0: break;
15328  default: goto __pyx_L5_argtuple_error;
15329  }
15330  kw_args = PyDict_Size(__pyx_kwds);
15331  switch (pos_args) {
15332  case 0:
15333  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15334  else goto __pyx_L5_argtuple_error;
15335  CYTHON_FALLTHROUGH;
15336  case 1:
15337  if (kw_args > 0) {
15338  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15339  if (value) { values[1] = value; kw_args--; }
15340  }
15341  }
15342  if (unlikely(kw_args > 0)) {
15343  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15344  }
15345  } else {
15346  switch (PyTuple_GET_SIZE(__pyx_args)) {
15347  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15348  CYTHON_FALLTHROUGH;
15349  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15350  break;
15351  default: goto __pyx_L5_argtuple_error;
15352  }
15353  }
15354  __pyx_v_obj = values[0];
15355  __pyx_v_i = values[1];
15356  }
15357  goto __pyx_L4_argument_unpacking_done;
15358  __pyx_L5_argtuple_error:;
15359  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15360  __pyx_L3_error:;
15361  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15362  __Pyx_RefNannyFinishContext();
15363  return NULL;
15364  __pyx_L4_argument_unpacking_done:;
15365  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15366 
15367  /* function exit code */
15368  __Pyx_RefNannyFinishContext();
15369  return __pyx_r;
15370  }
15371 
15372  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15373  PyObject *__pyx_r = NULL;
15374  __Pyx_RefNannyDeclarations
15375  PyObject *__pyx_t_1 = NULL;
15376  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15377  __Pyx_RefNannySetupContext("sin", 0);
15378  __Pyx_XDECREF(__pyx_r);
15379  __pyx_t_2.__pyx_n = 1;
15380  __pyx_t_2.i = __pyx_v_i;
15381  __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)
15382  __Pyx_GOTREF(__pyx_t_1);
15383  __pyx_r = __pyx_t_1;
15384  __pyx_t_1 = 0;
15385  goto __pyx_L0;
15386 
15387  /* function exit code */
15388  __pyx_L1_error:;
15389  __Pyx_XDECREF(__pyx_t_1);
15390  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15391  __pyx_r = NULL;
15392  __pyx_L0:;
15393  __Pyx_XGIVEREF(__pyx_r);
15394  __Pyx_RefNannyFinishContext();
15395  return __pyx_r;
15396  }
15397 
15398  /* "PyClical.pyx":1698
15399  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15400  *
15401  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15402  * """
15403  * Inverse sine of multivector with optional complexifier.
15404  */
15405 
15406  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15407  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) {
15408  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15409  PyObject *__pyx_r = NULL;
15410  __Pyx_RefNannyDeclarations
15411  int __pyx_t_1;
15412  int __pyx_t_2;
15413  PyObject *__pyx_t_3 = NULL;
15414  Clifford __pyx_t_4;
15415  PyObject *__pyx_t_5 = NULL;
15416  PyObject *__pyx_t_6 = NULL;
15417  PyObject *__pyx_t_7 = NULL;
15418  PyObject *__pyx_t_8 = NULL;
15419  PyObject *__pyx_t_9 = NULL;
15420  PyObject *__pyx_t_10 = NULL;
15421  PyObject *__pyx_t_11 = NULL;
15422  __Pyx_RefNannySetupContext("asin", 0);
15423  if (__pyx_optional_args) {
15424  if (__pyx_optional_args->__pyx_n > 0) {
15425  __pyx_v_i = __pyx_optional_args->i;
15426  }
15427  }
15428 
15429  /* "PyClical.pyx":1711
15430  * {1,2,3}
15431  * """
15432  * if not (i is None): # <<<<<<<<<<<<<<
15433  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15434  * else:
15435  */
15436  __pyx_t_1 = (__pyx_v_i != Py_None);
15437  __pyx_t_2 = (__pyx_t_1 != 0);
15438  if (__pyx_t_2) {
15439 
15440  /* "PyClical.pyx":1712
15441  * """
15442  * if not (i is None):
15443  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15444  * else:
15445  * try:
15446  */
15447  __Pyx_XDECREF(__pyx_r);
15448  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15449  __Pyx_GOTREF(__pyx_t_3);
15450  try {
15451  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15452  } catch(...) {
15453  __Pyx_CppExn2PyErr();
15454  __PYX_ERR(0, 1712, __pyx_L1_error)
15455  }
15456  __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)
15457  __Pyx_GOTREF(__pyx_t_5);
15458  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15459  __pyx_r = __pyx_t_5;
15460  __pyx_t_5 = 0;
15461  goto __pyx_L0;
15462 
15463  /* "PyClical.pyx":1711
15464  * {1,2,3}
15465  * """
15466  * if not (i is None): # <<<<<<<<<<<<<<
15467  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15468  * else:
15469  */
15470  }
15471 
15472  /* "PyClical.pyx":1714
15473  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15474  * else:
15475  * try: # <<<<<<<<<<<<<<
15476  * return math.asin(obj)
15477  * except:
15478  */
15479  /*else*/ {
15480  {
15481  __Pyx_PyThreadState_declare
15482  __Pyx_PyThreadState_assign
15483  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15484  __Pyx_XGOTREF(__pyx_t_6);
15485  __Pyx_XGOTREF(__pyx_t_7);
15486  __Pyx_XGOTREF(__pyx_t_8);
15487  /*try:*/ {
15488 
15489  /* "PyClical.pyx":1715
15490  * else:
15491  * try:
15492  * return math.asin(obj) # <<<<<<<<<<<<<<
15493  * except:
15494  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15495  */
15496  __Pyx_XDECREF(__pyx_r);
15497  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15498  __Pyx_GOTREF(__pyx_t_3);
15499  __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)
15500  __Pyx_GOTREF(__pyx_t_9);
15501  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15502  __pyx_t_3 = NULL;
15503  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15504  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15505  if (likely(__pyx_t_3)) {
15506  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15507  __Pyx_INCREF(__pyx_t_3);
15508  __Pyx_INCREF(function);
15509  __Pyx_DECREF_SET(__pyx_t_9, function);
15510  }
15511  }
15512  __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);
15513  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15514  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15515  __Pyx_GOTREF(__pyx_t_5);
15516  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15517  __pyx_r = __pyx_t_5;
15518  __pyx_t_5 = 0;
15519  goto __pyx_L8_try_return;
15520 
15521  /* "PyClical.pyx":1714
15522  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15523  * else:
15524  * try: # <<<<<<<<<<<<<<
15525  * return math.asin(obj)
15526  * except:
15527  */
15528  }
15529  __pyx_L4_error:;
15530  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15531  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15532  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15533 
15534  /* "PyClical.pyx":1716
15535  * try:
15536  * return math.asin(obj)
15537  * except: # <<<<<<<<<<<<<<
15538  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15539  *
15540  */
15541  /*except:*/ {
15542  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15543  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15544  __Pyx_GOTREF(__pyx_t_5);
15545  __Pyx_GOTREF(__pyx_t_9);
15546  __Pyx_GOTREF(__pyx_t_3);
15547 
15548  /* "PyClical.pyx":1717
15549  * return math.asin(obj)
15550  * except:
15551  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15552  *
15553  * cpdef inline sinh(obj):
15554  */
15555  __Pyx_XDECREF(__pyx_r);
15556  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15557  __Pyx_GOTREF(__pyx_t_10);
15558  __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)
15559  __Pyx_GOTREF(__pyx_t_11);
15560  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15561  __pyx_r = __pyx_t_11;
15562  __pyx_t_11 = 0;
15563  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15564  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15565  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15566  goto __pyx_L7_except_return;
15567  }
15568  __pyx_L6_except_error:;
15569 
15570  /* "PyClical.pyx":1714
15571  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15572  * else:
15573  * try: # <<<<<<<<<<<<<<
15574  * return math.asin(obj)
15575  * except:
15576  */
15577  __Pyx_XGIVEREF(__pyx_t_6);
15578  __Pyx_XGIVEREF(__pyx_t_7);
15579  __Pyx_XGIVEREF(__pyx_t_8);
15580  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15581  goto __pyx_L1_error;
15582  __pyx_L8_try_return:;
15583  __Pyx_XGIVEREF(__pyx_t_6);
15584  __Pyx_XGIVEREF(__pyx_t_7);
15585  __Pyx_XGIVEREF(__pyx_t_8);
15586  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15587  goto __pyx_L0;
15588  __pyx_L7_except_return:;
15589  __Pyx_XGIVEREF(__pyx_t_6);
15590  __Pyx_XGIVEREF(__pyx_t_7);
15591  __Pyx_XGIVEREF(__pyx_t_8);
15592  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15593  goto __pyx_L0;
15594  }
15595  }
15596 
15597  /* "PyClical.pyx":1698
15598  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15599  *
15600  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15601  * """
15602  * Inverse sine of multivector with optional complexifier.
15603  */
15604 
15605  /* function exit code */
15606  __pyx_L1_error:;
15607  __Pyx_XDECREF(__pyx_t_3);
15608  __Pyx_XDECREF(__pyx_t_5);
15609  __Pyx_XDECREF(__pyx_t_9);
15610  __Pyx_XDECREF(__pyx_t_10);
15611  __Pyx_XDECREF(__pyx_t_11);
15612  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15613  __pyx_r = 0;
15614  __pyx_L0:;
15615  __Pyx_XGIVEREF(__pyx_r);
15616  __Pyx_RefNannyFinishContext();
15617  return __pyx_r;
15618  }
15619 
15620  /* Python wrapper */
15621  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15622  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 ";
15623  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15624  PyObject *__pyx_v_obj = 0;
15625  PyObject *__pyx_v_i = 0;
15626  PyObject *__pyx_r = 0;
15627  __Pyx_RefNannyDeclarations
15628  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15629  {
15630  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15631  PyObject* values[2] = {0,0};
15632  values[1] = ((PyObject *)Py_None);
15633  if (unlikely(__pyx_kwds)) {
15634  Py_ssize_t kw_args;
15635  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15636  switch (pos_args) {
15637  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15638  CYTHON_FALLTHROUGH;
15639  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15640  CYTHON_FALLTHROUGH;
15641  case 0: break;
15642  default: goto __pyx_L5_argtuple_error;
15643  }
15644  kw_args = PyDict_Size(__pyx_kwds);
15645  switch (pos_args) {
15646  case 0:
15647  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15648  else goto __pyx_L5_argtuple_error;
15649  CYTHON_FALLTHROUGH;
15650  case 1:
15651  if (kw_args > 0) {
15652  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15653  if (value) { values[1] = value; kw_args--; }
15654  }
15655  }
15656  if (unlikely(kw_args > 0)) {
15657  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15658  }
15659  } else {
15660  switch (PyTuple_GET_SIZE(__pyx_args)) {
15661  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15662  CYTHON_FALLTHROUGH;
15663  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15664  break;
15665  default: goto __pyx_L5_argtuple_error;
15666  }
15667  }
15668  __pyx_v_obj = values[0];
15669  __pyx_v_i = values[1];
15670  }
15671  goto __pyx_L4_argument_unpacking_done;
15672  __pyx_L5_argtuple_error:;
15673  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15674  __pyx_L3_error:;
15675  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15676  __Pyx_RefNannyFinishContext();
15677  return NULL;
15678  __pyx_L4_argument_unpacking_done:;
15679  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15680 
15681  /* function exit code */
15682  __Pyx_RefNannyFinishContext();
15683  return __pyx_r;
15684  }
15685 
15686  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15687  PyObject *__pyx_r = NULL;
15688  __Pyx_RefNannyDeclarations
15689  PyObject *__pyx_t_1 = NULL;
15690  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15691  __Pyx_RefNannySetupContext("asin", 0);
15692  __Pyx_XDECREF(__pyx_r);
15693  __pyx_t_2.__pyx_n = 1;
15694  __pyx_t_2.i = __pyx_v_i;
15695  __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)
15696  __Pyx_GOTREF(__pyx_t_1);
15697  __pyx_r = __pyx_t_1;
15698  __pyx_t_1 = 0;
15699  goto __pyx_L0;
15700 
15701  /* function exit code */
15702  __pyx_L1_error:;
15703  __Pyx_XDECREF(__pyx_t_1);
15704  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15705  __pyx_r = NULL;
15706  __pyx_L0:;
15707  __Pyx_XGIVEREF(__pyx_r);
15708  __Pyx_RefNannyFinishContext();
15709  return __pyx_r;
15710  }
15711 
15712  /* "PyClical.pyx":1719
15713  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15714  *
15715  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15716  * """
15717  * Hyperbolic sine of multivector.
15718  */
15719 
15720  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15721  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15722  PyObject *__pyx_r = NULL;
15723  __Pyx_RefNannyDeclarations
15724  PyObject *__pyx_t_1 = NULL;
15725  PyObject *__pyx_t_2 = NULL;
15726  PyObject *__pyx_t_3 = NULL;
15727  PyObject *__pyx_t_4 = NULL;
15728  PyObject *__pyx_t_5 = NULL;
15729  PyObject *__pyx_t_6 = NULL;
15730  PyObject *__pyx_t_7 = NULL;
15731  PyObject *__pyx_t_8 = NULL;
15732  __Pyx_RefNannySetupContext("sinh", 0);
15733 
15734  /* "PyClical.pyx":1728
15735  * 0.5{1,2}
15736  * """
15737  * try: # <<<<<<<<<<<<<<
15738  * return math.sinh(obj)
15739  * except:
15740  */
15741  {
15742  __Pyx_PyThreadState_declare
15743  __Pyx_PyThreadState_assign
15744  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15745  __Pyx_XGOTREF(__pyx_t_1);
15746  __Pyx_XGOTREF(__pyx_t_2);
15747  __Pyx_XGOTREF(__pyx_t_3);
15748  /*try:*/ {
15749 
15750  /* "PyClical.pyx":1729
15751  * """
15752  * try:
15753  * return math.sinh(obj) # <<<<<<<<<<<<<<
15754  * except:
15755  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15756  */
15757  __Pyx_XDECREF(__pyx_r);
15758  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
15759  __Pyx_GOTREF(__pyx_t_5);
15760  __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)
15761  __Pyx_GOTREF(__pyx_t_6);
15762  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15763  __pyx_t_5 = NULL;
15764  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15765  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15766  if (likely(__pyx_t_5)) {
15767  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15768  __Pyx_INCREF(__pyx_t_5);
15769  __Pyx_INCREF(function);
15770  __Pyx_DECREF_SET(__pyx_t_6, function);
15771  }
15772  }
15773  __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);
15774  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15775  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
15776  __Pyx_GOTREF(__pyx_t_4);
15777  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15778  __pyx_r = __pyx_t_4;
15779  __pyx_t_4 = 0;
15780  goto __pyx_L7_try_return;
15781 
15782  /* "PyClical.pyx":1728
15783  * 0.5{1,2}
15784  * """
15785  * try: # <<<<<<<<<<<<<<
15786  * return math.sinh(obj)
15787  * except:
15788  */
15789  }
15790  __pyx_L3_error:;
15791  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15792  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15793  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15794 
15795  /* "PyClical.pyx":1730
15796  * try:
15797  * return math.sinh(obj)
15798  * except: # <<<<<<<<<<<<<<
15799  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15800  *
15801  */
15802  /*except:*/ {
15803  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15804  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
15805  __Pyx_GOTREF(__pyx_t_4);
15806  __Pyx_GOTREF(__pyx_t_6);
15807  __Pyx_GOTREF(__pyx_t_5);
15808 
15809  /* "PyClical.pyx":1731
15810  * return math.sinh(obj)
15811  * except:
15812  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15813  *
15814  * cpdef inline asinh(obj,i = None):
15815  */
15816  __Pyx_XDECREF(__pyx_r);
15817  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15818  __Pyx_GOTREF(__pyx_t_7);
15819  __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)
15820  __Pyx_GOTREF(__pyx_t_8);
15821  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15822  __pyx_r = __pyx_t_8;
15823  __pyx_t_8 = 0;
15824  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15825  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15826  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15827  goto __pyx_L6_except_return;
15828  }
15829  __pyx_L5_except_error:;
15830 
15831  /* "PyClical.pyx":1728
15832  * 0.5{1,2}
15833  * """
15834  * try: # <<<<<<<<<<<<<<
15835  * return math.sinh(obj)
15836  * except:
15837  */
15838  __Pyx_XGIVEREF(__pyx_t_1);
15839  __Pyx_XGIVEREF(__pyx_t_2);
15840  __Pyx_XGIVEREF(__pyx_t_3);
15841  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15842  goto __pyx_L1_error;
15843  __pyx_L7_try_return:;
15844  __Pyx_XGIVEREF(__pyx_t_1);
15845  __Pyx_XGIVEREF(__pyx_t_2);
15846  __Pyx_XGIVEREF(__pyx_t_3);
15847  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15848  goto __pyx_L0;
15849  __pyx_L6_except_return:;
15850  __Pyx_XGIVEREF(__pyx_t_1);
15851  __Pyx_XGIVEREF(__pyx_t_2);
15852  __Pyx_XGIVEREF(__pyx_t_3);
15853  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15854  goto __pyx_L0;
15855  }
15856 
15857  /* "PyClical.pyx":1719
15858  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15859  *
15860  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15861  * """
15862  * Hyperbolic sine of multivector.
15863  */
15864 
15865  /* function exit code */
15866  __pyx_L1_error:;
15867  __Pyx_XDECREF(__pyx_t_4);
15868  __Pyx_XDECREF(__pyx_t_5);
15869  __Pyx_XDECREF(__pyx_t_6);
15870  __Pyx_XDECREF(__pyx_t_7);
15871  __Pyx_XDECREF(__pyx_t_8);
15872  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15873  __pyx_r = 0;
15874  __pyx_L0:;
15875  __Pyx_XGIVEREF(__pyx_r);
15876  __Pyx_RefNannyFinishContext();
15877  return __pyx_r;
15878  }
15879 
15880  /* Python wrapper */
15881  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15882  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 ";
15883  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15884  PyObject *__pyx_r = 0;
15885  __Pyx_RefNannyDeclarations
15886  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
15887  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15888 
15889  /* function exit code */
15890  __Pyx_RefNannyFinishContext();
15891  return __pyx_r;
15892  }
15893 
15894  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15895  PyObject *__pyx_r = NULL;
15896  __Pyx_RefNannyDeclarations
15897  PyObject *__pyx_t_1 = NULL;
15898  __Pyx_RefNannySetupContext("sinh", 0);
15899  __Pyx_XDECREF(__pyx_r);
15900  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
15901  __Pyx_GOTREF(__pyx_t_1);
15902  __pyx_r = __pyx_t_1;
15903  __pyx_t_1 = 0;
15904  goto __pyx_L0;
15905 
15906  /* function exit code */
15907  __pyx_L1_error:;
15908  __Pyx_XDECREF(__pyx_t_1);
15909  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15910  __pyx_r = NULL;
15911  __pyx_L0:;
15912  __Pyx_XGIVEREF(__pyx_r);
15913  __Pyx_RefNannyFinishContext();
15914  return __pyx_r;
15915  }
15916 
15917  /* "PyClical.pyx":1733
15918  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15919  *
15920  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15921  * """
15922  * Inverse hyperbolic sine of multivector with optional complexifier.
15923  */
15924 
15925  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15926  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) {
15927  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15928  PyObject *__pyx_r = NULL;
15929  __Pyx_RefNannyDeclarations
15930  int __pyx_t_1;
15931  int __pyx_t_2;
15932  PyObject *__pyx_t_3 = NULL;
15933  Clifford __pyx_t_4;
15934  PyObject *__pyx_t_5 = NULL;
15935  PyObject *__pyx_t_6 = NULL;
15936  PyObject *__pyx_t_7 = NULL;
15937  PyObject *__pyx_t_8 = NULL;
15938  PyObject *__pyx_t_9 = NULL;
15939  PyObject *__pyx_t_10 = NULL;
15940  PyObject *__pyx_t_11 = NULL;
15941  __Pyx_RefNannySetupContext("asinh", 0);
15942  if (__pyx_optional_args) {
15943  if (__pyx_optional_args->__pyx_n > 0) {
15944  __pyx_v_i = __pyx_optional_args->i;
15945  }
15946  }
15947 
15948  /* "PyClical.pyx":1744
15949  * {1,2}
15950  * """
15951  * if not (i is None): # <<<<<<<<<<<<<<
15952  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15953  * else:
15954  */
15955  __pyx_t_1 = (__pyx_v_i != Py_None);
15956  __pyx_t_2 = (__pyx_t_1 != 0);
15957  if (__pyx_t_2) {
15958 
15959  /* "PyClical.pyx":1745
15960  * """
15961  * if not (i is None):
15962  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15963  * else:
15964  * try:
15965  */
15966  __Pyx_XDECREF(__pyx_r);
15967  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
15968  __Pyx_GOTREF(__pyx_t_3);
15969  try {
15970  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15971  } catch(...) {
15972  __Pyx_CppExn2PyErr();
15973  __PYX_ERR(0, 1745, __pyx_L1_error)
15974  }
15975  __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)
15976  __Pyx_GOTREF(__pyx_t_5);
15977  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15978  __pyx_r = __pyx_t_5;
15979  __pyx_t_5 = 0;
15980  goto __pyx_L0;
15981 
15982  /* "PyClical.pyx":1744
15983  * {1,2}
15984  * """
15985  * if not (i is None): # <<<<<<<<<<<<<<
15986  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15987  * else:
15988  */
15989  }
15990 
15991  /* "PyClical.pyx":1747
15992  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15993  * else:
15994  * try: # <<<<<<<<<<<<<<
15995  * return math.asinh(obj)
15996  * except:
15997  */
15998  /*else*/ {
15999  {
16000  __Pyx_PyThreadState_declare
16001  __Pyx_PyThreadState_assign
16002  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16003  __Pyx_XGOTREF(__pyx_t_6);
16004  __Pyx_XGOTREF(__pyx_t_7);
16005  __Pyx_XGOTREF(__pyx_t_8);
16006  /*try:*/ {
16007 
16008  /* "PyClical.pyx":1748
16009  * else:
16010  * try:
16011  * return math.asinh(obj) # <<<<<<<<<<<<<<
16012  * except:
16013  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16014  */
16015  __Pyx_XDECREF(__pyx_r);
16016  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16017  __Pyx_GOTREF(__pyx_t_3);
16018  __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)
16019  __Pyx_GOTREF(__pyx_t_9);
16020  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16021  __pyx_t_3 = NULL;
16022  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16023  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16024  if (likely(__pyx_t_3)) {
16025  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16026  __Pyx_INCREF(__pyx_t_3);
16027  __Pyx_INCREF(function);
16028  __Pyx_DECREF_SET(__pyx_t_9, function);
16029  }
16030  }
16031  __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);
16032  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16033  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16034  __Pyx_GOTREF(__pyx_t_5);
16035  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16036  __pyx_r = __pyx_t_5;
16037  __pyx_t_5 = 0;
16038  goto __pyx_L8_try_return;
16039 
16040  /* "PyClical.pyx":1747
16041  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16042  * else:
16043  * try: # <<<<<<<<<<<<<<
16044  * return math.asinh(obj)
16045  * except:
16046  */
16047  }
16048  __pyx_L4_error:;
16049  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16050  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16051  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16052 
16053  /* "PyClical.pyx":1749
16054  * try:
16055  * return math.asinh(obj)
16056  * except: # <<<<<<<<<<<<<<
16057  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16058  *
16059  */
16060  /*except:*/ {
16061  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16062  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16063  __Pyx_GOTREF(__pyx_t_5);
16064  __Pyx_GOTREF(__pyx_t_9);
16065  __Pyx_GOTREF(__pyx_t_3);
16066 
16067  /* "PyClical.pyx":1750
16068  * return math.asinh(obj)
16069  * except:
16070  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16071  *
16072  * cpdef inline tan(obj,i = None):
16073  */
16074  __Pyx_XDECREF(__pyx_r);
16075  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16076  __Pyx_GOTREF(__pyx_t_10);
16077  __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)
16078  __Pyx_GOTREF(__pyx_t_11);
16079  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16080  __pyx_r = __pyx_t_11;
16081  __pyx_t_11 = 0;
16082  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16083  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16084  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16085  goto __pyx_L7_except_return;
16086  }
16087  __pyx_L6_except_error:;
16088 
16089  /* "PyClical.pyx":1747
16090  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16091  * else:
16092  * try: # <<<<<<<<<<<<<<
16093  * return math.asinh(obj)
16094  * except:
16095  */
16096  __Pyx_XGIVEREF(__pyx_t_6);
16097  __Pyx_XGIVEREF(__pyx_t_7);
16098  __Pyx_XGIVEREF(__pyx_t_8);
16099  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16100  goto __pyx_L1_error;
16101  __pyx_L8_try_return:;
16102  __Pyx_XGIVEREF(__pyx_t_6);
16103  __Pyx_XGIVEREF(__pyx_t_7);
16104  __Pyx_XGIVEREF(__pyx_t_8);
16105  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16106  goto __pyx_L0;
16107  __pyx_L7_except_return:;
16108  __Pyx_XGIVEREF(__pyx_t_6);
16109  __Pyx_XGIVEREF(__pyx_t_7);
16110  __Pyx_XGIVEREF(__pyx_t_8);
16111  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16112  goto __pyx_L0;
16113  }
16114  }
16115 
16116  /* "PyClical.pyx":1733
16117  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16118  *
16119  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16120  * """
16121  * Inverse hyperbolic sine of multivector with optional complexifier.
16122  */
16123 
16124  /* function exit code */
16125  __pyx_L1_error:;
16126  __Pyx_XDECREF(__pyx_t_3);
16127  __Pyx_XDECREF(__pyx_t_5);
16128  __Pyx_XDECREF(__pyx_t_9);
16129  __Pyx_XDECREF(__pyx_t_10);
16130  __Pyx_XDECREF(__pyx_t_11);
16131  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16132  __pyx_r = 0;
16133  __pyx_L0:;
16134  __Pyx_XGIVEREF(__pyx_r);
16135  __Pyx_RefNannyFinishContext();
16136  return __pyx_r;
16137  }
16138 
16139  /* Python wrapper */
16140  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16141  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 ";
16142  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16143  PyObject *__pyx_v_obj = 0;
16144  PyObject *__pyx_v_i = 0;
16145  PyObject *__pyx_r = 0;
16146  __Pyx_RefNannyDeclarations
16147  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16148  {
16149  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16150  PyObject* values[2] = {0,0};
16151  values[1] = ((PyObject *)Py_None);
16152  if (unlikely(__pyx_kwds)) {
16153  Py_ssize_t kw_args;
16154  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16155  switch (pos_args) {
16156  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16157  CYTHON_FALLTHROUGH;
16158  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16159  CYTHON_FALLTHROUGH;
16160  case 0: break;
16161  default: goto __pyx_L5_argtuple_error;
16162  }
16163  kw_args = PyDict_Size(__pyx_kwds);
16164  switch (pos_args) {
16165  case 0:
16166  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16167  else goto __pyx_L5_argtuple_error;
16168  CYTHON_FALLTHROUGH;
16169  case 1:
16170  if (kw_args > 0) {
16171  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16172  if (value) { values[1] = value; kw_args--; }
16173  }
16174  }
16175  if (unlikely(kw_args > 0)) {
16176  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16177  }
16178  } else {
16179  switch (PyTuple_GET_SIZE(__pyx_args)) {
16180  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16181  CYTHON_FALLTHROUGH;
16182  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16183  break;
16184  default: goto __pyx_L5_argtuple_error;
16185  }
16186  }
16187  __pyx_v_obj = values[0];
16188  __pyx_v_i = values[1];
16189  }
16190  goto __pyx_L4_argument_unpacking_done;
16191  __pyx_L5_argtuple_error:;
16192  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16193  __pyx_L3_error:;
16194  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16195  __Pyx_RefNannyFinishContext();
16196  return NULL;
16197  __pyx_L4_argument_unpacking_done:;
16198  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16199 
16200  /* function exit code */
16201  __Pyx_RefNannyFinishContext();
16202  return __pyx_r;
16203  }
16204 
16205  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16206  PyObject *__pyx_r = NULL;
16207  __Pyx_RefNannyDeclarations
16208  PyObject *__pyx_t_1 = NULL;
16209  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16210  __Pyx_RefNannySetupContext("asinh", 0);
16211  __Pyx_XDECREF(__pyx_r);
16212  __pyx_t_2.__pyx_n = 1;
16213  __pyx_t_2.i = __pyx_v_i;
16214  __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)
16215  __Pyx_GOTREF(__pyx_t_1);
16216  __pyx_r = __pyx_t_1;
16217  __pyx_t_1 = 0;
16218  goto __pyx_L0;
16219 
16220  /* function exit code */
16221  __pyx_L1_error:;
16222  __Pyx_XDECREF(__pyx_t_1);
16223  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16224  __pyx_r = NULL;
16225  __pyx_L0:;
16226  __Pyx_XGIVEREF(__pyx_r);
16227  __Pyx_RefNannyFinishContext();
16228  return __pyx_r;
16229  }
16230 
16231  /* "PyClical.pyx":1752
16232  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16233  *
16234  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16235  * """
16236  * Tangent of multivector with optional complexifier.
16237  */
16238 
16239  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16240  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) {
16241  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16242  PyObject *__pyx_r = NULL;
16243  __Pyx_RefNannyDeclarations
16244  int __pyx_t_1;
16245  int __pyx_t_2;
16246  PyObject *__pyx_t_3 = NULL;
16247  Clifford __pyx_t_4;
16248  PyObject *__pyx_t_5 = NULL;
16249  PyObject *__pyx_t_6 = NULL;
16250  PyObject *__pyx_t_7 = NULL;
16251  PyObject *__pyx_t_8 = NULL;
16252  PyObject *__pyx_t_9 = NULL;
16253  PyObject *__pyx_t_10 = NULL;
16254  PyObject *__pyx_t_11 = NULL;
16255  __Pyx_RefNannySetupContext("tan", 0);
16256  if (__pyx_optional_args) {
16257  if (__pyx_optional_args->__pyx_n > 0) {
16258  __pyx_v_i = __pyx_optional_args->i;
16259  }
16260  }
16261 
16262  /* "PyClical.pyx":1761
16263  * 0.7616{1,2}
16264  * """
16265  * if not (i is None): # <<<<<<<<<<<<<<
16266  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16267  * else:
16268  */
16269  __pyx_t_1 = (__pyx_v_i != Py_None);
16270  __pyx_t_2 = (__pyx_t_1 != 0);
16271  if (__pyx_t_2) {
16272 
16273  /* "PyClical.pyx":1762
16274  * """
16275  * if not (i is None):
16276  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16277  * else:
16278  * try:
16279  */
16280  __Pyx_XDECREF(__pyx_r);
16281  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16282  __Pyx_GOTREF(__pyx_t_3);
16283  try {
16284  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16285  } catch(...) {
16286  __Pyx_CppExn2PyErr();
16287  __PYX_ERR(0, 1762, __pyx_L1_error)
16288  }
16289  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1762, __pyx_L1_error)
16290  __Pyx_GOTREF(__pyx_t_5);
16291  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16292  __pyx_r = __pyx_t_5;
16293  __pyx_t_5 = 0;
16294  goto __pyx_L0;
16295 
16296  /* "PyClical.pyx":1761
16297  * 0.7616{1,2}
16298  * """
16299  * if not (i is None): # <<<<<<<<<<<<<<
16300  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16301  * else:
16302  */
16303  }
16304 
16305  /* "PyClical.pyx":1764
16306  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16307  * else:
16308  * try: # <<<<<<<<<<<<<<
16309  * return math.tan(obj)
16310  * except:
16311  */
16312  /*else*/ {
16313  {
16314  __Pyx_PyThreadState_declare
16315  __Pyx_PyThreadState_assign
16316  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16317  __Pyx_XGOTREF(__pyx_t_6);
16318  __Pyx_XGOTREF(__pyx_t_7);
16319  __Pyx_XGOTREF(__pyx_t_8);
16320  /*try:*/ {
16321 
16322  /* "PyClical.pyx":1765
16323  * else:
16324  * try:
16325  * return math.tan(obj) # <<<<<<<<<<<<<<
16326  * except:
16327  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16328  */
16329  __Pyx_XDECREF(__pyx_r);
16330  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16331  __Pyx_GOTREF(__pyx_t_3);
16332  __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)
16333  __Pyx_GOTREF(__pyx_t_9);
16334  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16335  __pyx_t_3 = NULL;
16336  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16337  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16338  if (likely(__pyx_t_3)) {
16339  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16340  __Pyx_INCREF(__pyx_t_3);
16341  __Pyx_INCREF(function);
16342  __Pyx_DECREF_SET(__pyx_t_9, function);
16343  }
16344  }
16345  __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);
16346  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16347  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16348  __Pyx_GOTREF(__pyx_t_5);
16349  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16350  __pyx_r = __pyx_t_5;
16351  __pyx_t_5 = 0;
16352  goto __pyx_L8_try_return;
16353 
16354  /* "PyClical.pyx":1764
16355  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16356  * else:
16357  * try: # <<<<<<<<<<<<<<
16358  * return math.tan(obj)
16359  * except:
16360  */
16361  }
16362  __pyx_L4_error:;
16363  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16364  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16365  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16366 
16367  /* "PyClical.pyx":1766
16368  * try:
16369  * return math.tan(obj)
16370  * except: # <<<<<<<<<<<<<<
16371  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16372  *
16373  */
16374  /*except:*/ {
16375  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16376  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16377  __Pyx_GOTREF(__pyx_t_5);
16378  __Pyx_GOTREF(__pyx_t_9);
16379  __Pyx_GOTREF(__pyx_t_3);
16380 
16381  /* "PyClical.pyx":1767
16382  * return math.tan(obj)
16383  * except:
16384  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16385  *
16386  * cpdef inline atan(obj,i = None):
16387  */
16388  __Pyx_XDECREF(__pyx_r);
16389  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16390  __Pyx_GOTREF(__pyx_t_10);
16391  __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)
16392  __Pyx_GOTREF(__pyx_t_11);
16393  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16394  __pyx_r = __pyx_t_11;
16395  __pyx_t_11 = 0;
16396  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16397  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16398  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16399  goto __pyx_L7_except_return;
16400  }
16401  __pyx_L6_except_error:;
16402 
16403  /* "PyClical.pyx":1764
16404  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16405  * else:
16406  * try: # <<<<<<<<<<<<<<
16407  * return math.tan(obj)
16408  * except:
16409  */
16410  __Pyx_XGIVEREF(__pyx_t_6);
16411  __Pyx_XGIVEREF(__pyx_t_7);
16412  __Pyx_XGIVEREF(__pyx_t_8);
16413  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16414  goto __pyx_L1_error;
16415  __pyx_L8_try_return:;
16416  __Pyx_XGIVEREF(__pyx_t_6);
16417  __Pyx_XGIVEREF(__pyx_t_7);
16418  __Pyx_XGIVEREF(__pyx_t_8);
16419  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16420  goto __pyx_L0;
16421  __pyx_L7_except_return:;
16422  __Pyx_XGIVEREF(__pyx_t_6);
16423  __Pyx_XGIVEREF(__pyx_t_7);
16424  __Pyx_XGIVEREF(__pyx_t_8);
16425  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16426  goto __pyx_L0;
16427  }
16428  }
16429 
16430  /* "PyClical.pyx":1752
16431  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16432  *
16433  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16434  * """
16435  * Tangent of multivector with optional complexifier.
16436  */
16437 
16438  /* function exit code */
16439  __pyx_L1_error:;
16440  __Pyx_XDECREF(__pyx_t_3);
16441  __Pyx_XDECREF(__pyx_t_5);
16442  __Pyx_XDECREF(__pyx_t_9);
16443  __Pyx_XDECREF(__pyx_t_10);
16444  __Pyx_XDECREF(__pyx_t_11);
16445  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16446  __pyx_r = 0;
16447  __pyx_L0:;
16448  __Pyx_XGIVEREF(__pyx_r);
16449  __Pyx_RefNannyFinishContext();
16450  return __pyx_r;
16451  }
16452 
16453  /* Python wrapper */
16454  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16455  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 ";
16456  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16457  PyObject *__pyx_v_obj = 0;
16458  PyObject *__pyx_v_i = 0;
16459  PyObject *__pyx_r = 0;
16460  __Pyx_RefNannyDeclarations
16461  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16462  {
16463  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16464  PyObject* values[2] = {0,0};
16465  values[1] = ((PyObject *)Py_None);
16466  if (unlikely(__pyx_kwds)) {
16467  Py_ssize_t kw_args;
16468  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16469  switch (pos_args) {
16470  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16471  CYTHON_FALLTHROUGH;
16472  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16473  CYTHON_FALLTHROUGH;
16474  case 0: break;
16475  default: goto __pyx_L5_argtuple_error;
16476  }
16477  kw_args = PyDict_Size(__pyx_kwds);
16478  switch (pos_args) {
16479  case 0:
16480  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16481  else goto __pyx_L5_argtuple_error;
16482  CYTHON_FALLTHROUGH;
16483  case 1:
16484  if (kw_args > 0) {
16485  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16486  if (value) { values[1] = value; kw_args--; }
16487  }
16488  }
16489  if (unlikely(kw_args > 0)) {
16490  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16491  }
16492  } else {
16493  switch (PyTuple_GET_SIZE(__pyx_args)) {
16494  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16495  CYTHON_FALLTHROUGH;
16496  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16497  break;
16498  default: goto __pyx_L5_argtuple_error;
16499  }
16500  }
16501  __pyx_v_obj = values[0];
16502  __pyx_v_i = values[1];
16503  }
16504  goto __pyx_L4_argument_unpacking_done;
16505  __pyx_L5_argtuple_error:;
16506  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16507  __pyx_L3_error:;
16508  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16509  __Pyx_RefNannyFinishContext();
16510  return NULL;
16511  __pyx_L4_argument_unpacking_done:;
16512  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16513 
16514  /* function exit code */
16515  __Pyx_RefNannyFinishContext();
16516  return __pyx_r;
16517  }
16518 
16519  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16520  PyObject *__pyx_r = NULL;
16521  __Pyx_RefNannyDeclarations
16522  PyObject *__pyx_t_1 = NULL;
16523  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16524  __Pyx_RefNannySetupContext("tan", 0);
16525  __Pyx_XDECREF(__pyx_r);
16526  __pyx_t_2.__pyx_n = 1;
16527  __pyx_t_2.i = __pyx_v_i;
16528  __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)
16529  __Pyx_GOTREF(__pyx_t_1);
16530  __pyx_r = __pyx_t_1;
16531  __pyx_t_1 = 0;
16532  goto __pyx_L0;
16533 
16534  /* function exit code */
16535  __pyx_L1_error:;
16536  __Pyx_XDECREF(__pyx_t_1);
16537  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16538  __pyx_r = NULL;
16539  __pyx_L0:;
16540  __Pyx_XGIVEREF(__pyx_r);
16541  __Pyx_RefNannyFinishContext();
16542  return __pyx_r;
16543  }
16544 
16545  /* "PyClical.pyx":1769
16546  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16547  *
16548  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16549  * """
16550  * Inverse tangent of multivector with optional complexifier.
16551  */
16552 
16553  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16554  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) {
16555  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16556  PyObject *__pyx_r = NULL;
16557  __Pyx_RefNannyDeclarations
16558  int __pyx_t_1;
16559  int __pyx_t_2;
16560  PyObject *__pyx_t_3 = NULL;
16561  Clifford __pyx_t_4;
16562  PyObject *__pyx_t_5 = NULL;
16563  PyObject *__pyx_t_6 = NULL;
16564  PyObject *__pyx_t_7 = NULL;
16565  PyObject *__pyx_t_8 = NULL;
16566  PyObject *__pyx_t_9 = NULL;
16567  PyObject *__pyx_t_10 = NULL;
16568  PyObject *__pyx_t_11 = NULL;
16569  __Pyx_RefNannySetupContext("atan", 0);
16570  if (__pyx_optional_args) {
16571  if (__pyx_optional_args->__pyx_n > 0) {
16572  __pyx_v_i = __pyx_optional_args->i;
16573  }
16574  }
16575 
16576  /* "PyClical.pyx":1778
16577  * {1}
16578  * """
16579  * if not (i is None): # <<<<<<<<<<<<<<
16580  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16581  * else:
16582  */
16583  __pyx_t_1 = (__pyx_v_i != Py_None);
16584  __pyx_t_2 = (__pyx_t_1 != 0);
16585  if (__pyx_t_2) {
16586 
16587  /* "PyClical.pyx":1779
16588  * """
16589  * if not (i is None):
16590  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16591  * else:
16592  * try:
16593  */
16594  __Pyx_XDECREF(__pyx_r);
16595  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16596  __Pyx_GOTREF(__pyx_t_3);
16597  try {
16598  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16599  } catch(...) {
16600  __Pyx_CppExn2PyErr();
16601  __PYX_ERR(0, 1779, __pyx_L1_error)
16602  }
16603  __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)
16604  __Pyx_GOTREF(__pyx_t_5);
16605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16606  __pyx_r = __pyx_t_5;
16607  __pyx_t_5 = 0;
16608  goto __pyx_L0;
16609 
16610  /* "PyClical.pyx":1778
16611  * {1}
16612  * """
16613  * if not (i is None): # <<<<<<<<<<<<<<
16614  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16615  * else:
16616  */
16617  }
16618 
16619  /* "PyClical.pyx":1781
16620  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16621  * else:
16622  * try: # <<<<<<<<<<<<<<
16623  * return math.atan(obj)
16624  * except:
16625  */
16626  /*else*/ {
16627  {
16628  __Pyx_PyThreadState_declare
16629  __Pyx_PyThreadState_assign
16630  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16631  __Pyx_XGOTREF(__pyx_t_6);
16632  __Pyx_XGOTREF(__pyx_t_7);
16633  __Pyx_XGOTREF(__pyx_t_8);
16634  /*try:*/ {
16635 
16636  /* "PyClical.pyx":1782
16637  * else:
16638  * try:
16639  * return math.atan(obj) # <<<<<<<<<<<<<<
16640  * except:
16641  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16642  */
16643  __Pyx_XDECREF(__pyx_r);
16644  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
16645  __Pyx_GOTREF(__pyx_t_3);
16646  __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)
16647  __Pyx_GOTREF(__pyx_t_9);
16648  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16649  __pyx_t_3 = NULL;
16650  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16651  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16652  if (likely(__pyx_t_3)) {
16653  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16654  __Pyx_INCREF(__pyx_t_3);
16655  __Pyx_INCREF(function);
16656  __Pyx_DECREF_SET(__pyx_t_9, function);
16657  }
16658  }
16659  __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);
16660  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16661  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
16662  __Pyx_GOTREF(__pyx_t_5);
16663  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16664  __pyx_r = __pyx_t_5;
16665  __pyx_t_5 = 0;
16666  goto __pyx_L8_try_return;
16667 
16668  /* "PyClical.pyx":1781
16669  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16670  * else:
16671  * try: # <<<<<<<<<<<<<<
16672  * return math.atan(obj)
16673  * except:
16674  */
16675  }
16676  __pyx_L4_error:;
16677  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16678  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16679  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16680 
16681  /* "PyClical.pyx":1783
16682  * try:
16683  * return math.atan(obj)
16684  * except: # <<<<<<<<<<<<<<
16685  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16686  *
16687  */
16688  /*except:*/ {
16689  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16690  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
16691  __Pyx_GOTREF(__pyx_t_5);
16692  __Pyx_GOTREF(__pyx_t_9);
16693  __Pyx_GOTREF(__pyx_t_3);
16694 
16695  /* "PyClical.pyx":1784
16696  * return math.atan(obj)
16697  * except:
16698  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16699  *
16700  * cpdef inline tanh(obj):
16701  */
16702  __Pyx_XDECREF(__pyx_r);
16703  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16704  __Pyx_GOTREF(__pyx_t_10);
16705  __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)
16706  __Pyx_GOTREF(__pyx_t_11);
16707  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16708  __pyx_r = __pyx_t_11;
16709  __pyx_t_11 = 0;
16710  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16711  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16712  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16713  goto __pyx_L7_except_return;
16714  }
16715  __pyx_L6_except_error:;
16716 
16717  /* "PyClical.pyx":1781
16718  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16719  * else:
16720  * try: # <<<<<<<<<<<<<<
16721  * return math.atan(obj)
16722  * except:
16723  */
16724  __Pyx_XGIVEREF(__pyx_t_6);
16725  __Pyx_XGIVEREF(__pyx_t_7);
16726  __Pyx_XGIVEREF(__pyx_t_8);
16727  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16728  goto __pyx_L1_error;
16729  __pyx_L8_try_return:;
16730  __Pyx_XGIVEREF(__pyx_t_6);
16731  __Pyx_XGIVEREF(__pyx_t_7);
16732  __Pyx_XGIVEREF(__pyx_t_8);
16733  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16734  goto __pyx_L0;
16735  __pyx_L7_except_return:;
16736  __Pyx_XGIVEREF(__pyx_t_6);
16737  __Pyx_XGIVEREF(__pyx_t_7);
16738  __Pyx_XGIVEREF(__pyx_t_8);
16739  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16740  goto __pyx_L0;
16741  }
16742  }
16743 
16744  /* "PyClical.pyx":1769
16745  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16746  *
16747  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16748  * """
16749  * Inverse tangent of multivector with optional complexifier.
16750  */
16751 
16752  /* function exit code */
16753  __pyx_L1_error:;
16754  __Pyx_XDECREF(__pyx_t_3);
16755  __Pyx_XDECREF(__pyx_t_5);
16756  __Pyx_XDECREF(__pyx_t_9);
16757  __Pyx_XDECREF(__pyx_t_10);
16758  __Pyx_XDECREF(__pyx_t_11);
16759  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16760  __pyx_r = 0;
16761  __pyx_L0:;
16762  __Pyx_XGIVEREF(__pyx_r);
16763  __Pyx_RefNannyFinishContext();
16764  return __pyx_r;
16765  }
16766 
16767  /* Python wrapper */
16768  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16769  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 ";
16770  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16771  PyObject *__pyx_v_obj = 0;
16772  PyObject *__pyx_v_i = 0;
16773  PyObject *__pyx_r = 0;
16774  __Pyx_RefNannyDeclarations
16775  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
16776  {
16777  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16778  PyObject* values[2] = {0,0};
16779  values[1] = ((PyObject *)Py_None);
16780  if (unlikely(__pyx_kwds)) {
16781  Py_ssize_t kw_args;
16782  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16783  switch (pos_args) {
16784  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16785  CYTHON_FALLTHROUGH;
16786  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16787  CYTHON_FALLTHROUGH;
16788  case 0: break;
16789  default: goto __pyx_L5_argtuple_error;
16790  }
16791  kw_args = PyDict_Size(__pyx_kwds);
16792  switch (pos_args) {
16793  case 0:
16794  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16795  else goto __pyx_L5_argtuple_error;
16796  CYTHON_FALLTHROUGH;
16797  case 1:
16798  if (kw_args > 0) {
16799  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16800  if (value) { values[1] = value; kw_args--; }
16801  }
16802  }
16803  if (unlikely(kw_args > 0)) {
16804  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
16805  }
16806  } else {
16807  switch (PyTuple_GET_SIZE(__pyx_args)) {
16808  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16809  CYTHON_FALLTHROUGH;
16810  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16811  break;
16812  default: goto __pyx_L5_argtuple_error;
16813  }
16814  }
16815  __pyx_v_obj = values[0];
16816  __pyx_v_i = values[1];
16817  }
16818  goto __pyx_L4_argument_unpacking_done;
16819  __pyx_L5_argtuple_error:;
16820  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
16821  __pyx_L3_error:;
16822  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16823  __Pyx_RefNannyFinishContext();
16824  return NULL;
16825  __pyx_L4_argument_unpacking_done:;
16826  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16827 
16828  /* function exit code */
16829  __Pyx_RefNannyFinishContext();
16830  return __pyx_r;
16831  }
16832 
16833  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16834  PyObject *__pyx_r = NULL;
16835  __Pyx_RefNannyDeclarations
16836  PyObject *__pyx_t_1 = NULL;
16837  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16838  __Pyx_RefNannySetupContext("atan", 0);
16839  __Pyx_XDECREF(__pyx_r);
16840  __pyx_t_2.__pyx_n = 1;
16841  __pyx_t_2.i = __pyx_v_i;
16842  __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)
16843  __Pyx_GOTREF(__pyx_t_1);
16844  __pyx_r = __pyx_t_1;
16845  __pyx_t_1 = 0;
16846  goto __pyx_L0;
16847 
16848  /* function exit code */
16849  __pyx_L1_error:;
16850  __Pyx_XDECREF(__pyx_t_1);
16851  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16852  __pyx_r = NULL;
16853  __pyx_L0:;
16854  __Pyx_XGIVEREF(__pyx_r);
16855  __Pyx_RefNannyFinishContext();
16856  return __pyx_r;
16857  }
16858 
16859  /* "PyClical.pyx":1786
16860  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16861  *
16862  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16863  * """
16864  * Hyperbolic tangent of multivector.
16865  */
16866 
16867  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16868  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16869  PyObject *__pyx_r = NULL;
16870  __Pyx_RefNannyDeclarations
16871  PyObject *__pyx_t_1 = NULL;
16872  PyObject *__pyx_t_2 = NULL;
16873  PyObject *__pyx_t_3 = NULL;
16874  PyObject *__pyx_t_4 = NULL;
16875  PyObject *__pyx_t_5 = NULL;
16876  PyObject *__pyx_t_6 = NULL;
16877  PyObject *__pyx_t_7 = NULL;
16878  PyObject *__pyx_t_8 = NULL;
16879  __Pyx_RefNannySetupContext("tanh", 0);
16880 
16881  /* "PyClical.pyx":1793
16882  * {1,2}
16883  * """
16884  * try: # <<<<<<<<<<<<<<
16885  * return math.tanh(obj)
16886  * except:
16887  */
16888  {
16889  __Pyx_PyThreadState_declare
16890  __Pyx_PyThreadState_assign
16891  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16892  __Pyx_XGOTREF(__pyx_t_1);
16893  __Pyx_XGOTREF(__pyx_t_2);
16894  __Pyx_XGOTREF(__pyx_t_3);
16895  /*try:*/ {
16896 
16897  /* "PyClical.pyx":1794
16898  * """
16899  * try:
16900  * return math.tanh(obj) # <<<<<<<<<<<<<<
16901  * except:
16902  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16903  */
16904  __Pyx_XDECREF(__pyx_r);
16905  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
16906  __Pyx_GOTREF(__pyx_t_5);
16907  __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)
16908  __Pyx_GOTREF(__pyx_t_6);
16909  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16910  __pyx_t_5 = NULL;
16911  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16912  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16913  if (likely(__pyx_t_5)) {
16914  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16915  __Pyx_INCREF(__pyx_t_5);
16916  __Pyx_INCREF(function);
16917  __Pyx_DECREF_SET(__pyx_t_6, function);
16918  }
16919  }
16920  __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);
16921  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16922  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
16923  __Pyx_GOTREF(__pyx_t_4);
16924  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16925  __pyx_r = __pyx_t_4;
16926  __pyx_t_4 = 0;
16927  goto __pyx_L7_try_return;
16928 
16929  /* "PyClical.pyx":1793
16930  * {1,2}
16931  * """
16932  * try: # <<<<<<<<<<<<<<
16933  * return math.tanh(obj)
16934  * except:
16935  */
16936  }
16937  __pyx_L3_error:;
16938  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16939  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16940  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16941 
16942  /* "PyClical.pyx":1795
16943  * try:
16944  * return math.tanh(obj)
16945  * except: # <<<<<<<<<<<<<<
16946  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16947  *
16948  */
16949  /*except:*/ {
16950  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16951  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
16952  __Pyx_GOTREF(__pyx_t_4);
16953  __Pyx_GOTREF(__pyx_t_6);
16954  __Pyx_GOTREF(__pyx_t_5);
16955 
16956  /* "PyClical.pyx":1796
16957  * return math.tanh(obj)
16958  * except:
16959  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16960  *
16961  * cpdef inline atanh(obj,i = None):
16962  */
16963  __Pyx_XDECREF(__pyx_r);
16964  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16965  __Pyx_GOTREF(__pyx_t_7);
16966  __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)
16967  __Pyx_GOTREF(__pyx_t_8);
16968  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16969  __pyx_r = __pyx_t_8;
16970  __pyx_t_8 = 0;
16971  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16972  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16973  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16974  goto __pyx_L6_except_return;
16975  }
16976  __pyx_L5_except_error:;
16977 
16978  /* "PyClical.pyx":1793
16979  * {1,2}
16980  * """
16981  * try: # <<<<<<<<<<<<<<
16982  * return math.tanh(obj)
16983  * except:
16984  */
16985  __Pyx_XGIVEREF(__pyx_t_1);
16986  __Pyx_XGIVEREF(__pyx_t_2);
16987  __Pyx_XGIVEREF(__pyx_t_3);
16988  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16989  goto __pyx_L1_error;
16990  __pyx_L7_try_return:;
16991  __Pyx_XGIVEREF(__pyx_t_1);
16992  __Pyx_XGIVEREF(__pyx_t_2);
16993  __Pyx_XGIVEREF(__pyx_t_3);
16994  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16995  goto __pyx_L0;
16996  __pyx_L6_except_return:;
16997  __Pyx_XGIVEREF(__pyx_t_1);
16998  __Pyx_XGIVEREF(__pyx_t_2);
16999  __Pyx_XGIVEREF(__pyx_t_3);
17000  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17001  goto __pyx_L0;
17002  }
17003 
17004  /* "PyClical.pyx":1786
17005  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17006  *
17007  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17008  * """
17009  * Hyperbolic tangent of multivector.
17010  */
17011 
17012  /* function exit code */
17013  __pyx_L1_error:;
17014  __Pyx_XDECREF(__pyx_t_4);
17015  __Pyx_XDECREF(__pyx_t_5);
17016  __Pyx_XDECREF(__pyx_t_6);
17017  __Pyx_XDECREF(__pyx_t_7);
17018  __Pyx_XDECREF(__pyx_t_8);
17019  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17020  __pyx_r = 0;
17021  __pyx_L0:;
17022  __Pyx_XGIVEREF(__pyx_r);
17023  __Pyx_RefNannyFinishContext();
17024  return __pyx_r;
17025  }
17026 
17027  /* Python wrapper */
17028  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17029  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 ";
17030  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17031  PyObject *__pyx_r = 0;
17032  __Pyx_RefNannyDeclarations
17033  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17034  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17035 
17036  /* function exit code */
17037  __Pyx_RefNannyFinishContext();
17038  return __pyx_r;
17039  }
17040 
17041  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17042  PyObject *__pyx_r = NULL;
17043  __Pyx_RefNannyDeclarations
17044  PyObject *__pyx_t_1 = NULL;
17045  __Pyx_RefNannySetupContext("tanh", 0);
17046  __Pyx_XDECREF(__pyx_r);
17047  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17048  __Pyx_GOTREF(__pyx_t_1);
17049  __pyx_r = __pyx_t_1;
17050  __pyx_t_1 = 0;
17051  goto __pyx_L0;
17052 
17053  /* function exit code */
17054  __pyx_L1_error:;
17055  __Pyx_XDECREF(__pyx_t_1);
17056  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17057  __pyx_r = NULL;
17058  __pyx_L0:;
17059  __Pyx_XGIVEREF(__pyx_r);
17060  __Pyx_RefNannyFinishContext();
17061  return __pyx_r;
17062  }
17063 
17064  /* "PyClical.pyx":1798
17065  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17066  *
17067  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17068  * """
17069  * Inverse hyperbolic tangent of multivector with optional complexifier.
17070  */
17071 
17072  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17073  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) {
17074  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17075  PyObject *__pyx_r = NULL;
17076  __Pyx_RefNannyDeclarations
17077  int __pyx_t_1;
17078  int __pyx_t_2;
17079  PyObject *__pyx_t_3 = NULL;
17080  Clifford __pyx_t_4;
17081  PyObject *__pyx_t_5 = NULL;
17082  PyObject *__pyx_t_6 = NULL;
17083  PyObject *__pyx_t_7 = NULL;
17084  PyObject *__pyx_t_8 = NULL;
17085  PyObject *__pyx_t_9 = NULL;
17086  PyObject *__pyx_t_10 = NULL;
17087  PyObject *__pyx_t_11 = NULL;
17088  __Pyx_RefNannySetupContext("atanh", 0);
17089  if (__pyx_optional_args) {
17090  if (__pyx_optional_args->__pyx_n > 0) {
17091  __pyx_v_i = __pyx_optional_args->i;
17092  }
17093  }
17094 
17095  /* "PyClical.pyx":1807
17096  * {1,2}
17097  * """
17098  * if not (i is None): # <<<<<<<<<<<<<<
17099  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17100  * else:
17101  */
17102  __pyx_t_1 = (__pyx_v_i != Py_None);
17103  __pyx_t_2 = (__pyx_t_1 != 0);
17104  if (__pyx_t_2) {
17105 
17106  /* "PyClical.pyx":1808
17107  * """
17108  * if not (i is None):
17109  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17110  * else:
17111  * try:
17112  */
17113  __Pyx_XDECREF(__pyx_r);
17114  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17115  __Pyx_GOTREF(__pyx_t_3);
17116  try {
17117  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17118  } catch(...) {
17119  __Pyx_CppExn2PyErr();
17120  __PYX_ERR(0, 1808, __pyx_L1_error)
17121  }
17122  __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)
17123  __Pyx_GOTREF(__pyx_t_5);
17124  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17125  __pyx_r = __pyx_t_5;
17126  __pyx_t_5 = 0;
17127  goto __pyx_L0;
17128 
17129  /* "PyClical.pyx":1807
17130  * {1,2}
17131  * """
17132  * if not (i is None): # <<<<<<<<<<<<<<
17133  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17134  * else:
17135  */
17136  }
17137 
17138  /* "PyClical.pyx":1810
17139  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17140  * else:
17141  * try: # <<<<<<<<<<<<<<
17142  * return math.atanh(obj)
17143  * except:
17144  */
17145  /*else*/ {
17146  {
17147  __Pyx_PyThreadState_declare
17148  __Pyx_PyThreadState_assign
17149  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17150  __Pyx_XGOTREF(__pyx_t_6);
17151  __Pyx_XGOTREF(__pyx_t_7);
17152  __Pyx_XGOTREF(__pyx_t_8);
17153  /*try:*/ {
17154 
17155  /* "PyClical.pyx":1811
17156  * else:
17157  * try:
17158  * return math.atanh(obj) # <<<<<<<<<<<<<<
17159  * except:
17160  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17161  */
17162  __Pyx_XDECREF(__pyx_r);
17163  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17164  __Pyx_GOTREF(__pyx_t_3);
17165  __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)
17166  __Pyx_GOTREF(__pyx_t_9);
17167  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17168  __pyx_t_3 = NULL;
17169  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17170  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17171  if (likely(__pyx_t_3)) {
17172  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17173  __Pyx_INCREF(__pyx_t_3);
17174  __Pyx_INCREF(function);
17175  __Pyx_DECREF_SET(__pyx_t_9, function);
17176  }
17177  }
17178  __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);
17179  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17180  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17181  __Pyx_GOTREF(__pyx_t_5);
17182  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17183  __pyx_r = __pyx_t_5;
17184  __pyx_t_5 = 0;
17185  goto __pyx_L8_try_return;
17186 
17187  /* "PyClical.pyx":1810
17188  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17189  * else:
17190  * try: # <<<<<<<<<<<<<<
17191  * return math.atanh(obj)
17192  * except:
17193  */
17194  }
17195  __pyx_L4_error:;
17196  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17197  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17198  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17199 
17200  /* "PyClical.pyx":1812
17201  * try:
17202  * return math.atanh(obj)
17203  * except: # <<<<<<<<<<<<<<
17204  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17205  *
17206  */
17207  /*except:*/ {
17208  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17209  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17210  __Pyx_GOTREF(__pyx_t_5);
17211  __Pyx_GOTREF(__pyx_t_9);
17212  __Pyx_GOTREF(__pyx_t_3);
17213 
17214  /* "PyClical.pyx":1813
17215  * return math.atanh(obj)
17216  * except:
17217  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17218  *
17219  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17220  */
17221  __Pyx_XDECREF(__pyx_r);
17222  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17223  __Pyx_GOTREF(__pyx_t_10);
17224  __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)
17225  __Pyx_GOTREF(__pyx_t_11);
17226  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17227  __pyx_r = __pyx_t_11;
17228  __pyx_t_11 = 0;
17229  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17230  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17231  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17232  goto __pyx_L7_except_return;
17233  }
17234  __pyx_L6_except_error:;
17235 
17236  /* "PyClical.pyx":1810
17237  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17238  * else:
17239  * try: # <<<<<<<<<<<<<<
17240  * return math.atanh(obj)
17241  * except:
17242  */
17243  __Pyx_XGIVEREF(__pyx_t_6);
17244  __Pyx_XGIVEREF(__pyx_t_7);
17245  __Pyx_XGIVEREF(__pyx_t_8);
17246  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17247  goto __pyx_L1_error;
17248  __pyx_L8_try_return:;
17249  __Pyx_XGIVEREF(__pyx_t_6);
17250  __Pyx_XGIVEREF(__pyx_t_7);
17251  __Pyx_XGIVEREF(__pyx_t_8);
17252  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17253  goto __pyx_L0;
17254  __pyx_L7_except_return:;
17255  __Pyx_XGIVEREF(__pyx_t_6);
17256  __Pyx_XGIVEREF(__pyx_t_7);
17257  __Pyx_XGIVEREF(__pyx_t_8);
17258  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17259  goto __pyx_L0;
17260  }
17261  }
17262 
17263  /* "PyClical.pyx":1798
17264  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17265  *
17266  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17267  * """
17268  * Inverse hyperbolic tangent of multivector with optional complexifier.
17269  */
17270 
17271  /* function exit code */
17272  __pyx_L1_error:;
17273  __Pyx_XDECREF(__pyx_t_3);
17274  __Pyx_XDECREF(__pyx_t_5);
17275  __Pyx_XDECREF(__pyx_t_9);
17276  __Pyx_XDECREF(__pyx_t_10);
17277  __Pyx_XDECREF(__pyx_t_11);
17278  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17279  __pyx_r = 0;
17280  __pyx_L0:;
17281  __Pyx_XGIVEREF(__pyx_r);
17282  __Pyx_RefNannyFinishContext();
17283  return __pyx_r;
17284  }
17285 
17286  /* Python wrapper */
17287  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17288  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 ";
17289  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17290  PyObject *__pyx_v_obj = 0;
17291  PyObject *__pyx_v_i = 0;
17292  PyObject *__pyx_r = 0;
17293  __Pyx_RefNannyDeclarations
17294  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17295  {
17296  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17297  PyObject* values[2] = {0,0};
17298  values[1] = ((PyObject *)Py_None);
17299  if (unlikely(__pyx_kwds)) {
17300  Py_ssize_t kw_args;
17301  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17302  switch (pos_args) {
17303  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17304  CYTHON_FALLTHROUGH;
17305  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17306  CYTHON_FALLTHROUGH;
17307  case 0: break;
17308  default: goto __pyx_L5_argtuple_error;
17309  }
17310  kw_args = PyDict_Size(__pyx_kwds);
17311  switch (pos_args) {
17312  case 0:
17313  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17314  else goto __pyx_L5_argtuple_error;
17315  CYTHON_FALLTHROUGH;
17316  case 1:
17317  if (kw_args > 0) {
17318  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17319  if (value) { values[1] = value; kw_args--; }
17320  }
17321  }
17322  if (unlikely(kw_args > 0)) {
17323  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17324  }
17325  } else {
17326  switch (PyTuple_GET_SIZE(__pyx_args)) {
17327  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17328  CYTHON_FALLTHROUGH;
17329  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17330  break;
17331  default: goto __pyx_L5_argtuple_error;
17332  }
17333  }
17334  __pyx_v_obj = values[0];
17335  __pyx_v_i = values[1];
17336  }
17337  goto __pyx_L4_argument_unpacking_done;
17338  __pyx_L5_argtuple_error:;
17339  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17340  __pyx_L3_error:;
17341  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17342  __Pyx_RefNannyFinishContext();
17343  return NULL;
17344  __pyx_L4_argument_unpacking_done:;
17345  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17346 
17347  /* function exit code */
17348  __Pyx_RefNannyFinishContext();
17349  return __pyx_r;
17350  }
17351 
17352  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17353  PyObject *__pyx_r = NULL;
17354  __Pyx_RefNannyDeclarations
17355  PyObject *__pyx_t_1 = NULL;
17356  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17357  __Pyx_RefNannySetupContext("atanh", 0);
17358  __Pyx_XDECREF(__pyx_r);
17359  __pyx_t_2.__pyx_n = 1;
17360  __pyx_t_2.i = __pyx_v_i;
17361  __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)
17362  __Pyx_GOTREF(__pyx_t_1);
17363  __pyx_r = __pyx_t_1;
17364  __pyx_t_1 = 0;
17365  goto __pyx_L0;
17366 
17367  /* function exit code */
17368  __pyx_L1_error:;
17369  __Pyx_XDECREF(__pyx_t_1);
17370  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17371  __pyx_r = NULL;
17372  __pyx_L0:;
17373  __Pyx_XGIVEREF(__pyx_r);
17374  __Pyx_RefNannyFinishContext();
17375  return __pyx_r;
17376  }
17377 
17378  /* "PyClical.pyx":1815
17379  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17380  *
17381  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17382  * """
17383  * Random multivector within a frame.
17384  */
17385 
17386  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17387  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) {
17388  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17389  PyObject *__pyx_r = NULL;
17390  __Pyx_RefNannyDeclarations
17391  PyObject *__pyx_t_1 = NULL;
17392  PyObject *__pyx_t_2 = NULL;
17393  scalar_t __pyx_t_3;
17394  PyObject *__pyx_t_4 = NULL;
17395  __Pyx_RefNannySetupContext("random_clifford", 0);
17396  if (__pyx_optional_args) {
17397  if (__pyx_optional_args->__pyx_n > 0) {
17398  __pyx_v_fill = __pyx_optional_args->fill;
17399  }
17400  }
17401 
17402  /* "PyClical.pyx":1822
17403  * {-3,-1,2}
17404  * """
17405  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17406  *
17407  * cpdef inline cga3(obj):
17408  */
17409  __Pyx_XDECREF(__pyx_r);
17410  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17411  __Pyx_GOTREF(__pyx_t_1);
17412  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17413  __Pyx_GOTREF(__pyx_t_2);
17414  __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)
17415  __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)
17416  __Pyx_GOTREF(__pyx_t_4);
17417  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17418  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17419  __pyx_r = __pyx_t_4;
17420  __pyx_t_4 = 0;
17421  goto __pyx_L0;
17422 
17423  /* "PyClical.pyx":1815
17424  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17425  *
17426  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17427  * """
17428  * Random multivector within a frame.
17429  */
17430 
17431  /* function exit code */
17432  __pyx_L1_error:;
17433  __Pyx_XDECREF(__pyx_t_1);
17434  __Pyx_XDECREF(__pyx_t_2);
17435  __Pyx_XDECREF(__pyx_t_4);
17436  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17437  __pyx_r = 0;
17438  __pyx_L0:;
17439  __Pyx_XGIVEREF(__pyx_r);
17440  __Pyx_RefNannyFinishContext();
17441  return __pyx_r;
17442  }
17443 
17444  /* Python wrapper */
17445  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17446  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 ";
17447  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17448  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17449  PyObject *__pyx_v_fill = 0;
17450  PyObject *__pyx_r = 0;
17451  __Pyx_RefNannyDeclarations
17452  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17453  {
17454  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17455  PyObject* values[2] = {0,0};
17456  values[1] = ((PyObject *)__pyx_float_1_0);
17457  if (unlikely(__pyx_kwds)) {
17458  Py_ssize_t kw_args;
17459  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17460  switch (pos_args) {
17461  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17462  CYTHON_FALLTHROUGH;
17463  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17464  CYTHON_FALLTHROUGH;
17465  case 0: break;
17466  default: goto __pyx_L5_argtuple_error;
17467  }
17468  kw_args = PyDict_Size(__pyx_kwds);
17469  switch (pos_args) {
17470  case 0:
17471  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17472  else goto __pyx_L5_argtuple_error;
17473  CYTHON_FALLTHROUGH;
17474  case 1:
17475  if (kw_args > 0) {
17476  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17477  if (value) { values[1] = value; kw_args--; }
17478  }
17479  }
17480  if (unlikely(kw_args > 0)) {
17481  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17482  }
17483  } else {
17484  switch (PyTuple_GET_SIZE(__pyx_args)) {
17485  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17486  CYTHON_FALLTHROUGH;
17487  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17488  break;
17489  default: goto __pyx_L5_argtuple_error;
17490  }
17491  }
17492  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17493  __pyx_v_fill = values[1];
17494  }
17495  goto __pyx_L4_argument_unpacking_done;
17496  __pyx_L5_argtuple_error:;
17497  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17498  __pyx_L3_error:;
17499  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17500  __Pyx_RefNannyFinishContext();
17501  return NULL;
17502  __pyx_L4_argument_unpacking_done:;
17503  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17504  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17505 
17506  /* function exit code */
17507  goto __pyx_L0;
17508  __pyx_L1_error:;
17509  __pyx_r = NULL;
17510  __pyx_L0:;
17511  __Pyx_RefNannyFinishContext();
17512  return __pyx_r;
17513  }
17514 
17515  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) {
17516  PyObject *__pyx_r = NULL;
17517  __Pyx_RefNannyDeclarations
17518  PyObject *__pyx_t_1 = NULL;
17519  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17520  __Pyx_RefNannySetupContext("random_clifford", 0);
17521  __Pyx_XDECREF(__pyx_r);
17522  __pyx_t_2.__pyx_n = 1;
17523  __pyx_t_2.fill = __pyx_v_fill;
17524  __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)
17525  __Pyx_GOTREF(__pyx_t_1);
17526  __pyx_r = __pyx_t_1;
17527  __pyx_t_1 = 0;
17528  goto __pyx_L0;
17529 
17530  /* function exit code */
17531  __pyx_L1_error:;
17532  __Pyx_XDECREF(__pyx_t_1);
17533  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17534  __pyx_r = NULL;
17535  __pyx_L0:;
17536  __Pyx_XGIVEREF(__pyx_r);
17537  __Pyx_RefNannyFinishContext();
17538  return __pyx_r;
17539  }
17540 
17541  /* "PyClical.pyx":1824
17542  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17543  *
17544  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17545  * """
17546  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17547  */
17548 
17549  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17550  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17551  PyObject *__pyx_r = NULL;
17552  __Pyx_RefNannyDeclarations
17553  PyObject *__pyx_t_1 = NULL;
17554  PyObject *__pyx_t_2 = NULL;
17555  __Pyx_RefNannySetupContext("cga3", 0);
17556 
17557  /* "PyClical.pyx":1831
17558  * 87{-1}+4{1}+18{2}+2{3}+85{4}
17559  * """
17560  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17561  *
17562  * cpdef inline cga3std(obj):
17563  */
17564  __Pyx_XDECREF(__pyx_r);
17565  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
17566  __Pyx_GOTREF(__pyx_t_1);
17567  __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)
17568  __Pyx_GOTREF(__pyx_t_2);
17569  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17570  __pyx_r = __pyx_t_2;
17571  __pyx_t_2 = 0;
17572  goto __pyx_L0;
17573 
17574  /* "PyClical.pyx":1824
17575  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17576  *
17577  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17578  * """
17579  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17580  */
17581 
17582  /* function exit code */
17583  __pyx_L1_error:;
17584  __Pyx_XDECREF(__pyx_t_1);
17585  __Pyx_XDECREF(__pyx_t_2);
17586  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17587  __pyx_r = 0;
17588  __pyx_L0:;
17589  __Pyx_XGIVEREF(__pyx_r);
17590  __Pyx_RefNannyFinishContext();
17591  return __pyx_r;
17592  }
17593 
17594  /* Python wrapper */
17595  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17596  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 ";
17597  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17598  PyObject *__pyx_r = 0;
17599  __Pyx_RefNannyDeclarations
17600  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
17601  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17602 
17603  /* function exit code */
17604  __Pyx_RefNannyFinishContext();
17605  return __pyx_r;
17606  }
17607 
17608  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17609  PyObject *__pyx_r = NULL;
17610  __Pyx_RefNannyDeclarations
17611  PyObject *__pyx_t_1 = NULL;
17612  __Pyx_RefNannySetupContext("cga3", 0);
17613  __Pyx_XDECREF(__pyx_r);
17614  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
17615  __Pyx_GOTREF(__pyx_t_1);
17616  __pyx_r = __pyx_t_1;
17617  __pyx_t_1 = 0;
17618  goto __pyx_L0;
17619 
17620  /* function exit code */
17621  __pyx_L1_error:;
17622  __Pyx_XDECREF(__pyx_t_1);
17623  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17624  __pyx_r = NULL;
17625  __pyx_L0:;
17626  __Pyx_XGIVEREF(__pyx_r);
17627  __Pyx_RefNannyFinishContext();
17628  return __pyx_r;
17629  }
17630 
17631  /* "PyClical.pyx":1833
17632  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17633  *
17634  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17635  * """
17636  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17637  */
17638 
17639  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17640  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17641  PyObject *__pyx_r = NULL;
17642  __Pyx_RefNannyDeclarations
17643  PyObject *__pyx_t_1 = NULL;
17644  PyObject *__pyx_t_2 = NULL;
17645  __Pyx_RefNannySetupContext("cga3std", 0);
17646 
17647  /* "PyClical.pyx":1842
17648  * 0
17649  * """
17650  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
17651  *
17652  * cpdef inline agc3(obj):
17653  */
17654  __Pyx_XDECREF(__pyx_r);
17655  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
17656  __Pyx_GOTREF(__pyx_t_1);
17657  __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)
17658  __Pyx_GOTREF(__pyx_t_2);
17659  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17660  __pyx_r = __pyx_t_2;
17661  __pyx_t_2 = 0;
17662  goto __pyx_L0;
17663 
17664  /* "PyClical.pyx":1833
17665  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17666  *
17667  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17668  * """
17669  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17670  */
17671 
17672  /* function exit code */
17673  __pyx_L1_error:;
17674  __Pyx_XDECREF(__pyx_t_1);
17675  __Pyx_XDECREF(__pyx_t_2);
17676  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17677  __pyx_r = 0;
17678  __pyx_L0:;
17679  __Pyx_XGIVEREF(__pyx_r);
17680  __Pyx_RefNannyFinishContext();
17681  return __pyx_r;
17682  }
17683 
17684  /* Python wrapper */
17685  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17686  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 ";
17687  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17688  PyObject *__pyx_r = 0;
17689  __Pyx_RefNannyDeclarations
17690  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
17691  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17692 
17693  /* function exit code */
17694  __Pyx_RefNannyFinishContext();
17695  return __pyx_r;
17696  }
17697 
17698  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17699  PyObject *__pyx_r = NULL;
17700  __Pyx_RefNannyDeclarations
17701  PyObject *__pyx_t_1 = NULL;
17702  __Pyx_RefNannySetupContext("cga3std", 0);
17703  __Pyx_XDECREF(__pyx_r);
17704  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
17705  __Pyx_GOTREF(__pyx_t_1);
17706  __pyx_r = __pyx_t_1;
17707  __pyx_t_1 = 0;
17708  goto __pyx_L0;
17709 
17710  /* function exit code */
17711  __pyx_L1_error:;
17712  __Pyx_XDECREF(__pyx_t_1);
17713  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17714  __pyx_r = NULL;
17715  __pyx_L0:;
17716  __Pyx_XGIVEREF(__pyx_r);
17717  __Pyx_RefNannyFinishContext();
17718  return __pyx_r;
17719  }
17720 
17721  /* "PyClical.pyx":1844
17722  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17723  *
17724  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17725  * """
17726  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17727  */
17728 
17729  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17730  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17731  PyObject *__pyx_r = NULL;
17732  __Pyx_RefNannyDeclarations
17733  PyObject *__pyx_t_1 = NULL;
17734  PyObject *__pyx_t_2 = NULL;
17735  __Pyx_RefNannySetupContext("agc3", 0);
17736 
17737  /* "PyClical.pyx":1853
17738  * 0
17739  * """
17740  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17741  *
17742  * # Some abbreviations.
17743  */
17744  __Pyx_XDECREF(__pyx_r);
17745  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
17746  __Pyx_GOTREF(__pyx_t_1);
17747  __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)
17748  __Pyx_GOTREF(__pyx_t_2);
17749  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17750  __pyx_r = __pyx_t_2;
17751  __pyx_t_2 = 0;
17752  goto __pyx_L0;
17753 
17754  /* "PyClical.pyx":1844
17755  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17756  *
17757  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17758  * """
17759  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17760  */
17761 
17762  /* function exit code */
17763  __pyx_L1_error:;
17764  __Pyx_XDECREF(__pyx_t_1);
17765  __Pyx_XDECREF(__pyx_t_2);
17766  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17767  __pyx_r = 0;
17768  __pyx_L0:;
17769  __Pyx_XGIVEREF(__pyx_r);
17770  __Pyx_RefNannyFinishContext();
17771  return __pyx_r;
17772  }
17773 
17774  /* Python wrapper */
17775  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17776  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 ";
17777  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17778  PyObject *__pyx_r = 0;
17779  __Pyx_RefNannyDeclarations
17780  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
17781  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17782 
17783  /* function exit code */
17784  __Pyx_RefNannyFinishContext();
17785  return __pyx_r;
17786  }
17787 
17788  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17789  PyObject *__pyx_r = NULL;
17790  __Pyx_RefNannyDeclarations
17791  PyObject *__pyx_t_1 = NULL;
17792  __Pyx_RefNannySetupContext("agc3", 0);
17793  __Pyx_XDECREF(__pyx_r);
17794  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
17795  __Pyx_GOTREF(__pyx_t_1);
17796  __pyx_r = __pyx_t_1;
17797  __pyx_t_1 = 0;
17798  goto __pyx_L0;
17799 
17800  /* function exit code */
17801  __pyx_L1_error:;
17802  __Pyx_XDECREF(__pyx_t_1);
17803  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17804  __pyx_r = NULL;
17805  __pyx_L0:;
17806  __Pyx_XGIVEREF(__pyx_r);
17807  __Pyx_RefNannyFinishContext();
17808  return __pyx_r;
17809  }
17810 
17811  /* "PyClical.pyx":1887
17812  * """
17813  *
17814  * def e(obj): # <<<<<<<<<<<<<<
17815  * """
17816  * Abbreviation for clifford(index_set(obj)).
17817  */
17818 
17819  /* Python wrapper */
17820  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17821  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 ";
17822  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17823  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17824  PyObject *__pyx_r = 0;
17825  __Pyx_RefNannyDeclarations
17826  __Pyx_RefNannySetupContext("e (wrapper)", 0);
17827  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17828 
17829  /* function exit code */
17830  __Pyx_RefNannyFinishContext();
17831  return __pyx_r;
17832  }
17833 
17834  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17835  PyObject *__pyx_r = NULL;
17836  __Pyx_RefNannyDeclarations
17837  PyObject *__pyx_t_1 = NULL;
17838  PyObject *__pyx_t_2 = NULL;
17839  __Pyx_RefNannySetupContext("e", 0);
17840 
17841  /* "PyClical.pyx":1898
17842  * 1
17843  * """
17844  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
17845  *
17846  * def istpq(p, q):
17847  */
17848  __Pyx_XDECREF(__pyx_r);
17849  __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)
17850  __Pyx_GOTREF(__pyx_t_1);
17851  __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)
17852  __Pyx_GOTREF(__pyx_t_2);
17853  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17854  __pyx_r = __pyx_t_2;
17855  __pyx_t_2 = 0;
17856  goto __pyx_L0;
17857 
17858  /* "PyClical.pyx":1887
17859  * """
17860  *
17861  * def e(obj): # <<<<<<<<<<<<<<
17862  * """
17863  * Abbreviation for clifford(index_set(obj)).
17864  */
17865 
17866  /* function exit code */
17867  __pyx_L1_error:;
17868  __Pyx_XDECREF(__pyx_t_1);
17869  __Pyx_XDECREF(__pyx_t_2);
17870  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17871  __pyx_r = NULL;
17872  __pyx_L0:;
17873  __Pyx_XGIVEREF(__pyx_r);
17874  __Pyx_RefNannyFinishContext();
17875  return __pyx_r;
17876  }
17877 
17878  /* "PyClical.pyx":1900
17879  * return clifford(index_set(obj))
17880  *
17881  * def istpq(p, q): # <<<<<<<<<<<<<<
17882  * """
17883  * Abbreviation for index_set({-q,...p}).
17884  */
17885 
17886  /* Python wrapper */
17887  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17888  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 ";
17889  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17890  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17891  PyObject *__pyx_v_p = 0;
17892  PyObject *__pyx_v_q = 0;
17893  PyObject *__pyx_r = 0;
17894  __Pyx_RefNannyDeclarations
17895  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
17896  {
17897  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17898  PyObject* values[2] = {0,0};
17899  if (unlikely(__pyx_kwds)) {
17900  Py_ssize_t kw_args;
17901  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17902  switch (pos_args) {
17903  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17904  CYTHON_FALLTHROUGH;
17905  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17906  CYTHON_FALLTHROUGH;
17907  case 0: break;
17908  default: goto __pyx_L5_argtuple_error;
17909  }
17910  kw_args = PyDict_Size(__pyx_kwds);
17911  switch (pos_args) {
17912  case 0:
17913  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17914  else goto __pyx_L5_argtuple_error;
17915  CYTHON_FALLTHROUGH;
17916  case 1:
17917  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17918  else {
17919  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
17920  }
17921  }
17922  if (unlikely(kw_args > 0)) {
17923  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
17924  }
17925  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17926  goto __pyx_L5_argtuple_error;
17927  } else {
17928  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17929  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17930  }
17931  __pyx_v_p = values[0];
17932  __pyx_v_q = values[1];
17933  }
17934  goto __pyx_L4_argument_unpacking_done;
17935  __pyx_L5_argtuple_error:;
17936  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
17937  __pyx_L3_error:;
17938  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17939  __Pyx_RefNannyFinishContext();
17940  return NULL;
17941  __pyx_L4_argument_unpacking_done:;
17942  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17943 
17944  /* function exit code */
17945  __Pyx_RefNannyFinishContext();
17946  return __pyx_r;
17947  }
17948 
17949  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17950  PyObject *__pyx_r = NULL;
17951  __Pyx_RefNannyDeclarations
17952  PyObject *__pyx_t_1 = NULL;
17953  PyObject *__pyx_t_2 = NULL;
17954  PyObject *__pyx_t_3 = NULL;
17955  __Pyx_RefNannySetupContext("istpq", 0);
17956 
17957  /* "PyClical.pyx":1907
17958  * {-3,-2,-1,1,2}
17959  * """
17960  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
17961  *
17962  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17963  */
17964  __Pyx_XDECREF(__pyx_r);
17965  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
17966  __Pyx_GOTREF(__pyx_t_1);
17967  __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)
17968  __Pyx_GOTREF(__pyx_t_2);
17969  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17970  __Pyx_GOTREF(__pyx_t_3);
17971  __Pyx_GIVEREF(__pyx_t_1);
17972  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17973  __Pyx_GIVEREF(__pyx_t_2);
17974  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17975  __pyx_t_1 = 0;
17976  __pyx_t_2 = 0;
17977  __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)
17978  __Pyx_GOTREF(__pyx_t_2);
17979  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17980  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17981  __Pyx_GOTREF(__pyx_t_3);
17982  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17983  __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)
17984  __Pyx_GOTREF(__pyx_t_2);
17985  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17986  __pyx_r = __pyx_t_2;
17987  __pyx_t_2 = 0;
17988  goto __pyx_L0;
17989 
17990  /* "PyClical.pyx":1900
17991  * return clifford(index_set(obj))
17992  *
17993  * def istpq(p, q): # <<<<<<<<<<<<<<
17994  * """
17995  * Abbreviation for index_set({-q,...p}).
17996  */
17997 
17998  /* function exit code */
17999  __pyx_L1_error:;
18000  __Pyx_XDECREF(__pyx_t_1);
18001  __Pyx_XDECREF(__pyx_t_2);
18002  __Pyx_XDECREF(__pyx_t_3);
18003  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18004  __pyx_r = NULL;
18005  __pyx_L0:;
18006  __Pyx_XGIVEREF(__pyx_r);
18007  __Pyx_RefNannyFinishContext();
18008  return __pyx_r;
18009  }
18010 
18011  /* "PyClical.pyx":1913
18012  *
18013  * # Doctest interface.
18014  * def _test(): # <<<<<<<<<<<<<<
18015  * import PyClical, doctest
18016  * return doctest.testmod(PyClical)
18017  */
18018 
18019  /* Python wrapper */
18020  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18021  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18022  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18023  PyObject *__pyx_r = 0;
18024  __Pyx_RefNannyDeclarations
18025  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18026  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18027 
18028  /* function exit code */
18029  __Pyx_RefNannyFinishContext();
18030  return __pyx_r;
18031  }
18032 
18033  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18034  PyObject *__pyx_v_PyClical = NULL;
18035  PyObject *__pyx_v_doctest = NULL;
18036  PyObject *__pyx_r = NULL;
18037  __Pyx_RefNannyDeclarations
18038  PyObject *__pyx_t_1 = NULL;
18039  PyObject *__pyx_t_2 = NULL;
18040  PyObject *__pyx_t_3 = NULL;
18041  __Pyx_RefNannySetupContext("_test", 0);
18042 
18043  /* "PyClical.pyx":1914
18044  * # Doctest interface.
18045  * def _test():
18046  * import PyClical, doctest # <<<<<<<<<<<<<<
18047  * return doctest.testmod(PyClical)
18048  *
18049  */
18050  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18051  __Pyx_GOTREF(__pyx_t_1);
18052  __pyx_v_PyClical = __pyx_t_1;
18053  __pyx_t_1 = 0;
18054  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18055  __Pyx_GOTREF(__pyx_t_1);
18056  __pyx_v_doctest = __pyx_t_1;
18057  __pyx_t_1 = 0;
18058 
18059  /* "PyClical.pyx":1915
18060  * def _test():
18061  * import PyClical, doctest
18062  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18063  *
18064  * if __name__ == "__main__":
18065  */
18066  __Pyx_XDECREF(__pyx_r);
18067  __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)
18068  __Pyx_GOTREF(__pyx_t_2);
18069  __pyx_t_3 = NULL;
18070  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18071  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18072  if (likely(__pyx_t_3)) {
18073  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18074  __Pyx_INCREF(__pyx_t_3);
18075  __Pyx_INCREF(function);
18076  __Pyx_DECREF_SET(__pyx_t_2, function);
18077  }
18078  }
18079  __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);
18080  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18081  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18082  __Pyx_GOTREF(__pyx_t_1);
18083  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18084  __pyx_r = __pyx_t_1;
18085  __pyx_t_1 = 0;
18086  goto __pyx_L0;
18087 
18088  /* "PyClical.pyx":1913
18089  *
18090  * # Doctest interface.
18091  * def _test(): # <<<<<<<<<<<<<<
18092  * import PyClical, doctest
18093  * return doctest.testmod(PyClical)
18094  */
18095 
18096  /* function exit code */
18097  __pyx_L1_error:;
18098  __Pyx_XDECREF(__pyx_t_1);
18099  __Pyx_XDECREF(__pyx_t_2);
18100  __Pyx_XDECREF(__pyx_t_3);
18101  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18102  __pyx_r = NULL;
18103  __pyx_L0:;
18104  __Pyx_XDECREF(__pyx_v_PyClical);
18105  __Pyx_XDECREF(__pyx_v_doctest);
18106  __Pyx_XGIVEREF(__pyx_r);
18107  __Pyx_RefNannyFinishContext();
18108  return __pyx_r;
18109  }
18110  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18111 
18112  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18113  struct __pyx_obj_8PyClical_index_set *p;
18114  PyObject *o;
18115  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18116  o = (*t->tp_alloc)(t, 0);
18117  } else {
18118  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18119  }
18120  if (unlikely(!o)) return 0;
18121  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18122  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18123  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18124  return o;
18125  bad:
18126  Py_DECREF(o); o = 0;
18127  return NULL;
18128  }
18129 
18130  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18131  #if CYTHON_USE_TP_FINALIZE
18132  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))) {
18133  if (PyObject_CallFinalizerFromDealloc(o)) return;
18134  }
18135  #endif
18136  {
18137  PyObject *etype, *eval, *etb;
18138  PyErr_Fetch(&etype, &eval, &etb);
18139  ++Py_REFCNT(o);
18140  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18141  --Py_REFCNT(o);
18142  PyErr_Restore(etype, eval, etb);
18143  }
18144  (*Py_TYPE(o)->tp_free)(o);
18145  }
18146  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18147  PyObject *r;
18148  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18149  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18150  Py_DECREF(x);
18151  return r;
18152  }
18153 
18154  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18155  if (v) {
18156  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18157  }
18158  else {
18159  PyErr_Format(PyExc_NotImplementedError,
18160  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18161  return -1;
18162  }
18163  }
18164 
18165  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18166  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18167  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18168  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18169  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18170  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18171  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18172  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18173  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18174  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18175  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18176  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18177  {0, 0, 0, 0}
18178  };
18179 
18180  static PyNumberMethods __pyx_tp_as_number_index_set = {
18181  0, /*nb_add*/
18182  0, /*nb_subtract*/
18183  0, /*nb_multiply*/
18184  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18185  0, /*nb_divide*/
18186  #endif
18187  0, /*nb_remainder*/
18188  0, /*nb_divmod*/
18189  0, /*nb_power*/
18190  0, /*nb_negative*/
18191  0, /*nb_positive*/
18192  0, /*nb_absolute*/
18193  0, /*nb_nonzero*/
18194  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18195  0, /*nb_lshift*/
18196  0, /*nb_rshift*/
18197  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18198  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18199  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18200  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18201  0, /*nb_coerce*/
18202  #endif
18203  0, /*nb_int*/
18204  #if PY_MAJOR_VERSION < 3
18205  0, /*nb_long*/
18206  #else
18207  0, /*reserved*/
18208  #endif
18209  0, /*nb_float*/
18210  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18211  0, /*nb_oct*/
18212  #endif
18213  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18214  0, /*nb_hex*/
18215  #endif
18216  0, /*nb_inplace_add*/
18217  0, /*nb_inplace_subtract*/
18218  0, /*nb_inplace_multiply*/
18219  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18220  0, /*nb_inplace_divide*/
18221  #endif
18222  0, /*nb_inplace_remainder*/
18223  0, /*nb_inplace_power*/
18224  0, /*nb_inplace_lshift*/
18225  0, /*nb_inplace_rshift*/
18226  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18227  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18228  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18229  0, /*nb_floor_divide*/
18230  0, /*nb_true_divide*/
18231  0, /*nb_inplace_floor_divide*/
18232  0, /*nb_inplace_true_divide*/
18233  0, /*nb_index*/
18234  #if PY_VERSION_HEX >= 0x03050000
18235  0, /*nb_matrix_multiply*/
18236  #endif
18237  #if PY_VERSION_HEX >= 0x03050000
18238  0, /*nb_inplace_matrix_multiply*/
18239  #endif
18240  };
18241 
18242  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18243  0, /*sq_length*/
18244  0, /*sq_concat*/
18245  0, /*sq_repeat*/
18246  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18247  0, /*sq_slice*/
18248  0, /*sq_ass_item*/
18249  0, /*sq_ass_slice*/
18250  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18251  0, /*sq_inplace_concat*/
18252  0, /*sq_inplace_repeat*/
18253  };
18254 
18255  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18256  0, /*mp_length*/
18257  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18258  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18259  };
18260 
18261  static PyTypeObject __pyx_type_8PyClical_index_set = {
18262  PyVarObject_HEAD_INIT(0, 0)
18263  "PyClical.index_set", /*tp_name*/
18264  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18265  0, /*tp_itemsize*/
18266  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18267  0, /*tp_print*/
18268  0, /*tp_getattr*/
18269  0, /*tp_setattr*/
18270  #if PY_MAJOR_VERSION < 3
18271  0, /*tp_compare*/
18272  #endif
18273  #if PY_MAJOR_VERSION >= 3
18274  0, /*tp_as_async*/
18275  #endif
18276  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18277  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18278  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18279  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18280  0, /*tp_hash*/
18281  0, /*tp_call*/
18282  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18283  0, /*tp_getattro*/
18284  0, /*tp_setattro*/
18285  0, /*tp_as_buffer*/
18286  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18287  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18288  0, /*tp_traverse*/
18289  0, /*tp_clear*/
18290  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18291  0, /*tp_weaklistoffset*/
18292  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18293  0, /*tp_iternext*/
18294  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18295  0, /*tp_members*/
18296  0, /*tp_getset*/
18297  0, /*tp_base*/
18298  0, /*tp_dict*/
18299  0, /*tp_descr_get*/
18300  0, /*tp_descr_set*/
18301  0, /*tp_dictoffset*/
18302  0, /*tp_init*/
18303  0, /*tp_alloc*/
18304  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18305  0, /*tp_free*/
18306  0, /*tp_is_gc*/
18307  0, /*tp_bases*/
18308  0, /*tp_mro*/
18309  0, /*tp_cache*/
18310  0, /*tp_subclasses*/
18311  0, /*tp_weaklist*/
18312  0, /*tp_del*/
18313  0, /*tp_version_tag*/
18314  #if PY_VERSION_HEX >= 0x030400a1
18315  0, /*tp_finalize*/
18316  #endif
18317  };
18318  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18319 
18320  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18321  struct __pyx_obj_8PyClical_clifford *p;
18322  PyObject *o;
18323  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18324  o = (*t->tp_alloc)(t, 0);
18325  } else {
18326  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18327  }
18328  if (unlikely(!o)) return 0;
18329  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18330  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18331  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18332  return o;
18333  bad:
18334  Py_DECREF(o); o = 0;
18335  return NULL;
18336  }
18337 
18338  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18339  #if CYTHON_USE_TP_FINALIZE
18340  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))) {
18341  if (PyObject_CallFinalizerFromDealloc(o)) return;
18342  }
18343  #endif
18344  {
18345  PyObject *etype, *eval, *etb;
18346  PyErr_Fetch(&etype, &eval, &etb);
18347  ++Py_REFCNT(o);
18348  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18349  --Py_REFCNT(o);
18350  PyErr_Restore(etype, eval, etb);
18351  }
18352  (*Py_TYPE(o)->tp_free)(o);
18353  }
18354  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18355  PyObject *r;
18356  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18357  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18358  Py_DECREF(x);
18359  return r;
18360  }
18361 
18362  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18363  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18364  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18365  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18366  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18367  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18368  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18369  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18370  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18371  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18372  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18373  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18374  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18375  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18376  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18377  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18378  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18379  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18380  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18381  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18382  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18383  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18384  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18385  {0, 0, 0, 0}
18386  };
18387 
18388  static PyNumberMethods __pyx_tp_as_number_clifford = {
18389  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18390  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18391  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18392  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18393  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18394  #endif
18395  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18396  0, /*nb_divmod*/
18397  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18398  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18399  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18400  0, /*nb_absolute*/
18401  0, /*nb_nonzero*/
18402  0, /*nb_invert*/
18403  0, /*nb_lshift*/
18404  0, /*nb_rshift*/
18405  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18406  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18407  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18408  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18409  0, /*nb_coerce*/
18410  #endif
18411  0, /*nb_int*/
18412  #if PY_MAJOR_VERSION < 3
18413  0, /*nb_long*/
18414  #else
18415  0, /*reserved*/
18416  #endif
18417  0, /*nb_float*/
18418  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18419  0, /*nb_oct*/
18420  #endif
18421  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18422  0, /*nb_hex*/
18423  #endif
18424  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18425  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18426  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18427  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18428  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18429  #endif
18430  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18431  0, /*nb_inplace_power*/
18432  0, /*nb_inplace_lshift*/
18433  0, /*nb_inplace_rshift*/
18434  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18435  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18436  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18437  0, /*nb_floor_divide*/
18438  0, /*nb_true_divide*/
18439  0, /*nb_inplace_floor_divide*/
18440  0, /*nb_inplace_true_divide*/
18441  0, /*nb_index*/
18442  #if PY_VERSION_HEX >= 0x03050000
18443  0, /*nb_matrix_multiply*/
18444  #endif
18445  #if PY_VERSION_HEX >= 0x03050000
18446  0, /*nb_inplace_matrix_multiply*/
18447  #endif
18448  };
18449 
18450  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18451  0, /*sq_length*/
18452  0, /*sq_concat*/
18453  0, /*sq_repeat*/
18454  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18455  0, /*sq_slice*/
18456  0, /*sq_ass_item*/
18457  0, /*sq_ass_slice*/
18458  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18459  0, /*sq_inplace_concat*/
18460  0, /*sq_inplace_repeat*/
18461  };
18462 
18463  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18464  0, /*mp_length*/
18465  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18466  0, /*mp_ass_subscript*/
18467  };
18468 
18469  static PyTypeObject __pyx_type_8PyClical_clifford = {
18470  PyVarObject_HEAD_INIT(0, 0)
18471  "PyClical.clifford", /*tp_name*/
18472  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18473  0, /*tp_itemsize*/
18474  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18475  0, /*tp_print*/
18476  0, /*tp_getattr*/
18477  0, /*tp_setattr*/
18478  #if PY_MAJOR_VERSION < 3
18479  0, /*tp_compare*/
18480  #endif
18481  #if PY_MAJOR_VERSION >= 3
18482  0, /*tp_as_async*/
18483  #endif
18484  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18485  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18486  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18487  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18488  0, /*tp_hash*/
18489  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18490  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18491  0, /*tp_getattro*/
18492  0, /*tp_setattro*/
18493  0, /*tp_as_buffer*/
18494  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18495  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18496  0, /*tp_traverse*/
18497  0, /*tp_clear*/
18498  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18499  0, /*tp_weaklistoffset*/
18500  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18501  0, /*tp_iternext*/
18502  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18503  0, /*tp_members*/
18504  0, /*tp_getset*/
18505  0, /*tp_base*/
18506  0, /*tp_dict*/
18507  0, /*tp_descr_get*/
18508  0, /*tp_descr_set*/
18509  0, /*tp_dictoffset*/
18510  0, /*tp_init*/
18511  0, /*tp_alloc*/
18512  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
18513  0, /*tp_free*/
18514  0, /*tp_is_gc*/
18515  0, /*tp_bases*/
18516  0, /*tp_mro*/
18517  0, /*tp_cache*/
18518  0, /*tp_subclasses*/
18519  0, /*tp_weaklist*/
18520  0, /*tp_del*/
18521  0, /*tp_version_tag*/
18522  #if PY_VERSION_HEX >= 0x030400a1
18523  0, /*tp_finalize*/
18524  #endif
18525  };
18526 
18527  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18528  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18529 
18530  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18531  PyObject *o;
18532  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__)))) {
18533  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18534  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18535  (void) PyObject_INIT(o, t);
18536  PyObject_GC_Track(o);
18537  } else {
18538  o = (*t->tp_alloc)(t, 0);
18539  if (unlikely(!o)) return 0;
18540  }
18541  return o;
18542  }
18543 
18544  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18545  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18546  PyObject_GC_UnTrack(o);
18547  Py_CLEAR(p->__pyx_v_idx);
18548  Py_CLEAR(p->__pyx_v_self);
18549  Py_CLEAR(p->__pyx_t_0);
18550  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__)))) {
18551  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18552  } else {
18553  (*Py_TYPE(o)->tp_free)(o);
18554  }
18555  }
18556 
18557  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
18558  int e;
18559  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18560  if (p->__pyx_v_idx) {
18561  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
18562  }
18563  if (p->__pyx_v_self) {
18564  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
18565  }
18566  if (p->__pyx_t_0) {
18567  e = (*v)(p->__pyx_t_0, a); if (e) return e;
18568  }
18569  return 0;
18570  }
18571 
18572  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18573  PyVarObject_HEAD_INIT(0, 0)
18574  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
18575  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
18576  0, /*tp_itemsize*/
18577  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
18578  0, /*tp_print*/
18579  0, /*tp_getattr*/
18580  0, /*tp_setattr*/
18581  #if PY_MAJOR_VERSION < 3
18582  0, /*tp_compare*/
18583  #endif
18584  #if PY_MAJOR_VERSION >= 3
18585  0, /*tp_as_async*/
18586  #endif
18587  0, /*tp_repr*/
18588  0, /*tp_as_number*/
18589  0, /*tp_as_sequence*/
18590  0, /*tp_as_mapping*/
18591  0, /*tp_hash*/
18592  0, /*tp_call*/
18593  0, /*tp_str*/
18594  0, /*tp_getattro*/
18595  0, /*tp_setattro*/
18596  0, /*tp_as_buffer*/
18597  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
18598  0, /*tp_doc*/
18599  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
18600  0, /*tp_clear*/
18601  0, /*tp_richcompare*/
18602  0, /*tp_weaklistoffset*/
18603  0, /*tp_iter*/
18604  0, /*tp_iternext*/
18605  0, /*tp_methods*/
18606  0, /*tp_members*/
18607  0, /*tp_getset*/
18608  0, /*tp_base*/
18609  0, /*tp_dict*/
18610  0, /*tp_descr_get*/
18611  0, /*tp_descr_set*/
18612  0, /*tp_dictoffset*/
18613  0, /*tp_init*/
18614  0, /*tp_alloc*/
18615  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
18616  0, /*tp_free*/
18617  0, /*tp_is_gc*/
18618  0, /*tp_bases*/
18619  0, /*tp_mro*/
18620  0, /*tp_cache*/
18621  0, /*tp_subclasses*/
18622  0, /*tp_weaklist*/
18623  0, /*tp_del*/
18624  0, /*tp_version_tag*/
18625  #if PY_VERSION_HEX >= 0x030400a1
18626  0, /*tp_finalize*/
18627  #endif
18628  };
18629 
18630  static PyMethodDef __pyx_methods[] = {
18631  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18632  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18633  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18634  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18635  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18636  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18637  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18638  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18639  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18640  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18641  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18642  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18643  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18644  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18645  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18646  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18647  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18648  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18649  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18650  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18651  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18652  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18653  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18654  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18655  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18656  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18657  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18658  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18659  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18660  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18661  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18662  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18663  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18664  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18665  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18666  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18667  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18668  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18669  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18670  {0, 0, 0, 0}
18671  };
18672 
18673  #if PY_MAJOR_VERSION >= 3
18674  #if CYTHON_PEP489_MULTI_PHASE_INIT
18675  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
18676  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
18677  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
18678  {Py_mod_create, (void*)__pyx_pymod_create},
18679  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
18680  {0, NULL}
18681  };
18682  #endif
18683 
18684  static struct PyModuleDef __pyx_moduledef = {
18685  PyModuleDef_HEAD_INIT,
18686  "PyClical",
18687  0, /* m_doc */
18688  #if CYTHON_PEP489_MULTI_PHASE_INIT
18689  0, /* m_size */
18690  #else
18691  -1, /* m_size */
18692  #endif
18693  __pyx_methods /* m_methods */,
18694  #if CYTHON_PEP489_MULTI_PHASE_INIT
18695  __pyx_moduledef_slots, /* m_slots */
18696  #else
18697  NULL, /* m_reload */
18698  #endif
18699  NULL, /* m_traverse */
18700  NULL, /* m_clear */
18701  NULL /* m_free */
18702  };
18703  #endif
18704  #ifndef CYTHON_SMALL_CODE
18705 #if defined(__clang__)
18706  #define CYTHON_SMALL_CODE
18707 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
18708  #define CYTHON_SMALL_CODE __attribute__((cold))
18709 #else
18710  #define CYTHON_SMALL_CODE
18711 #endif
18712 #endif
18713 
18714 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18715  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
18716  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18717  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18718  {&__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},
18719  {&__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},
18720  {&__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},
18721  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18722  {&__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},
18723  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18724  {&__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},
18725  {&__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},
18726  {&__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},
18727  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18728  {&__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},
18729  {&__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},
18730  {&__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},
18731  {&__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},
18732  {&__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},
18733  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18734  {&__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},
18735  {&__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},
18736  {&__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},
18737  {&__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},
18738  {&__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},
18739  {&__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},
18740  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18741  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18742  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18743  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18744  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18745  {&__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},
18746  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18747  {&__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},
18748  {&__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},
18749  {&__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},
18750  {&__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},
18751  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18752  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18753  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18754  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18755  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18756  {&__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},
18757  {&__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},
18758  {&__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},
18759  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18760  {&__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},
18761  {&__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},
18762  {&__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},
18763  {&__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},
18764  {&__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},
18765  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18766  {&__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},
18767  {&__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},
18768  {&__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},
18769  {&__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},
18770  {&__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},
18771  {&__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},
18772  {&__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},
18773  {&__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},
18774  {&__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},
18775  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18776  {&__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},
18777  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18778  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18779  {&__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},
18780  {&__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},
18781  {&__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},
18782  {&__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},
18783  {&__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},
18784  {&__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},
18785  {&__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},
18786  {&__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},
18787  {&__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},
18788  {&__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},
18789  {&__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},
18790  {&__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},
18791  {&__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},
18792  {&__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},
18793  {&__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},
18794  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18795  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
18796  {&__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},
18797  {&__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},
18798  {&__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},
18799  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
18800  {&__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},
18801  {&__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},
18802  {&__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},
18803  {&__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},
18804  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18805  {&__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},
18806  {&__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},
18807  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18808  {&__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},
18809  {&__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},
18810  {&__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},
18811  {&__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},
18812  {&__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},
18813  {&__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},
18814  {&__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},
18815  {&__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},
18816  {&__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},
18817  {&__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},
18818  {&__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},
18819  {&__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},
18820  {&__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},
18821  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18822  {&__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},
18823  {&__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},
18824  {&__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},
18825  {&__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},
18826  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18827  {&__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},
18828  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18829  {&__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},
18830  {&__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},
18831  {&__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},
18832  {&__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},
18833  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18834  {&__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},
18835  {&__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},
18836  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18837  {&__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},
18838  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
18839  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
18840  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
18841  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18842  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
18843  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
18844  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18845  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
18846  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18847  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18848  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18849  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18850  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18851  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18852  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
18853  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18854  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18855  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18856  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
18857  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18858  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18859  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18860  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18861  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18862  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
18863  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
18864  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18865  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18866  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18867  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18868  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18869  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18870  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18871  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18872  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18873  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18874  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18875  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18876  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18877  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18878  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18879  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18880  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18881  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18882  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18883  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18884  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18885  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18886  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18887  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18888  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18889  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18890  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18891  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18892  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18893  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18894  {&__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},
18895  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18896  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18897  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18898  {&__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},
18899  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18900  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18901  {&__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},
18902  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18903  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18904  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18905  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18906  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18907  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18908  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18909  {&__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},
18910  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
18911  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18912  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18913  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18914  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18915  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
18916  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18917  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
18918  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
18919  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18920  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18921  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18922  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18923  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
18924  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18925  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
18926  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18927  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
18928  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18929  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
18930  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
18931  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
18932  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
18933  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
18934  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
18935  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18936  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18937  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
18938  {&__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},
18939  {&__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},
18940  {&__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},
18941  {&__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},
18942  {&__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},
18943  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18944  {&__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},
18945  {&__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},
18946  {&__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},
18947  {&__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},
18948  {&__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},
18949  {&__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},
18950  {&__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},
18951  {&__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},
18952  {&__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},
18953  {&__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},
18954  {&__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},
18955  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18956  {&__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},
18957  {&__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},
18958  {&__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},
18959  {&__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},
18960  {&__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},
18961  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
18962  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
18963  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
18964  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
18965  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
18966  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
18967  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
18968  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
18969  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
18970  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
18971  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
18972  {&__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},
18973  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
18974  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
18975  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
18976  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
18977  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
18978  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
18979  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
18980  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
18981  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
18982  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
18983  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
18984  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
18985  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
18986  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
18987  {&__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},
18988  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
18989  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
18990  {&__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},
18991  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
18992  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
18993  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
18994  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
18995  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
18996  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
18997  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
18998  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
18999  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19000  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19001  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19002  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19003  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19004  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19005  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19006  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19007  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19008  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19009  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19010  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19011  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19012  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19013  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19014  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19015  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19016  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19017  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19018  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19019  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19020  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19021  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19022  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19023  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19024  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19025  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19026  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19027  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19028  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19029  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19030  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19031  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19032  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19033  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19034  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19035  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19036  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19037  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19038  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19039  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19040  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19041  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19042  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19043  {0, 0, 0, 0, 0, 0, 0}
19044 };
19045 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
19046  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19047  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19048  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19049  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19050  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19051  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19052  #if PY_MAJOR_VERSION >= 3
19053  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19054  #else
19055  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19056  #endif
19057  return 0;
19058  __pyx_L1_error:;
19059  return -1;
19060 }
19061 
19062 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
19063  __Pyx_RefNannyDeclarations
19064  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19065 
19066  /* "(tree fragment)":2
19067  * def __reduce_cython__(self):
19068  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19069  * def __setstate_cython__(self, __pyx_state):
19070  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19071  */
19072  __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)
19073  __Pyx_GOTREF(__pyx_tuple__3);
19074  __Pyx_GIVEREF(__pyx_tuple__3);
19075 
19076  /* "(tree fragment)":4
19077  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19078  * def __setstate_cython__(self, __pyx_state):
19079  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19080  */
19081  __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)
19082  __Pyx_GOTREF(__pyx_tuple__4);
19083  __Pyx_GIVEREF(__pyx_tuple__4);
19084 
19085  /* "PyClical.pyx":635
19086  * TypeError: Not applicable.
19087  * """
19088  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19089  *
19090  * def __iter__(self):
19091  */
19092  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19093  __Pyx_GOTREF(__pyx_tuple__10);
19094  __Pyx_GIVEREF(__pyx_tuple__10);
19095 
19096  /* "(tree fragment)":2
19097  * def __reduce_cython__(self):
19098  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19099  * def __setstate_cython__(self, __pyx_state):
19100  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19101  */
19102  __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)
19103  __Pyx_GOTREF(__pyx_tuple__11);
19104  __Pyx_GIVEREF(__pyx_tuple__11);
19105 
19106  /* "(tree fragment)":4
19107  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19108  * def __setstate_cython__(self, __pyx_state):
19109  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19110  */
19111  __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)
19112  __Pyx_GOTREF(__pyx_tuple__12);
19113  __Pyx_GIVEREF(__pyx_tuple__12);
19114 
19115  /* "PyClical.pyx":404
19116  * return index_set_to_str( self.unwrap() ).c_str()
19117  *
19118  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19119  * """
19120  * Tests for functions that Doctest cannot see.
19121  */
19122  __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)
19123 
19124  /* "PyClical.pyx":1243
19125  * return clifford_to_str( self.unwrap() ).c_str()
19126  *
19127  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19128  * """
19129  * Tests for functions that Doctest cannot see.
19130  */
19131  __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)
19132 
19133  /* "PyClical.pyx":1856
19134  *
19135  * # Some abbreviations.
19136  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19137  * pi = tau / 2.0
19138  *
19139  */
19140  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1856, __pyx_L1_error)
19141  __Pyx_GOTREF(__pyx_tuple__15);
19142  __Pyx_GIVEREF(__pyx_tuple__15);
19143 
19144  /* "PyClical.pyx":1887
19145  * """
19146  *
19147  * def e(obj): # <<<<<<<<<<<<<<
19148  * """
19149  * Abbreviation for clifford(index_set(obj)).
19150  */
19151  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1887, __pyx_L1_error)
19152  __Pyx_GOTREF(__pyx_tuple__16);
19153  __Pyx_GIVEREF(__pyx_tuple__16);
19154  __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)
19155 
19156  /* "PyClical.pyx":1900
19157  * return clifford(index_set(obj))
19158  *
19159  * def istpq(p, q): # <<<<<<<<<<<<<<
19160  * """
19161  * Abbreviation for index_set({-q,...p}).
19162  */
19163  __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)
19164  __Pyx_GOTREF(__pyx_tuple__18);
19165  __Pyx_GIVEREF(__pyx_tuple__18);
19166  __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)
19167 
19168  /* "PyClical.pyx":1909
19169  * return index_set(set(range(-q,p+1)))
19170  *
19171  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19172  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19173  *
19174  */
19175  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1909, __pyx_L1_error)
19176  __Pyx_GOTREF(__pyx_tuple__20);
19177  __Pyx_GIVEREF(__pyx_tuple__20);
19178  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19179  __Pyx_GOTREF(__pyx_tuple__21);
19180  __Pyx_GIVEREF(__pyx_tuple__21);
19181 
19182  /* "PyClical.pyx":1913
19183  *
19184  * # Doctest interface.
19185  * def _test(): # <<<<<<<<<<<<<<
19186  * import PyClical, doctest
19187  * return doctest.testmod(PyClical)
19188  */
19189  __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)
19190  __Pyx_GOTREF(__pyx_tuple__22);
19191  __Pyx_GIVEREF(__pyx_tuple__22);
19192  __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)
19193  __Pyx_RefNannyFinishContext();
19194  return 0;
19195  __pyx_L1_error:;
19196  __Pyx_RefNannyFinishContext();
19197  return -1;
19198 }
19199 
19200 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
19201  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19202  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19203  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19204  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19205  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19206  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19207  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19208  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19209  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19210  return 0;
19211  __pyx_L1_error:;
19212  return -1;
19213 }
19214 
19215 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
19216 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
19217 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
19218 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
19219 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
19220 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
19221 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
19222 
19223 static int __Pyx_modinit_global_init_code(void) {
19224  __Pyx_RefNannyDeclarations
19225  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19226  /*--- Global init code ---*/
19227  __Pyx_RefNannyFinishContext();
19228  return 0;
19229 }
19230 
19231 static int __Pyx_modinit_variable_export_code(void) {
19232  __Pyx_RefNannyDeclarations
19233  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19234  /*--- Variable export code ---*/
19235  __Pyx_RefNannyFinishContext();
19236  return 0;
19237 }
19238 
19239 static int __Pyx_modinit_function_export_code(void) {
19240  __Pyx_RefNannyDeclarations
19241  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19242  /*--- Function export code ---*/
19243  __Pyx_RefNannyFinishContext();
19244  return 0;
19245 }
19246 
19247 static int __Pyx_modinit_type_init_code(void) {
19248  __Pyx_RefNannyDeclarations
19249  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19250  /*--- Type init code ---*/
19251  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19252  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19253  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19254  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19255  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19256  __pyx_type_8PyClical_index_set.tp_print = 0;
19257  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)) {
19258  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19259  }
19260  #if CYTHON_COMPILING_IN_CPYTHON
19261  {
19262  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19263  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19264  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19265  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19266  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19267  }
19268  }
19269  #endif
19270  #if CYTHON_COMPILING_IN_CPYTHON
19271  {
19272  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19273  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19274  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19275  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19276  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19277  }
19278  }
19279  #endif
19280  #if CYTHON_COMPILING_IN_CPYTHON
19281  {
19282  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19283  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19284  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19285  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19286  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19287  }
19288  }
19289  #endif
19290  #if CYTHON_COMPILING_IN_CPYTHON
19291  {
19292  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19293  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19294  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19295  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19296  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19297  }
19298  }
19299  #endif
19300  #if CYTHON_COMPILING_IN_CPYTHON
19301  {
19302  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19303  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19304  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19305  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19306  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19307  }
19308  }
19309  #endif
19310  #if CYTHON_COMPILING_IN_CPYTHON
19311  {
19312  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19313  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19314  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19315  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19316  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19317  }
19318  }
19319  #endif
19320  #if CYTHON_COMPILING_IN_CPYTHON
19321  {
19322  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19323  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19324  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19325  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19326  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19327  }
19328  }
19329  #endif
19330  #if CYTHON_COMPILING_IN_CPYTHON
19331  {
19332  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19333  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19334  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19335  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19336  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19337  }
19338  }
19339  #endif
19340  #if CYTHON_COMPILING_IN_CPYTHON
19341  {
19342  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19343  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19344  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19345  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19346  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19347  }
19348  }
19349  #endif
19350  #if CYTHON_COMPILING_IN_CPYTHON
19351  {
19352  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19353  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19354  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19355  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19356  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19357  }
19358  }
19359  #endif
19360  #if CYTHON_COMPILING_IN_CPYTHON
19361  {
19362  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19363  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19364  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19365  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19366  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19367  }
19368  }
19369  #endif
19370  #if CYTHON_COMPILING_IN_CPYTHON
19371  {
19372  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19373  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19374  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19375  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19376  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19377  }
19378  }
19379  #endif
19380  #if CYTHON_COMPILING_IN_CPYTHON
19381  {
19382  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19383  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19384  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19385  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19386  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19387  }
19388  }
19389  #endif
19390  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19391  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19392  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19393  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19394  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19395  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19396  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19397  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19398  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19399  __pyx_type_8PyClical_clifford.tp_print = 0;
19400  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19401  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19402  }
19403  #if CYTHON_COMPILING_IN_CPYTHON
19404  {
19405  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19406  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19407  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19408  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19409  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19410  }
19411  }
19412  #endif
19413  #if CYTHON_COMPILING_IN_CPYTHON
19414  {
19415  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19416  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19417  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19418  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19419  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19420  }
19421  }
19422  #endif
19423  #if CYTHON_COMPILING_IN_CPYTHON
19424  {
19425  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19426  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19427  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19428  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19429  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19430  }
19431  }
19432  #endif
19433  #if CYTHON_COMPILING_IN_CPYTHON
19434  {
19435  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19436  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19437  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19438  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19439  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19440  }
19441  }
19442  #endif
19443  #if CYTHON_COMPILING_IN_CPYTHON
19444  {
19445  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19446  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19447  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19448  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19449  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19450  }
19451  }
19452  #endif
19453  #if CYTHON_COMPILING_IN_CPYTHON
19454  {
19455  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19456  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19457  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19458  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19459  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19460  }
19461  }
19462  #endif
19463  #if CYTHON_COMPILING_IN_CPYTHON
19464  {
19465  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19466  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19467  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19468  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19469  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19470  }
19471  }
19472  #endif
19473  #if CYTHON_COMPILING_IN_CPYTHON
19474  {
19475  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19476  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19477  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19478  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19479  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19480  }
19481  }
19482  #endif
19483  #if CYTHON_COMPILING_IN_CPYTHON
19484  {
19485  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19486  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19487  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19488  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19489  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19490  }
19491  }
19492  #endif
19493  #if CYTHON_COMPILING_IN_CPYTHON
19494  {
19495  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19496  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19497  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19498  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19499  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19500  }
19501  }
19502  #endif
19503  #if CYTHON_COMPILING_IN_CPYTHON
19504  {
19505  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19506  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19507  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19508  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19509  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19510  }
19511  }
19512  #endif
19513  #if CYTHON_COMPILING_IN_CPYTHON
19514  {
19515  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19516  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19517  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19518  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19519  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19520  }
19521  }
19522  #endif
19523  #if CYTHON_COMPILING_IN_CPYTHON
19524  {
19525  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19526  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19527  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19528  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19529  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19530  }
19531  }
19532  #endif
19533  #if CYTHON_COMPILING_IN_CPYTHON
19534  {
19535  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19536  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19537  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19538  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19539  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19540  }
19541  }
19542  #endif
19543  #if CYTHON_COMPILING_IN_CPYTHON
19544  {
19545  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19546  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19547  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19548  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19549  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19550  }
19551  }
19552  #endif
19553  #if CYTHON_COMPILING_IN_CPYTHON
19554  {
19555  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19556  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19557  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19558  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19559  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19560  }
19561  }
19562  #endif
19563  #if CYTHON_COMPILING_IN_CPYTHON
19564  {
19565  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19566  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19567  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19568  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19569  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19570  }
19571  }
19572  #endif
19573  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19574  #if CYTHON_COMPILING_IN_CPYTHON
19575  {
19576  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19577  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19578  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19579  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19580  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19581  }
19582  }
19583  #endif
19584  #endif
19585  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19586  #if CYTHON_COMPILING_IN_CPYTHON
19587  {
19588  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19589  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19590  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19591  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19592  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19593  }
19594  }
19595  #endif
19596  #endif
19597  #if CYTHON_COMPILING_IN_CPYTHON
19598  {
19599  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19600  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19601  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19602  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19603  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19604  }
19605  }
19606  #endif
19607  #if CYTHON_COMPILING_IN_CPYTHON
19608  {
19609  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19610  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19611  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19612  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19613  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19614  }
19615  }
19616  #endif
19617  #if CYTHON_COMPILING_IN_CPYTHON
19618  {
19619  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19620  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19621  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19622  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19623  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19624  }
19625  }
19626  #endif
19627  #if CYTHON_COMPILING_IN_CPYTHON
19628  {
19629  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19630  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19631  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19632  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19633  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19634  }
19635  }
19636  #endif
19637  #if CYTHON_COMPILING_IN_CPYTHON
19638  {
19639  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19640  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19641  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19642  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19643  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19644  }
19645  }
19646  #endif
19647  #if CYTHON_COMPILING_IN_CPYTHON
19648  {
19649  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19650  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19651  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19652  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19653  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19654  }
19655  }
19656  #endif
19657  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19658  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19659  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19660  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19661  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
19662  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19663  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)) {
19664  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
19665  }
19666  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19667  __Pyx_RefNannyFinishContext();
19668  return 0;
19669  __pyx_L1_error:;
19670  __Pyx_RefNannyFinishContext();
19671  return -1;
19672 }
19673 
19674 static int __Pyx_modinit_type_import_code(void) {
19675  __Pyx_RefNannyDeclarations
19676  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
19677  /*--- Type import code ---*/
19678  __Pyx_RefNannyFinishContext();
19679  return 0;
19680 }
19681 
19682 static int __Pyx_modinit_variable_import_code(void) {
19683  __Pyx_RefNannyDeclarations
19684  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
19685  /*--- Variable import code ---*/
19686  __Pyx_RefNannyFinishContext();
19687  return 0;
19688 }
19689 
19690 static int __Pyx_modinit_function_import_code(void) {
19691  __Pyx_RefNannyDeclarations
19692  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
19693  /*--- Function import code ---*/
19694  __Pyx_RefNannyFinishContext();
19695  return 0;
19696 }
19697 
19698 
19699 #if PY_MAJOR_VERSION < 3
19700 #ifdef CYTHON_NO_PYINIT_EXPORT
19701 #define __Pyx_PyMODINIT_FUNC void
19702 #else
19703 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19704 #endif
19705 #else
19706 #ifdef CYTHON_NO_PYINIT_EXPORT
19707 #define __Pyx_PyMODINIT_FUNC PyObject *
19708 #else
19709 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19710 #endif
19711 #endif
19712 
19713 
19714 #if PY_MAJOR_VERSION < 3
19715 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
19716 __Pyx_PyMODINIT_FUNC initPyClical(void)
19717 #else
19718 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
19719 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
19720 #if CYTHON_PEP489_MULTI_PHASE_INIT
19721 {
19722  return PyModuleDef_Init(&__pyx_moduledef);
19723 }
19724 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
19725  #if PY_VERSION_HEX >= 0x030700A1
19726  static PY_INT64_T main_interpreter_id = -1;
19727  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
19728  if (main_interpreter_id == -1) {
19729  main_interpreter_id = current_id;
19730  return (unlikely(current_id == -1)) ? -1 : 0;
19731  } else if (unlikely(main_interpreter_id != current_id))
19732  #else
19733  static PyInterpreterState *main_interpreter = NULL;
19734  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
19735  if (!main_interpreter) {
19736  main_interpreter = current_interpreter;
19737  } else if (unlikely(main_interpreter != current_interpreter))
19738  #endif
19739  {
19740  PyErr_SetString(
19741  PyExc_ImportError,
19742  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
19743  return -1;
19744  }
19745  return 0;
19746 }
19747 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) {
19748  PyObject *value = PyObject_GetAttrString(spec, from_name);
19749  int result = 0;
19750  if (likely(value)) {
19751  if (allow_none || value != Py_None) {
19752  result = PyDict_SetItemString(moddict, to_name, value);
19753  }
19754  Py_DECREF(value);
19755  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19756  PyErr_Clear();
19757  } else {
19758  result = -1;
19759  }
19760  return result;
19761 }
19762 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19763  PyObject *module = NULL, *moddict, *modname;
19764  if (__Pyx_check_single_interpreter())
19765  return NULL;
19766  if (__pyx_m)
19767  return __Pyx_NewRef(__pyx_m);
19768  modname = PyObject_GetAttrString(spec, "name");
19769  if (unlikely(!modname)) goto bad;
19770  module = PyModule_NewObject(modname);
19771  Py_DECREF(modname);
19772  if (unlikely(!module)) goto bad;
19773  moddict = PyModule_GetDict(module);
19774  if (unlikely(!moddict)) goto bad;
19775  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
19776  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
19777  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
19778  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
19779  return module;
19780 bad:
19781  Py_XDECREF(module);
19782  return NULL;
19783 }
19784 
19785 
19786 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
19787 #endif
19788 #endif
19789 {
19790  PyObject *__pyx_t_1 = NULL;
19791  PyObject *__pyx_t_2 = NULL;
19792  PyObject *__pyx_t_3 = NULL;
19793  int __pyx_t_4;
19794  __Pyx_RefNannyDeclarations
19795  #if CYTHON_PEP489_MULTI_PHASE_INIT
19796  if (__pyx_m) {
19797  if (__pyx_m == __pyx_pyinit_module) return 0;
19798  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
19799  return -1;
19800  }
19801  #elif PY_MAJOR_VERSION >= 3
19802  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
19803  #endif
19804  #if CYTHON_REFNANNY
19805 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
19806 if (!__Pyx_RefNanny) {
19807  PyErr_Clear();
19808  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
19809  if (!__Pyx_RefNanny)
19810  Py_FatalError("failed to import 'refnanny' module");
19811 }
19812 #endif
19813  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19814  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19815  #ifdef __Pxy_PyFrame_Initialize_Offsets
19816  __Pxy_PyFrame_Initialize_Offsets();
19817  #endif
19818  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
19819  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
19820  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
19821  #ifdef __Pyx_CyFunction_USED
19822  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19823  #endif
19824  #ifdef __Pyx_FusedFunction_USED
19825  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19826  #endif
19827  #ifdef __Pyx_Coroutine_USED
19828  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19829  #endif
19830  #ifdef __Pyx_Generator_USED
19831  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19832  #endif
19833  #ifdef __Pyx_AsyncGen_USED
19834  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19835  #endif
19836  #ifdef __Pyx_StopAsyncIteration_USED
19837  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19838  #endif
19839  /*--- Library function declarations ---*/
19840  /*--- Threads initialization code ---*/
19841  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
19842  #ifdef WITH_THREAD /* Python build with threading support? */
19843  PyEval_InitThreads();
19844  #endif
19845  #endif
19846  /*--- Module creation code ---*/
19847  #if CYTHON_PEP489_MULTI_PHASE_INIT
19848  __pyx_m = __pyx_pyinit_module;
19849  Py_INCREF(__pyx_m);
19850  #else
19851  #if PY_MAJOR_VERSION < 3
19852  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19853  #else
19854  __pyx_m = PyModule_Create(&__pyx_moduledef);
19855  #endif
19856  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
19857  #endif
19858  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
19859  Py_INCREF(__pyx_d);
19860  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
19861  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
19862  #if CYTHON_COMPILING_IN_PYPY
19863  Py_INCREF(__pyx_b);
19864  #endif
19865  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19866  /*--- Initialize various global constants etc. ---*/
19867  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19868  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
19869  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19870  #endif
19871  if (__pyx_module_is_main_PyClical) {
19872  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19873  }
19874  #if PY_MAJOR_VERSION >= 3
19875  {
19876  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
19877  if (!PyDict_GetItemString(modules, "PyClical")) {
19878  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
19879  }
19880  }
19881  #endif
19882  /*--- Builtin init code ---*/
19883  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19884  /*--- Constants init code ---*/
19885  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19886  /*--- Global type/function init code ---*/
19887  (void)__Pyx_modinit_global_init_code();
19888  (void)__Pyx_modinit_variable_export_code();
19889  (void)__Pyx_modinit_function_export_code();
19890  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
19891  (void)__Pyx_modinit_type_import_code();
19892  (void)__Pyx_modinit_variable_import_code();
19893  (void)__Pyx_modinit_function_import_code();
19894  /*--- Execution code ---*/
19895  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
19896  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19897  #endif
19898 
19899  /* "PyClical.pyx":28
19900  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
19901  *
19902  * import math # <<<<<<<<<<<<<<
19903  * import numbers
19904  * import collections
19905  */
19906  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
19907  __Pyx_GOTREF(__pyx_t_1);
19908  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
19909  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19910 
19911  /* "PyClical.pyx":29
19912  *
19913  * import math
19914  * import numbers # <<<<<<<<<<<<<<
19915  * import collections
19916  *
19917  */
19918  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
19919  __Pyx_GOTREF(__pyx_t_1);
19920  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
19921  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19922 
19923  /* "PyClical.pyx":30
19924  * import math
19925  * import numbers
19926  * import collections # <<<<<<<<<<<<<<
19927  *
19928  * __version__ = "0.8.2"
19929  */
19930  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
19931  __Pyx_GOTREF(__pyx_t_1);
19932  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
19933  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19934 
19935  /* "PyClical.pyx":32
19936  * import collections
19937  *
19938  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
19939  *
19940  * from PyClical cimport *
19941  */
19942  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
19943 
19944  /* "PyClical.pyx":404
19945  * return index_set_to_str( self.unwrap() ).c_str()
19946  *
19947  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19948  * """
19949  * Tests for functions that Doctest cannot see.
19950  */
19951  __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)
19952  __Pyx_GOTREF(__pyx_t_1);
19953  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
19954  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19955 
19956  /* "PyClical.pyx":1243
19957  * return clifford_to_str( self.unwrap() ).c_str()
19958  *
19959  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19960  * """
19961  * Tests for functions that Doctest cannot see.
19962  */
19963  __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)
19964  __Pyx_GOTREF(__pyx_t_1);
19965  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
19966  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19967 
19968  /* "PyClical.pyx":1856
19969  *
19970  * # Some abbreviations.
19971  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19972  * pi = tau / 2.0
19973  *
19974  */
19975  __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)
19976  __Pyx_GOTREF(__pyx_t_1);
19977  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
19978  __Pyx_GOTREF(__pyx_t_2);
19979  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19980  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
19981  __Pyx_GOTREF(__pyx_t_1);
19982  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19983  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
19984  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19985 
19986  /* "PyClical.pyx":1857
19987  * # Some abbreviations.
19988  * tau = atan(clifford(1.0)) * 8.0
19989  * pi = tau / 2.0 # <<<<<<<<<<<<<<
19990  *
19991  * cl = clifford
19992  */
19993  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
19994  __Pyx_GOTREF(__pyx_t_1);
19995  __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)
19996  __Pyx_GOTREF(__pyx_t_2);
19997  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19998  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
19999  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20000 
20001  /* "PyClical.pyx":1859
20002  * pi = tau / 2.0
20003  *
20004  * cl = clifford # <<<<<<<<<<<<<<
20005  * """
20006  * Abbreviation for clifford.
20007  */
20008  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20009 
20010  /* "PyClical.pyx":1879
20011  * """
20012  *
20013  * ist = index_set # <<<<<<<<<<<<<<
20014  * """
20015  * Abbreviation for index_set.
20016  */
20017  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20018 
20019  /* "PyClical.pyx":1887
20020  * """
20021  *
20022  * def e(obj): # <<<<<<<<<<<<<<
20023  * """
20024  * Abbreviation for clifford(index_set(obj)).
20025  */
20026  __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)
20027  __Pyx_GOTREF(__pyx_t_2);
20028  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20029  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20030 
20031  /* "PyClical.pyx":1900
20032  * return clifford(index_set(obj))
20033  *
20034  * def istpq(p, q): # <<<<<<<<<<<<<<
20035  * """
20036  * Abbreviation for index_set({-q,...p}).
20037  */
20038  __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)
20039  __Pyx_GOTREF(__pyx_t_2);
20040  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20041  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20042 
20043  /* "PyClical.pyx":1909
20044  * return index_set(set(range(-q,p+1)))
20045  *
20046  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20047  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20048  *
20049  */
20050  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20051  __Pyx_GOTREF(__pyx_t_2);
20052  __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)
20053  __Pyx_GOTREF(__pyx_t_1);
20054  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20055  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20056  __Pyx_GOTREF(__pyx_t_2);
20057  __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)
20058  __Pyx_GOTREF(__pyx_t_3);
20059  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20060  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20061  __Pyx_GOTREF(__pyx_t_2);
20062  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20063  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20064  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20065  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20066 
20067  /* "PyClical.pyx":1910
20068  *
20069  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20070  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20071  *
20072  * # Doctest interface.
20073  */
20074  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20075  __Pyx_GOTREF(__pyx_t_2);
20076  __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)
20077  __Pyx_GOTREF(__pyx_t_3);
20078  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20079  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20080  __Pyx_GOTREF(__pyx_t_2);
20081  __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)
20082  __Pyx_GOTREF(__pyx_t_1);
20083  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20084  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20085  __Pyx_GOTREF(__pyx_t_2);
20086  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20087  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20088  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20089  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20090 
20091  /* "PyClical.pyx":1913
20092  *
20093  * # Doctest interface.
20094  * def _test(): # <<<<<<<<<<<<<<
20095  * import PyClical, doctest
20096  * return doctest.testmod(PyClical)
20097  */
20098  __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)
20099  __Pyx_GOTREF(__pyx_t_2);
20100  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20101  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20102 
20103  /* "PyClical.pyx":1917
20104  * return doctest.testmod(PyClical)
20105  *
20106  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20107  * _test()
20108  */
20109  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20110  __Pyx_GOTREF(__pyx_t_2);
20111  __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)
20112  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20113  if (__pyx_t_4) {
20114 
20115  /* "PyClical.pyx":1918
20116  *
20117  * if __name__ == "__main__":
20118  * _test() # <<<<<<<<<<<<<<
20119  */
20120  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20121  __Pyx_GOTREF(__pyx_t_2);
20122  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20123  __Pyx_GOTREF(__pyx_t_1);
20124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20125  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20126 
20127  /* "PyClical.pyx":1917
20128  * return doctest.testmod(PyClical)
20129  *
20130  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20131  * _test()
20132  */
20133  }
20134 
20135  /* "PyClical.pyx":1
20136  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20137  * # distutils: language = c++
20138  * #
20139  */
20140  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20141  __Pyx_GOTREF(__pyx_t_1);
20142  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)
20143  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)
20144  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)
20145  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)
20146  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)
20147  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)
20148  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)
20149  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)
20150  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)
20151  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)
20152  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)
20153  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)
20154  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)
20155  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)
20156  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)
20157  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)
20158  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)
20159  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)
20160  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)
20161  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)
20162  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)
20163  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)
20164  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)
20165  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)
20166  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)
20167  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)
20168  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)
20169  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)
20170  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)
20171  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)
20172  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)
20173  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)
20174  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)
20175  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)
20176  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)
20177  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)
20178  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)
20179  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)
20180  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)
20181  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)
20182  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)
20183  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)
20184  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)
20185  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)
20186  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)
20187  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)
20188  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)
20189  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)
20190  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)
20191  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)
20192  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)
20193  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)
20194  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)
20195  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)
20196  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)
20197  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)
20198  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)
20199  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)
20200  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)
20201  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)
20202  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)
20203  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)
20204  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)
20205  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)
20206  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)
20207  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)
20208  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)
20209  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)
20210  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)
20211  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)
20212  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)
20213  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)
20214  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)
20215  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)
20216  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)
20217  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)
20218  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)
20219  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)
20220  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)
20221  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)
20222  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)
20223  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)
20224  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)
20225  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)
20226  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)
20227  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)
20228  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)
20229  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)
20230  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)
20231  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)
20232  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)
20233  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)
20234  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)
20235  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)
20236  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)
20237  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)
20238  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)
20239  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)
20240  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)
20241  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)
20242  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)
20243  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)
20244  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)
20245  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)
20246  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)
20247  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)
20248  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)
20249  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20251 
20252  /*--- Wrapped vars code ---*/
20253 
20254  goto __pyx_L0;
20255  __pyx_L1_error:;
20256  __Pyx_XDECREF(__pyx_t_1);
20257  __Pyx_XDECREF(__pyx_t_2);
20258  __Pyx_XDECREF(__pyx_t_3);
20259  if (__pyx_m) {
20260  if (__pyx_d) {
20261  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20262  }
20263  Py_CLEAR(__pyx_m);
20264  } else if (!PyErr_Occurred()) {
20265  PyErr_SetString(PyExc_ImportError, "init PyClical");
20266  }
20267  __pyx_L0:;
20268  __Pyx_RefNannyFinishContext();
20269  #if CYTHON_PEP489_MULTI_PHASE_INIT
20270  return (__pyx_m != NULL) ? 0 : -1;
20271  #elif PY_MAJOR_VERSION >= 3
20272  return __pyx_m;
20273  #else
20274  return;
20275  #endif
20276 }
20277 
20278 /* --- Runtime support code --- */
20279 /* Refnanny */
20280 #if CYTHON_REFNANNY
20281 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20282  PyObject *m = NULL, *p = NULL;
20283  void *r = NULL;
20284  m = PyImport_ImportModule(modname);
20285  if (!m) goto end;
20286  p = PyObject_GetAttrString(m, "RefNannyAPI");
20287  if (!p) goto end;
20288  r = PyLong_AsVoidPtr(p);
20289 end:
20290  Py_XDECREF(p);
20291  Py_XDECREF(m);
20292  return (__Pyx_RefNannyAPIStruct *)r;
20293 }
20294 #endif
20295 
20296 /* PyObjectGetAttrStr */
20297 #if CYTHON_USE_TYPE_SLOTS
20298 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20299  PyTypeObject* tp = Py_TYPE(obj);
20300  if (likely(tp->tp_getattro))
20301  return tp->tp_getattro(obj, attr_name);
20302 #if PY_MAJOR_VERSION < 3
20303  if (likely(tp->tp_getattr))
20304  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20305 #endif
20306  return PyObject_GetAttr(obj, attr_name);
20307 }
20308 #endif
20309 
20310 /* GetBuiltinName */
20311 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20312  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20313  if (unlikely(!result)) {
20314  PyErr_Format(PyExc_NameError,
20315 #if PY_MAJOR_VERSION >= 3
20316  "name '%U' is not defined", name);
20317 #else
20318  "name '%.200s' is not defined", PyString_AS_STRING(name));
20319 #endif
20320  }
20321  return result;
20322 }
20323 
20324 /* PyCFunctionFastCall */
20325 #if CYTHON_FAST_PYCCALL
20326 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20327  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20328  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20329  PyObject *self = PyCFunction_GET_SELF(func);
20330  int flags = PyCFunction_GET_FLAGS(func);
20331  assert(PyCFunction_Check(func));
20332  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
20333  assert(nargs >= 0);
20334  assert(nargs == 0 || args != NULL);
20335  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20336  because it may clear it (directly or indirectly) and so the
20337  caller loses its exception */
20338  assert(!PyErr_Occurred());
20339  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20340  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
20341  } else {
20342  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
20343  }
20344 }
20345 #endif
20346 
20347 /* PyFunctionFastCall */
20348 #if CYTHON_FAST_PYCALL
20349 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20350  PyObject *globals) {
20351  PyFrameObject *f;
20352  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20353  PyObject **fastlocals;
20354  Py_ssize_t i;
20355  PyObject *result;
20356  assert(globals != NULL);
20357  /* XXX Perhaps we should create a specialized
20358  PyFrame_New() that doesn't take locals, but does
20359  take builtins without sanity checking them.
20360  */
20361  assert(tstate != NULL);
20362  f = PyFrame_New(tstate, co, globals, NULL);
20363  if (f == NULL) {
20364  return NULL;
20365  }
20366  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
20367  for (i = 0; i < na; i++) {
20368  Py_INCREF(*args);
20369  fastlocals[i] = *args++;
20370  }
20371  result = PyEval_EvalFrameEx(f,0);
20372  ++tstate->recursion_depth;
20373  Py_DECREF(f);
20374  --tstate->recursion_depth;
20375  return result;
20376 }
20377 #if 1 || PY_VERSION_HEX < 0x030600B1
20378 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
20379  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20380  PyObject *globals = PyFunction_GET_GLOBALS(func);
20381  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20382  PyObject *closure;
20383 #if PY_MAJOR_VERSION >= 3
20384  PyObject *kwdefs;
20385 #endif
20386  PyObject *kwtuple, **k;
20387  PyObject **d;
20388  Py_ssize_t nd;
20389  Py_ssize_t nk;
20390  PyObject *result;
20391  assert(kwargs == NULL || PyDict_Check(kwargs));
20392  nk = kwargs ? PyDict_Size(kwargs) : 0;
20393  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20394  return NULL;
20395  }
20396  if (
20397 #if PY_MAJOR_VERSION >= 3
20398  co->co_kwonlyargcount == 0 &&
20399 #endif
20400  likely(kwargs == NULL || nk == 0) &&
20401  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20402  if (argdefs == NULL && co->co_argcount == nargs) {
20403  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20404  goto done;
20405  }
20406  else if (nargs == 0 && argdefs != NULL
20407  && co->co_argcount == Py_SIZE(argdefs)) {
20408  /* function called with no arguments, but all parameters have
20409  a default value: use default values as arguments .*/
20410  args = &PyTuple_GET_ITEM(argdefs, 0);
20411  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20412  goto done;
20413  }
20414  }
20415  if (kwargs != NULL) {
20416  Py_ssize_t pos, i;
20417  kwtuple = PyTuple_New(2 * nk);
20418  if (kwtuple == NULL) {
20419  result = NULL;
20420  goto done;
20421  }
20422  k = &PyTuple_GET_ITEM(kwtuple, 0);
20423  pos = i = 0;
20424  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20425  Py_INCREF(k[i]);
20426  Py_INCREF(k[i+1]);
20427  i += 2;
20428  }
20429  nk = i / 2;
20430  }
20431  else {
20432  kwtuple = NULL;
20433  k = NULL;
20434  }
20435  closure = PyFunction_GET_CLOSURE(func);
20436 #if PY_MAJOR_VERSION >= 3
20437  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20438 #endif
20439  if (argdefs != NULL) {
20440  d = &PyTuple_GET_ITEM(argdefs, 0);
20441  nd = Py_SIZE(argdefs);
20442  }
20443  else {
20444  d = NULL;
20445  nd = 0;
20446  }
20447 #if PY_MAJOR_VERSION >= 3
20448  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20449  args, nargs,
20450  k, (int)nk,
20451  d, (int)nd, kwdefs, closure);
20452 #else
20453  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20454  args, nargs,
20455  k, (int)nk,
20456  d, (int)nd, closure);
20457 #endif
20458  Py_XDECREF(kwtuple);
20459 done:
20460  Py_LeaveRecursiveCall();
20461  return result;
20462 }
20463 #endif
20464 #endif
20465 
20466 /* PyObjectCall */
20467 #if CYTHON_COMPILING_IN_CPYTHON
20468 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20469  PyObject *result;
20470  ternaryfunc call = func->ob_type->tp_call;
20471  if (unlikely(!call))
20472  return PyObject_Call(func, arg, kw);
20473  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20474  return NULL;
20475  result = (*call)(func, arg, kw);
20476  Py_LeaveRecursiveCall();
20477  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20478  PyErr_SetString(
20479  PyExc_SystemError,
20480  "NULL result without error in PyObject_Call");
20481  }
20482  return result;
20483 }
20484 #endif
20485 
20486 /* PyObjectCallMethO */
20487 #if CYTHON_COMPILING_IN_CPYTHON
20488 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20489  PyObject *self, *result;
20490  PyCFunction cfunc;
20491  cfunc = PyCFunction_GET_FUNCTION(func);
20492  self = PyCFunction_GET_SELF(func);
20493  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20494  return NULL;
20495  result = cfunc(self, arg);
20496  Py_LeaveRecursiveCall();
20497  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20498  PyErr_SetString(
20499  PyExc_SystemError,
20500  "NULL result without error in PyObject_Call");
20501  }
20502  return result;
20503 }
20504 #endif
20505 
20506 /* PyObjectCallOneArg */
20507 #if CYTHON_COMPILING_IN_CPYTHON
20508 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20509  PyObject *result;
20510  PyObject *args = PyTuple_New(1);
20511  if (unlikely(!args)) return NULL;
20512  Py_INCREF(arg);
20513  PyTuple_SET_ITEM(args, 0, arg);
20514  result = __Pyx_PyObject_Call(func, args, NULL);
20515  Py_DECREF(args);
20516  return result;
20517 }
20518 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20519 #if CYTHON_FAST_PYCALL
20520  if (PyFunction_Check(func)) {
20521  return __Pyx_PyFunction_FastCall(func, &arg, 1);
20522  }
20523 #endif
20524  if (likely(PyCFunction_Check(func))) {
20525  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20526  return __Pyx_PyObject_CallMethO(func, arg);
20527 #if CYTHON_FAST_PYCCALL
20528  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
20529  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
20530 #endif
20531  }
20532  }
20533  return __Pyx__PyObject_CallOneArg(func, arg);
20534 }
20535 #else
20536 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20537  PyObject *result;
20538  PyObject *args = PyTuple_Pack(1, arg);
20539  if (unlikely(!args)) return NULL;
20540  result = __Pyx_PyObject_Call(func, args, NULL);
20541  Py_DECREF(args);
20542  return result;
20543 }
20544 #endif
20545 
20546 /* PyErrFetchRestore */
20547 #if CYTHON_FAST_THREAD_STATE
20548 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20549  PyObject *tmp_type, *tmp_value, *tmp_tb;
20550  tmp_type = tstate->curexc_type;
20551  tmp_value = tstate->curexc_value;
20552  tmp_tb = tstate->curexc_traceback;
20553  tstate->curexc_type = type;
20554  tstate->curexc_value = value;
20555  tstate->curexc_traceback = tb;
20556  Py_XDECREF(tmp_type);
20557  Py_XDECREF(tmp_value);
20558  Py_XDECREF(tmp_tb);
20559 }
20560 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20561  *type = tstate->curexc_type;
20562  *value = tstate->curexc_value;
20563  *tb = tstate->curexc_traceback;
20564  tstate->curexc_type = 0;
20565  tstate->curexc_value = 0;
20566  tstate->curexc_traceback = 0;
20567 }
20568 #endif
20569 
20570 /* WriteUnraisableException */
20571 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20572  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20573  int full_traceback, CYTHON_UNUSED int nogil) {
20574  PyObject *old_exc, *old_val, *old_tb;
20575  PyObject *ctx;
20576  __Pyx_PyThreadState_declare
20577 #ifdef WITH_THREAD
20578  PyGILState_STATE state;
20579  if (nogil)
20580  state = PyGILState_Ensure();
20581 #ifdef _MSC_VER
20582  else state = (PyGILState_STATE)-1;
20583 #endif
20584 #endif
20585  __Pyx_PyThreadState_assign
20586  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20587  if (full_traceback) {
20588  Py_XINCREF(old_exc);
20589  Py_XINCREF(old_val);
20590  Py_XINCREF(old_tb);
20591  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20592  PyErr_PrintEx(1);
20593  }
20594  #if PY_MAJOR_VERSION < 3
20595  ctx = PyString_FromString(name);
20596  #else
20597  ctx = PyUnicode_FromString(name);
20598  #endif
20599  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20600  if (!ctx) {
20601  PyErr_WriteUnraisable(Py_None);
20602  } else {
20603  PyErr_WriteUnraisable(ctx);
20604  Py_DECREF(ctx);
20605  }
20606 #ifdef WITH_THREAD
20607  if (nogil)
20608  PyGILState_Release(state);
20609 #endif
20610 }
20611 
20612 /* PyDictVersioning */
20613 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
20614 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
20615  PyObject *dict = Py_TYPE(obj)->tp_dict;
20616  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
20617 }
20618 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
20619  PyObject **dictptr = NULL;
20620  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
20621  if (offset) {
20622 #if CYTHON_COMPILING_IN_CPYTHON
20623  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
20624 #else
20625  dictptr = _PyObject_GetDictPtr(obj);
20626 #endif
20627  }
20628  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
20629 }
20630 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
20631  PyObject *dict = Py_TYPE(obj)->tp_dict;
20632  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
20633  return 0;
20634  return obj_dict_version == __Pyx_get_object_dict_version(obj);
20635 }
20636 #endif
20637 
20638 /* PyObjectCallNoArg */
20639 #if CYTHON_COMPILING_IN_CPYTHON
20640 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20641 #if CYTHON_FAST_PYCALL
20642  if (PyFunction_Check(func)) {
20643  return __Pyx_PyFunction_FastCall(func, NULL, 0);
20644  }
20645 #endif
20646 #ifdef __Pyx_CyFunction_USED
20647  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
20648 #else
20649  if (likely(PyCFunction_Check(func)))
20650 #endif
20651  {
20652  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20653  return __Pyx_PyObject_CallMethO(func, NULL);
20654  }
20655  }
20656  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20657 }
20658 #endif
20659 
20660 /* RaiseDoubleKeywords */
20661 static void __Pyx_RaiseDoubleKeywordsError(
20662  const char* func_name,
20663  PyObject* kw_name)
20664 {
20665  PyErr_Format(PyExc_TypeError,
20666  #if PY_MAJOR_VERSION >= 3
20667  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20668  #else
20669  "%s() got multiple values for keyword argument '%s'", func_name,
20670  PyString_AsString(kw_name));
20671  #endif
20672 }
20673 
20674 /* ParseKeywords */
20675 static int __Pyx_ParseOptionalKeywords(
20676  PyObject *kwds,
20677  PyObject **argnames[],
20678  PyObject *kwds2,
20679  PyObject *values[],
20680  Py_ssize_t num_pos_args,
20681  const char* function_name)
20682 {
20683  PyObject *key = 0, *value = 0;
20684  Py_ssize_t pos = 0;
20685  PyObject*** name;
20686  PyObject*** first_kw_arg = argnames + num_pos_args;
20687  while (PyDict_Next(kwds, &pos, &key, &value)) {
20688  name = first_kw_arg;
20689  while (*name && (**name != key)) name++;
20690  if (*name) {
20691  values[name-argnames] = value;
20692  continue;
20693  }
20694  name = first_kw_arg;
20695  #if PY_MAJOR_VERSION < 3
20696  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20697  while (*name) {
20698  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20699  && _PyString_Eq(**name, key)) {
20700  values[name-argnames] = value;
20701  break;
20702  }
20703  name++;
20704  }
20705  if (*name) continue;
20706  else {
20707  PyObject*** argname = argnames;
20708  while (argname != first_kw_arg) {
20709  if ((**argname == key) || (
20710  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20711  && _PyString_Eq(**argname, key))) {
20712  goto arg_passed_twice;
20713  }
20714  argname++;
20715  }
20716  }
20717  } else
20718  #endif
20719  if (likely(PyUnicode_Check(key))) {
20720  while (*name) {
20721  int cmp = (**name == key) ? 0 :
20722  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20723  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20724  #endif
20725  PyUnicode_Compare(**name, key);
20726  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20727  if (cmp == 0) {
20728  values[name-argnames] = value;
20729  break;
20730  }
20731  name++;
20732  }
20733  if (*name) continue;
20734  else {
20735  PyObject*** argname = argnames;
20736  while (argname != first_kw_arg) {
20737  int cmp = (**argname == key) ? 0 :
20738  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20739  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20740  #endif
20741  PyUnicode_Compare(**argname, key);
20742  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20743  if (cmp == 0) goto arg_passed_twice;
20744  argname++;
20745  }
20746  }
20747  } else
20748  goto invalid_keyword_type;
20749  if (kwds2) {
20750  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
20751  } else {
20752  goto invalid_keyword;
20753  }
20754  }
20755  return 0;
20756 arg_passed_twice:
20757  __Pyx_RaiseDoubleKeywordsError(function_name, key);
20758  goto bad;
20759 invalid_keyword_type:
20760  PyErr_Format(PyExc_TypeError,
20761  "%.200s() keywords must be strings", function_name);
20762  goto bad;
20763 invalid_keyword:
20764  PyErr_Format(PyExc_TypeError,
20765  #if PY_MAJOR_VERSION < 3
20766  "%.200s() got an unexpected keyword argument '%.200s'",
20767  function_name, PyString_AsString(key));
20768  #else
20769  "%s() got an unexpected keyword argument '%U'",
20770  function_name, key);
20771  #endif
20772 bad:
20773  return -1;
20774 }
20775 
20776 /* RaiseArgTupleInvalid */
20777 static void __Pyx_RaiseArgtupleInvalid(
20778  const char* func_name,
20779  int exact,
20780  Py_ssize_t num_min,
20781  Py_ssize_t num_max,
20782  Py_ssize_t num_found)
20783 {
20784  Py_ssize_t num_expected;
20785  const char *more_or_less;
20786  if (num_found < num_min) {
20787  num_expected = num_min;
20788  more_or_less = "at least";
20789  } else {
20790  num_expected = num_max;
20791  more_or_less = "at most";
20792  }
20793  if (exact) {
20794  more_or_less = "exactly";
20795  }
20796  PyErr_Format(PyExc_TypeError,
20797  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
20798  func_name, more_or_less, num_expected,
20799  (num_expected == 1) ? "" : "s", num_found);
20800 }
20801 
20802 /* GetModuleGlobalName */
20803 #if CYTHON_USE_DICT_VERSIONS
20804 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
20805 #else
20806 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
20807 #endif
20808 {
20809  PyObject *result;
20810 #if !CYTHON_AVOID_BORROWED_REFS
20811 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
20812  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
20813  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20814  if (likely(result)) {
20815  return __Pyx_NewRef(result);
20816  } else if (unlikely(PyErr_Occurred())) {
20817  return NULL;
20818  }
20819 #else
20820  result = PyDict_GetItem(__pyx_d, name);
20821  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20822  if (likely(result)) {
20823  return __Pyx_NewRef(result);
20824  }
20825 #endif
20826 #else
20827  result = PyObject_GetItem(__pyx_d, name);
20828  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20829  if (likely(result)) {
20830  return __Pyx_NewRef(result);
20831  }
20832  PyErr_Clear();
20833 #endif
20834  return __Pyx_GetBuiltinName(name);
20835 }
20836 
20837 /* GetTopmostException */
20838 #if CYTHON_USE_EXC_INFO_STACK
20839 static _PyErr_StackItem *
20840 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
20841 {
20842  _PyErr_StackItem *exc_info = tstate->exc_info;
20843  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
20844  exc_info->previous_item != NULL)
20845  {
20846  exc_info = exc_info->previous_item;
20847  }
20848  return exc_info;
20849 }
20850 #endif
20851 
20852 /* SaveResetException */
20853 #if CYTHON_FAST_THREAD_STATE
20854 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20855  #if CYTHON_USE_EXC_INFO_STACK
20856  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
20857  *type = exc_info->exc_type;
20858  *value = exc_info->exc_value;
20859  *tb = exc_info->exc_traceback;
20860  #else
20861  *type = tstate->exc_type;
20862  *value = tstate->exc_value;
20863  *tb = tstate->exc_traceback;
20864  #endif
20865  Py_XINCREF(*type);
20866  Py_XINCREF(*value);
20867  Py_XINCREF(*tb);
20868 }
20869 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20870  PyObject *tmp_type, *tmp_value, *tmp_tb;
20871  #if CYTHON_USE_EXC_INFO_STACK
20872  _PyErr_StackItem *exc_info = tstate->exc_info;
20873  tmp_type = exc_info->exc_type;
20874  tmp_value = exc_info->exc_value;
20875  tmp_tb = exc_info->exc_traceback;
20876  exc_info->exc_type = type;
20877  exc_info->exc_value = value;
20878  exc_info->exc_traceback = tb;
20879  #else
20880  tmp_type = tstate->exc_type;
20881  tmp_value = tstate->exc_value;
20882  tmp_tb = tstate->exc_traceback;
20883  tstate->exc_type = type;
20884  tstate->exc_value = value;
20885  tstate->exc_traceback = tb;
20886  #endif
20887  Py_XDECREF(tmp_type);
20888  Py_XDECREF(tmp_value);
20889  Py_XDECREF(tmp_tb);
20890 }
20891 #endif
20892 
20893 /* PyErrExceptionMatches */
20894 #if CYTHON_FAST_THREAD_STATE
20895 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
20896  Py_ssize_t i, n;
20897  n = PyTuple_GET_SIZE(tuple);
20898 #if PY_MAJOR_VERSION >= 3
20899  for (i=0; i<n; i++) {
20900  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
20901  }
20902 #endif
20903  for (i=0; i<n; i++) {
20904  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
20905  }
20906  return 0;
20907 }
20908 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
20909  PyObject *exc_type = tstate->curexc_type;
20910  if (exc_type == err) return 1;
20911  if (unlikely(!exc_type)) return 0;
20912  if (unlikely(PyTuple_Check(err)))
20913  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
20914  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
20915 }
20916 #endif
20917 
20918 /* GetException */
20919 #if CYTHON_FAST_THREAD_STATE
20920 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
20921 #else
20922 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
20923 #endif
20924 {
20925  PyObject *local_type, *local_value, *local_tb;
20926 #if CYTHON_FAST_THREAD_STATE
20927  PyObject *tmp_type, *tmp_value, *tmp_tb;
20928  local_type = tstate->curexc_type;
20929  local_value = tstate->curexc_value;
20930  local_tb = tstate->curexc_traceback;
20931  tstate->curexc_type = 0;
20932  tstate->curexc_value = 0;
20933  tstate->curexc_traceback = 0;
20934 #else
20935  PyErr_Fetch(&local_type, &local_value, &local_tb);
20936 #endif
20937  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20938 #if CYTHON_FAST_THREAD_STATE
20939  if (unlikely(tstate->curexc_type))
20940 #else
20941  if (unlikely(PyErr_Occurred()))
20942 #endif
20943  goto bad;
20944  #if PY_MAJOR_VERSION >= 3
20945  if (local_tb) {
20946  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20947  goto bad;
20948  }
20949  #endif
20950  Py_XINCREF(local_tb);
20951  Py_XINCREF(local_type);
20952  Py_XINCREF(local_value);
20953  *type = local_type;
20954  *value = local_value;
20955  *tb = local_tb;
20956 #if CYTHON_FAST_THREAD_STATE
20957  #if CYTHON_USE_EXC_INFO_STACK
20958  {
20959  _PyErr_StackItem *exc_info = tstate->exc_info;
20960  tmp_type = exc_info->exc_type;
20961  tmp_value = exc_info->exc_value;
20962  tmp_tb = exc_info->exc_traceback;
20963  exc_info->exc_type = local_type;
20964  exc_info->exc_value = local_value;
20965  exc_info->exc_traceback = local_tb;
20966  }
20967  #else
20968  tmp_type = tstate->exc_type;
20969  tmp_value = tstate->exc_value;
20970  tmp_tb = tstate->exc_traceback;
20971  tstate->exc_type = local_type;
20972  tstate->exc_value = local_value;
20973  tstate->exc_traceback = local_tb;
20974  #endif
20975  Py_XDECREF(tmp_type);
20976  Py_XDECREF(tmp_value);
20977  Py_XDECREF(tmp_tb);
20978 #else
20979  PyErr_SetExcInfo(local_type, local_value, local_tb);
20980 #endif
20981  return 0;
20982 bad:
20983  *type = 0;
20984  *value = 0;
20985  *tb = 0;
20986  Py_XDECREF(local_type);
20987  Py_XDECREF(local_value);
20988  Py_XDECREF(local_tb);
20989  return -1;
20990 }
20991 
20992 /* RaiseException */
20993 #if PY_MAJOR_VERSION < 3
20994 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
20995  CYTHON_UNUSED PyObject *cause) {
20996  __Pyx_PyThreadState_declare
20997  Py_XINCREF(type);
20998  if (!value || value == Py_None)
20999  value = NULL;
21000  else
21001  Py_INCREF(value);
21002  if (!tb || tb == Py_None)
21003  tb = NULL;
21004  else {
21005  Py_INCREF(tb);
21006  if (!PyTraceBack_Check(tb)) {
21007  PyErr_SetString(PyExc_TypeError,
21008  "raise: arg 3 must be a traceback or None");
21009  goto raise_error;
21010  }
21011  }
21012  if (PyType_Check(type)) {
21013 #if CYTHON_COMPILING_IN_PYPY
21014  if (!value) {
21015  Py_INCREF(Py_None);
21016  value = Py_None;
21017  }
21018 #endif
21019  PyErr_NormalizeException(&type, &value, &tb);
21020  } else {
21021  if (value) {
21022  PyErr_SetString(PyExc_TypeError,
21023  "instance exception may not have a separate value");
21024  goto raise_error;
21025  }
21026  value = type;
21027  type = (PyObject*) Py_TYPE(type);
21028  Py_INCREF(type);
21029  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21030  PyErr_SetString(PyExc_TypeError,
21031  "raise: exception class must be a subclass of BaseException");
21032  goto raise_error;
21033  }
21034  }
21035  __Pyx_PyThreadState_assign
21036  __Pyx_ErrRestore(type, value, tb);
21037  return;
21038 raise_error:
21039  Py_XDECREF(value);
21040  Py_XDECREF(type);
21041  Py_XDECREF(tb);
21042  return;
21043 }
21044 #else
21045 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21046  PyObject* owned_instance = NULL;
21047  if (tb == Py_None) {
21048  tb = 0;
21049  } else if (tb && !PyTraceBack_Check(tb)) {
21050  PyErr_SetString(PyExc_TypeError,
21051  "raise: arg 3 must be a traceback or None");
21052  goto bad;
21053  }
21054  if (value == Py_None)
21055  value = 0;
21056  if (PyExceptionInstance_Check(type)) {
21057  if (value) {
21058  PyErr_SetString(PyExc_TypeError,
21059  "instance exception may not have a separate value");
21060  goto bad;
21061  }
21062  value = type;
21063  type = (PyObject*) Py_TYPE(value);
21064  } else if (PyExceptionClass_Check(type)) {
21065  PyObject *instance_class = NULL;
21066  if (value && PyExceptionInstance_Check(value)) {
21067  instance_class = (PyObject*) Py_TYPE(value);
21068  if (instance_class != type) {
21069  int is_subclass = PyObject_IsSubclass(instance_class, type);
21070  if (!is_subclass) {
21071  instance_class = NULL;
21072  } else if (unlikely(is_subclass == -1)) {
21073  goto bad;
21074  } else {
21075  type = instance_class;
21076  }
21077  }
21078  }
21079  if (!instance_class) {
21080  PyObject *args;
21081  if (!value)
21082  args = PyTuple_New(0);
21083  else if (PyTuple_Check(value)) {
21084  Py_INCREF(value);
21085  args = value;
21086  } else
21087  args = PyTuple_Pack(1, value);
21088  if (!args)
21089  goto bad;
21090  owned_instance = PyObject_Call(type, args, NULL);
21091  Py_DECREF(args);
21092  if (!owned_instance)
21093  goto bad;
21094  value = owned_instance;
21095  if (!PyExceptionInstance_Check(value)) {
21096  PyErr_Format(PyExc_TypeError,
21097  "calling %R should have returned an instance of "
21098  "BaseException, not %R",
21099  type, Py_TYPE(value));
21100  goto bad;
21101  }
21102  }
21103  } else {
21104  PyErr_SetString(PyExc_TypeError,
21105  "raise: exception class must be a subclass of BaseException");
21106  goto bad;
21107  }
21108  if (cause) {
21109  PyObject *fixed_cause;
21110  if (cause == Py_None) {
21111  fixed_cause = NULL;
21112  } else if (PyExceptionClass_Check(cause)) {
21113  fixed_cause = PyObject_CallObject(cause, NULL);
21114  if (fixed_cause == NULL)
21115  goto bad;
21116  } else if (PyExceptionInstance_Check(cause)) {
21117  fixed_cause = cause;
21118  Py_INCREF(fixed_cause);
21119  } else {
21120  PyErr_SetString(PyExc_TypeError,
21121  "exception causes must derive from "
21122  "BaseException");
21123  goto bad;
21124  }
21125  PyException_SetCause(value, fixed_cause);
21126  }
21127  PyErr_SetObject(type, value);
21128  if (tb) {
21129 #if CYTHON_COMPILING_IN_PYPY
21130  PyObject *tmp_type, *tmp_value, *tmp_tb;
21131  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21132  Py_INCREF(tb);
21133  PyErr_Restore(tmp_type, tmp_value, tb);
21134  Py_XDECREF(tmp_tb);
21135 #else
21136  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21137  PyObject* tmp_tb = tstate->curexc_traceback;
21138  if (tb != tmp_tb) {
21139  Py_INCREF(tb);
21140  tstate->curexc_traceback = tb;
21141  Py_XDECREF(tmp_tb);
21142  }
21143 #endif
21144  }
21145 bad:
21146  Py_XDECREF(owned_instance);
21147  return;
21148 }
21149 #endif
21150 
21151 /* PyIntBinop */
21152 #if !CYTHON_COMPILING_IN_PYPY
21153 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
21154  (void)inplace;
21155  (void)zerodivision_check;
21156  #if PY_MAJOR_VERSION < 3
21157  if (likely(PyInt_CheckExact(op1))) {
21158  const long b = intval;
21159  long x;
21160  long a = PyInt_AS_LONG(op1);
21161  x = (long)((unsigned long)a + b);
21162  if (likely((x^a) >= 0 || (x^b) >= 0))
21163  return PyInt_FromLong(x);
21164  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21165  }
21166  #endif
21167  #if CYTHON_USE_PYLONG_INTERNALS
21168  if (likely(PyLong_CheckExact(op1))) {
21169  const long b = intval;
21170  long a, x;
21171 #ifdef HAVE_LONG_LONG
21172  const PY_LONG_LONG llb = intval;
21173  PY_LONG_LONG lla, llx;
21174 #endif
21175  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21176  const Py_ssize_t size = Py_SIZE(op1);
21177  if (likely(__Pyx_sst_abs(size) <= 1)) {
21178  a = likely(size) ? digits[0] : 0;
21179  if (size == -1) a = -a;
21180  } else {
21181  switch (size) {
21182  case -2:
21183  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21184  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21185  break;
21186 #ifdef HAVE_LONG_LONG
21187  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21188  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21189  goto long_long;
21190 #endif
21191  }
21192  CYTHON_FALLTHROUGH;
21193  case 2:
21194  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21195  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21196  break;
21197 #ifdef HAVE_LONG_LONG
21198  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21199  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21200  goto long_long;
21201 #endif
21202  }
21203  CYTHON_FALLTHROUGH;
21204  case -3:
21205  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21206  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21207  break;
21208 #ifdef HAVE_LONG_LONG
21209  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21210  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]));
21211  goto long_long;
21212 #endif
21213  }
21214  CYTHON_FALLTHROUGH;
21215  case 3:
21216  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21217  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21218  break;
21219 #ifdef HAVE_LONG_LONG
21220  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21221  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]));
21222  goto long_long;
21223 #endif
21224  }
21225  CYTHON_FALLTHROUGH;
21226  case -4:
21227  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21228  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21229  break;
21230 #ifdef HAVE_LONG_LONG
21231  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21232  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]));
21233  goto long_long;
21234 #endif
21235  }
21236  CYTHON_FALLTHROUGH;
21237  case 4:
21238  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21239  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21240  break;
21241 #ifdef HAVE_LONG_LONG
21242  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21243  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]));
21244  goto long_long;
21245 #endif
21246  }
21247  CYTHON_FALLTHROUGH;
21248  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21249  }
21250  }
21251  x = a + b;
21252  return PyLong_FromLong(x);
21253 #ifdef HAVE_LONG_LONG
21254  long_long:
21255  llx = lla + llb;
21256  return PyLong_FromLongLong(llx);
21257 #endif
21258 
21259 
21260  }
21261  #endif
21262  if (PyFloat_CheckExact(op1)) {
21263  const long b = intval;
21264  double a = PyFloat_AS_DOUBLE(op1);
21265  double result;
21266  PyFPE_START_PROTECT("add", return NULL)
21267  result = ((double)a) + (double)b;
21268  PyFPE_END_PROTECT(result)
21269  return PyFloat_FromDouble(result);
21270  }
21271  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21272 }
21273 #endif
21274 
21275 /* SetItemInt */
21276 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21277  int r;
21278  if (!j) return -1;
21279  r = PyObject_SetItem(o, j, v);
21280  Py_DECREF(j);
21281  return r;
21282 }
21283 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21284  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21285 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21286  if (is_list || PyList_CheckExact(o)) {
21287  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21288  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
21289  PyObject* old = PyList_GET_ITEM(o, n);
21290  Py_INCREF(v);
21291  PyList_SET_ITEM(o, n, v);
21292  Py_DECREF(old);
21293  return 1;
21294  }
21295  } else {
21296  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21297  if (likely(m && m->sq_ass_item)) {
21298  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21299  Py_ssize_t l = m->sq_length(o);
21300  if (likely(l >= 0)) {
21301  i += l;
21302  } else {
21303  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21304  return -1;
21305  PyErr_Clear();
21306  }
21307  }
21308  return m->sq_ass_item(o, i, v);
21309  }
21310  }
21311 #else
21312 #if CYTHON_COMPILING_IN_PYPY
21313  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
21314 #else
21315  if (is_list || PySequence_Check(o))
21316 #endif
21317  {
21318  return PySequence_SetItem(o, i, v);
21319  }
21320 #endif
21321  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21322 }
21323 
21324 /* PyObjectCall2Args */
21325 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21326  PyObject *args, *result = NULL;
21327  #if CYTHON_FAST_PYCALL
21328  if (PyFunction_Check(function)) {
21329  PyObject *args[2] = {arg1, arg2};
21330  return __Pyx_PyFunction_FastCall(function, args, 2);
21331  }
21332  #endif
21333  #if CYTHON_FAST_PYCCALL
21334  if (__Pyx_PyFastCFunction_Check(function)) {
21335  PyObject *args[2] = {arg1, arg2};
21336  return __Pyx_PyCFunction_FastCall(function, args, 2);
21337  }
21338  #endif
21339  args = PyTuple_New(2);
21340  if (unlikely(!args)) goto done;
21341  Py_INCREF(arg1);
21342  PyTuple_SET_ITEM(args, 0, arg1);
21343  Py_INCREF(arg2);
21344  PyTuple_SET_ITEM(args, 1, arg2);
21345  Py_INCREF(function);
21346  result = __Pyx_PyObject_Call(function, args, NULL);
21347  Py_DECREF(args);
21348  Py_DECREF(function);
21349 done:
21350  return result;
21351 }
21352 
21353 /* ArgTypeTest */
21354 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21355 {
21356  if (unlikely(!type)) {
21357  PyErr_SetString(PyExc_SystemError, "Missing type object");
21358  return 0;
21359  }
21360  else if (exact) {
21361  #if PY_MAJOR_VERSION == 2
21362  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21363  #endif
21364  }
21365  else {
21366  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21367  }
21368  PyErr_Format(PyExc_TypeError,
21369  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21370  name, type->tp_name, Py_TYPE(obj)->tp_name);
21371  return 0;
21372 }
21373 
21374 /* Import */
21375 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21376  PyObject *empty_list = 0;
21377  PyObject *module = 0;
21378  PyObject *global_dict = 0;
21379  PyObject *empty_dict = 0;
21380  PyObject *list;
21381  #if PY_MAJOR_VERSION < 3
21382  PyObject *py_import;
21383  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21384  if (!py_import)
21385  goto bad;
21386  #endif
21387  if (from_list)
21388  list = from_list;
21389  else {
21390  empty_list = PyList_New(0);
21391  if (!empty_list)
21392  goto bad;
21393  list = empty_list;
21394  }
21395  global_dict = PyModule_GetDict(__pyx_m);
21396  if (!global_dict)
21397  goto bad;
21398  empty_dict = PyDict_New();
21399  if (!empty_dict)
21400  goto bad;
21401  {
21402  #if PY_MAJOR_VERSION >= 3
21403  if (level == -1) {
21404  if (strchr(__Pyx_MODULE_NAME, '.')) {
21405  module = PyImport_ImportModuleLevelObject(
21406  name, global_dict, empty_dict, list, 1);
21407  if (!module) {
21408  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21409  goto bad;
21410  PyErr_Clear();
21411  }
21412  }
21413  level = 0;
21414  }
21415  #endif
21416  if (!module) {
21417  #if PY_MAJOR_VERSION < 3
21418  PyObject *py_level = PyInt_FromLong(level);
21419  if (!py_level)
21420  goto bad;
21421  module = PyObject_CallFunctionObjArgs(py_import,
21422  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
21423  Py_DECREF(py_level);
21424  #else
21425  module = PyImport_ImportModuleLevelObject(
21426  name, global_dict, empty_dict, list, level);
21427  #endif
21428  }
21429  }
21430 bad:
21431  #if PY_MAJOR_VERSION < 3
21432  Py_XDECREF(py_import);
21433  #endif
21434  Py_XDECREF(empty_list);
21435  Py_XDECREF(empty_dict);
21436  return module;
21437 }
21438 
21439 /* PyObject_GenericGetAttrNoDict */
21440 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21441 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21442  PyErr_Format(PyExc_AttributeError,
21443 #if PY_MAJOR_VERSION >= 3
21444  "'%.50s' object has no attribute '%U'",
21445  tp->tp_name, attr_name);
21446 #else
21447  "'%.50s' object has no attribute '%.400s'",
21448  tp->tp_name, PyString_AS_STRING(attr_name));
21449 #endif
21450  return NULL;
21451 }
21452 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21453  PyObject *descr;
21454  PyTypeObject *tp = Py_TYPE(obj);
21455  if (unlikely(!PyString_Check(attr_name))) {
21456  return PyObject_GenericGetAttr(obj, attr_name);
21457  }
21458  assert(!tp->tp_dictoffset);
21459  descr = _PyType_Lookup(tp, attr_name);
21460  if (unlikely(!descr)) {
21461  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21462  }
21463  Py_INCREF(descr);
21464  #if PY_MAJOR_VERSION < 3
21465  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21466  #endif
21467  {
21468  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21469  if (unlikely(f)) {
21470  PyObject *res = f(descr, obj, (PyObject *)tp);
21471  Py_DECREF(descr);
21472  return res;
21473  }
21474  }
21475  return descr;
21476 }
21477 #endif
21478 
21479 /* PyObject_GenericGetAttr */
21480 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21481 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21482  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21483  return PyObject_GenericGetAttr(obj, attr_name);
21484  }
21485  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21486 }
21487 #endif
21488 
21489 /* SetVTable */
21490 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21491 #if PY_VERSION_HEX >= 0x02070000
21492  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21493 #else
21494  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21495 #endif
21496  if (!ob)
21497  goto bad;
21498  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21499  goto bad;
21500  Py_DECREF(ob);
21501  return 0;
21502 bad:
21503  Py_XDECREF(ob);
21504  return -1;
21505 }
21506 
21507 /* SetupReduce */
21508 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21509  int ret;
21510  PyObject *name_attr;
21511  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21512  if (likely(name_attr)) {
21513  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21514  } else {
21515  ret = -1;
21516  }
21517  if (unlikely(ret < 0)) {
21518  PyErr_Clear();
21519  ret = 0;
21520  }
21521  Py_XDECREF(name_attr);
21522  return ret;
21523 }
21524 static int __Pyx_setup_reduce(PyObject* type_obj) {
21525  int ret = 0;
21526  PyObject *object_reduce = NULL;
21527  PyObject *object_reduce_ex = NULL;
21528  PyObject *reduce = NULL;
21529  PyObject *reduce_ex = NULL;
21530  PyObject *reduce_cython = NULL;
21531  PyObject *setstate = NULL;
21532  PyObject *setstate_cython = NULL;
21533 #if CYTHON_USE_PYTYPE_LOOKUP
21534  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21535 #else
21536  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21537 #endif
21538 #if CYTHON_USE_PYTYPE_LOOKUP
21539  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21540 #else
21541  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21542 #endif
21543  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21544  if (reduce_ex == object_reduce_ex) {
21545 #if CYTHON_USE_PYTYPE_LOOKUP
21546  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21547 #else
21548  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21549 #endif
21550  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21551  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21552  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21553  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21554  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21555  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21556  if (!setstate) PyErr_Clear();
21557  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21558  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21559  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21560  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21561  }
21562  PyType_Modified((PyTypeObject*)type_obj);
21563  }
21564  }
21565  goto GOOD;
21566 BAD:
21567  if (!PyErr_Occurred())
21568  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21569  ret = -1;
21570 GOOD:
21571 #if !CYTHON_USE_PYTYPE_LOOKUP
21572  Py_XDECREF(object_reduce);
21573  Py_XDECREF(object_reduce_ex);
21574 #endif
21575  Py_XDECREF(reduce);
21576  Py_XDECREF(reduce_ex);
21577  Py_XDECREF(reduce_cython);
21578  Py_XDECREF(setstate);
21579  Py_XDECREF(setstate_cython);
21580  return ret;
21581 }
21582 
21583 /* PyFloatBinop */
21584 #if !CYTHON_COMPILING_IN_PYPY
21585 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
21586  const double b = floatval;
21587  double a, result;
21588  (void)inplace;
21589  (void)zerodivision_check;
21590  if (likely(PyFloat_CheckExact(op1))) {
21591  a = PyFloat_AS_DOUBLE(op1);
21592 
21593  } else
21594  #if PY_MAJOR_VERSION < 3
21595  if (likely(PyInt_CheckExact(op1))) {
21596  a = (double) PyInt_AS_LONG(op1);
21597 
21598  } else
21599  #endif
21600  if (likely(PyLong_CheckExact(op1))) {
21601  #if CYTHON_USE_PYLONG_INTERNALS
21602  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21603  const Py_ssize_t size = Py_SIZE(op1);
21604  switch (size) {
21605  case 0: a = 0.0; break;
21606  case -1: a = -(double) digits[0]; break;
21607  case 1: a = (double) digits[0]; break;
21608  case -2:
21609  case 2:
21610  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21611  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21612  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21613  if (size == -2)
21614  a = -a;
21615  break;
21616  }
21617  }
21618  CYTHON_FALLTHROUGH;
21619  case -3:
21620  case 3:
21621  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21622  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21623  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21624  if (size == -3)
21625  a = -a;
21626  break;
21627  }
21628  }
21629  CYTHON_FALLTHROUGH;
21630  case -4:
21631  case 4:
21632  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21633  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21634  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21635  if (size == -4)
21636  a = -a;
21637  break;
21638  }
21639  }
21640  CYTHON_FALLTHROUGH;
21641  default:
21642  #else
21643  {
21644  #endif
21645  a = PyLong_AsDouble(op1);
21646  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
21647 
21648  }
21649  } else {
21650  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21651  }
21652 
21653  PyFPE_START_PROTECT("divide", return NULL)
21654  result = a / b;
21655  PyFPE_END_PROTECT(result)
21656  return PyFloat_FromDouble(result);
21657 }
21658 #endif
21659 
21660 /* BytesEquals */
21661  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21662 #if CYTHON_COMPILING_IN_PYPY
21663  return PyObject_RichCompareBool(s1, s2, equals);
21664 #else
21665  if (s1 == s2) {
21666  return (equals == Py_EQ);
21667  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21668  const char *ps1, *ps2;
21669  Py_ssize_t length = PyBytes_GET_SIZE(s1);
21670  if (length != PyBytes_GET_SIZE(s2))
21671  return (equals == Py_NE);
21672  ps1 = PyBytes_AS_STRING(s1);
21673  ps2 = PyBytes_AS_STRING(s2);
21674  if (ps1[0] != ps2[0]) {
21675  return (equals == Py_NE);
21676  } else if (length == 1) {
21677  return (equals == Py_EQ);
21678  } else {
21679  int result;
21680 #if CYTHON_USE_UNICODE_INTERNALS
21681  Py_hash_t hash1, hash2;
21682  hash1 = ((PyBytesObject*)s1)->ob_shash;
21683  hash2 = ((PyBytesObject*)s2)->ob_shash;
21684  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21685  return (equals == Py_NE);
21686  }
21687 #endif
21688  result = memcmp(ps1, ps2, (size_t)length);
21689  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21690  }
21691  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21692  return (equals == Py_NE);
21693  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21694  return (equals == Py_NE);
21695  } else {
21696  int result;
21697  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21698  if (!py_result)
21699  return -1;
21700  result = __Pyx_PyObject_IsTrue(py_result);
21701  Py_DECREF(py_result);
21702  return result;
21703  }
21704 #endif
21705 }
21706 
21707 /* UnicodeEquals */
21708  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
21709 #if CYTHON_COMPILING_IN_PYPY
21710  return PyObject_RichCompareBool(s1, s2, equals);
21711 #else
21712 #if PY_MAJOR_VERSION < 3
21713  PyObject* owned_ref = NULL;
21714 #endif
21715  int s1_is_unicode, s2_is_unicode;
21716  if (s1 == s2) {
21717  goto return_eq;
21718  }
21719  s1_is_unicode = PyUnicode_CheckExact(s1);
21720  s2_is_unicode = PyUnicode_CheckExact(s2);
21721 #if PY_MAJOR_VERSION < 3
21722  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21723  owned_ref = PyUnicode_FromObject(s2);
21724  if (unlikely(!owned_ref))
21725  return -1;
21726  s2 = owned_ref;
21727  s2_is_unicode = 1;
21728  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21729  owned_ref = PyUnicode_FromObject(s1);
21730  if (unlikely(!owned_ref))
21731  return -1;
21732  s1 = owned_ref;
21733  s1_is_unicode = 1;
21734  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21735  return __Pyx_PyBytes_Equals(s1, s2, equals);
21736  }
21737 #endif
21738  if (s1_is_unicode & s2_is_unicode) {
21739  Py_ssize_t length;
21740  int kind;
21741  void *data1, *data2;
21742  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21743  return -1;
21744  length = __Pyx_PyUnicode_GET_LENGTH(s1);
21745  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21746  goto return_ne;
21747  }
21748 #if CYTHON_USE_UNICODE_INTERNALS
21749  {
21750  Py_hash_t hash1, hash2;
21751  #if CYTHON_PEP393_ENABLED
21752  hash1 = ((PyASCIIObject*)s1)->hash;
21753  hash2 = ((PyASCIIObject*)s2)->hash;
21754  #else
21755  hash1 = ((PyUnicodeObject*)s1)->hash;
21756  hash2 = ((PyUnicodeObject*)s2)->hash;
21757  #endif
21758  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21759  goto return_ne;
21760  }
21761  }
21762 #endif
21763  kind = __Pyx_PyUnicode_KIND(s1);
21764  if (kind != __Pyx_PyUnicode_KIND(s2)) {
21765  goto return_ne;
21766  }
21767  data1 = __Pyx_PyUnicode_DATA(s1);
21768  data2 = __Pyx_PyUnicode_DATA(s2);
21769  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21770  goto return_ne;
21771  } else if (length == 1) {
21772  goto return_eq;
21773  } else {
21774  int result = memcmp(data1, data2, (size_t)(length * kind));
21775  #if PY_MAJOR_VERSION < 3
21776  Py_XDECREF(owned_ref);
21777  #endif
21778  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21779  }
21780  } else if ((s1 == Py_None) & s2_is_unicode) {
21781  goto return_ne;
21782  } else if ((s2 == Py_None) & s1_is_unicode) {
21783  goto return_ne;
21784  } else {
21785  int result;
21786  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21787  #if PY_MAJOR_VERSION < 3
21788  Py_XDECREF(owned_ref);
21789  #endif
21790  if (!py_result)
21791  return -1;
21792  result = __Pyx_PyObject_IsTrue(py_result);
21793  Py_DECREF(py_result);
21794  return result;
21795  }
21796 return_eq:
21797  #if PY_MAJOR_VERSION < 3
21798  Py_XDECREF(owned_ref);
21799  #endif
21800  return (equals == Py_EQ);
21801 return_ne:
21802  #if PY_MAJOR_VERSION < 3
21803  Py_XDECREF(owned_ref);
21804  #endif
21805  return (equals == Py_NE);
21806 #endif
21807 }
21808 
21809 /* CLineInTraceback */
21810  #ifndef CYTHON_CLINE_IN_TRACEBACK
21811 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
21812  PyObject *use_cline;
21813  PyObject *ptype, *pvalue, *ptraceback;
21814 #if CYTHON_COMPILING_IN_CPYTHON
21815  PyObject **cython_runtime_dict;
21816 #endif
21817  if (unlikely(!__pyx_cython_runtime)) {
21818  return c_line;
21819  }
21820  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
21821 #if CYTHON_COMPILING_IN_CPYTHON
21822  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
21823  if (likely(cython_runtime_dict)) {
21824  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
21825  use_cline, *cython_runtime_dict,
21826  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
21827  } else
21828 #endif
21829  {
21830  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
21831  if (use_cline_obj) {
21832  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
21833  Py_DECREF(use_cline_obj);
21834  } else {
21835  PyErr_Clear();
21836  use_cline = NULL;
21837  }
21838  }
21839  if (!use_cline) {
21840  c_line = 0;
21841  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
21842  }
21843  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
21844  c_line = 0;
21845  }
21846  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
21847  return c_line;
21848 }
21849 #endif
21850 
21851 /* CodeObjectCache */
21852  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
21853  int start = 0, mid = 0, end = count - 1;
21854  if (end >= 0 && code_line > entries[end].code_line) {
21855  return count;
21856  }
21857  while (start < end) {
21858  mid = start + (end - start) / 2;
21859  if (code_line < entries[mid].code_line) {
21860  end = mid;
21861  } else if (code_line > entries[mid].code_line) {
21862  start = mid + 1;
21863  } else {
21864  return mid;
21865  }
21866  }
21867  if (code_line <= entries[mid].code_line) {
21868  return mid;
21869  } else {
21870  return mid + 1;
21871  }
21872 }
21873 static PyCodeObject *__pyx_find_code_object(int code_line) {
21874  PyCodeObject* code_object;
21875  int pos;
21876  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21877  return NULL;
21878  }
21879  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21880  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21881  return NULL;
21882  }
21883  code_object = __pyx_code_cache.entries[pos].code_object;
21884  Py_INCREF(code_object);
21885  return code_object;
21886 }
21887 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
21888  int pos, i;
21889  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21890  if (unlikely(!code_line)) {
21891  return;
21892  }
21893  if (unlikely(!entries)) {
21894  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
21895  if (likely(entries)) {
21896  __pyx_code_cache.entries = entries;
21897  __pyx_code_cache.max_count = 64;
21898  __pyx_code_cache.count = 1;
21899  entries[0].code_line = code_line;
21900  entries[0].code_object = code_object;
21901  Py_INCREF(code_object);
21902  }
21903  return;
21904  }
21905  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21906  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21907  PyCodeObject* tmp = entries[pos].code_object;
21908  entries[pos].code_object = code_object;
21909  Py_DECREF(tmp);
21910  return;
21911  }
21912  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21913  int new_max = __pyx_code_cache.max_count + 64;
21914  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21915  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
21916  if (unlikely(!entries)) {
21917  return;
21918  }
21919  __pyx_code_cache.entries = entries;
21920  __pyx_code_cache.max_count = new_max;
21921  }
21922  for (i=__pyx_code_cache.count; i>pos; i--) {
21923  entries[i] = entries[i-1];
21924  }
21925  entries[pos].code_line = code_line;
21926  entries[pos].code_object = code_object;
21927  __pyx_code_cache.count++;
21928  Py_INCREF(code_object);
21929 }
21930 
21931 /* AddTraceback */
21932  #include "compile.h"
21933 #include "frameobject.h"
21934 #include "traceback.h"
21935 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21936  const char *funcname, int c_line,
21937  int py_line, const char *filename) {
21938  PyCodeObject *py_code = 0;
21939  PyObject *py_srcfile = 0;
21940  PyObject *py_funcname = 0;
21941  #if PY_MAJOR_VERSION < 3
21942  py_srcfile = PyString_FromString(filename);
21943  #else
21944  py_srcfile = PyUnicode_FromString(filename);
21945  #endif
21946  if (!py_srcfile) goto bad;
21947  if (c_line) {
21948  #if PY_MAJOR_VERSION < 3
21949  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21950  #else
21951  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21952  #endif
21953  }
21954  else {
21955  #if PY_MAJOR_VERSION < 3
21956  py_funcname = PyString_FromString(funcname);
21957  #else
21958  py_funcname = PyUnicode_FromString(funcname);
21959  #endif
21960  }
21961  if (!py_funcname) goto bad;
21962  py_code = __Pyx_PyCode_New(
21963  0,
21964  0,
21965  0,
21966  0,
21967  0,
21968  __pyx_empty_bytes, /*PyObject *code,*/
21969  __pyx_empty_tuple, /*PyObject *consts,*/
21970  __pyx_empty_tuple, /*PyObject *names,*/
21971  __pyx_empty_tuple, /*PyObject *varnames,*/
21972  __pyx_empty_tuple, /*PyObject *freevars,*/
21973  __pyx_empty_tuple, /*PyObject *cellvars,*/
21974  py_srcfile, /*PyObject *filename,*/
21975  py_funcname, /*PyObject *name,*/
21976  py_line,
21977  __pyx_empty_bytes /*PyObject *lnotab*/
21978  );
21979  Py_DECREF(py_srcfile);
21980  Py_DECREF(py_funcname);
21981  return py_code;
21982 bad:
21983  Py_XDECREF(py_srcfile);
21984  Py_XDECREF(py_funcname);
21985  return NULL;
21986 }
21987 static void __Pyx_AddTraceback(const char *funcname, int c_line,
21988  int py_line, const char *filename) {
21989  PyCodeObject *py_code = 0;
21990  PyFrameObject *py_frame = 0;
21991  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21992  if (c_line) {
21993  c_line = __Pyx_CLineForTraceback(tstate, c_line);
21994  }
21995  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
21996  if (!py_code) {
21997  py_code = __Pyx_CreateCodeObjectForTraceback(
21998  funcname, c_line, py_line, filename);
21999  if (!py_code) goto bad;
22000  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22001  }
22002  py_frame = PyFrame_New(
22003  tstate, /*PyThreadState *tstate,*/
22004  py_code, /*PyCodeObject *code,*/
22005  __pyx_d, /*PyObject *globals,*/
22006  0 /*PyObject *locals*/
22007  );
22008  if (!py_frame) goto bad;
22009  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22010  PyTraceBack_Here(py_frame);
22011 bad:
22012  Py_XDECREF(py_code);
22013  Py_XDECREF(py_frame);
22014 }
22015 
22016 /* CIntFromPyVerify */
22017  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22018  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22019 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22020  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22021 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22022  {\
22023  func_type value = func_value;\
22024  if (sizeof(target_type) < sizeof(func_type)) {\
22025  if (unlikely(value != (func_type) (target_type) value)) {\
22026  func_type zero = 0;\
22027  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22028  return (target_type) -1;\
22029  if (is_unsigned && unlikely(value < zero))\
22030  goto raise_neg_overflow;\
22031  else\
22032  goto raise_overflow;\
22033  }\
22034  }\
22035  return (target_type) value;\
22036  }
22037 
22038 /* CIntToPy */
22039  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22040  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22041  const int is_unsigned = neg_one > const_zero;
22042  if (is_unsigned) {
22043  if (sizeof(int) < sizeof(long)) {
22044  return PyInt_FromLong((long) value);
22045  } else if (sizeof(int) <= sizeof(unsigned long)) {
22046  return PyLong_FromUnsignedLong((unsigned long) value);
22047 #ifdef HAVE_LONG_LONG
22048  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22049  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22050 #endif
22051  }
22052  } else {
22053  if (sizeof(int) <= sizeof(long)) {
22054  return PyInt_FromLong((long) value);
22055 #ifdef HAVE_LONG_LONG
22056  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22057  return PyLong_FromLongLong((PY_LONG_LONG) value);
22058 #endif
22059  }
22060  }
22061  {
22062  int one = 1; int little = (int)*(unsigned char *)&one;
22063  unsigned char *bytes = (unsigned char *)&value;
22064  return _PyLong_FromByteArray(bytes, sizeof(int),
22065  little, !is_unsigned);
22066  }
22067 }
22068 
22069 /* CIntFromPy */
22070  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22071  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22072  const int is_unsigned = neg_one > const_zero;
22073 #if PY_MAJOR_VERSION < 3
22074  if (likely(PyInt_Check(x))) {
22075  if (sizeof(int) < sizeof(long)) {
22076  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22077  } else {
22078  long val = PyInt_AS_LONG(x);
22079  if (is_unsigned && unlikely(val < 0)) {
22080  goto raise_neg_overflow;
22081  }
22082  return (int) val;
22083  }
22084  } else
22085 #endif
22086  if (likely(PyLong_Check(x))) {
22087  if (is_unsigned) {
22088 #if CYTHON_USE_PYLONG_INTERNALS
22089  const digit* digits = ((PyLongObject*)x)->ob_digit;
22090  switch (Py_SIZE(x)) {
22091  case 0: return (int) 0;
22092  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22093  case 2:
22094  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22095  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22096  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22097  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22098  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22099  }
22100  }
22101  break;
22102  case 3:
22103  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22104  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22105  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22106  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22107  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22108  }
22109  }
22110  break;
22111  case 4:
22112  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22113  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22114  __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])))
22115  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22116  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22117  }
22118  }
22119  break;
22120  }
22121 #endif
22122 #if CYTHON_COMPILING_IN_CPYTHON
22123  if (unlikely(Py_SIZE(x) < 0)) {
22124  goto raise_neg_overflow;
22125  }
22126 #else
22127  {
22128  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22129  if (unlikely(result < 0))
22130  return (int) -1;
22131  if (unlikely(result == 1))
22132  goto raise_neg_overflow;
22133  }
22134 #endif
22135  if (sizeof(int) <= sizeof(unsigned long)) {
22136  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22137 #ifdef HAVE_LONG_LONG
22138  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22139  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22140 #endif
22141  }
22142  } else {
22143 #if CYTHON_USE_PYLONG_INTERNALS
22144  const digit* digits = ((PyLongObject*)x)->ob_digit;
22145  switch (Py_SIZE(x)) {
22146  case 0: return (int) 0;
22147  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22148  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22149  case -2:
22150  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22151  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22152  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22153  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22154  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22155  }
22156  }
22157  break;
22158  case 2:
22159  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22160  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22161  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22162  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22163  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22164  }
22165  }
22166  break;
22167  case -3:
22168  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22169  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22170  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22171  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22172  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22173  }
22174  }
22175  break;
22176  case 3:
22177  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22178  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22179  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22180  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22181  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22182  }
22183  }
22184  break;
22185  case -4:
22186  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22187  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22188  __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])))
22189  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22190  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22191  }
22192  }
22193  break;
22194  case 4:
22195  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22196  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22197  __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])))
22198  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22199  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22200  }
22201  }
22202  break;
22203  }
22204 #endif
22205  if (sizeof(int) <= sizeof(long)) {
22206  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22207 #ifdef HAVE_LONG_LONG
22208  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22209  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22210 #endif
22211  }
22212  }
22213  {
22214 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22215  PyErr_SetString(PyExc_RuntimeError,
22216  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22217 #else
22218  int val;
22219  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22220  #if PY_MAJOR_VERSION < 3
22221  if (likely(v) && !PyLong_Check(v)) {
22222  PyObject *tmp = v;
22223  v = PyNumber_Long(tmp);
22224  Py_DECREF(tmp);
22225  }
22226  #endif
22227  if (likely(v)) {
22228  int one = 1; int is_little = (int)*(unsigned char *)&one;
22229  unsigned char *bytes = (unsigned char *)&val;
22230  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22231  bytes, sizeof(val),
22232  is_little, !is_unsigned);
22233  Py_DECREF(v);
22234  if (likely(!ret))
22235  return val;
22236  }
22237 #endif
22238  return (int) -1;
22239  }
22240  } else {
22241  int val;
22242  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22243  if (!tmp) return (int) -1;
22244  val = __Pyx_PyInt_As_int(tmp);
22245  Py_DECREF(tmp);
22246  return val;
22247  }
22248 raise_overflow:
22249  PyErr_SetString(PyExc_OverflowError,
22250  "value too large to convert to int");
22251  return (int) -1;
22252 raise_neg_overflow:
22253  PyErr_SetString(PyExc_OverflowError,
22254  "can't convert negative value to int");
22255  return (int) -1;
22256 }
22257 
22258 /* CIntToPy */
22259  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22260  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22261  const int is_unsigned = neg_one > const_zero;
22262  if (is_unsigned) {
22263  if (sizeof(long) < sizeof(long)) {
22264  return PyInt_FromLong((long) value);
22265  } else if (sizeof(long) <= sizeof(unsigned long)) {
22266  return PyLong_FromUnsignedLong((unsigned long) value);
22267 #ifdef HAVE_LONG_LONG
22268  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22269  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22270 #endif
22271  }
22272  } else {
22273  if (sizeof(long) <= sizeof(long)) {
22274  return PyInt_FromLong((long) value);
22275 #ifdef HAVE_LONG_LONG
22276  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22277  return PyLong_FromLongLong((PY_LONG_LONG) value);
22278 #endif
22279  }
22280  }
22281  {
22282  int one = 1; int little = (int)*(unsigned char *)&one;
22283  unsigned char *bytes = (unsigned char *)&value;
22284  return _PyLong_FromByteArray(bytes, sizeof(long),
22285  little, !is_unsigned);
22286  }
22287 }
22288 
22289 /* CIntFromPy */
22290  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22291  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22292  const int is_unsigned = neg_one > const_zero;
22293 #if PY_MAJOR_VERSION < 3
22294  if (likely(PyInt_Check(x))) {
22295  if (sizeof(long) < sizeof(long)) {
22296  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22297  } else {
22298  long val = PyInt_AS_LONG(x);
22299  if (is_unsigned && unlikely(val < 0)) {
22300  goto raise_neg_overflow;
22301  }
22302  return (long) val;
22303  }
22304  } else
22305 #endif
22306  if (likely(PyLong_Check(x))) {
22307  if (is_unsigned) {
22308 #if CYTHON_USE_PYLONG_INTERNALS
22309  const digit* digits = ((PyLongObject*)x)->ob_digit;
22310  switch (Py_SIZE(x)) {
22311  case 0: return (long) 0;
22312  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22313  case 2:
22314  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22315  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22316  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22317  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22318  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22319  }
22320  }
22321  break;
22322  case 3:
22323  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22324  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22325  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22326  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22327  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22328  }
22329  }
22330  break;
22331  case 4:
22332  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22333  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22334  __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])))
22335  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22336  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22337  }
22338  }
22339  break;
22340  }
22341 #endif
22342 #if CYTHON_COMPILING_IN_CPYTHON
22343  if (unlikely(Py_SIZE(x) < 0)) {
22344  goto raise_neg_overflow;
22345  }
22346 #else
22347  {
22348  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22349  if (unlikely(result < 0))
22350  return (long) -1;
22351  if (unlikely(result == 1))
22352  goto raise_neg_overflow;
22353  }
22354 #endif
22355  if (sizeof(long) <= sizeof(unsigned long)) {
22356  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22357 #ifdef HAVE_LONG_LONG
22358  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22359  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22360 #endif
22361  }
22362  } else {
22363 #if CYTHON_USE_PYLONG_INTERNALS
22364  const digit* digits = ((PyLongObject*)x)->ob_digit;
22365  switch (Py_SIZE(x)) {
22366  case 0: return (long) 0;
22367  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22368  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22369  case -2:
22370  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22371  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22372  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22373  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22374  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22375  }
22376  }
22377  break;
22378  case 2:
22379  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22380  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22381  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22382  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22383  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22384  }
22385  }
22386  break;
22387  case -3:
22388  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22389  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22390  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22391  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22392  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22393  }
22394  }
22395  break;
22396  case 3:
22397  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22398  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22399  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22400  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22401  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22402  }
22403  }
22404  break;
22405  case -4:
22406  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22407  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22408  __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])))
22409  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22410  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22411  }
22412  }
22413  break;
22414  case 4:
22415  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22416  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22417  __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])))
22418  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22419  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22420  }
22421  }
22422  break;
22423  }
22424 #endif
22425  if (sizeof(long) <= sizeof(long)) {
22426  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22427 #ifdef HAVE_LONG_LONG
22428  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22429  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22430 #endif
22431  }
22432  }
22433  {
22434 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22435  PyErr_SetString(PyExc_RuntimeError,
22436  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22437 #else
22438  long val;
22439  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22440  #if PY_MAJOR_VERSION < 3
22441  if (likely(v) && !PyLong_Check(v)) {
22442  PyObject *tmp = v;
22443  v = PyNumber_Long(tmp);
22444  Py_DECREF(tmp);
22445  }
22446  #endif
22447  if (likely(v)) {
22448  int one = 1; int is_little = (int)*(unsigned char *)&one;
22449  unsigned char *bytes = (unsigned char *)&val;
22450  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22451  bytes, sizeof(val),
22452  is_little, !is_unsigned);
22453  Py_DECREF(v);
22454  if (likely(!ret))
22455  return val;
22456  }
22457 #endif
22458  return (long) -1;
22459  }
22460  } else {
22461  long val;
22462  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22463  if (!tmp) return (long) -1;
22464  val = __Pyx_PyInt_As_long(tmp);
22465  Py_DECREF(tmp);
22466  return val;
22467  }
22468 raise_overflow:
22469  PyErr_SetString(PyExc_OverflowError,
22470  "value too large to convert to long");
22471  return (long) -1;
22472 raise_neg_overflow:
22473  PyErr_SetString(PyExc_OverflowError,
22474  "can't convert negative value to long");
22475  return (long) -1;
22476 }
22477 
22478 /* FastTypeChecks */
22479  #if CYTHON_COMPILING_IN_CPYTHON
22480 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22481  while (a) {
22482  a = a->tp_base;
22483  if (a == b)
22484  return 1;
22485  }
22486  return b == &PyBaseObject_Type;
22487 }
22488 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22489  PyObject *mro;
22490  if (a == b) return 1;
22491  mro = a->tp_mro;
22492  if (likely(mro)) {
22493  Py_ssize_t i, n;
22494  n = PyTuple_GET_SIZE(mro);
22495  for (i = 0; i < n; i++) {
22496  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22497  return 1;
22498  }
22499  return 0;
22500  }
22501  return __Pyx_InBases(a, b);
22502 }
22503 #if PY_MAJOR_VERSION == 2
22504 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22505  PyObject *exception, *value, *tb;
22506  int res;
22507  __Pyx_PyThreadState_declare
22508  __Pyx_PyThreadState_assign
22509  __Pyx_ErrFetch(&exception, &value, &tb);
22510  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22511  if (unlikely(res == -1)) {
22512  PyErr_WriteUnraisable(err);
22513  res = 0;
22514  }
22515  if (!res) {
22516  res = PyObject_IsSubclass(err, exc_type2);
22517  if (unlikely(res == -1)) {
22518  PyErr_WriteUnraisable(err);
22519  res = 0;
22520  }
22521  }
22522  __Pyx_ErrRestore(exception, value, tb);
22523  return res;
22524 }
22525 #else
22526 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22527  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22528  if (!res) {
22529  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22530  }
22531  return res;
22532 }
22533 #endif
22534 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22535  Py_ssize_t i, n;
22536  assert(PyExceptionClass_Check(exc_type));
22537  n = PyTuple_GET_SIZE(tuple);
22538 #if PY_MAJOR_VERSION >= 3
22539  for (i=0; i<n; i++) {
22540  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22541  }
22542 #endif
22543  for (i=0; i<n; i++) {
22544  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22545  #if PY_MAJOR_VERSION < 3
22546  if (likely(exc_type == t)) return 1;
22547  #endif
22548  if (likely(PyExceptionClass_Check(t))) {
22549  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22550  } else {
22551  }
22552  }
22553  return 0;
22554 }
22555 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22556  if (likely(err == exc_type)) return 1;
22557  if (likely(PyExceptionClass_Check(err))) {
22558  if (likely(PyExceptionClass_Check(exc_type))) {
22559  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22560  } else if (likely(PyTuple_Check(exc_type))) {
22561  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22562  } else {
22563  }
22564  }
22565  return PyErr_GivenExceptionMatches(err, exc_type);
22566 }
22567 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22568  assert(PyExceptionClass_Check(exc_type1));
22569  assert(PyExceptionClass_Check(exc_type2));
22570  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22571  if (likely(PyExceptionClass_Check(err))) {
22572  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22573  }
22574  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22575 }
22576 #endif
22577 
22578 /* FetchCommonType */
22579  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22580  PyObject* fake_module;
22581  PyTypeObject* cached_type = NULL;
22582  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22583  if (!fake_module) return NULL;
22584  Py_INCREF(fake_module);
22585  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22586  if (cached_type) {
22587  if (!PyType_Check((PyObject*)cached_type)) {
22588  PyErr_Format(PyExc_TypeError,
22589  "Shared Cython type %.200s is not a type object",
22590  type->tp_name);
22591  goto bad;
22592  }
22593  if (cached_type->tp_basicsize != type->tp_basicsize) {
22594  PyErr_Format(PyExc_TypeError,
22595  "Shared Cython type %.200s has the wrong size, try recompiling",
22596  type->tp_name);
22597  goto bad;
22598  }
22599  } else {
22600  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22601  PyErr_Clear();
22602  if (PyType_Ready(type) < 0) goto bad;
22603  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22604  goto bad;
22605  Py_INCREF(type);
22606  cached_type = type;
22607  }
22608 done:
22609  Py_DECREF(fake_module);
22610  return cached_type;
22611 bad:
22612  Py_XDECREF(cached_type);
22613  cached_type = NULL;
22614  goto done;
22615 }
22616 
22617 /* SwapException */
22618  #if CYTHON_FAST_THREAD_STATE
22619 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22620  PyObject *tmp_type, *tmp_value, *tmp_tb;
22621  #if CYTHON_USE_EXC_INFO_STACK
22622  _PyErr_StackItem *exc_info = tstate->exc_info;
22623  tmp_type = exc_info->exc_type;
22624  tmp_value = exc_info->exc_value;
22625  tmp_tb = exc_info->exc_traceback;
22626  exc_info->exc_type = *type;
22627  exc_info->exc_value = *value;
22628  exc_info->exc_traceback = *tb;
22629  #else
22630  tmp_type = tstate->exc_type;
22631  tmp_value = tstate->exc_value;
22632  tmp_tb = tstate->exc_traceback;
22633  tstate->exc_type = *type;
22634  tstate->exc_value = *value;
22635  tstate->exc_traceback = *tb;
22636  #endif
22637  *type = tmp_type;
22638  *value = tmp_value;
22639  *tb = tmp_tb;
22640 }
22641 #else
22642 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22643  PyObject *tmp_type, *tmp_value, *tmp_tb;
22644  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22645  PyErr_SetExcInfo(*type, *value, *tb);
22646  *type = tmp_type;
22647  *value = tmp_value;
22648  *tb = tmp_tb;
22649 }
22650 #endif
22651 
22652 /* PyObjectGetMethod */
22653  static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
22654  PyObject *attr;
22655 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
22656  PyTypeObject *tp = Py_TYPE(obj);
22657  PyObject *descr;
22658  descrgetfunc f = NULL;
22659  PyObject **dictptr, *dict;
22660  int meth_found = 0;
22661  assert (*method == NULL);
22662  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
22663  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22664  goto try_unpack;
22665  }
22666  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
22667  return 0;
22668  }
22669  descr = _PyType_Lookup(tp, name);
22670  if (likely(descr != NULL)) {
22671  Py_INCREF(descr);
22672 #if PY_MAJOR_VERSION >= 3
22673  #ifdef __Pyx_CyFunction_USED
22674  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
22675  #else
22676  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
22677  #endif
22678 #else
22679  #ifdef __Pyx_CyFunction_USED
22680  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
22681  #else
22682  if (likely(PyFunction_Check(descr)))
22683  #endif
22684 #endif
22685  {
22686  meth_found = 1;
22687  } else {
22688  f = Py_TYPE(descr)->tp_descr_get;
22689  if (f != NULL && PyDescr_IsData(descr)) {
22690  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22691  Py_DECREF(descr);
22692  goto try_unpack;
22693  }
22694  }
22695  }
22696  dictptr = _PyObject_GetDictPtr(obj);
22697  if (dictptr != NULL && (dict = *dictptr) != NULL) {
22698  Py_INCREF(dict);
22699  attr = __Pyx_PyDict_GetItemStr(dict, name);
22700  if (attr != NULL) {
22701  Py_INCREF(attr);
22702  Py_DECREF(dict);
22703  Py_XDECREF(descr);
22704  goto try_unpack;
22705  }
22706  Py_DECREF(dict);
22707  }
22708  if (meth_found) {
22709  *method = descr;
22710  return 1;
22711  }
22712  if (f != NULL) {
22713  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22714  Py_DECREF(descr);
22715  goto try_unpack;
22716  }
22717  if (descr != NULL) {
22718  *method = descr;
22719  return 0;
22720  }
22721  PyErr_Format(PyExc_AttributeError,
22722 #if PY_MAJOR_VERSION >= 3
22723  "'%.50s' object has no attribute '%U'",
22724  tp->tp_name, name);
22725 #else
22726  "'%.50s' object has no attribute '%.400s'",
22727  tp->tp_name, PyString_AS_STRING(name));
22728 #endif
22729  return 0;
22730 #else
22731  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22732  goto try_unpack;
22733 #endif
22734 try_unpack:
22735 #if CYTHON_UNPACK_METHODS
22736  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
22737  PyObject *function = PyMethod_GET_FUNCTION(attr);
22738  Py_INCREF(function);
22739  Py_DECREF(attr);
22740  *method = function;
22741  return 1;
22742  }
22743 #endif
22744  *method = attr;
22745  return 0;
22746 }
22747 
22748 /* PyObjectCallMethod1 */
22749  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
22750  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
22751  Py_DECREF(method);
22752  return result;
22753 }
22754 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
22755  PyObject *method = NULL, *result;
22756  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
22757  if (likely(is_method)) {
22758  result = __Pyx_PyObject_Call2Args(method, obj, arg);
22759  Py_DECREF(method);
22760  return result;
22761  }
22762  if (unlikely(!method)) return NULL;
22763  return __Pyx__PyObject_CallMethod1(method, arg);
22764 }
22765 
22766 /* CoroutineBase */
22767  #include <structmember.h>
22768 #include <frameobject.h>
22769 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
22770 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
22771  PyObject *et, *ev, *tb;
22772  PyObject *value = NULL;
22773  __Pyx_ErrFetch(&et, &ev, &tb);
22774  if (!et) {
22775  Py_XDECREF(tb);
22776  Py_XDECREF(ev);
22777  Py_INCREF(Py_None);
22778  *pvalue = Py_None;
22779  return 0;
22780  }
22781  if (likely(et == PyExc_StopIteration)) {
22782  if (!ev) {
22783  Py_INCREF(Py_None);
22784  value = Py_None;
22785  }
22786 #if PY_VERSION_HEX >= 0x030300A0
22787  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
22788  value = ((PyStopIterationObject *)ev)->value;
22789  Py_INCREF(value);
22790  Py_DECREF(ev);
22791  }
22792 #endif
22793  else if (unlikely(PyTuple_Check(ev))) {
22794  if (PyTuple_GET_SIZE(ev) >= 1) {
22795 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22796  value = PyTuple_GET_ITEM(ev, 0);
22797  Py_INCREF(value);
22798 #else
22799  value = PySequence_ITEM(ev, 0);
22800 #endif
22801  } else {
22802  Py_INCREF(Py_None);
22803  value = Py_None;
22804  }
22805  Py_DECREF(ev);
22806  }
22807  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
22808  value = ev;
22809  }
22810  if (likely(value)) {
22811  Py_XDECREF(tb);
22812  Py_DECREF(et);
22813  *pvalue = value;
22814  return 0;
22815  }
22816  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
22817  __Pyx_ErrRestore(et, ev, tb);
22818  return -1;
22819  }
22820  PyErr_NormalizeException(&et, &ev, &tb);
22821  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
22822  __Pyx_ErrRestore(et, ev, tb);
22823  return -1;
22824  }
22825  Py_XDECREF(tb);
22826  Py_DECREF(et);
22827 #if PY_VERSION_HEX >= 0x030300A0
22828  value = ((PyStopIterationObject *)ev)->value;
22829  Py_INCREF(value);
22830  Py_DECREF(ev);
22831 #else
22832  {
22833  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
22834  Py_DECREF(ev);
22835  if (likely(args)) {
22836  value = PySequence_GetItem(args, 0);
22837  Py_DECREF(args);
22838  }
22839  if (unlikely(!value)) {
22840  __Pyx_ErrRestore(NULL, NULL, NULL);
22841  Py_INCREF(Py_None);
22842  value = Py_None;
22843  }
22844  }
22845 #endif
22846  *pvalue = value;
22847  return 0;
22848 }
22849 static CYTHON_INLINE
22850 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
22851  PyObject *t, *v, *tb;
22852  t = exc_state->exc_type;
22853  v = exc_state->exc_value;
22854  tb = exc_state->exc_traceback;
22855  exc_state->exc_type = NULL;
22856  exc_state->exc_value = NULL;
22857  exc_state->exc_traceback = NULL;
22858  Py_XDECREF(t);
22859  Py_XDECREF(v);
22860  Py_XDECREF(tb);
22861 }
22862 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
22863 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
22864  const char *msg;
22865  if ((0)) {
22866  #ifdef __Pyx_Coroutine_USED
22867  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
22868  msg = "coroutine already executing";
22869  #endif
22870  #ifdef __Pyx_AsyncGen_USED
22871  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
22872  msg = "async generator already executing";
22873  #endif
22874  } else {
22875  msg = "generator already executing";
22876  }
22877  PyErr_SetString(PyExc_ValueError, msg);
22878 }
22879 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
22880 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
22881  const char *msg;
22882  if ((0)) {
22883  #ifdef __Pyx_Coroutine_USED
22884  } else if (__Pyx_Coroutine_Check(gen)) {
22885  msg = "can't send non-None value to a just-started coroutine";
22886  #endif
22887  #ifdef __Pyx_AsyncGen_USED
22888  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
22889  msg = "can't send non-None value to a just-started async generator";
22890  #endif
22891  } else {
22892  msg = "can't send non-None value to a just-started generator";
22893  }
22894  PyErr_SetString(PyExc_TypeError, msg);
22895 }
22896 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
22897 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
22898  #ifdef __Pyx_Coroutine_USED
22899  if (!closing && __Pyx_Coroutine_Check(gen)) {
22900  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
22901  } else
22902  #endif
22903  if (value) {
22904  #ifdef __Pyx_AsyncGen_USED
22905  if (__Pyx_AsyncGen_CheckExact(gen))
22906  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
22907  else
22908  #endif
22909  PyErr_SetNone(PyExc_StopIteration);
22910  }
22911 }
22912 static
22913 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
22914  __Pyx_PyThreadState_declare
22915  PyThreadState *tstate;
22916  __Pyx_ExcInfoStruct *exc_state;
22917  PyObject *retval;
22918  assert(!self->is_running);
22919  if (unlikely(self->resume_label == 0)) {
22920  if (unlikely(value && value != Py_None)) {
22921  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
22922  }
22923  }
22924  if (unlikely(self->resume_label == -1)) {
22925  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
22926  }
22927 #if CYTHON_FAST_THREAD_STATE
22928  __Pyx_PyThreadState_assign
22929  tstate = __pyx_tstate;
22930 #else
22931  tstate = __Pyx_PyThreadState_Current;
22932 #endif
22933  exc_state = &self->gi_exc_state;
22934  if (exc_state->exc_type) {
22935  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22936  #else
22937  if (exc_state->exc_traceback) {
22938  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
22939  PyFrameObject *f = tb->tb_frame;
22940  Py_XINCREF(tstate->frame);
22941  assert(f->f_back == NULL);
22942  f->f_back = tstate->frame;
22943  }
22944  #endif
22945  }
22946 #if CYTHON_USE_EXC_INFO_STACK
22947  exc_state->previous_item = tstate->exc_info;
22948  tstate->exc_info = exc_state;
22949 #else
22950  if (exc_state->exc_type) {
22951  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22952  } else {
22953  __Pyx_Coroutine_ExceptionClear(exc_state);
22954  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22955  }
22956 #endif
22957  self->is_running = 1;
22958  retval = self->body((PyObject *) self, tstate, value);
22959  self->is_running = 0;
22960 #if CYTHON_USE_EXC_INFO_STACK
22961  exc_state = &self->gi_exc_state;
22962  tstate->exc_info = exc_state->previous_item;
22963  exc_state->previous_item = NULL;
22964  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
22965 #endif
22966  return retval;
22967 }
22968 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
22969  PyObject *exc_tb = exc_state->exc_traceback;
22970  if (likely(exc_tb)) {
22971 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22972 #else
22973  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
22974  PyFrameObject *f = tb->tb_frame;
22975  Py_CLEAR(f->f_back);
22976 #endif
22977  }
22978 }
22979 static CYTHON_INLINE
22980 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
22981  if (unlikely(!retval)) {
22982  __Pyx_PyThreadState_declare
22983  __Pyx_PyThreadState_assign
22984  if (!__Pyx_PyErr_Occurred()) {
22985  PyObject *exc = PyExc_StopIteration;
22986  #ifdef __Pyx_AsyncGen_USED
22987  if (__Pyx_AsyncGen_CheckExact(gen))
22988  exc = __Pyx_PyExc_StopAsyncIteration;
22989  #endif
22990  __Pyx_PyErr_SetNone(exc);
22991  }
22992  }
22993  return retval;
22994 }
22995 static CYTHON_INLINE
22996 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
22997  PyObject *ret;
22998  PyObject *val = NULL;
22999  __Pyx_Coroutine_Undelegate(gen);
23000  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23001  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23002  Py_XDECREF(val);
23003  return ret;
23004 }
23005 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23006  PyObject *retval;
23007  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23008  PyObject *yf = gen->yieldfrom;
23009  if (unlikely(gen->is_running))
23010  return __Pyx_Coroutine_AlreadyRunningError(gen);
23011  if (yf) {
23012  PyObject *ret;
23013  gen->is_running = 1;
23014  #ifdef __Pyx_Generator_USED
23015  if (__Pyx_Generator_CheckExact(yf)) {
23016  ret = __Pyx_Coroutine_Send(yf, value);
23017  } else
23018  #endif
23019  #ifdef __Pyx_Coroutine_USED
23020  if (__Pyx_Coroutine_Check(yf)) {
23021  ret = __Pyx_Coroutine_Send(yf, value);
23022  } else
23023  #endif
23024  #ifdef __Pyx_AsyncGen_USED
23025  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23026  ret = __Pyx_async_gen_asend_send(yf, value);
23027  } else
23028  #endif
23029  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23030  if (PyGen_CheckExact(yf)) {
23031  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23032  } else
23033  #endif
23034  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23035  if (PyCoro_CheckExact(yf)) {
23036  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23037  } else
23038  #endif
23039  {
23040  if (value == Py_None)
23041  ret = Py_TYPE(yf)->tp_iternext(yf);
23042  else
23043  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23044  }
23045  gen->is_running = 0;
23046  if (likely(ret)) {
23047  return ret;
23048  }
23049  retval = __Pyx_Coroutine_FinishDelegation(gen);
23050  } else {
23051  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23052  }
23053  return __Pyx_Coroutine_MethodReturn(self, retval);
23054 }
23055 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23056  PyObject *retval = NULL;
23057  int err = 0;
23058  #ifdef __Pyx_Generator_USED
23059  if (__Pyx_Generator_CheckExact(yf)) {
23060  retval = __Pyx_Coroutine_Close(yf);
23061  if (!retval)
23062  return -1;
23063  } else
23064  #endif
23065  #ifdef __Pyx_Coroutine_USED
23066  if (__Pyx_Coroutine_Check(yf)) {
23067  retval = __Pyx_Coroutine_Close(yf);
23068  if (!retval)
23069  return -1;
23070  } else
23071  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23072  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
23073  if (!retval)
23074  return -1;
23075  } else
23076  #endif
23077  #ifdef __Pyx_AsyncGen_USED
23078  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23079  retval = __Pyx_async_gen_asend_close(yf, NULL);
23080  } else
23081  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23082  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23083  } else
23084  #endif
23085  {
23086  PyObject *meth;
23087  gen->is_running = 1;
23088  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23089  if (unlikely(!meth)) {
23090  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23091  PyErr_WriteUnraisable(yf);
23092  }
23093  PyErr_Clear();
23094  } else {
23095  retval = PyObject_CallFunction(meth, NULL);
23096  Py_DECREF(meth);
23097  if (!retval)
23098  err = -1;
23099  }
23100  gen->is_running = 0;
23101  }
23102  Py_XDECREF(retval);
23103  return err;
23104 }
23105 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23106  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23107  PyObject *yf = gen->yieldfrom;
23108  if (unlikely(gen->is_running))
23109  return __Pyx_Coroutine_AlreadyRunningError(gen);
23110  if (yf) {
23111  PyObject *ret;
23112  gen->is_running = 1;
23113  #ifdef __Pyx_Generator_USED
23114  if (__Pyx_Generator_CheckExact(yf)) {
23115  ret = __Pyx_Generator_Next(yf);
23116  } else
23117  #endif
23118  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23119  if (PyGen_CheckExact(yf)) {
23120  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23121  } else
23122  #endif
23123  #ifdef __Pyx_Coroutine_USED
23124  if (__Pyx_Coroutine_Check(yf)) {
23125  ret = __Pyx_Coroutine_Send(yf, Py_None);
23126  } else
23127  #endif
23128  ret = Py_TYPE(yf)->tp_iternext(yf);
23129  gen->is_running = 0;
23130  if (likely(ret)) {
23131  return ret;
23132  }
23133  return __Pyx_Coroutine_FinishDelegation(gen);
23134  }
23135  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23136 }
23137 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
23138  return __Pyx_Coroutine_Close(self);
23139 }
23140 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23141  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23142  PyObject *retval, *raised_exception;
23143  PyObject *yf = gen->yieldfrom;
23144  int err = 0;
23145  if (unlikely(gen->is_running))
23146  return __Pyx_Coroutine_AlreadyRunningError(gen);
23147  if (yf) {
23148  Py_INCREF(yf);
23149  err = __Pyx_Coroutine_CloseIter(gen, yf);
23150  __Pyx_Coroutine_Undelegate(gen);
23151  Py_DECREF(yf);
23152  }
23153  if (err == 0)
23154  PyErr_SetNone(PyExc_GeneratorExit);
23155  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23156  if (unlikely(retval)) {
23157  const char *msg;
23158  Py_DECREF(retval);
23159  if ((0)) {
23160  #ifdef __Pyx_Coroutine_USED
23161  } else if (__Pyx_Coroutine_Check(self)) {
23162  msg = "coroutine ignored GeneratorExit";
23163  #endif
23164  #ifdef __Pyx_AsyncGen_USED
23165  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23166 #if PY_VERSION_HEX < 0x03060000
23167  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23168 #else
23169  msg = "async generator ignored GeneratorExit";
23170 #endif
23171  #endif
23172  } else {
23173  msg = "generator ignored GeneratorExit";
23174  }
23175  PyErr_SetString(PyExc_RuntimeError, msg);
23176  return NULL;
23177  }
23178  raised_exception = PyErr_Occurred();
23179  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23180  if (raised_exception) PyErr_Clear();
23181  Py_INCREF(Py_None);
23182  return Py_None;
23183  }
23184  return NULL;
23185 }
23186 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23187  PyObject *args, int close_on_genexit) {
23188  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23189  PyObject *yf = gen->yieldfrom;
23190  if (unlikely(gen->is_running))
23191  return __Pyx_Coroutine_AlreadyRunningError(gen);
23192  if (yf) {
23193  PyObject *ret;
23194  Py_INCREF(yf);
23195  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23196  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23197  Py_DECREF(yf);
23198  __Pyx_Coroutine_Undelegate(gen);
23199  if (err < 0)
23200  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23201  goto throw_here;
23202  }
23203  gen->is_running = 1;
23204  if (0
23205  #ifdef __Pyx_Generator_USED
23206  || __Pyx_Generator_CheckExact(yf)
23207  #endif
23208  #ifdef __Pyx_Coroutine_USED
23209  || __Pyx_Coroutine_Check(yf)
23210  #endif
23211  ) {
23212  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23213  #ifdef __Pyx_Coroutine_USED
23214  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23215  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23216  #endif
23217  } else {
23218  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23219  if (unlikely(!meth)) {
23220  Py_DECREF(yf);
23221  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23222  gen->is_running = 0;
23223  return NULL;
23224  }
23225  PyErr_Clear();
23226  __Pyx_Coroutine_Undelegate(gen);
23227  gen->is_running = 0;
23228  goto throw_here;
23229  }
23230  if (likely(args)) {
23231  ret = PyObject_CallObject(meth, args);
23232  } else {
23233  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23234  }
23235  Py_DECREF(meth);
23236  }
23237  gen->is_running = 0;
23238  Py_DECREF(yf);
23239  if (!ret) {
23240  ret = __Pyx_Coroutine_FinishDelegation(gen);
23241  }
23242  return __Pyx_Coroutine_MethodReturn(self, ret);
23243  }
23244 throw_here:
23245  __Pyx_Raise(typ, val, tb, NULL);
23246  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23247 }
23248 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23249  PyObject *typ;
23250  PyObject *val = NULL;
23251  PyObject *tb = NULL;
23252  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23253  return NULL;
23254  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23255 }
23256 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
23257  Py_VISIT(exc_state->exc_type);
23258  Py_VISIT(exc_state->exc_value);
23259  Py_VISIT(exc_state->exc_traceback);
23260  return 0;
23261 }
23262 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23263  Py_VISIT(gen->closure);
23264  Py_VISIT(gen->classobj);
23265  Py_VISIT(gen->yieldfrom);
23266  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
23267 }
23268 static int __Pyx_Coroutine_clear(PyObject *self) {
23269  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23270  Py_CLEAR(gen->closure);
23271  Py_CLEAR(gen->classobj);
23272  Py_CLEAR(gen->yieldfrom);
23273  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
23274 #ifdef __Pyx_AsyncGen_USED
23275  if (__Pyx_AsyncGen_CheckExact(self)) {
23276  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23277  }
23278 #endif
23279  Py_CLEAR(gen->gi_code);
23280  Py_CLEAR(gen->gi_name);
23281  Py_CLEAR(gen->gi_qualname);
23282  Py_CLEAR(gen->gi_modulename);
23283  return 0;
23284 }
23285 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23286  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23287  PyObject_GC_UnTrack(gen);
23288  if (gen->gi_weakreflist != NULL)
23289  PyObject_ClearWeakRefs(self);
23290  if (gen->resume_label >= 0) {
23291  PyObject_GC_Track(self);
23292 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23293  if (PyObject_CallFinalizerFromDealloc(self))
23294 #else
23295  Py_TYPE(gen)->tp_del(self);
23296  if (self->ob_refcnt > 0)
23297 #endif
23298  {
23299  return;
23300  }
23301  PyObject_GC_UnTrack(self);
23302  }
23303 #ifdef __Pyx_AsyncGen_USED
23304  if (__Pyx_AsyncGen_CheckExact(self)) {
23305  /* We have to handle this case for asynchronous generators
23306  right here, because this code has to be between UNTRACK
23307  and GC_Del. */
23308  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23309  }
23310 #endif
23311  __Pyx_Coroutine_clear(self);
23312  PyObject_GC_Del(gen);
23313 }
23314 static void __Pyx_Coroutine_del(PyObject *self) {
23315  PyObject *error_type, *error_value, *error_traceback;
23316  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23317  __Pyx_PyThreadState_declare
23318  if (gen->resume_label < 0) {
23319  return;
23320  }
23321 #if !CYTHON_USE_TP_FINALIZE
23322  assert(self->ob_refcnt == 0);
23323  self->ob_refcnt = 1;
23324 #endif
23325  __Pyx_PyThreadState_assign
23326  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23327 #ifdef __Pyx_AsyncGen_USED
23328  if (__Pyx_AsyncGen_CheckExact(self)) {
23329  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23330  PyObject *finalizer = agen->ag_finalizer;
23331  if (finalizer && !agen->ag_closed) {
23332  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23333  if (unlikely(!res)) {
23334  PyErr_WriteUnraisable(self);
23335  } else {
23336  Py_DECREF(res);
23337  }
23338  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23339  return;
23340  }
23341  }
23342 #endif
23343  if (unlikely(gen->resume_label == 0 && !error_value)) {
23344 #ifdef __Pyx_Coroutine_USED
23345 #ifdef __Pyx_Generator_USED
23346  if (!__Pyx_Generator_CheckExact(self))
23347 #endif
23348  {
23349  PyObject_GC_UnTrack(self);
23350 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23351  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23352  PyErr_WriteUnraisable(self);
23353 #else
23354  {PyObject *msg;
23355  char *cmsg;
23356  #if CYTHON_COMPILING_IN_PYPY
23357  msg = NULL;
23358  cmsg = (char*) "coroutine was never awaited";
23359  #else
23360  char *cname;
23361  PyObject *qualname;
23362  qualname = gen->gi_qualname;
23363  cname = PyString_AS_STRING(qualname);
23364  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23365  if (unlikely(!msg)) {
23366  PyErr_Clear();
23367  cmsg = (char*) "coroutine was never awaited";
23368  } else {
23369  cmsg = PyString_AS_STRING(msg);
23370  }
23371  #endif
23372  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23373  PyErr_WriteUnraisable(self);
23374  Py_XDECREF(msg);}
23375 #endif
23376  PyObject_GC_Track(self);
23377  }
23378 #endif
23379  } else {
23380  PyObject *res = __Pyx_Coroutine_Close(self);
23381  if (unlikely(!res)) {
23382  if (PyErr_Occurred())
23383  PyErr_WriteUnraisable(self);
23384  } else {
23385  Py_DECREF(res);
23386  }
23387  }
23388  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23389 #if !CYTHON_USE_TP_FINALIZE
23390  assert(self->ob_refcnt > 0);
23391  if (--self->ob_refcnt == 0) {
23392  return;
23393  }
23394  {
23395  Py_ssize_t refcnt = self->ob_refcnt;
23396  _Py_NewReference(self);
23397  self->ob_refcnt = refcnt;
23398  }
23399 #if CYTHON_COMPILING_IN_CPYTHON
23400  assert(PyType_IS_GC(self->ob_type) &&
23401  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23402  _Py_DEC_REFTOTAL;
23403 #endif
23404 #ifdef COUNT_ALLOCS
23405  --Py_TYPE(self)->tp_frees;
23406  --Py_TYPE(self)->tp_allocs;
23407 #endif
23408 #endif
23409 }
23410 static PyObject *
23411 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23412 {
23413  PyObject *name = self->gi_name;
23414  if (unlikely(!name)) name = Py_None;
23415  Py_INCREF(name);
23416  return name;
23417 }
23418 static int
23419 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23420 {
23421  PyObject *tmp;
23422 #if PY_MAJOR_VERSION >= 3
23423  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23424 #else
23425  if (unlikely(value == NULL || !PyString_Check(value)))
23426 #endif
23427  {
23428  PyErr_SetString(PyExc_TypeError,
23429  "__name__ must be set to a string object");
23430  return -1;
23431  }
23432  tmp = self->gi_name;
23433  Py_INCREF(value);
23434  self->gi_name = value;
23435  Py_XDECREF(tmp);
23436  return 0;
23437 }
23438 static PyObject *
23439 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23440 {
23441  PyObject *name = self->gi_qualname;
23442  if (unlikely(!name)) name = Py_None;
23443  Py_INCREF(name);
23444  return name;
23445 }
23446 static int
23447 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23448 {
23449  PyObject *tmp;
23450 #if PY_MAJOR_VERSION >= 3
23451  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23452 #else
23453  if (unlikely(value == NULL || !PyString_Check(value)))
23454 #endif
23455  {
23456  PyErr_SetString(PyExc_TypeError,
23457  "__qualname__ must be set to a string object");
23458  return -1;
23459  }
23460  tmp = self->gi_qualname;
23461  Py_INCREF(value);
23462  self->gi_qualname = value;
23463  Py_XDECREF(tmp);
23464  return 0;
23465 }
23466 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23467  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23468  PyObject *name, PyObject *qualname, PyObject *module_name) {
23469  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23470  if (unlikely(!gen))
23471  return NULL;
23472  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23473 }
23474 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23475  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23476  PyObject *name, PyObject *qualname, PyObject *module_name) {
23477  gen->body = body;
23478  gen->closure = closure;
23479  Py_XINCREF(closure);
23480  gen->is_running = 0;
23481  gen->resume_label = 0;
23482  gen->classobj = NULL;
23483  gen->yieldfrom = NULL;
23484  gen->gi_exc_state.exc_type = NULL;
23485  gen->gi_exc_state.exc_value = NULL;
23486  gen->gi_exc_state.exc_traceback = NULL;
23487 #if CYTHON_USE_EXC_INFO_STACK
23488  gen->gi_exc_state.previous_item = NULL;
23489 #endif
23490  gen->gi_weakreflist = NULL;
23491  Py_XINCREF(qualname);
23492  gen->gi_qualname = qualname;
23493  Py_XINCREF(name);
23494  gen->gi_name = name;
23495  Py_XINCREF(module_name);
23496  gen->gi_modulename = module_name;
23497  Py_XINCREF(code);
23498  gen->gi_code = code;
23499  PyObject_GC_Track(gen);
23500  return gen;
23501 }
23502 
23503 /* PatchModuleWithCoroutine */
23504  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23505 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23506  int result;
23507  PyObject *globals, *result_obj;
23508  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23509  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23510  #ifdef __Pyx_Coroutine_USED
23511  (PyObject*)__pyx_CoroutineType);
23512  #else
23513  Py_None);
23514  #endif
23515  if (unlikely(result < 0)) goto ignore;
23516  result = PyDict_SetItemString(globals, "_cython_generator_type",
23517  #ifdef __Pyx_Generator_USED
23518  (PyObject*)__pyx_GeneratorType);
23519  #else
23520  Py_None);
23521  #endif
23522  if (unlikely(result < 0)) goto ignore;
23523  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23524  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23525  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23526  if (unlikely(!result_obj)) goto ignore;
23527  Py_DECREF(result_obj);
23528  Py_DECREF(globals);
23529  return module;
23530 ignore:
23531  Py_XDECREF(globals);
23532  PyErr_WriteUnraisable(module);
23533  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23534  Py_DECREF(module);
23535  module = NULL;
23536  }
23537 #else
23538  py_code++;
23539 #endif
23540  return module;
23541 }
23542 
23543 /* PatchGeneratorABC */
23544  #ifndef CYTHON_REGISTER_ABCS
23545 #define CYTHON_REGISTER_ABCS 1
23546 #endif
23547 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23548 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23549 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23550  module = __Pyx_Coroutine_patch_module(
23551  module, ""
23552 "if _cython_generator_type is not None:\n"
23553 " try: Generator = _module.Generator\n"
23554 " except AttributeError: pass\n"
23555 " else: Generator.register(_cython_generator_type)\n"
23556 "if _cython_coroutine_type is not None:\n"
23557 " try: Coroutine = _module.Coroutine\n"
23558 " except AttributeError: pass\n"
23559 " else: Coroutine.register(_cython_coroutine_type)\n"
23560  );
23561  return module;
23562 }
23563 #endif
23564 static int __Pyx_patch_abc(void) {
23565 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23566  static int abc_patched = 0;
23567  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23568  PyObject *module;
23569  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23570  if (!module) {
23571  PyErr_WriteUnraisable(NULL);
23572  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23573  ((PY_MAJOR_VERSION >= 3) ?
23574  "Cython module failed to register with collections.abc module" :
23575  "Cython module failed to register with collections module"), 1) < 0)) {
23576  return -1;
23577  }
23578  } else {
23579  module = __Pyx_patch_abc_module(module);
23580  abc_patched = 1;
23581  if (unlikely(!module))
23582  return -1;
23583  Py_DECREF(module);
23584  }
23585  module = PyImport_ImportModule("backports_abc");
23586  if (module) {
23587  module = __Pyx_patch_abc_module(module);
23588  Py_XDECREF(module);
23589  }
23590  if (!module) {
23591  PyErr_Clear();
23592  }
23593  }
23594 #else
23595  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23596 #endif
23597  return 0;
23598 }
23599 
23600 /* Generator */
23601  static PyMethodDef __pyx_Generator_methods[] = {
23602  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23603  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23604  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23605  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23606  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
23607  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23608  {0, 0, 0, 0}
23609 };
23610 static PyMemberDef __pyx_Generator_memberlist[] = {
23611  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23612  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23613  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23614  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23615  {0, 0, 0, 0, 0}
23616 };
23617 static PyGetSetDef __pyx_Generator_getsets[] = {
23618  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23619  (char*) PyDoc_STR("name of the generator"), 0},
23620  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23621  (char*) PyDoc_STR("qualified name of the generator"), 0},
23622  {0, 0, 0, 0, 0}
23623 };
23624 static PyTypeObject __pyx_GeneratorType_type = {
23625  PyVarObject_HEAD_INIT(0, 0)
23626  "generator",
23627  sizeof(__pyx_CoroutineObject),
23628  0,
23629  (destructor) __Pyx_Coroutine_dealloc,
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  0,
23644  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23645  0,
23646  (traverseproc) __Pyx_Coroutine_traverse,
23647  0,
23648  0,
23649  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23650  0,
23651  (iternextfunc) __Pyx_Generator_Next,
23652  __pyx_Generator_methods,
23653  __pyx_Generator_memberlist,
23654  __pyx_Generator_getsets,
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  0,
23670 #if CYTHON_USE_TP_FINALIZE
23671  0,
23672 #else
23673  __Pyx_Coroutine_del,
23674 #endif
23675  0,
23676 #if CYTHON_USE_TP_FINALIZE
23677  __Pyx_Coroutine_del,
23678 #elif PY_VERSION_HEX >= 0x030400a1
23679  0,
23680 #endif
23681 };
23682 static int __pyx_Generator_init(void) {
23683  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23684  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23685  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23686  if (unlikely(!__pyx_GeneratorType)) {
23687  return -1;
23688  }
23689  return 0;
23690 }
23691 
23692 /* CheckBinaryVersion */
23693  static int __Pyx_check_binary_version(void) {
23694  char ctversion[4], rtversion[4];
23695  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23696  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23697  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23698  char message[200];
23699  PyOS_snprintf(message, sizeof(message),
23700  "compiletime version %s of module '%.100s' "
23701  "does not match runtime version %s",
23702  ctversion, __Pyx_MODULE_NAME, rtversion);
23703  return PyErr_WarnEx(NULL, message, 1);
23704  }
23705  return 0;
23706 }
23707 
23708 /* InitStrings */
23709  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23710  while (t->p) {
23711  #if PY_MAJOR_VERSION < 3
23712  if (t->is_unicode) {
23713  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
23714  } else if (t->intern) {
23715  *t->p = PyString_InternFromString(t->s);
23716  } else {
23717  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23718  }
23719  #else
23720  if (t->is_unicode | t->is_str) {
23721  if (t->intern) {
23722  *t->p = PyUnicode_InternFromString(t->s);
23723  } else if (t->encoding) {
23724  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
23725  } else {
23726  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
23727  }
23728  } else {
23729  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
23730  }
23731  #endif
23732  if (!*t->p)
23733  return -1;
23734  if (PyObject_Hash(*t->p) == -1)
23735  return -1;
23736  ++t;
23737  }
23738  return 0;
23739 }
23740 
23741 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
23742  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
23743 }
23744 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
23745  Py_ssize_t ignore;
23746  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
23747 }
23748 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23749 #if !CYTHON_PEP393_ENABLED
23750 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23751  char* defenc_c;
23752  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
23753  if (!defenc) return NULL;
23754  defenc_c = PyBytes_AS_STRING(defenc);
23755 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23756  {
23757  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
23758  char* c;
23759  for (c = defenc_c; c < end; c++) {
23760  if ((unsigned char) (*c) >= 128) {
23761  PyUnicode_AsASCIIString(o);
23762  return NULL;
23763  }
23764  }
23765  }
23766 #endif
23767  *length = PyBytes_GET_SIZE(defenc);
23768  return defenc_c;
23769 }
23770 #else
23771 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23772  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
23773 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23774  if (likely(PyUnicode_IS_ASCII(o))) {
23775  *length = PyUnicode_GET_LENGTH(o);
23776  return PyUnicode_AsUTF8(o);
23777  } else {
23778  PyUnicode_AsASCIIString(o);
23779  return NULL;
23780  }
23781 #else
23782  return PyUnicode_AsUTF8AndSize(o, length);
23783 #endif
23784 }
23785 #endif
23786 #endif
23787 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23788 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23789  if (
23790 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23791  __Pyx_sys_getdefaultencoding_not_ascii &&
23792 #endif
23793  PyUnicode_Check(o)) {
23794  return __Pyx_PyUnicode_AsStringAndSize(o, length);
23795  } else
23796 #endif
23797 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
23798  if (PyByteArray_Check(o)) {
23799  *length = PyByteArray_GET_SIZE(o);
23800  return PyByteArray_AS_STRING(o);
23801  } else
23802 #endif
23803  {
23804  char* result;
23805  int r = PyBytes_AsStringAndSize(o, &result, length);
23806  if (unlikely(r < 0)) {
23807  return NULL;
23808  } else {
23809  return result;
23810  }
23811  }
23812 }
23813 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
23814  int is_true = x == Py_True;
23815  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
23816  else return PyObject_IsTrue(x);
23817 }
23818 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
23819  int retval;
23820  if (unlikely(!x)) return -1;
23821  retval = __Pyx_PyObject_IsTrue(x);
23822  Py_DECREF(x);
23823  return retval;
23824 }
23825 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
23826 #if PY_MAJOR_VERSION >= 3
23827  if (PyLong_Check(result)) {
23828  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
23829  "__int__ returned non-int (type %.200s). "
23830  "The ability to return an instance of a strict subclass of int "
23831  "is deprecated, and may be removed in a future version of Python.",
23832  Py_TYPE(result)->tp_name)) {
23833  Py_DECREF(result);
23834  return NULL;
23835  }
23836  return result;
23837  }
23838 #endif
23839  PyErr_Format(PyExc_TypeError,
23840  "__%.4s__ returned non-%.4s (type %.200s)",
23841  type_name, type_name, Py_TYPE(result)->tp_name);
23842  Py_DECREF(result);
23843  return NULL;
23844 }
23845 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
23846 #if CYTHON_USE_TYPE_SLOTS
23847  PyNumberMethods *m;
23848 #endif
23849  const char *name = NULL;
23850  PyObject *res = NULL;
23851 #if PY_MAJOR_VERSION < 3
23852  if (likely(PyInt_Check(x) || PyLong_Check(x)))
23853 #else
23854  if (likely(PyLong_Check(x)))
23855 #endif
23856  return __Pyx_NewRef(x);
23857 #if CYTHON_USE_TYPE_SLOTS
23858  m = Py_TYPE(x)->tp_as_number;
23859  #if PY_MAJOR_VERSION < 3
23860  if (m && m->nb_int) {
23861  name = "int";
23862  res = m->nb_int(x);
23863  }
23864  else if (m && m->nb_long) {
23865  name = "long";
23866  res = m->nb_long(x);
23867  }
23868  #else
23869  if (likely(m && m->nb_int)) {
23870  name = "int";
23871  res = m->nb_int(x);
23872  }
23873  #endif
23874 #else
23875  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
23876  res = PyNumber_Int(x);
23877  }
23878 #endif
23879  if (likely(res)) {
23880 #if PY_MAJOR_VERSION < 3
23881  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
23882 #else
23883  if (unlikely(!PyLong_CheckExact(res))) {
23884 #endif
23885  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
23886  }
23887  }
23888  else if (!PyErr_Occurred()) {
23889  PyErr_SetString(PyExc_TypeError,
23890  "an integer is required");
23891  }
23892  return res;
23893 }
23894 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
23895  Py_ssize_t ival;
23896  PyObject *x;
23897 #if PY_MAJOR_VERSION < 3
23898  if (likely(PyInt_CheckExact(b))) {
23899  if (sizeof(Py_ssize_t) >= sizeof(long))
23900  return PyInt_AS_LONG(b);
23901  else
23902  return PyInt_AsSsize_t(b);
23903  }
23904 #endif
23905  if (likely(PyLong_CheckExact(b))) {
23906  #if CYTHON_USE_PYLONG_INTERNALS
23907  const digit* digits = ((PyLongObject*)b)->ob_digit;
23908  const Py_ssize_t size = Py_SIZE(b);
23909  if (likely(__Pyx_sst_abs(size) <= 1)) {
23910  ival = likely(size) ? digits[0] : 0;
23911  if (size == -1) ival = -ival;
23912  return ival;
23913  } else {
23914  switch (size) {
23915  case 2:
23916  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23917  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23918  }
23919  break;
23920  case -2:
23921  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23922  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23923  }
23924  break;
23925  case 3:
23926  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23927  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23928  }
23929  break;
23930  case -3:
23931  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23932  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23933  }
23934  break;
23935  case 4:
23936  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23937  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]));
23938  }
23939  break;
23940  case -4:
23941  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23942  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]));
23943  }
23944  break;
23945  }
23946  }
23947  #endif
23948  return PyLong_AsSsize_t(b);
23949  }
23950  x = PyNumber_Index(b);
23951  if (!x) return -1;
23952  ival = PyInt_AsSsize_t(x);
23953  Py_DECREF(x);
23954  return ival;
23955 }
23956 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
23957  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
23958 }
23959 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
23960  return PyInt_FromSize_t(ival);
23961 }
23962 
23963 
23964 #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