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  "-O2",
19  "-Wall",
20  "-D_FORTIFY_SOURCE=2",
21  "-fstack-protector-strong",
22  "-funwind-tables",
23  "-fasynchronous-unwind-tables",
24  "-fstack-clash-protection",
25  "-g",
26  "-finline-limit=4000",
27  "--param",
28  "inline-unit-growth=200",
29  "-funroll-loops",
30  "-fvariable-expansion-in-unroller",
31  "-DNDEBUG",
32  "-DHAVE_BITS_WORDSIZE_H",
33  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
34  "-D_GLUCAT_USE_DENSE_MATRICES",
35  "-D_GLUCAT_CHECK_ISNAN",
36  "-Wno-unused-local-typedefs",
37  "-Wno-misleading-indentation",
38  "-fno-check-new",
39  "-fexceptions"
40  ],
41  "include_dirs": [
42  ".",
43  ".."
44  ],
45  "language": "c++",
46  "name": "PyClical",
47  "sources": [
48  "PyClical.pyx"
49  ]
50  },
51  "module_name": "PyClical"
52 }
53 END: Cython Metadata */
54 
55 #define PY_SSIZE_T_CLEAN
56 #include "Python.h"
57 #ifndef Py_PYTHON_H
58  #error Python headers needed to compile C extensions, please install development version of Python.
59 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
60  #error Cython requires Python 2.6+ or Python 3.3+.
61 #else
62 #define CYTHON_ABI "0_29_6"
63 #define CYTHON_HEX_VERSION 0x001D06F0
64 #define CYTHON_FUTURE_DIVISION 0
65 #include <stddef.h>
66 #ifndef offsetof
67  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
68 #endif
69 #if !defined(WIN32) && !defined(MS_WINDOWS)
70  #ifndef __stdcall
71  #define __stdcall
72  #endif
73  #ifndef __cdecl
74  #define __cdecl
75  #endif
76  #ifndef __fastcall
77  #define __fastcall
78  #endif
79 #endif
80 #ifndef DL_IMPORT
81  #define DL_IMPORT(t) t
82 #endif
83 #ifndef DL_EXPORT
84  #define DL_EXPORT(t) t
85 #endif
86 #define __PYX_COMMA ,
87 #ifndef HAVE_LONG_LONG
88  #if PY_VERSION_HEX >= 0x02070000
89  #define HAVE_LONG_LONG
90  #endif
91 #endif
92 #ifndef PY_LONG_LONG
93  #define PY_LONG_LONG LONG_LONG
94 #endif
95 #ifndef Py_HUGE_VAL
96  #define Py_HUGE_VAL HUGE_VAL
97 #endif
98 #ifdef PYPY_VERSION
99  #define CYTHON_COMPILING_IN_PYPY 1
100  #define CYTHON_COMPILING_IN_PYSTON 0
101  #define CYTHON_COMPILING_IN_CPYTHON 0
102  #undef CYTHON_USE_TYPE_SLOTS
103  #define CYTHON_USE_TYPE_SLOTS 0
104  #undef CYTHON_USE_PYTYPE_LOOKUP
105  #define CYTHON_USE_PYTYPE_LOOKUP 0
106  #if PY_VERSION_HEX < 0x03050000
107  #undef CYTHON_USE_ASYNC_SLOTS
108  #define CYTHON_USE_ASYNC_SLOTS 0
109  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
110  #define CYTHON_USE_ASYNC_SLOTS 1
111  #endif
112  #undef CYTHON_USE_PYLIST_INTERNALS
113  #define CYTHON_USE_PYLIST_INTERNALS 0
114  #undef CYTHON_USE_UNICODE_INTERNALS
115  #define CYTHON_USE_UNICODE_INTERNALS 0
116  #undef CYTHON_USE_UNICODE_WRITER
117  #define CYTHON_USE_UNICODE_WRITER 0
118  #undef CYTHON_USE_PYLONG_INTERNALS
119  #define CYTHON_USE_PYLONG_INTERNALS 0
120  #undef CYTHON_AVOID_BORROWED_REFS
121  #define CYTHON_AVOID_BORROWED_REFS 1
122  #undef CYTHON_ASSUME_SAFE_MACROS
123  #define CYTHON_ASSUME_SAFE_MACROS 0
124  #undef CYTHON_UNPACK_METHODS
125  #define CYTHON_UNPACK_METHODS 0
126  #undef CYTHON_FAST_THREAD_STATE
127  #define CYTHON_FAST_THREAD_STATE 0
128  #undef CYTHON_FAST_PYCALL
129  #define CYTHON_FAST_PYCALL 0
130  #undef CYTHON_PEP489_MULTI_PHASE_INIT
131  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
132  #undef CYTHON_USE_TP_FINALIZE
133  #define CYTHON_USE_TP_FINALIZE 0
134  #undef CYTHON_USE_DICT_VERSIONS
135  #define CYTHON_USE_DICT_VERSIONS 0
136  #undef CYTHON_USE_EXC_INFO_STACK
137  #define CYTHON_USE_EXC_INFO_STACK 0
138 #elif defined(PYSTON_VERSION)
139  #define CYTHON_COMPILING_IN_PYPY 0
140  #define CYTHON_COMPILING_IN_PYSTON 1
141  #define CYTHON_COMPILING_IN_CPYTHON 0
142  #ifndef CYTHON_USE_TYPE_SLOTS
143  #define CYTHON_USE_TYPE_SLOTS 1
144  #endif
145  #undef CYTHON_USE_PYTYPE_LOOKUP
146  #define CYTHON_USE_PYTYPE_LOOKUP 0
147  #undef CYTHON_USE_ASYNC_SLOTS
148  #define CYTHON_USE_ASYNC_SLOTS 0
149  #undef CYTHON_USE_PYLIST_INTERNALS
150  #define CYTHON_USE_PYLIST_INTERNALS 0
151  #ifndef CYTHON_USE_UNICODE_INTERNALS
152  #define CYTHON_USE_UNICODE_INTERNALS 1
153  #endif
154  #undef CYTHON_USE_UNICODE_WRITER
155  #define CYTHON_USE_UNICODE_WRITER 0
156  #undef CYTHON_USE_PYLONG_INTERNALS
157  #define CYTHON_USE_PYLONG_INTERNALS 0
158  #ifndef CYTHON_AVOID_BORROWED_REFS
159  #define CYTHON_AVOID_BORROWED_REFS 0
160  #endif
161  #ifndef CYTHON_ASSUME_SAFE_MACROS
162  #define CYTHON_ASSUME_SAFE_MACROS 1
163  #endif
164  #ifndef CYTHON_UNPACK_METHODS
165  #define CYTHON_UNPACK_METHODS 1
166  #endif
167  #undef CYTHON_FAST_THREAD_STATE
168  #define CYTHON_FAST_THREAD_STATE 0
169  #undef CYTHON_FAST_PYCALL
170  #define CYTHON_FAST_PYCALL 0
171  #undef CYTHON_PEP489_MULTI_PHASE_INIT
172  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
173  #undef CYTHON_USE_TP_FINALIZE
174  #define CYTHON_USE_TP_FINALIZE 0
175  #undef CYTHON_USE_DICT_VERSIONS
176  #define CYTHON_USE_DICT_VERSIONS 0
177  #undef CYTHON_USE_EXC_INFO_STACK
178  #define CYTHON_USE_EXC_INFO_STACK 0
179 #else
180  #define CYTHON_COMPILING_IN_PYPY 0
181  #define CYTHON_COMPILING_IN_PYSTON 0
182  #define CYTHON_COMPILING_IN_CPYTHON 1
183  #ifndef CYTHON_USE_TYPE_SLOTS
184  #define CYTHON_USE_TYPE_SLOTS 1
185  #endif
186  #if PY_VERSION_HEX < 0x02070000
187  #undef CYTHON_USE_PYTYPE_LOOKUP
188  #define CYTHON_USE_PYTYPE_LOOKUP 0
189  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
190  #define CYTHON_USE_PYTYPE_LOOKUP 1
191  #endif
192  #if PY_MAJOR_VERSION < 3
193  #undef CYTHON_USE_ASYNC_SLOTS
194  #define CYTHON_USE_ASYNC_SLOTS 0
195  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
196  #define CYTHON_USE_ASYNC_SLOTS 1
197  #endif
198  #if PY_VERSION_HEX < 0x02070000
199  #undef CYTHON_USE_PYLONG_INTERNALS
200  #define CYTHON_USE_PYLONG_INTERNALS 0
201  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
202  #define CYTHON_USE_PYLONG_INTERNALS 1
203  #endif
204  #ifndef CYTHON_USE_PYLIST_INTERNALS
205  #define CYTHON_USE_PYLIST_INTERNALS 1
206  #endif
207  #ifndef CYTHON_USE_UNICODE_INTERNALS
208  #define CYTHON_USE_UNICODE_INTERNALS 1
209  #endif
210  #if PY_VERSION_HEX < 0x030300F0
211  #undef CYTHON_USE_UNICODE_WRITER
212  #define CYTHON_USE_UNICODE_WRITER 0
213  #elif !defined(CYTHON_USE_UNICODE_WRITER)
214  #define CYTHON_USE_UNICODE_WRITER 1
215  #endif
216  #ifndef CYTHON_AVOID_BORROWED_REFS
217  #define CYTHON_AVOID_BORROWED_REFS 0
218  #endif
219  #ifndef CYTHON_ASSUME_SAFE_MACROS
220  #define CYTHON_ASSUME_SAFE_MACROS 1
221  #endif
222  #ifndef CYTHON_UNPACK_METHODS
223  #define CYTHON_UNPACK_METHODS 1
224  #endif
225  #ifndef CYTHON_FAST_THREAD_STATE
226  #define CYTHON_FAST_THREAD_STATE 1
227  #endif
228  #ifndef CYTHON_FAST_PYCALL
229  #define CYTHON_FAST_PYCALL 1
230  #endif
231  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
232  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
233  #endif
234  #ifndef CYTHON_USE_TP_FINALIZE
235  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
236  #endif
237  #ifndef CYTHON_USE_DICT_VERSIONS
238  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
239  #endif
240  #ifndef CYTHON_USE_EXC_INFO_STACK
241  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
242  #endif
243 #endif
244 #if !defined(CYTHON_FAST_PYCCALL)
245 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
246 #endif
247 #if CYTHON_USE_PYLONG_INTERNALS
248  #include "longintrepr.h"
249  #undef SHIFT
250  #undef BASE
251  #undef MASK
252  #ifdef SIZEOF_VOID_P
253  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
254  #endif
255 #endif
256 #ifndef __has_attribute
257  #define __has_attribute(x) 0
258 #endif
259 #ifndef __has_cpp_attribute
260  #define __has_cpp_attribute(x) 0
261 #endif
262 #ifndef CYTHON_RESTRICT
263  #if defined(__GNUC__)
264  #define CYTHON_RESTRICT __restrict__
265  #elif defined(_MSC_VER) && _MSC_VER >= 1400
266  #define CYTHON_RESTRICT __restrict
267  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
268  #define CYTHON_RESTRICT restrict
269  #else
270  #define CYTHON_RESTRICT
271  #endif
272 #endif
273 #ifndef CYTHON_UNUSED
274 # if defined(__GNUC__)
275 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
276 # define CYTHON_UNUSED __attribute__ ((__unused__))
277 # else
278 # define CYTHON_UNUSED
279 # endif
280 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
281 # define CYTHON_UNUSED __attribute__ ((__unused__))
282 # else
283 # define CYTHON_UNUSED
284 # endif
285 #endif
286 #ifndef CYTHON_MAYBE_UNUSED_VAR
287 # if defined(__cplusplus)
288  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
289 # else
290 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
291 # endif
292 #endif
293 #ifndef CYTHON_NCP_UNUSED
294 # if CYTHON_COMPILING_IN_CPYTHON
295 # define CYTHON_NCP_UNUSED
296 # else
297 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
298 # endif
299 #endif
300 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
301 #ifdef _MSC_VER
302  #ifndef _MSC_STDINT_H_
303  #if _MSC_VER < 1300
304  typedef unsigned char uint8_t;
305  typedef unsigned int uint32_t;
306  #else
307  typedef unsigned __int8 uint8_t;
308  typedef unsigned __int32 uint32_t;
309  #endif
310  #endif
311 #else
312  #include <stdint.h>
313 #endif
314 #ifndef CYTHON_FALLTHROUGH
315  #if defined(__cplusplus) && __cplusplus >= 201103L
316  #if __has_cpp_attribute(fallthrough)
317  #define CYTHON_FALLTHROUGH [[fallthrough]]
318  #elif __has_cpp_attribute(clang::fallthrough)
319  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
320  #elif __has_cpp_attribute(gnu::fallthrough)
321  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
322  #endif
323  #endif
324  #ifndef CYTHON_FALLTHROUGH
325  #if __has_attribute(fallthrough)
326  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
327  #else
328  #define CYTHON_FALLTHROUGH
329  #endif
330  #endif
331  #if defined(__clang__ ) && defined(__apple_build_version__)
332  #if __apple_build_version__ < 7000000
333  #undef CYTHON_FALLTHROUGH
334  #define CYTHON_FALLTHROUGH
335  #endif
336  #endif
337 #endif
338 
339 #ifndef __cplusplus
340  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
341 #endif
342 #ifndef CYTHON_INLINE
343  #if defined(__clang__)
344  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
345  #else
346  #define CYTHON_INLINE inline
347  #endif
348 #endif
349 template<typename T>
350 void __Pyx_call_destructor(T& x) {
351  x.~T();
352 }
353 template<typename T>
354 class __Pyx_FakeReference {
355  public:
356  __Pyx_FakeReference() : ptr(NULL) { }
357  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
358  T *operator->() { return ptr; }
359  T *operator&() { return ptr; }
360  operator T&() { return *ptr; }
361  template<typename U> bool operator ==(U other) { return *ptr == other; }
362  template<typename U> bool operator !=(U other) { return *ptr != other; }
363  private:
364  T *ptr;
365 };
366 
367 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
368  #define Py_OptimizeFlag 0
369 #endif
370 #define __PYX_BUILD_PY_SSIZE_T "n"
371 #define CYTHON_FORMAT_SSIZE_T "z"
372 #if PY_MAJOR_VERSION < 3
373  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
374  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
375  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
376  #define __Pyx_DefaultClassType PyClass_Type
377 #else
378  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
379  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
380  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
381  #define __Pyx_DefaultClassType PyType_Type
382 #endif
383 #ifndef Py_TPFLAGS_CHECKTYPES
384  #define Py_TPFLAGS_CHECKTYPES 0
385 #endif
386 #ifndef Py_TPFLAGS_HAVE_INDEX
387  #define Py_TPFLAGS_HAVE_INDEX 0
388 #endif
389 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
390  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
391 #endif
392 #ifndef Py_TPFLAGS_HAVE_FINALIZE
393  #define Py_TPFLAGS_HAVE_FINALIZE 0
394 #endif
395 #ifndef METH_STACKLESS
396  #define METH_STACKLESS 0
397 #endif
398 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
399  #ifndef METH_FASTCALL
400  #define METH_FASTCALL 0x80
401  #endif
402  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
403  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
404  Py_ssize_t nargs, PyObject *kwnames);
405 #else
406  #define __Pyx_PyCFunctionFast _PyCFunctionFast
407  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
408 #endif
409 #if CYTHON_FAST_PYCCALL
410 #define __Pyx_PyFastCFunction_Check(func)\
411  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
412 #else
413 #define __Pyx_PyFastCFunction_Check(func) 0
414 #endif
415 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
416  #define PyObject_Malloc(s) PyMem_Malloc(s)
417  #define PyObject_Free(p) PyMem_Free(p)
418  #define PyObject_Realloc(p) PyMem_Realloc(p)
419 #endif
420 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
421  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
422  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
423  #define PyMem_RawFree(p) PyMem_Free(p)
424 #endif
425 #if CYTHON_COMPILING_IN_PYSTON
426  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
427  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
428 #else
429  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
430  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
431 #endif
432 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
433  #define __Pyx_PyThreadState_Current PyThreadState_GET()
434 #elif PY_VERSION_HEX >= 0x03060000
435  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
436 #elif PY_VERSION_HEX >= 0x03000000
437  #define __Pyx_PyThreadState_Current PyThreadState_GET()
438 #else
439  #define __Pyx_PyThreadState_Current _PyThreadState_Current
440 #endif
441 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
442 #include "pythread.h"
443 #define Py_tss_NEEDS_INIT 0
444 typedef int Py_tss_t;
445 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
446  *key = PyThread_create_key();
447  return 0;
448 }
449 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
450  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
451  *key = Py_tss_NEEDS_INIT;
452  return key;
453 }
454 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
455  PyObject_Free(key);
456 }
457 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
458  return *key != Py_tss_NEEDS_INIT;
459 }
460 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
461  PyThread_delete_key(*key);
462  *key = Py_tss_NEEDS_INIT;
463 }
464 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
465  return PyThread_set_key_value(*key, value);
466 }
467 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
468  return PyThread_get_key_value(*key);
469 }
470 #endif
471 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
472 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
473 #else
474 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
475 #endif
476 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
477  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
478  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
479 #else
480  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
481  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
482 #endif
483 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
484 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
485 #else
486 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
487 #endif
488 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
489  #define CYTHON_PEP393_ENABLED 1
490  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
491  0 : _PyUnicode_Ready((PyObject *)(op)))
492  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
493  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
494  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
495  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
496  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
497  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
498  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
499  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
500 #else
501  #define CYTHON_PEP393_ENABLED 0
502  #define PyUnicode_1BYTE_KIND 1
503  #define PyUnicode_2BYTE_KIND 2
504  #define PyUnicode_4BYTE_KIND 4
505  #define __Pyx_PyUnicode_READY(op) (0)
506  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
507  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
508  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
509  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
510  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
511  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
512  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
513  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
514 #endif
515 #if CYTHON_COMPILING_IN_PYPY
516  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
517  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
518 #else
519  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
520  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
521  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
522 #endif
523 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
524  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
525 #endif
526 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
527  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
528 #endif
529 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
530  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
531 #endif
532 #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))
533 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
534 #if PY_MAJOR_VERSION >= 3
535  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
536 #else
537  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
538 #endif
539 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
540  #define PyObject_ASCII(o) PyObject_Repr(o)
541 #endif
542 #if PY_MAJOR_VERSION >= 3
543  #define PyBaseString_Type PyUnicode_Type
544  #define PyStringObject PyUnicodeObject
545  #define PyString_Type PyUnicode_Type
546  #define PyString_Check PyUnicode_Check
547  #define PyString_CheckExact PyUnicode_CheckExact
548  #define PyObject_Unicode PyObject_Str
549 #endif
550 #if PY_MAJOR_VERSION >= 3
551  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
552  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
553 #else
554  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
555  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
556 #endif
557 #ifndef PySet_CheckExact
558  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
559 #endif
560 #if CYTHON_ASSUME_SAFE_MACROS
561  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
562 #else
563  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
564 #endif
565 #if PY_MAJOR_VERSION >= 3
566  #define PyIntObject PyLongObject
567  #define PyInt_Type PyLong_Type
568  #define PyInt_Check(op) PyLong_Check(op)
569  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
570  #define PyInt_FromString PyLong_FromString
571  #define PyInt_FromUnicode PyLong_FromUnicode
572  #define PyInt_FromLong PyLong_FromLong
573  #define PyInt_FromSize_t PyLong_FromSize_t
574  #define PyInt_FromSsize_t PyLong_FromSsize_t
575  #define PyInt_AsLong PyLong_AsLong
576  #define PyInt_AS_LONG PyLong_AS_LONG
577  #define PyInt_AsSsize_t PyLong_AsSsize_t
578  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
579  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
580  #define PyNumber_Int PyNumber_Long
581 #endif
582 #if PY_MAJOR_VERSION >= 3
583  #define PyBoolObject PyLongObject
584 #endif
585 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
586  #ifndef PyUnicode_InternFromString
587  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
588  #endif
589 #endif
590 #if PY_VERSION_HEX < 0x030200A4
591  typedef long Py_hash_t;
592  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
593  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
594 #else
595  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
596  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
597 #endif
598 #if PY_MAJOR_VERSION >= 3
599  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
600 #else
601  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
602 #endif
603 #if CYTHON_USE_ASYNC_SLOTS
604  #if PY_VERSION_HEX >= 0x030500B1
605  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
606  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
607  #else
608  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
609  #endif
610 #else
611  #define __Pyx_PyType_AsAsync(obj) NULL
612 #endif
613 #ifndef __Pyx_PyAsyncMethodsStruct
614  typedef struct {
615  unaryfunc am_await;
616  unaryfunc am_aiter;
617  unaryfunc am_anext;
618  } __Pyx_PyAsyncMethodsStruct;
619 #endif
620 
621 #if defined(WIN32) || defined(MS_WINDOWS)
622  #define _USE_MATH_DEFINES
623 #endif
624 #include <math.h>
625 #ifdef NAN
626 #define __PYX_NAN() ((float) NAN)
627 #else
628 static CYTHON_INLINE float __PYX_NAN() {
629  float value;
630  memset(&value, 0xFF, sizeof(value));
631  return value;
632 }
633 #endif
634 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
635 #define __Pyx_truncl trunc
636 #else
637 #define __Pyx_truncl truncl
638 #endif
639 
640 
641 #define __PYX_ERR(f_index, lineno, Ln_error) \
642 { \
643  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
644 }
645 
646 #ifndef __PYX_EXTERN_C
647  #ifdef __cplusplus
648  #define __PYX_EXTERN_C extern "C"
649  #else
650  #define __PYX_EXTERN_C extern
651  #endif
652 #endif
653 
654 #define __PYX_HAVE__PyClical
655 #define __PYX_HAVE_API__PyClical
656 /* Early includes */
657 #include "ios"
658 #include "new"
659 #include "stdexcept"
660 #include "typeinfo"
661 #include <vector>
662 #include "PyClical.h"
663 #ifdef _OPENMP
664 #include <omp.h>
665 #endif /* _OPENMP */
666 
667 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
668 #define CYTHON_WITHOUT_ASSERTIONS
669 #endif
670 
671 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
672  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
673 
674 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
675 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
676 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
677 #define __PYX_DEFAULT_STRING_ENCODING ""
678 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
679 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
680 #define __Pyx_uchar_cast(c) ((unsigned char)c)
681 #define __Pyx_long_cast(x) ((long)x)
682 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
683  (sizeof(type) < sizeof(Py_ssize_t)) ||\
684  (sizeof(type) > sizeof(Py_ssize_t) &&\
685  likely(v < (type)PY_SSIZE_T_MAX ||\
686  v == (type)PY_SSIZE_T_MAX) &&\
687  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
688  v == (type)PY_SSIZE_T_MIN))) ||\
689  (sizeof(type) == sizeof(Py_ssize_t) &&\
690  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
691  v == (type)PY_SSIZE_T_MAX))) )
692 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
693  return (size_t) i < (size_t) limit;
694 }
695 #if defined (__cplusplus) && __cplusplus >= 201103L
696  #include <cstdlib>
697  #define __Pyx_sst_abs(value) std::abs(value)
698 #elif SIZEOF_INT >= SIZEOF_SIZE_T
699  #define __Pyx_sst_abs(value) abs(value)
700 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
701  #define __Pyx_sst_abs(value) labs(value)
702 #elif defined (_MSC_VER)
703  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
704 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
705  #define __Pyx_sst_abs(value) llabs(value)
706 #elif defined (__GNUC__)
707  #define __Pyx_sst_abs(value) __builtin_llabs(value)
708 #else
709  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
710 #endif
711 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
712 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
713 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
714 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
715 #define __Pyx_PyBytes_FromString PyBytes_FromString
716 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
717 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
718 #if PY_MAJOR_VERSION < 3
719  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
720  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
721 #else
722  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
723  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
724 #endif
725 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
726 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
727 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
728 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
729 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
730 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
731 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
732 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
733 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
734 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
735 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
736 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
737 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
738 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
739 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
740 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
741 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
742  const Py_UNICODE *u_end = u;
743  while (*u_end++) ;
744  return (size_t)(u_end - u - 1);
745 }
746 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
747 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
748 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
749 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
750 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
751 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
752 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
753 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
754 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
755 #define __Pyx_PySequence_Tuple(obj)\
756  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
757 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
758 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
759 #if CYTHON_ASSUME_SAFE_MACROS
760 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
761 #else
762 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
763 #endif
764 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
765 #if PY_MAJOR_VERSION >= 3
766 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
767 #else
768 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
769 #endif
770 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
771 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
772 static int __Pyx_sys_getdefaultencoding_not_ascii;
773 static int __Pyx_init_sys_getdefaultencoding_params(void) {
774  PyObject* sys;
775  PyObject* default_encoding = NULL;
776  PyObject* ascii_chars_u = NULL;
777  PyObject* ascii_chars_b = NULL;
778  const char* default_encoding_c;
779  sys = PyImport_ImportModule("sys");
780  if (!sys) goto bad;
781  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
782  Py_DECREF(sys);
783  if (!default_encoding) goto bad;
784  default_encoding_c = PyBytes_AsString(default_encoding);
785  if (!default_encoding_c) goto bad;
786  if (strcmp(default_encoding_c, "ascii") == 0) {
787  __Pyx_sys_getdefaultencoding_not_ascii = 0;
788  } else {
789  char ascii_chars[128];
790  int c;
791  for (c = 0; c < 128; c++) {
792  ascii_chars[c] = c;
793  }
794  __Pyx_sys_getdefaultencoding_not_ascii = 1;
795  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
796  if (!ascii_chars_u) goto bad;
797  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
798  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
799  PyErr_Format(
800  PyExc_ValueError,
801  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
802  default_encoding_c);
803  goto bad;
804  }
805  Py_DECREF(ascii_chars_u);
806  Py_DECREF(ascii_chars_b);
807  }
808  Py_DECREF(default_encoding);
809  return 0;
810 bad:
811  Py_XDECREF(default_encoding);
812  Py_XDECREF(ascii_chars_u);
813  Py_XDECREF(ascii_chars_b);
814  return -1;
815 }
816 #endif
817 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
818 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
819 #else
820 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
821 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
822 static char* __PYX_DEFAULT_STRING_ENCODING;
823 static int __Pyx_init_sys_getdefaultencoding_params(void) {
824  PyObject* sys;
825  PyObject* default_encoding = NULL;
826  char* default_encoding_c;
827  sys = PyImport_ImportModule("sys");
828  if (!sys) goto bad;
829  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
830  Py_DECREF(sys);
831  if (!default_encoding) goto bad;
832  default_encoding_c = PyBytes_AsString(default_encoding);
833  if (!default_encoding_c) goto bad;
834  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
835  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
836  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
837  Py_DECREF(default_encoding);
838  return 0;
839 bad:
840  Py_XDECREF(default_encoding);
841  return -1;
842 }
843 #endif
844 #endif
845 
846 
847 /* Test for GCC > 2.95 */
848 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
849  #define likely(x) __builtin_expect(!!(x), 1)
850  #define unlikely(x) __builtin_expect(!!(x), 0)
851 #else /* !__GNUC__ or GCC < 2.95 */
852  #define likely(x) (x)
853  #define unlikely(x) (x)
854 #endif /* __GNUC__ */
855 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
856 
857 static PyObject *__pyx_m = NULL;
858 static PyObject *__pyx_d;
859 static PyObject *__pyx_b;
860 static PyObject *__pyx_cython_runtime = NULL;
861 static PyObject *__pyx_empty_tuple;
862 static PyObject *__pyx_empty_bytes;
863 static PyObject *__pyx_empty_unicode;
864 static int __pyx_lineno;
865 static int __pyx_clineno = 0;
866 static const char * __pyx_cfilenm= __FILE__;
867 static const char *__pyx_filename;
868 
869 
870 static const char *__pyx_f[] = {
871  "PyClical.pyx",
872  "stringsource",
873 };
874 
875 /*--- Type declarations ---*/
876 struct __pyx_obj_8PyClical_index_set;
877 struct __pyx_obj_8PyClical_clifford;
878 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
879 struct __pyx_opt_args_8PyClical_sqrt;
880 struct __pyx_opt_args_8PyClical_log;
881 struct __pyx_opt_args_8PyClical_cos;
882 struct __pyx_opt_args_8PyClical_acos;
883 struct __pyx_opt_args_8PyClical_acosh;
884 struct __pyx_opt_args_8PyClical_sin;
885 struct __pyx_opt_args_8PyClical_asin;
886 struct __pyx_opt_args_8PyClical_asinh;
887 struct __pyx_opt_args_8PyClical_tan;
888 struct __pyx_opt_args_8PyClical_atan;
889 struct __pyx_opt_args_8PyClical_atanh;
890 struct __pyx_opt_args_8PyClical_random_clifford;
891 
892 /* "PyClical.pyx":1542
893  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
894  *
895  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
896  * """
897  * Square root of multivector with optional complexifier.
898  */
899 struct __pyx_opt_args_8PyClical_sqrt {
900  int __pyx_n;
901  PyObject *i;
902 };
903 
904 /* "PyClical.pyx":1579
905  * return clifford().wrap( glucat.exp(toClifford(obj)) )
906  *
907  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
908  * """
909  * Natural logarithm of multivector with optional complexifier.
910  */
911 struct __pyx_opt_args_8PyClical_log {
912  int __pyx_n;
913  PyObject *i;
914 };
915 
916 /* "PyClical.pyx":1602
917  * return clifford().wrap( glucat.log(toClifford(obj)) )
918  *
919  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
920  * """
921  * Cosine of multivector with optional complexifier.
922  */
923 struct __pyx_opt_args_8PyClical_cos {
924  int __pyx_n;
925  PyObject *i;
926 };
927 
928 /* "PyClical.pyx":1619
929  * return clifford().wrap( glucat.cos(toClifford(obj)) )
930  *
931  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
932  * """
933  * Inverse cosine of multivector with optional complexifier.
934  */
935 struct __pyx_opt_args_8PyClical_acos {
936  int __pyx_n;
937  PyObject *i;
938 };
939 
940 /* "PyClical.pyx":1656
941  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
942  *
943  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
944  * """
945  * Inverse hyperbolic cosine of multivector with optional complexifier.
946  */
947 struct __pyx_opt_args_8PyClical_acosh {
948  int __pyx_n;
949  PyObject *i;
950 };
951 
952 /* "PyClical.pyx":1679
953  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
954  *
955  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
956  * """
957  * Sine of multivector with optional complexifier.
958  */
959 struct __pyx_opt_args_8PyClical_sin {
960  int __pyx_n;
961  PyObject *i;
962 };
963 
964 /* "PyClical.pyx":1698
965  * return clifford().wrap( glucat.sin(toClifford(obj)) )
966  *
967  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
968  * """
969  * Inverse sine of multivector with optional complexifier.
970  */
971 struct __pyx_opt_args_8PyClical_asin {
972  int __pyx_n;
973  PyObject *i;
974 };
975 
976 /* "PyClical.pyx":1733
977  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
978  *
979  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
980  * """
981  * Inverse hyperbolic sine of multivector with optional complexifier.
982  */
983 struct __pyx_opt_args_8PyClical_asinh {
984  int __pyx_n;
985  PyObject *i;
986 };
987 
988 /* "PyClical.pyx":1752
989  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
990  *
991  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
992  * """
993  * Tangent of multivector with optional complexifier.
994  */
995 struct __pyx_opt_args_8PyClical_tan {
996  int __pyx_n;
997  PyObject *i;
998 };
999 
1000 /* "PyClical.pyx":1769
1001  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1002  *
1003  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1004  * """
1005  * Inverse tangent of multivector with optional complexifier.
1006  */
1007 struct __pyx_opt_args_8PyClical_atan {
1008  int __pyx_n;
1009  PyObject *i;
1010 };
1011 
1012 /* "PyClical.pyx":1798
1013  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1014  *
1015  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1016  * """
1017  * Inverse hyperbolic tangent of multivector with optional complexifier.
1018  */
1019 struct __pyx_opt_args_8PyClical_atanh {
1020  int __pyx_n;
1021  PyObject *i;
1022 };
1023 
1024 /* "PyClical.pyx":1815
1025  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1026  *
1027  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1028  * """
1029  * Random multivector within a frame.
1030  */
1031 struct __pyx_opt_args_8PyClical_random_clifford {
1032  int __pyx_n;
1033  PyObject *fill;
1034 };
1035 
1036 /* "PyClical.pyx":37
1037  *
1038  * # Forward reference
1039  * cdef class index_set # <<<<<<<<<<<<<<
1040  *
1041  * cdef inline IndexSet toIndexSet(obj):
1042  */
1043 struct __pyx_obj_8PyClical_index_set {
1044  PyObject_HEAD
1045  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1046  IndexSet *instance;
1047 };
1048 
1049 
1050 /* "PyClical.pyx":530
1051  *
1052  * # Forward reference.
1053  * cdef class clifford # <<<<<<<<<<<<<<
1054  *
1055  * cdef inline Clifford toClifford(obj):
1056  */
1057 struct __pyx_obj_8PyClical_clifford {
1058  PyObject_HEAD
1059  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1060  Clifford *instance;
1061 };
1062 
1063 
1064 /* "PyClical.pyx":227
1065  * return self.instance.getitem(idx)
1066  *
1067  * def __iter__(self): # <<<<<<<<<<<<<<
1068  * """
1069  * Iterate over the indices of an index_set.
1070  */
1071 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1072  PyObject_HEAD
1073  PyObject *__pyx_v_idx;
1074  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1075  PyObject *__pyx_t_0;
1076  Py_ssize_t __pyx_t_1;
1077  PyObject *(*__pyx_t_2)(PyObject *);
1078 };
1079 
1080 
1081 
1082 /* "PyClical.pyx":45
1083  * return index_set(obj).instance[0]
1084  *
1085  * cdef class index_set: # <<<<<<<<<<<<<<
1086  * """
1087  * Python class index_set wraps C++ class IndexSet.
1088  */
1089 
1090 struct __pyx_vtabstruct_8PyClical_index_set {
1091  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1092  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1093  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1094 };
1095 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1096 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1097 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1098 
1099 
1100 /* "PyClical.pyx":535
1101  * return clifford(obj).instance[0]
1102  *
1103  * cdef class clifford: # <<<<<<<<<<<<<<
1104  * """
1105  * Python class clifford wraps C++ class Clifford.
1106  */
1107 
1108 struct __pyx_vtabstruct_8PyClical_clifford {
1109  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1110  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1111  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1112 };
1113 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1114 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1115 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1116 
1117 /* --- Runtime support code (head) --- */
1118 /* Refnanny.proto */
1119 #ifndef CYTHON_REFNANNY
1120  #define CYTHON_REFNANNY 0
1121 #endif
1122 #if CYTHON_REFNANNY
1123  typedef struct {
1124  void (*INCREF)(void*, PyObject*, int);
1125  void (*DECREF)(void*, PyObject*, int);
1126  void (*GOTREF)(void*, PyObject*, int);
1127  void (*GIVEREF)(void*, PyObject*, int);
1128  void* (*SetupContext)(const char*, int, const char*);
1129  void (*FinishContext)(void**);
1130  } __Pyx_RefNannyAPIStruct;
1131  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1132  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1133  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1134 #ifdef WITH_THREAD
1135  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1136  if (acquire_gil) {\
1137  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1138  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1139  PyGILState_Release(__pyx_gilstate_save);\
1140  } else {\
1141  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1142  }
1143 #else
1144  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1145  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1146 #endif
1147  #define __Pyx_RefNannyFinishContext()\
1148  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1149  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1150  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1151  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1152  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1153  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1154  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1155  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1156  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1157 #else
1158  #define __Pyx_RefNannyDeclarations
1159  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1160  #define __Pyx_RefNannyFinishContext()
1161  #define __Pyx_INCREF(r) Py_INCREF(r)
1162  #define __Pyx_DECREF(r) Py_DECREF(r)
1163  #define __Pyx_GOTREF(r)
1164  #define __Pyx_GIVEREF(r)
1165  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1166  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1167  #define __Pyx_XGOTREF(r)
1168  #define __Pyx_XGIVEREF(r)
1169 #endif
1170 #define __Pyx_XDECREF_SET(r, v) do {\
1171  PyObject *tmp = (PyObject *) r;\
1172  r = v; __Pyx_XDECREF(tmp);\
1173  } while (0)
1174 #define __Pyx_DECREF_SET(r, v) do {\
1175  PyObject *tmp = (PyObject *) r;\
1176  r = v; __Pyx_DECREF(tmp);\
1177  } while (0)
1178 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1179 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1180 
1181 /* PyObjectGetAttrStr.proto */
1182 #if CYTHON_USE_TYPE_SLOTS
1183 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1184 #else
1185 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1186 #endif
1187 
1188 /* GetBuiltinName.proto */
1189 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1190 
1191 /* PyCFunctionFastCall.proto */
1192 #if CYTHON_FAST_PYCCALL
1193 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1194 #else
1195 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1196 #endif
1197 
1198 /* PyFunctionFastCall.proto */
1199 #if CYTHON_FAST_PYCALL
1200 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1201  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1202 #if 1 || PY_VERSION_HEX < 0x030600B1
1203 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1204 #else
1205 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1206 #endif
1207 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1208  (sizeof(char [1 - 2*!(cond)]) - 1)
1209 #ifndef Py_MEMBER_SIZE
1210 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1211 #endif
1212  static size_t __pyx_pyframe_localsplus_offset = 0;
1213  #include "frameobject.h"
1214  #define __Pxy_PyFrame_Initialize_Offsets()\
1215  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1216  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1217  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1218  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1219 #endif
1220 
1221 /* PyObjectCall.proto */
1222 #if CYTHON_COMPILING_IN_CPYTHON
1223 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1224 #else
1225 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1226 #endif
1227 
1228 /* PyObjectCallMethO.proto */
1229 #if CYTHON_COMPILING_IN_CPYTHON
1230 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1231 #endif
1232 
1233 /* PyObjectCallOneArg.proto */
1234 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1235 
1236 /* PyThreadStateGet.proto */
1237 #if CYTHON_FAST_THREAD_STATE
1238 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1239 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1240 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1241 #else
1242 #define __Pyx_PyThreadState_declare
1243 #define __Pyx_PyThreadState_assign
1244 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1245 #endif
1246 
1247 /* PyErrFetchRestore.proto */
1248 #if CYTHON_FAST_THREAD_STATE
1249 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1250 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1251 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1252 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1253 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1254 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1255 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1256 #if CYTHON_COMPILING_IN_CPYTHON
1257 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1258 #else
1259 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1260 #endif
1261 #else
1262 #define __Pyx_PyErr_Clear() PyErr_Clear()
1263 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1264 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1265 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1266 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1267 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1268 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1269 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1270 #endif
1271 
1272 /* WriteUnraisableException.proto */
1273 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1274  int lineno, const char *filename,
1275  int full_traceback, int nogil);
1276 
1277 /* PyDictVersioning.proto */
1278 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1279 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1280 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1281 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1282  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1283  (cache_var) = (value);
1284 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1285  static PY_UINT64_T __pyx_dict_version = 0;\
1286  static PyObject *__pyx_dict_cached_value = NULL;\
1287  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1288  (VAR) = __pyx_dict_cached_value;\
1289  } else {\
1290  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1291  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1292  }\
1293 }
1294 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1295 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1296 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1297 #else
1298 #define __PYX_GET_DICT_VERSION(dict) (0)
1299 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1300 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1301 #endif
1302 
1303 /* PyObjectCallNoArg.proto */
1304 #if CYTHON_COMPILING_IN_CPYTHON
1305 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1306 #else
1307 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1308 #endif
1309 
1310 /* RaiseDoubleKeywords.proto */
1311 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1312 
1313 /* ParseKeywords.proto */
1314 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1315  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1316  const char* function_name);
1317 
1318 /* RaiseArgTupleInvalid.proto */
1319 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1320  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1321 
1322 /* GetModuleGlobalName.proto */
1323 #if CYTHON_USE_DICT_VERSIONS
1324 #define __Pyx_GetModuleGlobalName(var, name) {\
1325  static PY_UINT64_T __pyx_dict_version = 0;\
1326  static PyObject *__pyx_dict_cached_value = NULL;\
1327  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1328  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1329  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1330 }
1331 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1332  PY_UINT64_T __pyx_dict_version;\
1333  PyObject *__pyx_dict_cached_value;\
1334  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1335 }
1336 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1337 #else
1338 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1339 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1340 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1341 #endif
1342 
1343 /* GetTopmostException.proto */
1344 #if CYTHON_USE_EXC_INFO_STACK
1345 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1346 #endif
1347 
1348 /* SaveResetException.proto */
1349 #if CYTHON_FAST_THREAD_STATE
1350 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1351 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1352 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1353 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1354 #else
1355 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1356 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1357 #endif
1358 
1359 /* PyErrExceptionMatches.proto */
1360 #if CYTHON_FAST_THREAD_STATE
1361 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1362 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1363 #else
1364 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1365 #endif
1366 
1367 /* GetException.proto */
1368 #if CYTHON_FAST_THREAD_STATE
1369 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1370 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1371 #else
1372 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1373 #endif
1374 
1375 /* RaiseException.proto */
1376 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1377 
1378 /* PyIntBinop.proto */
1379 #if !CYTHON_COMPILING_IN_PYPY
1380 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1381 #else
1382 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1383  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1384 #endif
1385 
1386 /* PySequenceContains.proto */
1387 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1388  int result = PySequence_Contains(seq, item);
1389  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1390 }
1391 
1392 /* SetItemInt.proto */
1393 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1394  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1395  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1396  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1397  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1398 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1399 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1400  int is_list, int wraparound, int boundscheck);
1401 
1402 /* PyObjectCall2Args.proto */
1403 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1404 
1405 /* ArgTypeTest.proto */
1406 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1407  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1408  __Pyx__ArgTypeTest(obj, type, name, exact))
1409 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1410 
1411 /* Import.proto */
1412 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1413 
1414 /* IncludeStringH.proto */
1415 #include <string.h>
1416 
1417 /* PyObject_GenericGetAttrNoDict.proto */
1418 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1419 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1420 #else
1421 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1422 #endif
1423 
1424 /* PyObject_GenericGetAttr.proto */
1425 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1426 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1427 #else
1428 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1429 #endif
1430 
1431 /* SetVTable.proto */
1432 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1433 
1434 /* SetupReduce.proto */
1435 static int __Pyx_setup_reduce(PyObject* type_obj);
1436 
1437 /* PyFloatBinop.proto */
1438 #if !CYTHON_COMPILING_IN_PYPY
1439 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1440 #else
1441 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1442  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1443  #endif
1444 
1445 /* BytesEquals.proto */
1446 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1447 
1448 /* UnicodeEquals.proto */
1449 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1450 
1451 /* StrEquals.proto */
1452 #if PY_MAJOR_VERSION >= 3
1453 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1454 #else
1455 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1456 #endif
1457 
1458 /* CLineInTraceback.proto */
1459 #ifdef CYTHON_CLINE_IN_TRACEBACK
1460 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1461 #else
1462 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1463 #endif
1464 
1465 /* CodeObjectCache.proto */
1466 typedef struct {
1467  PyCodeObject* code_object;
1468  int code_line;
1469 } __Pyx_CodeObjectCacheEntry;
1470 struct __Pyx_CodeObjectCache {
1471  int count;
1472  int max_count;
1473  __Pyx_CodeObjectCacheEntry* entries;
1474 };
1475 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1476 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1477 static PyCodeObject *__pyx_find_code_object(int code_line);
1478 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1479 
1480 /* AddTraceback.proto */
1481 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1482  int py_line, const char *filename);
1483 
1484 /* CppExceptionConversion.proto */
1485 #ifndef __Pyx_CppExn2PyErr
1486 #include <new>
1487 #include <typeinfo>
1488 #include <stdexcept>
1489 #include <ios>
1490 static void __Pyx_CppExn2PyErr() {
1491  try {
1492  if (PyErr_Occurred())
1493  ; // let the latest Python exn pass through and ignore the current one
1494  else
1495  throw;
1496  } catch (const std::bad_alloc& exn) {
1497  PyErr_SetString(PyExc_MemoryError, exn.what());
1498  } catch (const std::bad_cast& exn) {
1499  PyErr_SetString(PyExc_TypeError, exn.what());
1500  } catch (const std::bad_typeid& exn) {
1501  PyErr_SetString(PyExc_TypeError, exn.what());
1502  } catch (const std::domain_error& exn) {
1503  PyErr_SetString(PyExc_ValueError, exn.what());
1504  } catch (const std::invalid_argument& exn) {
1505  PyErr_SetString(PyExc_ValueError, exn.what());
1506  } catch (const std::ios_base::failure& exn) {
1507  PyErr_SetString(PyExc_IOError, exn.what());
1508  } catch (const std::out_of_range& exn) {
1509  PyErr_SetString(PyExc_IndexError, exn.what());
1510  } catch (const std::overflow_error& exn) {
1511  PyErr_SetString(PyExc_OverflowError, exn.what());
1512  } catch (const std::range_error& exn) {
1513  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1514  } catch (const std::underflow_error& exn) {
1515  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1516  } catch (const std::exception& exn) {
1517  PyErr_SetString(PyExc_RuntimeError, exn.what());
1518  }
1519  catch (...)
1520  {
1521  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1522  }
1523 }
1524 #endif
1525 
1526 /* CIntToPy.proto */
1527 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1528 
1529 /* CIntFromPy.proto */
1530 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1531 
1532 /* CIntToPy.proto */
1533 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1534 
1535 /* CIntFromPy.proto */
1536 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1537 
1538 /* FastTypeChecks.proto */
1539 #if CYTHON_COMPILING_IN_CPYTHON
1540 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1541 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1542 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1543 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1544 #else
1545 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1546 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1547 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1548 #endif
1549 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1550 
1551 /* FetchCommonType.proto */
1552 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1553 
1554 /* SwapException.proto */
1555 #if CYTHON_FAST_THREAD_STATE
1556 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1557 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1558 #else
1559 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1560 #endif
1561 
1562 /* PyObjectGetMethod.proto */
1563 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1564 
1565 /* PyObjectCallMethod1.proto */
1566 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1567 
1568 /* CoroutineBase.proto */
1569 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1570 #if CYTHON_USE_EXC_INFO_STACK
1571 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1572 #else
1573 typedef struct {
1574  PyObject *exc_type;
1575  PyObject *exc_value;
1576  PyObject *exc_traceback;
1577 } __Pyx_ExcInfoStruct;
1578 #endif
1579 typedef struct {
1580  PyObject_HEAD
1581  __pyx_coroutine_body_t body;
1582  PyObject *closure;
1583  __Pyx_ExcInfoStruct gi_exc_state;
1584  PyObject *gi_weakreflist;
1585  PyObject *classobj;
1586  PyObject *yieldfrom;
1587  PyObject *gi_name;
1588  PyObject *gi_qualname;
1589  PyObject *gi_modulename;
1590  PyObject *gi_code;
1591  int resume_label;
1592  char is_running;
1593 } __pyx_CoroutineObject;
1594 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1595  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1596  PyObject *name, PyObject *qualname, PyObject *module_name);
1597 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1598  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1599  PyObject *name, PyObject *qualname, PyObject *module_name);
1600 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1601 static int __Pyx_Coroutine_clear(PyObject *self);
1602 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1603 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1604 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1605 #if CYTHON_USE_EXC_INFO_STACK
1606 #define __Pyx_Coroutine_SwapException(self)
1607 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1608 #else
1609 #define __Pyx_Coroutine_SwapException(self) {\
1610  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1611  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1612  }
1613 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1614  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1615  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1616  }
1617 #endif
1618 #if CYTHON_FAST_THREAD_STATE
1619 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1620  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1621 #else
1622 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1623  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1624 #endif
1625 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1626 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1627 
1628 /* PatchModuleWithCoroutine.proto */
1629 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1630 
1631 /* PatchGeneratorABC.proto */
1632 static int __Pyx_patch_abc(void);
1633 
1634 /* Generator.proto */
1635 #define __Pyx_Generator_USED
1636 static PyTypeObject *__pyx_GeneratorType = 0;
1637 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1638 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1639  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1640 static PyObject *__Pyx_Generator_Next(PyObject *self);
1641 static int __pyx_Generator_init(void);
1642 
1643 /* CheckBinaryVersion.proto */
1644 static int __Pyx_check_binary_version(void);
1645 
1646 /* InitStrings.proto */
1647 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1648 
1649 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1650 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1651 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1652 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1653 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1654 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1655 
1656 /* Module declarations from 'libcpp.vector' */
1657 
1658 /* Module declarations from 'glucat' */
1659 
1660 /* Module declarations from 'PyClical' */
1661 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1662 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1663 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1664 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1665 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1666 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1667 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1668 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1669 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1670 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1671 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1672 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1673 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1674 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1675 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1676 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1677 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1678 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1679 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1680 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1681 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1682 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1683 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1685 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1686 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1687 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1690 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1691 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1692 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1693 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1694 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1695 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1696 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1697 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1698 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1699 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1700 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1702 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*/
1703 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1704 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1705 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1706 #define __Pyx_MODULE_NAME "PyClical"
1707 extern int __pyx_module_is_main_PyClical;
1708 int __pyx_module_is_main_PyClical = 0;
1709 
1710 /* Implementation of 'PyClical' */
1711 static PyObject *__pyx_builtin_IndexError;
1712 static PyObject *__pyx_builtin_RuntimeError;
1713 static PyObject *__pyx_builtin_TypeError;
1714 static PyObject *__pyx_builtin_ValueError;
1715 static PyObject *__pyx_builtin_NotImplemented;
1716 static PyObject *__pyx_builtin_range;
1717 static PyObject *__pyx_builtin_xrange;
1718 static const char __pyx_k_[] = ".";
1719 static const char __pyx_k_e[] = "e";
1720 static const char __pyx_k_i[] = "i";
1721 static const char __pyx_k_m[] = "m";
1722 static const char __pyx_k_p[] = "p";
1723 static const char __pyx_k_q[] = "q";
1724 static const char __pyx_k__2[] = " ";
1725 static const char __pyx_k__5[] = ":";
1726 static const char __pyx_k__6[] = "\n\t";
1727 static const char __pyx_k__7[] = " (";
1728 static const char __pyx_k__8[] = ", ";
1729 static const char __pyx_k__9[] = ").";
1730 static const char __pyx_k_cl[] = "cl";
1731 static const char __pyx_k_pi[] = "pi";
1732 static const char __pyx_k_cos[] = "cos";
1733 static const char __pyx_k_exp[] = "exp";
1734 static const char __pyx_k_frm[] = "frm";
1735 static const char __pyx_k_inv[] = "inv";
1736 static const char __pyx_k_ist[] = "ist";
1737 static const char __pyx_k_ixt[] = "ixt";
1738 static const char __pyx_k_lhs[] = "lhs";
1739 static const char __pyx_k_log[] = "log";
1740 static const char __pyx_k_max[] = "max";
1741 static const char __pyx_k_min[] = "min";
1742 static const char __pyx_k_obj[] = "obj";
1743 static const char __pyx_k_odd[] = "odd";
1744 static const char __pyx_k_pow[] = "pow";
1745 static const char __pyx_k_rhs[] = "rhs";
1746 static const char __pyx_k_sin[] = "sin";
1747 static const char __pyx_k_tan[] = "tan";
1748 static const char __pyx_k_tau[] = "tau";
1749 static const char __pyx_k_Real[] = "Real";
1750 static const char __pyx_k_acos[] = "acos";
1751 static const char __pyx_k_args[] = "args";
1752 static const char __pyx_k_asin[] = "asin";
1753 static const char __pyx_k_atan[] = "atan";
1754 static const char __pyx_k_conj[] = "conj";
1755 static const char __pyx_k_copy[] = "copy";
1756 static const char __pyx_k_cosh[] = "cosh";
1757 static const char __pyx_k_even[] = "even";
1758 static const char __pyx_k_fill[] = "fill";
1759 static const char __pyx_k_from[] = " from ";
1760 static const char __pyx_k_iter[] = "__iter__";
1761 static const char __pyx_k_main[] = "__main__";
1762 static const char __pyx_k_math[] = "math";
1763 static const char __pyx_k_name[] = "__name__";
1764 static const char __pyx_k_norm[] = "norm";
1765 static const char __pyx_k_pure[] = "pure";
1766 static const char __pyx_k_quad[] = "quad";
1767 static const char __pyx_k_send[] = "send";
1768 static const char __pyx_k_sinh[] = "sinh";
1769 static const char __pyx_k_sqrt[] = "sqrt";
1770 static const char __pyx_k_tanh[] = "tanh";
1771 static const char __pyx_k_test[] = "_test";
1772 static const char __pyx_k_0_8_2[] = "0.8.2";
1773 static const char __pyx_k_acosh[] = "acosh";
1774 static const char __pyx_k_asinh[] = "asinh";
1775 static const char __pyx_k_atanh[] = "atanh";
1776 static const char __pyx_k_close[] = "close";
1777 static const char __pyx_k_grade[] = "grade";
1778 static const char __pyx_k_istpq[] = "istpq";
1779 static const char __pyx_k_nbar3[] = "nbar3";
1780 static const char __pyx_k_ninf3[] = "ninf3";
1781 static const char __pyx_k_other[] = "other";
1782 static const char __pyx_k_range[] = "range";
1783 static const char __pyx_k_throw[] = "throw";
1784 static const char __pyx_k_using[] = " using (";
1785 static const char __pyx_k_value[] = " value ";
1786 static const char __pyx_k_import[] = "__import__";
1787 static const char __pyx_k_reduce[] = "__reduce__";
1788 static const char __pyx_k_scalar[] = "scalar";
1789 static const char __pyx_k_test_2[] = "__test__";
1790 static const char __pyx_k_xrange[] = "xrange";
1791 static const char __pyx_k_doctest[] = "doctest";
1792 static const char __pyx_k_invalid[] = " invalid ";
1793 static const char __pyx_k_numbers[] = "numbers";
1794 static const char __pyx_k_reverse[] = "reverse";
1795 static const char __pyx_k_testmod[] = "testmod";
1796 static const char __pyx_k_version[] = "__version__";
1797 static const char __pyx_k_Integral[] = "Integral";
1798 static const char __pyx_k_PyClical[] = "PyClical";
1799 static const char __pyx_k_Sequence[] = "Sequence";
1800 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1801 static const char __pyx_k_clifford[] = "clifford";
1802 static const char __pyx_k_getstate[] = "__getstate__";
1803 static const char __pyx_k_involute[] = "involute";
1804 static const char __pyx_k_setstate[] = "__setstate__";
1805 static const char __pyx_k_to_frame[] = " to frame ";
1806 static const char __pyx_k_TypeError[] = "TypeError";
1807 static const char __pyx_k_index_set[] = "index_set";
1808 static const char __pyx_k_outer_pow[] = "outer_pow";
1809 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1810 static const char __pyx_k_IndexError[] = "IndexError";
1811 static const char __pyx_k_ValueError[] = "ValueError";
1812 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1813 static const char __pyx_k_collections[] = "collections";
1814 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1815 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1816 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1817 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1818 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1819 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1820 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1821 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1822 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1823 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1824 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1825 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1826 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1827 static const char __pyx_k_using_invalid[] = " using invalid ";
1828 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1829 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1830 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1831 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1832 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1833 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1834 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1835 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1836 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1837 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1838 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1839 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1840 static const char __pyx_k_invalid_string[] = " invalid string ";
1841 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1842 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1843 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1844 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1845 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1846 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1847 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1848 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1849 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1850 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1851 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1852 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1853 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1854 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1855 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1856 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1857 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1858 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1859 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1860 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1861 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1862 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1863 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1864 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1865 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1866 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1867 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1868 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1869 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1870 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1871 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1872 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1873 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1874 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1875 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1876 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1877 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1878 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1879 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1880 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1881 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1882 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1883 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1884 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1885 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1886 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1887 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1888 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1889 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1890 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1891 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1892 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1893 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1894 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1895 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1896 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1897 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1898 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1899 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1900 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1901 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1902 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1903 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1904 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1905 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1906 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1907 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1908 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1909 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1910 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1911 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1912 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1913 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1914 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1915 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1916 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1917 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1918 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1919 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1920 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1921 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1922 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1923 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1924 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1925 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1926 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1927 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1928 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1929 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1930 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 ";
1931 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 ";
1932 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 ";
1933 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 ";
1934 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 ";
1935 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 ";
1936 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 ";
1937 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 ";
1938 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 ";
1939 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 ";
1940 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 ";
1941 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 ";
1942 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 ";
1943 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 ";
1944 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 ";
1945 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 ";
1946 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 ";
1947 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 ";
1948 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 ";
1949 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 ";
1950 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 ";
1951 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1952 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1953 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1954 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 ";
1955 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 ";
1956 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 ";
1957 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 ";
1958 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 ";
1959 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 ";
1960 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 ";
1961 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 ";
1962 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 ";
1963 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 ";
1964 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 ";
1965 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 ";
1966 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 ";
1967 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 ";
1968 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 ";
1969 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 ";
1970 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 ";
1971 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 ";
1972 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 ";
1973 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 ";
1974 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 ";
1975 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 ";
1976 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 ";
1977 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 ";
1978 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 ";
1979 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 ";
1980 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 ";
1981 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 ";
1982 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 ";
1983 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 ";
1984 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 ";
1985 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 ";
1986 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 ";
1987 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 ";
1988 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 ";
1989 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 ";
1990 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 ";
1991 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 ";
1992 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 ";
1993 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 ";
1994 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 ";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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 ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 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 ";
2016 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 ";
2017 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 ";
2018 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 ";
2019 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 ";
2020 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 ";
2021 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 ";
2022  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 ";
2023  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 ";
2024  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2025  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 ";
2026  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
2027  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 ";
2028  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2029  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2030  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 ";
2031  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 ";
2032  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 ";
2033  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 ";
2034  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 ";
2035  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
2036  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
2037  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
2038  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2039  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 ";
2040  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 ";
2041  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 ";
2042  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 ";
2043  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 ";
2044  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 ";
2045  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 ";
2046  static PyObject *__pyx_kp_s_;
2047  static PyObject *__pyx_kp_s_0_8_2;
2048  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2049  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2050  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2051  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2052  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
2053  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
2054  static PyObject *__pyx_kp_s_Cannot_reframe;
2055  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
2056  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2057  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2058  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2059  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2060  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2061  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2062  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2063  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2064  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2065  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2066  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2067  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2068  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2069  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2070  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2071  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2072  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2073  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2074  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2075  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2076  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2077  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2078  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2079  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2080  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2081  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2082  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2083  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2084  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2085  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2086  static PyObject *__pyx_n_s_IndexError;
2087  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2088  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2089  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2090  static PyObject *__pyx_n_s_Integral;
2091  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2092  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2093  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2094  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2095  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2096  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2097  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2098  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2099  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2100  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2101  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2102  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2103  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2104  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2105  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2106  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2107  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2108  static PyObject *__pyx_n_s_NotImplemented;
2109  static PyObject *__pyx_kp_s_Not_applicable;
2110  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2111  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2112  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2113  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2114  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2115  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2116  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2117  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2118  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2119  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2120  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2121  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2122  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2123  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2124  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2125  static PyObject *__pyx_n_s_PyClical;
2126  static PyObject *__pyx_kp_s_PyClical_pyx;
2127  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2128  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2129  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2130  static PyObject *__pyx_n_s_Real;
2131  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2132  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2133  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2134  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2135  static PyObject *__pyx_n_s_RuntimeError;
2136  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2137  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2138  static PyObject *__pyx_n_s_Sequence;
2139  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2140  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2141  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2142  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2143  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2144  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2145  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2146  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2147  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2148  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2149  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2150  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2151  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2152  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2153  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2154  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2155  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2156  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2157  static PyObject *__pyx_kp_u_The_informal_string_representat;
2158  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2159  static PyObject *__pyx_kp_u_The_official_string_representat;
2160  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2161  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2162  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2163  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2164  static PyObject *__pyx_n_s_TypeError;
2165  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2166  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2167  static PyObject *__pyx_n_s_ValueError;
2168  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2169  static PyObject *__pyx_kp_s__2;
2170  static PyObject *__pyx_kp_s__5;
2171  static PyObject *__pyx_kp_s__6;
2172  static PyObject *__pyx_kp_s__7;
2173  static PyObject *__pyx_kp_s__8;
2174  static PyObject *__pyx_kp_s__9;
2175  static PyObject *__pyx_kp_u_abs_line_1473;
2176  static PyObject *__pyx_n_s_acos;
2177  static PyObject *__pyx_kp_u_acos_line_1619;
2178  static PyObject *__pyx_n_s_acosh;
2179  static PyObject *__pyx_kp_u_acosh_line_1656;
2180  static PyObject *__pyx_kp_u_agc3_line_1844;
2181  static PyObject *__pyx_n_s_args;
2182  static PyObject *__pyx_kp_s_as_frame;
2183  static PyObject *__pyx_n_s_asin;
2184  static PyObject *__pyx_kp_u_asin_line_1698;
2185  static PyObject *__pyx_n_s_asinh;
2186  static PyObject *__pyx_kp_u_asinh_line_1733;
2187  static PyObject *__pyx_n_s_atan;
2188  static PyObject *__pyx_kp_u_atan_line_1769;
2189  static PyObject *__pyx_n_s_atanh;
2190  static PyObject *__pyx_kp_u_atanh_line_1798;
2191  static PyObject *__pyx_kp_u_cga3_line_1824;
2192  static PyObject *__pyx_kp_u_cga3std_line_1833;
2193  static PyObject *__pyx_n_s_cl;
2194  static PyObject *__pyx_n_s_clifford;
2195  static PyObject *__pyx_kp_u_clifford___add___line_739;
2196  static PyObject *__pyx_kp_u_clifford___and___line_835;
2197  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2198  static PyObject *__pyx_kp_u_clifford___div___line_895;
2199  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2200  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2201  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2202  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2203  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2204  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2205  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2206  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2207  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2208  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2209  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2210  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2211  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2212  static PyObject *__pyx_kp_u_clifford___or___line_938;
2213  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2214  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2215  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2216  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2217  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2218  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2219  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2220  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2221  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2222  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2223  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2224  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2225  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2226  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2227  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2228  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2229  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2230  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2231  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2232  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2233  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2234  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2235  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2236  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2237  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2238  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2239  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2240  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2241  static PyObject *__pyx_n_s_cline_in_traceback;
2242  static PyObject *__pyx_n_s_close;
2243  static PyObject *__pyx_n_s_collections;
2244  static PyObject *__pyx_kp_u_compare_line_490;
2245  static PyObject *__pyx_kp_u_complexifier_line_1527;
2246  static PyObject *__pyx_n_s_conj;
2247  static PyObject *__pyx_kp_u_conj_line_1436;
2248  static PyObject *__pyx_n_s_copy;
2249  static PyObject *__pyx_n_s_cos;
2250  static PyObject *__pyx_kp_u_cos_line_1602;
2251  static PyObject *__pyx_n_s_cosh;
2252  static PyObject *__pyx_kp_u_cosh_line_1640;
2253  static PyObject *__pyx_n_s_doctest;
2254  static PyObject *__pyx_n_s_e;
2255  static PyObject *__pyx_kp_u_e_line_1887;
2256  static PyObject *__pyx_n_s_even;
2257  static PyObject *__pyx_kp_u_even_line_1388;
2258  static PyObject *__pyx_n_s_exp;
2259  static PyObject *__pyx_kp_u_exp_line_1565;
2260  static PyObject *__pyx_n_s_fill;
2261  static PyObject *__pyx_n_s_frm;
2262  static PyObject *__pyx_kp_s_from;
2263  static PyObject *__pyx_n_s_getstate;
2264  static PyObject *__pyx_n_s_grade;
2265  static PyObject *__pyx_n_s_i;
2266  static PyObject *__pyx_kp_u_imag_line_1366;
2267  static PyObject *__pyx_n_s_import;
2268  static PyObject *__pyx_n_s_index_set;
2269  static PyObject *__pyx_kp_u_index_set___and___line_269;
2270  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2271  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2272  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2273  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2274  static PyObject *__pyx_n_s_index_set___iter;
2275  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2276  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2277  static PyObject *__pyx_kp_u_index_set___or___line_291;
2278  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2279  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2280  static PyObject *__pyx_kp_u_index_set___str___line_393;
2281  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2282  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2283  static PyObject *__pyx_kp_u_index_set_count_line_313;
2284  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2285  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2286  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2287  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2288  static PyObject *__pyx_kp_u_index_set_max_line_349;
2289  static PyObject *__pyx_kp_u_index_set_min_line_340;
2290  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2291  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2292  static PyObject *__pyx_n_s_inv;
2293  static PyObject *__pyx_kp_u_inv_line_1329;
2294  static PyObject *__pyx_kp_s_invalid;
2295  static PyObject *__pyx_kp_s_invalid_string;
2296  static PyObject *__pyx_n_s_involute;
2297  static PyObject *__pyx_kp_u_involute_line_1406;
2298  static PyObject *__pyx_n_s_ist;
2299  static PyObject *__pyx_n_s_istpq;
2300  static PyObject *__pyx_kp_u_istpq_line_1900;
2301  static PyObject *__pyx_n_s_iter;
2302  static PyObject *__pyx_n_s_ixt;
2303  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2304  static PyObject *__pyx_n_s_lhs;
2305  static PyObject *__pyx_n_s_log;
2306  static PyObject *__pyx_kp_u_log_line_1579;
2307  static PyObject *__pyx_n_s_m;
2308  static PyObject *__pyx_n_s_main;
2309  static PyObject *__pyx_n_s_math;
2310  static PyObject *__pyx_n_s_max;
2311  static PyObject *__pyx_kp_u_max_abs_line_1482;
2312  static PyObject *__pyx_kp_u_max_pos_line_511;
2313  static PyObject *__pyx_n_s_min;
2314  static PyObject *__pyx_kp_u_min_neg_line_502;
2315  static PyObject *__pyx_n_s_name;
2316  static PyObject *__pyx_n_s_nbar3;
2317  static PyObject *__pyx_n_s_ninf3;
2318  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2319  static PyObject *__pyx_n_s_norm;
2320  static PyObject *__pyx_kp_u_norm_line_1462;
2321  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2322  static PyObject *__pyx_n_s_numbers;
2323  static PyObject *__pyx_n_s_obj;
2324  static PyObject *__pyx_n_s_odd;
2325  static PyObject *__pyx_kp_u_odd_line_1397;
2326  static PyObject *__pyx_n_s_other;
2327  static PyObject *__pyx_n_s_outer_pow;
2328  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2329  static PyObject *__pyx_n_s_p;
2330  static PyObject *__pyx_n_s_pi;
2331  static PyObject *__pyx_n_s_pow;
2332  static PyObject *__pyx_kp_u_pow_line_1494;
2333  static PyObject *__pyx_n_s_pure;
2334  static PyObject *__pyx_kp_u_pure_line_1377;
2335  static PyObject *__pyx_n_s_pyx_vtable;
2336  static PyObject *__pyx_n_s_q;
2337  static PyObject *__pyx_n_s_quad;
2338  static PyObject *__pyx_kp_u_quad_line_1451;
2339  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2340  static PyObject *__pyx_n_s_range;
2341  static PyObject *__pyx_kp_u_real_line_1355;
2342  static PyObject *__pyx_n_s_reduce;
2343  static PyObject *__pyx_n_s_reduce_cython;
2344  static PyObject *__pyx_n_s_reduce_ex;
2345  static PyObject *__pyx_n_s_reverse;
2346  static PyObject *__pyx_kp_u_reverse_line_1421;
2347  static PyObject *__pyx_n_s_rhs;
2348  static PyObject *__pyx_n_s_scalar;
2349  static PyObject *__pyx_kp_u_scalar_line_1344;
2350  static PyObject *__pyx_n_s_send;
2351  static PyObject *__pyx_n_s_setstate;
2352  static PyObject *__pyx_n_s_setstate_cython;
2353  static PyObject *__pyx_n_s_sin;
2354  static PyObject *__pyx_kp_u_sin_line_1679;
2355  static PyObject *__pyx_n_s_sinh;
2356  static PyObject *__pyx_kp_u_sinh_line_1719;
2357  static PyObject *__pyx_n_s_sqrt;
2358  static PyObject *__pyx_kp_u_sqrt_line_1542;
2359  static PyObject *__pyx_n_s_tan;
2360  static PyObject *__pyx_kp_u_tan_line_1752;
2361  static PyObject *__pyx_n_s_tanh;
2362  static PyObject *__pyx_kp_u_tanh_line_1786;
2363  static PyObject *__pyx_n_s_tau;
2364  static PyObject *__pyx_n_s_test;
2365  static PyObject *__pyx_n_s_test_2;
2366  static PyObject *__pyx_n_s_testmod;
2367  static PyObject *__pyx_n_s_throw;
2368  static PyObject *__pyx_kp_s_to_frame;
2369  static PyObject *__pyx_kp_s_using;
2370  static PyObject *__pyx_kp_s_using_invalid;
2371  static PyObject *__pyx_kp_s_value;
2372  static PyObject *__pyx_n_s_version;
2373  static PyObject *__pyx_n_s_xrange;
2374 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2375 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2376 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2377 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 */
2378 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 */
2379 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2380 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2381 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2382 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2383 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2384 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2385 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2386 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2387 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2388 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2389 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2390 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2391 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2392 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2393 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2394 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2395 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2396 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2397 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2398 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2399 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2400 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 */
2401 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2402 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2403 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2404 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2405 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2406 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 */
2407 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2408 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 */
2409 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2410 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2411 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 */
2412 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2413 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2414 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2415 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2416 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2417 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2418 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2419 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2420 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2421 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2422 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2423 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2424 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2425 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2426 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2427 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2428 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2429 #endif
2430 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2431 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2432 #endif
2433 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2434 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2435 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2436 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2437 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2438 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2439 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2440 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2441 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2442 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2443 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2444 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2445 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2446 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2447 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2448 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2449 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2458 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 */
2459 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2460 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2461 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2464 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2465 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2466 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2470 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2476 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2477 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2478 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2481 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2482 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2492 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 */
2493 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2494 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2497 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2498 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2499 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2500 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2501 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2502 static PyObject *__pyx_float_0_0;
2503 static PyObject *__pyx_float_1_0;
2504 static PyObject *__pyx_float_2_0;
2505 static PyObject *__pyx_float_8_0;
2506 static PyObject *__pyx_int_0;
2507 static PyObject *__pyx_int_1;
2508 static PyObject *__pyx_int_4;
2509 static PyObject *__pyx_int_neg_1;
2510 static PyObject *__pyx_tuple__3;
2511 static PyObject *__pyx_tuple__4;
2512 static PyObject *__pyx_tuple__10;
2513 static PyObject *__pyx_tuple__11;
2514 static PyObject *__pyx_tuple__12;
2515 static PyObject *__pyx_tuple__15;
2516 static PyObject *__pyx_tuple__16;
2517 static PyObject *__pyx_tuple__18;
2518 static PyObject *__pyx_tuple__20;
2519 static PyObject *__pyx_tuple__21;
2520 static PyObject *__pyx_tuple__22;
2521 static PyObject *__pyx_codeobj__13;
2522 static PyObject *__pyx_codeobj__14;
2523 static PyObject *__pyx_codeobj__17;
2524 static PyObject *__pyx_codeobj__19;
2525 static PyObject *__pyx_codeobj__23;
2526 /* Late includes */
2527 
2528 /* "PyClical.pyx":39
2529  * cdef class index_set
2530  *
2531  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2532  * """
2533  * Return the C++ IndexSet instance wrapped by index_set(obj).
2534  */
2535 
2536 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2537  IndexSet __pyx_r;
2538  __Pyx_RefNannyDeclarations
2539  PyObject *__pyx_t_1 = NULL;
2540  __Pyx_RefNannySetupContext("toIndexSet", 0);
2541 
2542  /* "PyClical.pyx":43
2543  * Return the C++ IndexSet instance wrapped by index_set(obj).
2544  * """
2545  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2546  *
2547  * cdef class index_set:
2548  */
2549  __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)
2550  __Pyx_GOTREF(__pyx_t_1);
2551  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2552  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2553  goto __pyx_L0;
2554 
2555  /* "PyClical.pyx":39
2556  * cdef class index_set
2557  *
2558  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2559  * """
2560  * Return the C++ IndexSet instance wrapped by index_set(obj).
2561  */
2562 
2563  /* function exit code */
2564  __pyx_L1_error:;
2565  __Pyx_XDECREF(__pyx_t_1);
2566  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2567  __Pyx_pretend_to_initialize(&__pyx_r);
2568  __pyx_L0:;
2569  __Pyx_RefNannyFinishContext();
2570  return __pyx_r;
2571 }
2572 
2573 /* "PyClical.pyx":51
2574  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2575  *
2576  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2577  * """
2578  * Wrap an instance of the C++ class IndexSet.
2579  */
2580 
2581 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2582  PyObject *__pyx_r = NULL;
2583  __Pyx_RefNannyDeclarations
2584  __Pyx_RefNannySetupContext("wrap", 0);
2585 
2586  /* "PyClical.pyx":55
2587  * Wrap an instance of the C++ class IndexSet.
2588  * """
2589  * self.instance[0] = other # <<<<<<<<<<<<<<
2590  * return self
2591  *
2592  */
2593  (__pyx_v_self->instance[0]) = __pyx_v_other;
2594 
2595  /* "PyClical.pyx":56
2596  * """
2597  * self.instance[0] = other
2598  * return self # <<<<<<<<<<<<<<
2599  *
2600  * cdef inline IndexSet unwrap(index_set self):
2601  */
2602  __Pyx_XDECREF(__pyx_r);
2603  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2604  __pyx_r = ((PyObject *)__pyx_v_self);
2605  goto __pyx_L0;
2606 
2607  /* "PyClical.pyx":51
2608  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2609  *
2610  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2611  * """
2612  * Wrap an instance of the C++ class IndexSet.
2613  */
2614 
2615  /* function exit code */
2616  __pyx_L0:;
2617  __Pyx_XGIVEREF(__pyx_r);
2618  __Pyx_RefNannyFinishContext();
2619  return __pyx_r;
2620 }
2621 
2622 /* "PyClical.pyx":58
2623  * return self
2624  *
2625  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2626  * """
2627  * Return the wrapped C++ IndexSet instance.
2628  */
2629 
2630 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2631  IndexSet __pyx_r;
2632  __Pyx_RefNannyDeclarations
2633  __Pyx_RefNannySetupContext("unwrap", 0);
2634 
2635  /* "PyClical.pyx":62
2636  * Return the wrapped C++ IndexSet instance.
2637  * """
2638  * return self.instance[0] # <<<<<<<<<<<<<<
2639  *
2640  * cpdef copy(index_set self):
2641  */
2642  __pyx_r = (__pyx_v_self->instance[0]);
2643  goto __pyx_L0;
2644 
2645  /* "PyClical.pyx":58
2646  * return self
2647  *
2648  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2649  * """
2650  * Return the wrapped C++ IndexSet instance.
2651  */
2652 
2653  /* function exit code */
2654  __pyx_L0:;
2655  __Pyx_RefNannyFinishContext();
2656  return __pyx_r;
2657 }
2658 
2659 /* "PyClical.pyx":64
2660  * return self.instance[0]
2661  *
2662  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2663  * """
2664  * Copy this index_set object.
2665  */
2666 
2667 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2668 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2669  PyObject *__pyx_r = NULL;
2670  __Pyx_RefNannyDeclarations
2671  PyObject *__pyx_t_1 = NULL;
2672  PyObject *__pyx_t_2 = NULL;
2673  PyObject *__pyx_t_3 = NULL;
2674  PyObject *__pyx_t_4 = NULL;
2675  __Pyx_RefNannySetupContext("copy", 0);
2676  /* Check if called by wrapper */
2677  if (unlikely(__pyx_skip_dispatch)) ;
2678  /* Check if overridden in Python */
2679  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)))) {
2680  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2681  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2682  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2683  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2684  #endif
2685  __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)
2686  __Pyx_GOTREF(__pyx_t_1);
2687  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2688  __Pyx_XDECREF(__pyx_r);
2689  __Pyx_INCREF(__pyx_t_1);
2690  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2691  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2692  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2693  if (likely(__pyx_t_4)) {
2694  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2695  __Pyx_INCREF(__pyx_t_4);
2696  __Pyx_INCREF(function);
2697  __Pyx_DECREF_SET(__pyx_t_3, function);
2698  }
2699  }
2700  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2701  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2702  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2703  __Pyx_GOTREF(__pyx_t_2);
2704  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2705  __pyx_r = __pyx_t_2;
2706  __pyx_t_2 = 0;
2707  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2708  goto __pyx_L0;
2709  }
2710  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2711  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2712  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2713  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2714  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2715  }
2716  #endif
2717  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2718  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2719  }
2720  #endif
2721  }
2722 
2723  /* "PyClical.pyx":71
2724  * {1}
2725  * """
2726  * return index_set(self) # <<<<<<<<<<<<<<
2727  *
2728  * def __cinit__(self, other = 0):
2729  */
2730  __Pyx_XDECREF(__pyx_r);
2731  __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)
2732  __Pyx_GOTREF(__pyx_t_1);
2733  __pyx_r = __pyx_t_1;
2734  __pyx_t_1 = 0;
2735  goto __pyx_L0;
2736 
2737  /* "PyClical.pyx":64
2738  * return self.instance[0]
2739  *
2740  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2741  * """
2742  * Copy this index_set object.
2743  */
2744 
2745  /* function exit code */
2746  __pyx_L1_error:;
2747  __Pyx_XDECREF(__pyx_t_1);
2748  __Pyx_XDECREF(__pyx_t_2);
2749  __Pyx_XDECREF(__pyx_t_3);
2750  __Pyx_XDECREF(__pyx_t_4);
2751  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2752  __pyx_r = 0;
2753  __pyx_L0:;
2754  __Pyx_XGIVEREF(__pyx_r);
2755  __Pyx_RefNannyFinishContext();
2756  return __pyx_r;
2757 }
2758 
2759 /* Python wrapper */
2760 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2761 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 ";
2762 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2763  PyObject *__pyx_r = 0;
2764  __Pyx_RefNannyDeclarations
2765  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2766  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2767 
2768  /* function exit code */
2769  __Pyx_RefNannyFinishContext();
2770  return __pyx_r;
2771 }
2772 
2773 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2774  PyObject *__pyx_r = NULL;
2775  __Pyx_RefNannyDeclarations
2776  PyObject *__pyx_t_1 = NULL;
2777  __Pyx_RefNannySetupContext("copy", 0);
2778  __Pyx_XDECREF(__pyx_r);
2779  __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)
2780  __Pyx_GOTREF(__pyx_t_1);
2781  __pyx_r = __pyx_t_1;
2782  __pyx_t_1 = 0;
2783  goto __pyx_L0;
2784 
2785  /* function exit code */
2786  __pyx_L1_error:;
2787  __Pyx_XDECREF(__pyx_t_1);
2788  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2789  __pyx_r = NULL;
2790  __pyx_L0:;
2791  __Pyx_XGIVEREF(__pyx_r);
2792  __Pyx_RefNannyFinishContext();
2793  return __pyx_r;
2794 }
2795 
2796 /* "PyClical.pyx":73
2797  * return index_set(self)
2798  *
2799  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2800  * """
2801  * Construct an object of type index_set.
2802  */
2803 
2804 /* Python wrapper */
2805 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2806 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2807  PyObject *__pyx_v_other = 0;
2808  int __pyx_r;
2809  __Pyx_RefNannyDeclarations
2810  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2811  {
2812  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2813  PyObject* values[1] = {0};
2814  values[0] = ((PyObject *)__pyx_int_0);
2815  if (unlikely(__pyx_kwds)) {
2816  Py_ssize_t kw_args;
2817  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2818  switch (pos_args) {
2819  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2820  CYTHON_FALLTHROUGH;
2821  case 0: break;
2822  default: goto __pyx_L5_argtuple_error;
2823  }
2824  kw_args = PyDict_Size(__pyx_kwds);
2825  switch (pos_args) {
2826  case 0:
2827  if (kw_args > 0) {
2828  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2829  if (value) { values[0] = value; kw_args--; }
2830  }
2831  }
2832  if (unlikely(kw_args > 0)) {
2833  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2834  }
2835  } else {
2836  switch (PyTuple_GET_SIZE(__pyx_args)) {
2837  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2838  CYTHON_FALLTHROUGH;
2839  case 0: break;
2840  default: goto __pyx_L5_argtuple_error;
2841  }
2842  }
2843  __pyx_v_other = values[0];
2844  }
2845  goto __pyx_L4_argument_unpacking_done;
2846  __pyx_L5_argtuple_error:;
2847  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2848  __pyx_L3_error:;
2849  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2850  __Pyx_RefNannyFinishContext();
2851  return -1;
2852  __pyx_L4_argument_unpacking_done:;
2853  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2854 
2855  /* function exit code */
2856  __Pyx_RefNannyFinishContext();
2857  return __pyx_r;
2858 }
2859 
2860 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2861  PyObject *__pyx_v_error_msg_prefix = NULL;
2862  PyObject *__pyx_v_idx = NULL;
2863  int __pyx_r;
2864  __Pyx_RefNannyDeclarations
2865  int __pyx_t_1;
2866  int __pyx_t_2;
2867  IndexSet *__pyx_t_3;
2868  PyObject *__pyx_t_4 = NULL;
2869  PyObject *__pyx_t_5 = NULL;
2870  int __pyx_t_6;
2871  int __pyx_t_7;
2872  PyObject *__pyx_t_8 = NULL;
2873  PyObject *__pyx_t_9 = NULL;
2874  PyObject *__pyx_t_10 = NULL;
2875  Py_ssize_t __pyx_t_11;
2876  PyObject *(*__pyx_t_12)(PyObject *);
2877  PyObject *__pyx_t_13 = NULL;
2878  PyObject *__pyx_t_14 = NULL;
2879  PyObject *__pyx_t_15 = NULL;
2880  PyObject *__pyx_t_16 = NULL;
2881  char *__pyx_t_17;
2882  __Pyx_RefNannySetupContext("__cinit__", 0);
2883 
2884  /* "PyClical.pyx":92
2885  * {}
2886  * """
2887  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2888  * if isinstance(other, index_set):
2889  * self.instance = new IndexSet((<index_set>other).unwrap())
2890  */
2891  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2892  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2893 
2894  /* "PyClical.pyx":93
2895  * """
2896  * error_msg_prefix = "Cannot initialize index_set object from"
2897  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2898  * self.instance = new IndexSet((<index_set>other).unwrap())
2899  * elif isinstance(other, numbers.Integral):
2900  */
2901  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2902  __pyx_t_2 = (__pyx_t_1 != 0);
2903  if (__pyx_t_2) {
2904 
2905  /* "PyClical.pyx":94
2906  * error_msg_prefix = "Cannot initialize index_set object from"
2907  * if isinstance(other, index_set):
2908  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2909  * elif isinstance(other, numbers.Integral):
2910  * self.instance = new IndexSet(<int>other)
2911  */
2912  try {
2913  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2914  } catch(...) {
2915  __Pyx_CppExn2PyErr();
2916  __PYX_ERR(0, 94, __pyx_L1_error)
2917  }
2918  __pyx_v_self->instance = __pyx_t_3;
2919 
2920  /* "PyClical.pyx":93
2921  * """
2922  * error_msg_prefix = "Cannot initialize index_set object from"
2923  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2924  * self.instance = new IndexSet((<index_set>other).unwrap())
2925  * elif isinstance(other, numbers.Integral):
2926  */
2927  goto __pyx_L3;
2928  }
2929 
2930  /* "PyClical.pyx":95
2931  * if isinstance(other, index_set):
2932  * self.instance = new IndexSet((<index_set>other).unwrap())
2933  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2934  * self.instance = new IndexSet(<int>other)
2935  * elif isinstance(other, (set, frozenset)):
2936  */
2937  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2938  __Pyx_GOTREF(__pyx_t_4);
2939  __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)
2940  __Pyx_GOTREF(__pyx_t_5);
2941  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2942  __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)
2943  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2944  __pyx_t_1 = (__pyx_t_2 != 0);
2945  if (__pyx_t_1) {
2946 
2947  /* "PyClical.pyx":96
2948  * self.instance = new IndexSet((<index_set>other).unwrap())
2949  * elif isinstance(other, numbers.Integral):
2950  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2951  * elif isinstance(other, (set, frozenset)):
2952  * try:
2953  */
2954  __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)
2955  try {
2956  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2957  } catch(...) {
2958  __Pyx_CppExn2PyErr();
2959  __PYX_ERR(0, 96, __pyx_L1_error)
2960  }
2961  __pyx_v_self->instance = __pyx_t_3;
2962 
2963  /* "PyClical.pyx":95
2964  * if isinstance(other, index_set):
2965  * self.instance = new IndexSet((<index_set>other).unwrap())
2966  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2967  * self.instance = new IndexSet(<int>other)
2968  * elif isinstance(other, (set, frozenset)):
2969  */
2970  goto __pyx_L3;
2971  }
2972 
2973  /* "PyClical.pyx":97
2974  * elif isinstance(other, numbers.Integral):
2975  * self.instance = new IndexSet(<int>other)
2976  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2977  * try:
2978  * self.instance = new IndexSet()
2979  */
2980  __pyx_t_2 = PySet_Check(__pyx_v_other);
2981  __pyx_t_7 = (__pyx_t_2 != 0);
2982  if (!__pyx_t_7) {
2983  } else {
2984  __pyx_t_1 = __pyx_t_7;
2985  goto __pyx_L4_bool_binop_done;
2986  }
2987  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2988  __pyx_t_2 = (__pyx_t_7 != 0);
2989  __pyx_t_1 = __pyx_t_2;
2990  __pyx_L4_bool_binop_done:;
2991  __pyx_t_2 = (__pyx_t_1 != 0);
2992  if (__pyx_t_2) {
2993 
2994  /* "PyClical.pyx":98
2995  * self.instance = new IndexSet(<int>other)
2996  * elif isinstance(other, (set, frozenset)):
2997  * try: # <<<<<<<<<<<<<<
2998  * self.instance = new IndexSet()
2999  * for idx in other:
3000  */
3001  {
3002  __Pyx_PyThreadState_declare
3003  __Pyx_PyThreadState_assign
3004  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3005  __Pyx_XGOTREF(__pyx_t_8);
3006  __Pyx_XGOTREF(__pyx_t_9);
3007  __Pyx_XGOTREF(__pyx_t_10);
3008  /*try:*/ {
3009 
3010  /* "PyClical.pyx":99
3011  * elif isinstance(other, (set, frozenset)):
3012  * try:
3013  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3014  * for idx in other:
3015  * self[idx] = True
3016  */
3017  __pyx_t_3 = new IndexSet();
3018  __pyx_v_self->instance = __pyx_t_3;
3019 
3020  /* "PyClical.pyx":100
3021  * try:
3022  * self.instance = new IndexSet()
3023  * for idx in other: # <<<<<<<<<<<<<<
3024  * self[idx] = True
3025  * except IndexError:
3026  */
3027  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3028  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3029  __pyx_t_12 = NULL;
3030  } else {
3031  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
3032  __Pyx_GOTREF(__pyx_t_5);
3033  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
3034  }
3035  for (;;) {
3036  if (likely(!__pyx_t_12)) {
3037  if (likely(PyList_CheckExact(__pyx_t_5))) {
3038  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3039  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3040  __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)
3041  #else
3042  __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)
3043  __Pyx_GOTREF(__pyx_t_4);
3044  #endif
3045  } else {
3046  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3047  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3048  __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)
3049  #else
3050  __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)
3051  __Pyx_GOTREF(__pyx_t_4);
3052  #endif
3053  }
3054  } else {
3055  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3056  if (unlikely(!__pyx_t_4)) {
3057  PyObject* exc_type = PyErr_Occurred();
3058  if (exc_type) {
3059  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3060  else __PYX_ERR(0, 100, __pyx_L6_error)
3061  }
3062  break;
3063  }
3064  __Pyx_GOTREF(__pyx_t_4);
3065  }
3066  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3067  __pyx_t_4 = 0;
3068 
3069  /* "PyClical.pyx":101
3070  * self.instance = new IndexSet()
3071  * for idx in other:
3072  * self[idx] = True # <<<<<<<<<<<<<<
3073  * except IndexError:
3074  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3075  */
3076  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
3077 
3078  /* "PyClical.pyx":100
3079  * try:
3080  * self.instance = new IndexSet()
3081  * for idx in other: # <<<<<<<<<<<<<<
3082  * self[idx] = True
3083  * except IndexError:
3084  */
3085  }
3086  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3087 
3088  /* "PyClical.pyx":98
3089  * self.instance = new IndexSet(<int>other)
3090  * elif isinstance(other, (set, frozenset)):
3091  * try: # <<<<<<<<<<<<<<
3092  * self.instance = new IndexSet()
3093  * for idx in other:
3094  */
3095  }
3096  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3097  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3098  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3099  goto __pyx_L11_try_end;
3100  __pyx_L6_error:;
3101  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3102  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3103 
3104  /* "PyClical.pyx":102
3105  * for idx in other:
3106  * self[idx] = True
3107  * except IndexError: # <<<<<<<<<<<<<<
3108  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3109  * except (RuntimeError, TypeError):
3110  */
3111  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3112  if (__pyx_t_6) {
3113  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3114  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
3115  __Pyx_GOTREF(__pyx_t_5);
3116  __Pyx_GOTREF(__pyx_t_4);
3117  __Pyx_GOTREF(__pyx_t_13);
3118 
3119  /* "PyClical.pyx":103
3120  * self[idx] = True
3121  * except IndexError:
3122  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3123  * except (RuntimeError, TypeError):
3124  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3125  */
3126  __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)
3127  __Pyx_GOTREF(__pyx_t_14);
3128  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3129  __Pyx_GOTREF(__pyx_t_15);
3130  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3131  __Pyx_GOTREF(__pyx_t_16);
3132  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3133  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3134  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3135  __Pyx_GOTREF(__pyx_t_15);
3136  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3137  __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)
3138  __Pyx_GOTREF(__pyx_t_16);
3139  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3140  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3141  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3142  __PYX_ERR(0, 103, __pyx_L8_except_error)
3143  }
3144 
3145  /* "PyClical.pyx":104
3146  * except IndexError:
3147  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3148  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3149  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3150  * elif isinstance(other, str):
3151  */
3152  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3153  if (__pyx_t_6) {
3154  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3155  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3156  __Pyx_GOTREF(__pyx_t_13);
3157  __Pyx_GOTREF(__pyx_t_4);
3158  __Pyx_GOTREF(__pyx_t_5);
3159 
3160  /* "PyClical.pyx":105
3161  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3162  * except (RuntimeError, TypeError):
3163  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3164  * elif isinstance(other, str):
3165  * try:
3166  */
3167  __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)
3168  __Pyx_GOTREF(__pyx_t_16);
3169  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3170  __Pyx_GOTREF(__pyx_t_15);
3171  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3172  __Pyx_GOTREF(__pyx_t_14);
3173  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3174  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3175  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3176  __Pyx_GOTREF(__pyx_t_15);
3177  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3178  __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)
3179  __Pyx_GOTREF(__pyx_t_14);
3180  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3181  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3182  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3183  __PYX_ERR(0, 105, __pyx_L8_except_error)
3184  }
3185  goto __pyx_L8_except_error;
3186  __pyx_L8_except_error:;
3187 
3188  /* "PyClical.pyx":98
3189  * self.instance = new IndexSet(<int>other)
3190  * elif isinstance(other, (set, frozenset)):
3191  * try: # <<<<<<<<<<<<<<
3192  * self.instance = new IndexSet()
3193  * for idx in other:
3194  */
3195  __Pyx_XGIVEREF(__pyx_t_8);
3196  __Pyx_XGIVEREF(__pyx_t_9);
3197  __Pyx_XGIVEREF(__pyx_t_10);
3198  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3199  goto __pyx_L1_error;
3200  __pyx_L11_try_end:;
3201  }
3202 
3203  /* "PyClical.pyx":97
3204  * elif isinstance(other, numbers.Integral):
3205  * self.instance = new IndexSet(<int>other)
3206  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3207  * try:
3208  * self.instance = new IndexSet()
3209  */
3210  goto __pyx_L3;
3211  }
3212 
3213  /* "PyClical.pyx":106
3214  * except (RuntimeError, TypeError):
3215  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3216  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3217  * try:
3218  * self.instance = new IndexSet(<char *>other)
3219  */
3220  __pyx_t_2 = PyString_Check(__pyx_v_other);
3221  __pyx_t_1 = (__pyx_t_2 != 0);
3222  if (likely(__pyx_t_1)) {
3223 
3224  /* "PyClical.pyx":107
3225  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3226  * elif isinstance(other, str):
3227  * try: # <<<<<<<<<<<<<<
3228  * self.instance = new IndexSet(<char *>other)
3229  * except RuntimeError:
3230  */
3231  {
3232  __Pyx_PyThreadState_declare
3233  __Pyx_PyThreadState_assign
3234  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3235  __Pyx_XGOTREF(__pyx_t_10);
3236  __Pyx_XGOTREF(__pyx_t_9);
3237  __Pyx_XGOTREF(__pyx_t_8);
3238  /*try:*/ {
3239 
3240  /* "PyClical.pyx":108
3241  * elif isinstance(other, str):
3242  * try:
3243  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3244  * except RuntimeError:
3245  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3246  */
3247  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3248  try {
3249  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3250  } catch(...) {
3251  __Pyx_CppExn2PyErr();
3252  __PYX_ERR(0, 108, __pyx_L18_error)
3253  }
3254  __pyx_v_self->instance = __pyx_t_3;
3255 
3256  /* "PyClical.pyx":107
3257  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3258  * elif isinstance(other, str):
3259  * try: # <<<<<<<<<<<<<<
3260  * self.instance = new IndexSet(<char *>other)
3261  * except RuntimeError:
3262  */
3263  }
3264  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3265  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3266  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3267  goto __pyx_L23_try_end;
3268  __pyx_L18_error:;
3269  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3270  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3271  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3272  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3273  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3274  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3275 
3276  /* "PyClical.pyx":109
3277  * try:
3278  * self.instance = new IndexSet(<char *>other)
3279  * except RuntimeError: # <<<<<<<<<<<<<<
3280  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3281  * else:
3282  */
3283  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3284  if (__pyx_t_6) {
3285  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3286  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3287  __Pyx_GOTREF(__pyx_t_5);
3288  __Pyx_GOTREF(__pyx_t_4);
3289  __Pyx_GOTREF(__pyx_t_13);
3290 
3291  /* "PyClical.pyx":110
3292  * self.instance = new IndexSet(<char *>other)
3293  * except RuntimeError:
3294  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3295  * else:
3296  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3297  */
3298  __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)
3299  __Pyx_GOTREF(__pyx_t_14);
3300  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3301  __Pyx_GOTREF(__pyx_t_15);
3302  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3303  __Pyx_GOTREF(__pyx_t_16);
3304  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3305  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3306  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3307  __Pyx_GOTREF(__pyx_t_15);
3308  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3309  __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)
3310  __Pyx_GOTREF(__pyx_t_16);
3311  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3312  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3313  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3314  __PYX_ERR(0, 110, __pyx_L20_except_error)
3315  }
3316  goto __pyx_L20_except_error;
3317  __pyx_L20_except_error:;
3318 
3319  /* "PyClical.pyx":107
3320  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3321  * elif isinstance(other, str):
3322  * try: # <<<<<<<<<<<<<<
3323  * self.instance = new IndexSet(<char *>other)
3324  * except RuntimeError:
3325  */
3326  __Pyx_XGIVEREF(__pyx_t_10);
3327  __Pyx_XGIVEREF(__pyx_t_9);
3328  __Pyx_XGIVEREF(__pyx_t_8);
3329  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3330  goto __pyx_L1_error;
3331  __pyx_L23_try_end:;
3332  }
3333 
3334  /* "PyClical.pyx":106
3335  * except (RuntimeError, TypeError):
3336  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3337  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3338  * try:
3339  * self.instance = new IndexSet(<char *>other)
3340  */
3341  goto __pyx_L3;
3342  }
3343 
3344  /* "PyClical.pyx":112
3345  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3346  * else:
3347  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3348  *
3349  * def __dealloc__(self):
3350  */
3351  /*else*/ {
3352  __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)
3353  __Pyx_GOTREF(__pyx_t_13);
3354  __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)
3355  __Pyx_GOTREF(__pyx_t_4);
3356  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3357  __Pyx_GOTREF(__pyx_t_5);
3358  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3359  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3360  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3361  __Pyx_GOTREF(__pyx_t_4);
3362  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3363  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3364  __Pyx_GOTREF(__pyx_t_5);
3365  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3366  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3367  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3368  __PYX_ERR(0, 112, __pyx_L1_error)
3369  }
3370  __pyx_L3:;
3371 
3372  /* "PyClical.pyx":73
3373  * return index_set(self)
3374  *
3375  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3376  * """
3377  * Construct an object of type index_set.
3378  */
3379 
3380  /* function exit code */
3381  __pyx_r = 0;
3382  goto __pyx_L0;
3383  __pyx_L1_error:;
3384  __Pyx_XDECREF(__pyx_t_4);
3385  __Pyx_XDECREF(__pyx_t_5);
3386  __Pyx_XDECREF(__pyx_t_13);
3387  __Pyx_XDECREF(__pyx_t_14);
3388  __Pyx_XDECREF(__pyx_t_15);
3389  __Pyx_XDECREF(__pyx_t_16);
3390  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3391  __pyx_r = -1;
3392  __pyx_L0:;
3393  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3394  __Pyx_XDECREF(__pyx_v_idx);
3395  __Pyx_RefNannyFinishContext();
3396  return __pyx_r;
3397 }
3398 
3399 /* "PyClical.pyx":114
3400  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3401  *
3402  * def __dealloc__(self): # <<<<<<<<<<<<<<
3403  * """
3404  * Clean up by deallocating the instance of C++ class IndexSet.
3405  */
3406 
3407 /* Python wrapper */
3408 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3409 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3410  __Pyx_RefNannyDeclarations
3411  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3412  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3413 
3414  /* function exit code */
3415  __Pyx_RefNannyFinishContext();
3416 }
3417 
3418 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3419  __Pyx_RefNannyDeclarations
3420  __Pyx_RefNannySetupContext("__dealloc__", 0);
3421 
3422  /* "PyClical.pyx":118
3423  * Clean up by deallocating the instance of C++ class IndexSet.
3424  * """
3425  * del self.instance # <<<<<<<<<<<<<<
3426  *
3427  * def __richcmp__(lhs, rhs, int op):
3428  */
3429  delete __pyx_v_self->instance;
3430 
3431  /* "PyClical.pyx":114
3432  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3433  *
3434  * def __dealloc__(self): # <<<<<<<<<<<<<<
3435  * """
3436  * Clean up by deallocating the instance of C++ class IndexSet.
3437  */
3438 
3439  /* function exit code */
3440  __Pyx_RefNannyFinishContext();
3441 }
3442 
3443 /* "PyClical.pyx":120
3444  * del self.instance
3445  *
3446  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3447  * """
3448  * Compare two objects of class index_set.
3449  */
3450 
3451 /* Python wrapper */
3452 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3453 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3454  PyObject *__pyx_r = 0;
3455  __Pyx_RefNannyDeclarations
3456  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3457  __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));
3458 
3459  /* function exit code */
3460  __Pyx_RefNannyFinishContext();
3461  return __pyx_r;
3462 }
3463 
3464 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) {
3465  PyObject *__pyx_v_eq = NULL;
3466  PyObject *__pyx_v_lt = NULL;
3467  PyObject *__pyx_r = NULL;
3468  __Pyx_RefNannyDeclarations
3469  int __pyx_t_1;
3470  int __pyx_t_2;
3471  int __pyx_t_3;
3472  PyObject *__pyx_t_4 = NULL;
3473  __Pyx_RefNannySetupContext("__richcmp__", 0);
3474 
3475  /* "PyClical.pyx":141
3476  * False
3477  * """
3478  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3479  * eq = bool(lhs is rhs)
3480  * if op == 2: # ==
3481  */
3482  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3483  __pyx_t_3 = (__pyx_t_2 != 0);
3484  if (!__pyx_t_3) {
3485  } else {
3486  __pyx_t_1 = __pyx_t_3;
3487  goto __pyx_L4_bool_binop_done;
3488  }
3489  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3490  __pyx_t_2 = (__pyx_t_3 != 0);
3491  __pyx_t_1 = __pyx_t_2;
3492  __pyx_L4_bool_binop_done:;
3493  if (__pyx_t_1) {
3494 
3495  /* "PyClical.pyx":142
3496  * """
3497  * if (lhs is None) or (rhs is None):
3498  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3499  * if op == 2: # ==
3500  * return eq
3501  */
3502  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3503  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3504  __Pyx_GOTREF(__pyx_t_4);
3505  __pyx_v_eq = __pyx_t_4;
3506  __pyx_t_4 = 0;
3507 
3508  /* "PyClical.pyx":143
3509  * if (lhs is None) or (rhs is None):
3510  * eq = bool(lhs is rhs)
3511  * if op == 2: # == # <<<<<<<<<<<<<<
3512  * return eq
3513  * elif op == 3: # !=
3514  */
3515  switch (__pyx_v_op) {
3516  case 2:
3517 
3518  /* "PyClical.pyx":144
3519  * eq = bool(lhs is rhs)
3520  * if op == 2: # ==
3521  * return eq # <<<<<<<<<<<<<<
3522  * elif op == 3: # !=
3523  * return not eq
3524  */
3525  __Pyx_XDECREF(__pyx_r);
3526  __Pyx_INCREF(__pyx_v_eq);
3527  __pyx_r = __pyx_v_eq;
3528  goto __pyx_L0;
3529 
3530  /* "PyClical.pyx":143
3531  * if (lhs is None) or (rhs is None):
3532  * eq = bool(lhs is rhs)
3533  * if op == 2: # == # <<<<<<<<<<<<<<
3534  * return eq
3535  * elif op == 3: # !=
3536  */
3537  break;
3538  case 3:
3539 
3540  /* "PyClical.pyx":146
3541  * return eq
3542  * elif op == 3: # !=
3543  * return not eq # <<<<<<<<<<<<<<
3544  * else:
3545  * if op == 0: # <
3546  */
3547  __Pyx_XDECREF(__pyx_r);
3548  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3549  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3550  __Pyx_GOTREF(__pyx_t_4);
3551  __pyx_r = __pyx_t_4;
3552  __pyx_t_4 = 0;
3553  goto __pyx_L0;
3554 
3555  /* "PyClical.pyx":145
3556  * if op == 2: # ==
3557  * return eq
3558  * elif op == 3: # != # <<<<<<<<<<<<<<
3559  * return not eq
3560  * else:
3561  */
3562  break;
3563  default:
3564 
3565  /* "PyClical.pyx":148
3566  * return not eq
3567  * else:
3568  * if op == 0: # < # <<<<<<<<<<<<<<
3569  * return False
3570  * elif op == 1: # <=
3571  */
3572  switch (__pyx_v_op) {
3573  case 0:
3574 
3575  /* "PyClical.pyx":149
3576  * else:
3577  * if op == 0: # <
3578  * return False # <<<<<<<<<<<<<<
3579  * elif op == 1: # <=
3580  * return eq
3581  */
3582  __Pyx_XDECREF(__pyx_r);
3583  __Pyx_INCREF(Py_False);
3584  __pyx_r = Py_False;
3585  goto __pyx_L0;
3586 
3587  /* "PyClical.pyx":148
3588  * return not eq
3589  * else:
3590  * if op == 0: # < # <<<<<<<<<<<<<<
3591  * return False
3592  * elif op == 1: # <=
3593  */
3594  break;
3595  case 1:
3596 
3597  /* "PyClical.pyx":151
3598  * return False
3599  * elif op == 1: # <=
3600  * return eq # <<<<<<<<<<<<<<
3601  * elif op == 4: # >
3602  * return False
3603  */
3604  __Pyx_XDECREF(__pyx_r);
3605  __Pyx_INCREF(__pyx_v_eq);
3606  __pyx_r = __pyx_v_eq;
3607  goto __pyx_L0;
3608 
3609  /* "PyClical.pyx":150
3610  * if op == 0: # <
3611  * return False
3612  * elif op == 1: # <= # <<<<<<<<<<<<<<
3613  * return eq
3614  * elif op == 4: # >
3615  */
3616  break;
3617  case 4:
3618 
3619  /* "PyClical.pyx":153
3620  * return eq
3621  * elif op == 4: # >
3622  * return False # <<<<<<<<<<<<<<
3623  * elif op == 5: # >=
3624  * return eq
3625  */
3626  __Pyx_XDECREF(__pyx_r);
3627  __Pyx_INCREF(Py_False);
3628  __pyx_r = Py_False;
3629  goto __pyx_L0;
3630 
3631  /* "PyClical.pyx":152
3632  * elif op == 1: # <=
3633  * return eq
3634  * elif op == 4: # > # <<<<<<<<<<<<<<
3635  * return False
3636  * elif op == 5: # >=
3637  */
3638  break;
3639  case 5:
3640 
3641  /* "PyClical.pyx":155
3642  * return False
3643  * elif op == 5: # >=
3644  * return eq # <<<<<<<<<<<<<<
3645  * else:
3646  * return NotImplemented
3647  */
3648  __Pyx_XDECREF(__pyx_r);
3649  __Pyx_INCREF(__pyx_v_eq);
3650  __pyx_r = __pyx_v_eq;
3651  goto __pyx_L0;
3652 
3653  /* "PyClical.pyx":154
3654  * elif op == 4: # >
3655  * return False
3656  * elif op == 5: # >= # <<<<<<<<<<<<<<
3657  * return eq
3658  * else:
3659  */
3660  break;
3661  default:
3662 
3663  /* "PyClical.pyx":157
3664  * return eq
3665  * else:
3666  * return NotImplemented # <<<<<<<<<<<<<<
3667  * else:
3668  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3669  */
3670  __Pyx_XDECREF(__pyx_r);
3671  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3672  __pyx_r = __pyx_builtin_NotImplemented;
3673  goto __pyx_L0;
3674  break;
3675  }
3676  break;
3677  }
3678 
3679  /* "PyClical.pyx":141
3680  * False
3681  * """
3682  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3683  * eq = bool(lhs is rhs)
3684  * if op == 2: # ==
3685  */
3686  }
3687 
3688  /* "PyClical.pyx":159
3689  * return NotImplemented
3690  * else:
3691  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3692  * if op == 2: # ==
3693  * return eq
3694  */
3695  /*else*/ {
3696  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3697  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3698  __Pyx_GOTREF(__pyx_t_4);
3699  __pyx_v_eq = __pyx_t_4;
3700  __pyx_t_4 = 0;
3701 
3702  /* "PyClical.pyx":160
3703  * else:
3704  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3705  * if op == 2: # == # <<<<<<<<<<<<<<
3706  * return eq
3707  * elif op == 3: # !=
3708  */
3709  switch (__pyx_v_op) {
3710  case 2:
3711 
3712  /* "PyClical.pyx":161
3713  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3714  * if op == 2: # ==
3715  * return eq # <<<<<<<<<<<<<<
3716  * elif op == 3: # !=
3717  * return not eq
3718  */
3719  __Pyx_XDECREF(__pyx_r);
3720  __Pyx_INCREF(__pyx_v_eq);
3721  __pyx_r = __pyx_v_eq;
3722  goto __pyx_L0;
3723 
3724  /* "PyClical.pyx":160
3725  * else:
3726  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3727  * if op == 2: # == # <<<<<<<<<<<<<<
3728  * return eq
3729  * elif op == 3: # !=
3730  */
3731  break;
3732  case 3:
3733 
3734  /* "PyClical.pyx":163
3735  * return eq
3736  * elif op == 3: # !=
3737  * return not eq # <<<<<<<<<<<<<<
3738  * else:
3739  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3740  */
3741  __Pyx_XDECREF(__pyx_r);
3742  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3743  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3744  __Pyx_GOTREF(__pyx_t_4);
3745  __pyx_r = __pyx_t_4;
3746  __pyx_t_4 = 0;
3747  goto __pyx_L0;
3748 
3749  /* "PyClical.pyx":162
3750  * if op == 2: # ==
3751  * return eq
3752  * elif op == 3: # != # <<<<<<<<<<<<<<
3753  * return not eq
3754  * else:
3755  */
3756  break;
3757  default:
3758 
3759  /* "PyClical.pyx":165
3760  * return not eq
3761  * else:
3762  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3763  * if op == 0: # <
3764  * return lt
3765  */
3766  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3767  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3768  __Pyx_GOTREF(__pyx_t_4);
3769  __pyx_v_lt = __pyx_t_4;
3770  __pyx_t_4 = 0;
3771 
3772  /* "PyClical.pyx":166
3773  * else:
3774  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3775  * if op == 0: # < # <<<<<<<<<<<<<<
3776  * return lt
3777  * elif op == 1: # <=
3778  */
3779  switch (__pyx_v_op) {
3780  case 0:
3781 
3782  /* "PyClical.pyx":167
3783  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3784  * if op == 0: # <
3785  * return lt # <<<<<<<<<<<<<<
3786  * elif op == 1: # <=
3787  * return lt or eq
3788  */
3789  __Pyx_XDECREF(__pyx_r);
3790  __Pyx_INCREF(__pyx_v_lt);
3791  __pyx_r = __pyx_v_lt;
3792  goto __pyx_L0;
3793 
3794  /* "PyClical.pyx":166
3795  * else:
3796  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3797  * if op == 0: # < # <<<<<<<<<<<<<<
3798  * return lt
3799  * elif op == 1: # <=
3800  */
3801  break;
3802  case 1:
3803 
3804  /* "PyClical.pyx":169
3805  * return lt
3806  * elif op == 1: # <=
3807  * return lt or eq # <<<<<<<<<<<<<<
3808  * elif op == 4: # >
3809  * return not (lt or eq)
3810  */
3811  __Pyx_XDECREF(__pyx_r);
3812  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3813  if (!__pyx_t_1) {
3814  } else {
3815  __Pyx_INCREF(__pyx_v_lt);
3816  __pyx_t_4 = __pyx_v_lt;
3817  goto __pyx_L6_bool_binop_done;
3818  }
3819  __Pyx_INCREF(__pyx_v_eq);
3820  __pyx_t_4 = __pyx_v_eq;
3821  __pyx_L6_bool_binop_done:;
3822  __pyx_r = __pyx_t_4;
3823  __pyx_t_4 = 0;
3824  goto __pyx_L0;
3825 
3826  /* "PyClical.pyx":168
3827  * if op == 0: # <
3828  * return lt
3829  * elif op == 1: # <= # <<<<<<<<<<<<<<
3830  * return lt or eq
3831  * elif op == 4: # >
3832  */
3833  break;
3834  case 4:
3835 
3836  /* "PyClical.pyx":171
3837  * return lt or eq
3838  * elif op == 4: # >
3839  * return not (lt or eq) # <<<<<<<<<<<<<<
3840  * elif op == 5: # >=
3841  * return not lt
3842  */
3843  __Pyx_XDECREF(__pyx_r);
3844  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3845  if (!__pyx_t_2) {
3846  } else {
3847  __pyx_t_1 = __pyx_t_2;
3848  goto __pyx_L8_bool_binop_done;
3849  }
3850  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3851  __pyx_t_1 = __pyx_t_2;
3852  __pyx_L8_bool_binop_done:;
3853  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3854  __Pyx_GOTREF(__pyx_t_4);
3855  __pyx_r = __pyx_t_4;
3856  __pyx_t_4 = 0;
3857  goto __pyx_L0;
3858 
3859  /* "PyClical.pyx":170
3860  * elif op == 1: # <=
3861  * return lt or eq
3862  * elif op == 4: # > # <<<<<<<<<<<<<<
3863  * return not (lt or eq)
3864  * elif op == 5: # >=
3865  */
3866  break;
3867  case 5:
3868 
3869  /* "PyClical.pyx":173
3870  * return not (lt or eq)
3871  * elif op == 5: # >=
3872  * return not lt # <<<<<<<<<<<<<<
3873  * else:
3874  * return NotImplemented
3875  */
3876  __Pyx_XDECREF(__pyx_r);
3877  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3878  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3879  __Pyx_GOTREF(__pyx_t_4);
3880  __pyx_r = __pyx_t_4;
3881  __pyx_t_4 = 0;
3882  goto __pyx_L0;
3883 
3884  /* "PyClical.pyx":172
3885  * elif op == 4: # >
3886  * return not (lt or eq)
3887  * elif op == 5: # >= # <<<<<<<<<<<<<<
3888  * return not lt
3889  * else:
3890  */
3891  break;
3892  default:
3893 
3894  /* "PyClical.pyx":175
3895  * return not lt
3896  * else:
3897  * return NotImplemented # <<<<<<<<<<<<<<
3898  *
3899  * def __setitem__(self, idx, val):
3900  */
3901  __Pyx_XDECREF(__pyx_r);
3902  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3903  __pyx_r = __pyx_builtin_NotImplemented;
3904  goto __pyx_L0;
3905  break;
3906  }
3907  break;
3908  }
3909  }
3910 
3911  /* "PyClical.pyx":120
3912  * del self.instance
3913  *
3914  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3915  * """
3916  * Compare two objects of class index_set.
3917  */
3918 
3919  /* function exit code */
3920  __pyx_L1_error:;
3921  __Pyx_XDECREF(__pyx_t_4);
3922  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3923  __pyx_r = NULL;
3924  __pyx_L0:;
3925  __Pyx_XDECREF(__pyx_v_eq);
3926  __Pyx_XDECREF(__pyx_v_lt);
3927  __Pyx_XGIVEREF(__pyx_r);
3928  __Pyx_RefNannyFinishContext();
3929  return __pyx_r;
3930 }
3931 
3932 /* "PyClical.pyx":177
3933  * return NotImplemented
3934  *
3935  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3936  * """
3937  * Set the value of an index_set object at index idx to value val.
3938  */
3939 
3940 /* Python wrapper */
3941 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3942 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 ";
3943 #if CYTHON_COMPILING_IN_CPYTHON
3944 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3945 #endif
3946 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3947  int __pyx_r;
3948  __Pyx_RefNannyDeclarations
3949  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3950  __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));
3951 
3952  /* function exit code */
3953  __Pyx_RefNannyFinishContext();
3954  return __pyx_r;
3955 }
3956 
3957 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) {
3958  int __pyx_r;
3959  __Pyx_RefNannyDeclarations
3960  int __pyx_t_1;
3961  int __pyx_t_2;
3962  __Pyx_RefNannySetupContext("__setitem__", 0);
3963 
3964  /* "PyClical.pyx":186
3965  * {2}
3966  * """
3967  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3968  * return
3969  *
3970  */
3971  __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)
3972  __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)
3973  try {
3974  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3975  } catch(...) {
3976  __Pyx_CppExn2PyErr();
3977  __PYX_ERR(0, 186, __pyx_L1_error)
3978  }
3979 
3980  /* "PyClical.pyx":187
3981  * """
3982  * self.instance.set(idx, val)
3983  * return # <<<<<<<<<<<<<<
3984  *
3985  * def __getitem__(self, idx):
3986  */
3987  __pyx_r = 0;
3988  goto __pyx_L0;
3989 
3990  /* "PyClical.pyx":177
3991  * return NotImplemented
3992  *
3993  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3994  * """
3995  * Set the value of an index_set object at index idx to value val.
3996  */
3997 
3998  /* function exit code */
3999  __pyx_L1_error:;
4000  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4001  __pyx_r = -1;
4002  __pyx_L0:;
4003  __Pyx_RefNannyFinishContext();
4004  return __pyx_r;
4005 }
4006 
4007 /* "PyClical.pyx":189
4008  * return
4009  *
4010  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4011  * """
4012  * Get the value of an index_set object at an index.
4013  */
4014 
4015 /* Python wrapper */
4016 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4017 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 ";
4018 #if CYTHON_COMPILING_IN_CPYTHON
4019 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4020 #endif
4021 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4022  PyObject *__pyx_r = 0;
4023  __Pyx_RefNannyDeclarations
4024  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4025  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4026 
4027  /* function exit code */
4028  __Pyx_RefNannyFinishContext();
4029  return __pyx_r;
4030 }
4031 
4032 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4033  PyObject *__pyx_r = NULL;
4034  __Pyx_RefNannyDeclarations
4035  int __pyx_t_1;
4036  PyObject *__pyx_t_2 = NULL;
4037  __Pyx_RefNannySetupContext("__getitem__", 0);
4038 
4039  /* "PyClical.pyx":206
4040  * False
4041  * """
4042  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4043  *
4044  * def __contains__(self, idx):
4045  */
4046  __Pyx_XDECREF(__pyx_r);
4047  __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)
4048  __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)
4049  __Pyx_GOTREF(__pyx_t_2);
4050  __pyx_r = __pyx_t_2;
4051  __pyx_t_2 = 0;
4052  goto __pyx_L0;
4053 
4054  /* "PyClical.pyx":189
4055  * return
4056  *
4057  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4058  * """
4059  * Get the value of an index_set object at an index.
4060  */
4061 
4062  /* function exit code */
4063  __pyx_L1_error:;
4064  __Pyx_XDECREF(__pyx_t_2);
4065  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4066  __pyx_r = NULL;
4067  __pyx_L0:;
4068  __Pyx_XGIVEREF(__pyx_r);
4069  __Pyx_RefNannyFinishContext();
4070  return __pyx_r;
4071 }
4072 
4073 /* "PyClical.pyx":208
4074  * return self.instance.getitem(idx)
4075  *
4076  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4077  * """
4078  * Check that an index_set object contains the index idx: idx in self.
4079  */
4080 
4081 /* Python wrapper */
4082 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4083 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 ";
4084 #if CYTHON_COMPILING_IN_CPYTHON
4085 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4086 #endif
4087 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4088  int __pyx_r;
4089  __Pyx_RefNannyDeclarations
4090  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4091  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4092 
4093  /* function exit code */
4094  __Pyx_RefNannyFinishContext();
4095  return __pyx_r;
4096 }
4097 
4098 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4099  int __pyx_r;
4100  __Pyx_RefNannyDeclarations
4101  int __pyx_t_1;
4102  __Pyx_RefNannySetupContext("__contains__", 0);
4103 
4104  /* "PyClical.pyx":225
4105  * False
4106  * """
4107  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4108  *
4109  * def __iter__(self):
4110  */
4111  __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)
4112  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4113  goto __pyx_L0;
4114 
4115  /* "PyClical.pyx":208
4116  * return self.instance.getitem(idx)
4117  *
4118  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4119  * """
4120  * Check that an index_set object contains the index idx: idx in self.
4121  */
4122 
4123  /* function exit code */
4124  __pyx_L1_error:;
4125  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4126  __pyx_r = -1;
4127  __pyx_L0:;
4128  __Pyx_RefNannyFinishContext();
4129  return __pyx_r;
4130 }
4131 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4132 
4133 /* "PyClical.pyx":227
4134  * return self.instance.getitem(idx)
4135  *
4136  * def __iter__(self): # <<<<<<<<<<<<<<
4137  * """
4138  * Iterate over the indices of an index_set.
4139  */
4140 
4141 /* Python wrapper */
4142 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4143 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 ";
4144 #if CYTHON_COMPILING_IN_CPYTHON
4145 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4146 #endif
4147 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4148  PyObject *__pyx_r = 0;
4149  __Pyx_RefNannyDeclarations
4150  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4151  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4152 
4153  /* function exit code */
4154  __Pyx_RefNannyFinishContext();
4155  return __pyx_r;
4156 }
4157 
4158 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4159  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4160  PyObject *__pyx_r = NULL;
4161  __Pyx_RefNannyDeclarations
4162  __Pyx_RefNannySetupContext("__iter__", 0);
4163  __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);
4164  if (unlikely(!__pyx_cur_scope)) {
4165  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4166  __Pyx_INCREF(Py_None);
4167  __PYX_ERR(0, 227, __pyx_L1_error)
4168  } else {
4169  __Pyx_GOTREF(__pyx_cur_scope);
4170  }
4171  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4172  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4173  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4174  {
4175  __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)
4176  __Pyx_DECREF(__pyx_cur_scope);
4177  __Pyx_RefNannyFinishContext();
4178  return (PyObject *) gen;
4179  }
4180 
4181  /* function exit code */
4182  __pyx_L1_error:;
4183  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4184  __pyx_r = NULL;
4185  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4186  __Pyx_XGIVEREF(__pyx_r);
4187  __Pyx_RefNannyFinishContext();
4188  return __pyx_r;
4189 }
4190 
4191 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4192 {
4193  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4194  PyObject *__pyx_r = NULL;
4195  PyObject *__pyx_t_1 = NULL;
4196  PyObject *__pyx_t_2 = NULL;
4197  PyObject *__pyx_t_3 = NULL;
4198  PyObject *__pyx_t_4 = NULL;
4199  Py_ssize_t __pyx_t_5;
4200  PyObject *(*__pyx_t_6)(PyObject *);
4201  int __pyx_t_7;
4202  int __pyx_t_8;
4203  __Pyx_RefNannyDeclarations
4204  __Pyx_RefNannySetupContext("__iter__", 0);
4205  switch (__pyx_generator->resume_label) {
4206  case 0: goto __pyx_L3_first_run;
4207  case 1: goto __pyx_L7_resume_from_yield;
4208  default: /* CPython raises the right error here */
4209  __Pyx_RefNannyFinishContext();
4210  return NULL;
4211  }
4212  __pyx_L3_first_run:;
4213  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4214 
4215  /* "PyClical.pyx":234
4216  * -3 4 7
4217  * """
4218  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4219  * if idx in self:
4220  * yield idx
4221  */
4222  __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)
4223  __Pyx_GOTREF(__pyx_t_2);
4224  __pyx_t_3 = NULL;
4225  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4226  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4227  if (likely(__pyx_t_3)) {
4228  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4229  __Pyx_INCREF(__pyx_t_3);
4230  __Pyx_INCREF(function);
4231  __Pyx_DECREF_SET(__pyx_t_2, function);
4232  }
4233  }
4234  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4235  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4236  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4237  __Pyx_GOTREF(__pyx_t_1);
4238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4239  __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)
4240  __Pyx_GOTREF(__pyx_t_3);
4241  __pyx_t_4 = NULL;
4242  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4243  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4244  if (likely(__pyx_t_4)) {
4245  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4246  __Pyx_INCREF(__pyx_t_4);
4247  __Pyx_INCREF(function);
4248  __Pyx_DECREF_SET(__pyx_t_3, function);
4249  }
4250  }
4251  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4252  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4253  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4254  __Pyx_GOTREF(__pyx_t_2);
4255  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4256  __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)
4257  __Pyx_GOTREF(__pyx_t_3);
4258  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4259  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4260  __Pyx_GOTREF(__pyx_t_2);
4261  __Pyx_GIVEREF(__pyx_t_1);
4262  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4263  __Pyx_GIVEREF(__pyx_t_3);
4264  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4265  __pyx_t_1 = 0;
4266  __pyx_t_3 = 0;
4267  __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)
4268  __Pyx_GOTREF(__pyx_t_3);
4269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4270  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4271  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4272  __pyx_t_6 = NULL;
4273  } else {
4274  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4275  __Pyx_GOTREF(__pyx_t_2);
4276  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4277  }
4278  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4279  for (;;) {
4280  if (likely(!__pyx_t_6)) {
4281  if (likely(PyList_CheckExact(__pyx_t_2))) {
4282  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4283  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4284  __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)
4285  #else
4286  __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)
4287  __Pyx_GOTREF(__pyx_t_3);
4288  #endif
4289  } else {
4290  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4291  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4292  __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)
4293  #else
4294  __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)
4295  __Pyx_GOTREF(__pyx_t_3);
4296  #endif
4297  }
4298  } else {
4299  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4300  if (unlikely(!__pyx_t_3)) {
4301  PyObject* exc_type = PyErr_Occurred();
4302  if (exc_type) {
4303  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4304  else __PYX_ERR(0, 234, __pyx_L1_error)
4305  }
4306  break;
4307  }
4308  __Pyx_GOTREF(__pyx_t_3);
4309  }
4310  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4311  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4312  __Pyx_GIVEREF(__pyx_t_3);
4313  __pyx_t_3 = 0;
4314 
4315  /* "PyClical.pyx":235
4316  * """
4317  * for idx in range(self.min(), self.max()+1):
4318  * if idx in self: # <<<<<<<<<<<<<<
4319  * yield idx
4320  *
4321  */
4322  __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)
4323  __pyx_t_8 = (__pyx_t_7 != 0);
4324  if (__pyx_t_8) {
4325 
4326  /* "PyClical.pyx":236
4327  * for idx in range(self.min(), self.max()+1):
4328  * if idx in self:
4329  * yield idx # <<<<<<<<<<<<<<
4330  *
4331  * def __invert__(self):
4332  */
4333  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4334  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4335  __Pyx_XGIVEREF(__pyx_t_2);
4336  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4337  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4338  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4339  __Pyx_XGIVEREF(__pyx_r);
4340  __Pyx_RefNannyFinishContext();
4341  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4342  /* return from generator, yielding value */
4343  __pyx_generator->resume_label = 1;
4344  return __pyx_r;
4345  __pyx_L7_resume_from_yield:;
4346  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4347  __pyx_cur_scope->__pyx_t_0 = 0;
4348  __Pyx_XGOTREF(__pyx_t_2);
4349  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4350  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4351  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4352 
4353  /* "PyClical.pyx":235
4354  * """
4355  * for idx in range(self.min(), self.max()+1):
4356  * if idx in self: # <<<<<<<<<<<<<<
4357  * yield idx
4358  *
4359  */
4360  }
4361 
4362  /* "PyClical.pyx":234
4363  * -3 4 7
4364  * """
4365  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4366  * if idx in self:
4367  * yield idx
4368  */
4369  }
4370  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4371  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4372 
4373  /* "PyClical.pyx":227
4374  * return self.instance.getitem(idx)
4375  *
4376  * def __iter__(self): # <<<<<<<<<<<<<<
4377  * """
4378  * Iterate over the indices of an index_set.
4379  */
4380 
4381  /* function exit code */
4382  PyErr_SetNone(PyExc_StopIteration);
4383  goto __pyx_L0;
4384  __pyx_L1_error:;
4385  __Pyx_XDECREF(__pyx_t_1);
4386  __Pyx_XDECREF(__pyx_t_2);
4387  __Pyx_XDECREF(__pyx_t_3);
4388  __Pyx_XDECREF(__pyx_t_4);
4389  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4390  __pyx_L0:;
4391  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4392  #if !CYTHON_USE_EXC_INFO_STACK
4393  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4394  #endif
4395  __pyx_generator->resume_label = -1;
4396  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4397  __Pyx_RefNannyFinishContext();
4398  return __pyx_r;
4399 }
4400 
4401 /* "PyClical.pyx":238
4402  * yield idx
4403  *
4404  * def __invert__(self): # <<<<<<<<<<<<<<
4405  * """
4406  * Set complement: not.
4407  */
4408 
4409 /* Python wrapper */
4410 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4411 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 ";
4412 #if CYTHON_COMPILING_IN_CPYTHON
4413 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4414 #endif
4415 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4416  PyObject *__pyx_r = 0;
4417  __Pyx_RefNannyDeclarations
4418  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4419  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4420 
4421  /* function exit code */
4422  __Pyx_RefNannyFinishContext();
4423  return __pyx_r;
4424 }
4425 
4426 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4427  PyObject *__pyx_r = NULL;
4428  __Pyx_RefNannyDeclarations
4429  PyObject *__pyx_t_1 = NULL;
4430  PyObject *__pyx_t_2 = NULL;
4431  __Pyx_RefNannySetupContext("__invert__", 0);
4432 
4433  /* "PyClical.pyx":245
4434  * {-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}
4435  * """
4436  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4437  *
4438  * def __xor__(lhs, rhs):
4439  */
4440  __Pyx_XDECREF(__pyx_r);
4441  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4442  __Pyx_GOTREF(__pyx_t_1);
4443  __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)
4444  __Pyx_GOTREF(__pyx_t_2);
4445  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4446  __pyx_r = __pyx_t_2;
4447  __pyx_t_2 = 0;
4448  goto __pyx_L0;
4449 
4450  /* "PyClical.pyx":238
4451  * yield idx
4452  *
4453  * def __invert__(self): # <<<<<<<<<<<<<<
4454  * """
4455  * Set complement: not.
4456  */
4457 
4458  /* function exit code */
4459  __pyx_L1_error:;
4460  __Pyx_XDECREF(__pyx_t_1);
4461  __Pyx_XDECREF(__pyx_t_2);
4462  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4463  __pyx_r = NULL;
4464  __pyx_L0:;
4465  __Pyx_XGIVEREF(__pyx_r);
4466  __Pyx_RefNannyFinishContext();
4467  return __pyx_r;
4468 }
4469 
4470 /* "PyClical.pyx":247
4471  * return index_set().wrap( self.instance.invert() )
4472  *
4473  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4474  * """
4475  * Symmetric set difference: exclusive or.
4476  */
4477 
4478 /* Python wrapper */
4479 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4480 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 ";
4481 #if CYTHON_COMPILING_IN_CPYTHON
4482 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4483 #endif
4484 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4485  PyObject *__pyx_r = 0;
4486  __Pyx_RefNannyDeclarations
4487  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4488  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4489 
4490  /* function exit code */
4491  __Pyx_RefNannyFinishContext();
4492  return __pyx_r;
4493 }
4494 
4495 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4496  PyObject *__pyx_r = NULL;
4497  __Pyx_RefNannyDeclarations
4498  PyObject *__pyx_t_1 = NULL;
4499  PyObject *__pyx_t_2 = NULL;
4500  __Pyx_RefNannySetupContext("__xor__", 0);
4501 
4502  /* "PyClical.pyx":256
4503  * {1}
4504  * """
4505  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4506  *
4507  * def __ixor__(self, rhs):
4508  */
4509  __Pyx_XDECREF(__pyx_r);
4510  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4511  __Pyx_GOTREF(__pyx_t_1);
4512  __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)
4513  __Pyx_GOTREF(__pyx_t_2);
4514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4515  __pyx_r = __pyx_t_2;
4516  __pyx_t_2 = 0;
4517  goto __pyx_L0;
4518 
4519  /* "PyClical.pyx":247
4520  * return index_set().wrap( self.instance.invert() )
4521  *
4522  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4523  * """
4524  * Symmetric set difference: exclusive or.
4525  */
4526 
4527  /* function exit code */
4528  __pyx_L1_error:;
4529  __Pyx_XDECREF(__pyx_t_1);
4530  __Pyx_XDECREF(__pyx_t_2);
4531  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4532  __pyx_r = NULL;
4533  __pyx_L0:;
4534  __Pyx_XGIVEREF(__pyx_r);
4535  __Pyx_RefNannyFinishContext();
4536  return __pyx_r;
4537 }
4538 
4539 /* "PyClical.pyx":258
4540  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4541  *
4542  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4543  * """
4544  * Symmetric set difference: exclusive or.
4545  */
4546 
4547 /* Python wrapper */
4548 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4549 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 ";
4550 #if CYTHON_COMPILING_IN_CPYTHON
4551 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4552 #endif
4553 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4554  PyObject *__pyx_r = 0;
4555  __Pyx_RefNannyDeclarations
4556  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4557  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4558 
4559  /* function exit code */
4560  __Pyx_RefNannyFinishContext();
4561  return __pyx_r;
4562 }
4563 
4564 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4565  PyObject *__pyx_r = NULL;
4566  __Pyx_RefNannyDeclarations
4567  PyObject *__pyx_t_1 = NULL;
4568  __Pyx_RefNannySetupContext("__ixor__", 0);
4569 
4570  /* "PyClical.pyx":267
4571  * {1}
4572  * """
4573  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4574  *
4575  * def __and__(lhs, rhs):
4576  */
4577  __Pyx_XDECREF(__pyx_r);
4578  __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)
4579  __Pyx_GOTREF(__pyx_t_1);
4580  __pyx_r = __pyx_t_1;
4581  __pyx_t_1 = 0;
4582  goto __pyx_L0;
4583 
4584  /* "PyClical.pyx":258
4585  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4586  *
4587  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4588  * """
4589  * Symmetric set difference: exclusive or.
4590  */
4591 
4592  /* function exit code */
4593  __pyx_L1_error:;
4594  __Pyx_XDECREF(__pyx_t_1);
4595  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4596  __pyx_r = NULL;
4597  __pyx_L0:;
4598  __Pyx_XGIVEREF(__pyx_r);
4599  __Pyx_RefNannyFinishContext();
4600  return __pyx_r;
4601 }
4602 
4603 /* "PyClical.pyx":269
4604  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4605  *
4606  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4607  * """
4608  * Set intersection: and.
4609  */
4610 
4611 /* Python wrapper */
4612 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4613 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 ";
4614 #if CYTHON_COMPILING_IN_CPYTHON
4615 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4616 #endif
4617 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4618  PyObject *__pyx_r = 0;
4619  __Pyx_RefNannyDeclarations
4620  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4621  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4622 
4623  /* function exit code */
4624  __Pyx_RefNannyFinishContext();
4625  return __pyx_r;
4626 }
4627 
4628 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4629  PyObject *__pyx_r = NULL;
4630  __Pyx_RefNannyDeclarations
4631  PyObject *__pyx_t_1 = NULL;
4632  PyObject *__pyx_t_2 = NULL;
4633  __Pyx_RefNannySetupContext("__and__", 0);
4634 
4635  /* "PyClical.pyx":278
4636  * {2}
4637  * """
4638  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4639  *
4640  * def __iand__(self, rhs):
4641  */
4642  __Pyx_XDECREF(__pyx_r);
4643  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4644  __Pyx_GOTREF(__pyx_t_1);
4645  __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)
4646  __Pyx_GOTREF(__pyx_t_2);
4647  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4648  __pyx_r = __pyx_t_2;
4649  __pyx_t_2 = 0;
4650  goto __pyx_L0;
4651 
4652  /* "PyClical.pyx":269
4653  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4654  *
4655  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4656  * """
4657  * Set intersection: and.
4658  */
4659 
4660  /* function exit code */
4661  __pyx_L1_error:;
4662  __Pyx_XDECREF(__pyx_t_1);
4663  __Pyx_XDECREF(__pyx_t_2);
4664  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4665  __pyx_r = NULL;
4666  __pyx_L0:;
4667  __Pyx_XGIVEREF(__pyx_r);
4668  __Pyx_RefNannyFinishContext();
4669  return __pyx_r;
4670 }
4671 
4672 /* "PyClical.pyx":280
4673  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4674  *
4675  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4676  * """
4677  * Set intersection: and.
4678  */
4679 
4680 /* Python wrapper */
4681 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4682 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 ";
4683 #if CYTHON_COMPILING_IN_CPYTHON
4684 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4685 #endif
4686 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4687  PyObject *__pyx_r = 0;
4688  __Pyx_RefNannyDeclarations
4689  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4690  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4691 
4692  /* function exit code */
4693  __Pyx_RefNannyFinishContext();
4694  return __pyx_r;
4695 }
4696 
4697 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4698  PyObject *__pyx_r = NULL;
4699  __Pyx_RefNannyDeclarations
4700  PyObject *__pyx_t_1 = NULL;
4701  __Pyx_RefNannySetupContext("__iand__", 0);
4702 
4703  /* "PyClical.pyx":289
4704  * {2}
4705  * """
4706  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4707  *
4708  * def __or__(lhs, rhs):
4709  */
4710  __Pyx_XDECREF(__pyx_r);
4711  __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)
4712  __Pyx_GOTREF(__pyx_t_1);
4713  __pyx_r = __pyx_t_1;
4714  __pyx_t_1 = 0;
4715  goto __pyx_L0;
4716 
4717  /* "PyClical.pyx":280
4718  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4719  *
4720  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4721  * """
4722  * Set intersection: and.
4723  */
4724 
4725  /* function exit code */
4726  __pyx_L1_error:;
4727  __Pyx_XDECREF(__pyx_t_1);
4728  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4729  __pyx_r = NULL;
4730  __pyx_L0:;
4731  __Pyx_XGIVEREF(__pyx_r);
4732  __Pyx_RefNannyFinishContext();
4733  return __pyx_r;
4734 }
4735 
4736 /* "PyClical.pyx":291
4737  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4738  *
4739  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4740  * """
4741  * Set union: or.
4742  */
4743 
4744 /* Python wrapper */
4745 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4746 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 ";
4747 #if CYTHON_COMPILING_IN_CPYTHON
4748 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4749 #endif
4750 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4751  PyObject *__pyx_r = 0;
4752  __Pyx_RefNannyDeclarations
4753  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4754  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4755 
4756  /* function exit code */
4757  __Pyx_RefNannyFinishContext();
4758  return __pyx_r;
4759 }
4760 
4761 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4762  PyObject *__pyx_r = NULL;
4763  __Pyx_RefNannyDeclarations
4764  PyObject *__pyx_t_1 = NULL;
4765  PyObject *__pyx_t_2 = NULL;
4766  __Pyx_RefNannySetupContext("__or__", 0);
4767 
4768  /* "PyClical.pyx":300
4769  * {1,2}
4770  * """
4771  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4772  *
4773  * def __ior__(self, rhs):
4774  */
4775  __Pyx_XDECREF(__pyx_r);
4776  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4777  __Pyx_GOTREF(__pyx_t_1);
4778  __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)
4779  __Pyx_GOTREF(__pyx_t_2);
4780  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4781  __pyx_r = __pyx_t_2;
4782  __pyx_t_2 = 0;
4783  goto __pyx_L0;
4784 
4785  /* "PyClical.pyx":291
4786  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4787  *
4788  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4789  * """
4790  * Set union: or.
4791  */
4792 
4793  /* function exit code */
4794  __pyx_L1_error:;
4795  __Pyx_XDECREF(__pyx_t_1);
4796  __Pyx_XDECREF(__pyx_t_2);
4797  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4798  __pyx_r = NULL;
4799  __pyx_L0:;
4800  __Pyx_XGIVEREF(__pyx_r);
4801  __Pyx_RefNannyFinishContext();
4802  return __pyx_r;
4803 }
4804 
4805 /* "PyClical.pyx":302
4806  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4807  *
4808  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4809  * """
4810  * Set union: or.
4811  */
4812 
4813 /* Python wrapper */
4814 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4815 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 ";
4816 #if CYTHON_COMPILING_IN_CPYTHON
4817 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4818 #endif
4819 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4820  PyObject *__pyx_r = 0;
4821  __Pyx_RefNannyDeclarations
4822  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4823  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4824 
4825  /* function exit code */
4826  __Pyx_RefNannyFinishContext();
4827  return __pyx_r;
4828 }
4829 
4830 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4831  PyObject *__pyx_r = NULL;
4832  __Pyx_RefNannyDeclarations
4833  PyObject *__pyx_t_1 = NULL;
4834  __Pyx_RefNannySetupContext("__ior__", 0);
4835 
4836  /* "PyClical.pyx":311
4837  * {1,2}
4838  * """
4839  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4840  *
4841  * def count(self):
4842  */
4843  __Pyx_XDECREF(__pyx_r);
4844  __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)
4845  __Pyx_GOTREF(__pyx_t_1);
4846  __pyx_r = __pyx_t_1;
4847  __pyx_t_1 = 0;
4848  goto __pyx_L0;
4849 
4850  /* "PyClical.pyx":302
4851  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4852  *
4853  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4854  * """
4855  * Set union: or.
4856  */
4857 
4858  /* function exit code */
4859  __pyx_L1_error:;
4860  __Pyx_XDECREF(__pyx_t_1);
4861  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4862  __pyx_r = NULL;
4863  __pyx_L0:;
4864  __Pyx_XGIVEREF(__pyx_r);
4865  __Pyx_RefNannyFinishContext();
4866  return __pyx_r;
4867 }
4868 
4869 /* "PyClical.pyx":313
4870  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4871  *
4872  * def count(self): # <<<<<<<<<<<<<<
4873  * """
4874  * Cardinality: Number of indices included in set.
4875  */
4876 
4877 /* Python wrapper */
4878 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4879 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 ";
4880 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4881  PyObject *__pyx_r = 0;
4882  __Pyx_RefNannyDeclarations
4883  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4884  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4885 
4886  /* function exit code */
4887  __Pyx_RefNannyFinishContext();
4888  return __pyx_r;
4889 }
4890 
4891 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4892  PyObject *__pyx_r = NULL;
4893  __Pyx_RefNannyDeclarations
4894  PyObject *__pyx_t_1 = NULL;
4895  __Pyx_RefNannySetupContext("count", 0);
4896 
4897  /* "PyClical.pyx":320
4898  * 3
4899  * """
4900  * return self.instance.count() # <<<<<<<<<<<<<<
4901  *
4902  * def count_neg(self):
4903  */
4904  __Pyx_XDECREF(__pyx_r);
4905  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4906  __Pyx_GOTREF(__pyx_t_1);
4907  __pyx_r = __pyx_t_1;
4908  __pyx_t_1 = 0;
4909  goto __pyx_L0;
4910 
4911  /* "PyClical.pyx":313
4912  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4913  *
4914  * def count(self): # <<<<<<<<<<<<<<
4915  * """
4916  * Cardinality: Number of indices included in set.
4917  */
4918 
4919  /* function exit code */
4920  __pyx_L1_error:;
4921  __Pyx_XDECREF(__pyx_t_1);
4922  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4923  __pyx_r = NULL;
4924  __pyx_L0:;
4925  __Pyx_XGIVEREF(__pyx_r);
4926  __Pyx_RefNannyFinishContext();
4927  return __pyx_r;
4928 }
4929 
4930 /* "PyClical.pyx":322
4931  * return self.instance.count()
4932  *
4933  * def count_neg(self): # <<<<<<<<<<<<<<
4934  * """
4935  * Number of negative indices included in set.
4936  */
4937 
4938 /* Python wrapper */
4939 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4940 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 ";
4941 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4942  PyObject *__pyx_r = 0;
4943  __Pyx_RefNannyDeclarations
4944  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4945  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4946 
4947  /* function exit code */
4948  __Pyx_RefNannyFinishContext();
4949  return __pyx_r;
4950 }
4951 
4952 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4953  PyObject *__pyx_r = NULL;
4954  __Pyx_RefNannyDeclarations
4955  PyObject *__pyx_t_1 = NULL;
4956  __Pyx_RefNannySetupContext("count_neg", 0);
4957 
4958  /* "PyClical.pyx":329
4959  * 1
4960  * """
4961  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4962  *
4963  * def count_pos(self):
4964  */
4965  __Pyx_XDECREF(__pyx_r);
4966  __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)
4967  __Pyx_GOTREF(__pyx_t_1);
4968  __pyx_r = __pyx_t_1;
4969  __pyx_t_1 = 0;
4970  goto __pyx_L0;
4971 
4972  /* "PyClical.pyx":322
4973  * return self.instance.count()
4974  *
4975  * def count_neg(self): # <<<<<<<<<<<<<<
4976  * """
4977  * Number of negative indices included in set.
4978  */
4979 
4980  /* function exit code */
4981  __pyx_L1_error:;
4982  __Pyx_XDECREF(__pyx_t_1);
4983  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4984  __pyx_r = NULL;
4985  __pyx_L0:;
4986  __Pyx_XGIVEREF(__pyx_r);
4987  __Pyx_RefNannyFinishContext();
4988  return __pyx_r;
4989 }
4990 
4991 /* "PyClical.pyx":331
4992  * return self.instance.count_neg()
4993  *
4994  * def count_pos(self): # <<<<<<<<<<<<<<
4995  * """
4996  * Number of positive indices included in set.
4997  */
4998 
4999 /* Python wrapper */
5000 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5001 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 ";
5002 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5003  PyObject *__pyx_r = 0;
5004  __Pyx_RefNannyDeclarations
5005  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5006  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5007 
5008  /* function exit code */
5009  __Pyx_RefNannyFinishContext();
5010  return __pyx_r;
5011 }
5012 
5013 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5014  PyObject *__pyx_r = NULL;
5015  __Pyx_RefNannyDeclarations
5016  PyObject *__pyx_t_1 = NULL;
5017  __Pyx_RefNannySetupContext("count_pos", 0);
5018 
5019  /* "PyClical.pyx":338
5020  * 2
5021  * """
5022  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5023  *
5024  * def min(self):
5025  */
5026  __Pyx_XDECREF(__pyx_r);
5027  __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)
5028  __Pyx_GOTREF(__pyx_t_1);
5029  __pyx_r = __pyx_t_1;
5030  __pyx_t_1 = 0;
5031  goto __pyx_L0;
5032 
5033  /* "PyClical.pyx":331
5034  * return self.instance.count_neg()
5035  *
5036  * def count_pos(self): # <<<<<<<<<<<<<<
5037  * """
5038  * Number of positive indices included in set.
5039  */
5040 
5041  /* function exit code */
5042  __pyx_L1_error:;
5043  __Pyx_XDECREF(__pyx_t_1);
5044  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5045  __pyx_r = NULL;
5046  __pyx_L0:;
5047  __Pyx_XGIVEREF(__pyx_r);
5048  __Pyx_RefNannyFinishContext();
5049  return __pyx_r;
5050 }
5051 
5052 /* "PyClical.pyx":340
5053  * return self.instance.count_pos()
5054  *
5055  * def min(self): # <<<<<<<<<<<<<<
5056  * """
5057  * Minimum member.
5058  */
5059 
5060 /* Python wrapper */
5061 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5062 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5063 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5064  PyObject *__pyx_r = 0;
5065  __Pyx_RefNannyDeclarations
5066  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5067  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5068 
5069  /* function exit code */
5070  __Pyx_RefNannyFinishContext();
5071  return __pyx_r;
5072 }
5073 
5074 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5075  PyObject *__pyx_r = NULL;
5076  __Pyx_RefNannyDeclarations
5077  PyObject *__pyx_t_1 = NULL;
5078  __Pyx_RefNannySetupContext("min", 0);
5079 
5080  /* "PyClical.pyx":347
5081  * -1
5082  * """
5083  * return self.instance.min() # <<<<<<<<<<<<<<
5084  *
5085  * def max(self):
5086  */
5087  __Pyx_XDECREF(__pyx_r);
5088  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5089  __Pyx_GOTREF(__pyx_t_1);
5090  __pyx_r = __pyx_t_1;
5091  __pyx_t_1 = 0;
5092  goto __pyx_L0;
5093 
5094  /* "PyClical.pyx":340
5095  * return self.instance.count_pos()
5096  *
5097  * def min(self): # <<<<<<<<<<<<<<
5098  * """
5099  * Minimum member.
5100  */
5101 
5102  /* function exit code */
5103  __pyx_L1_error:;
5104  __Pyx_XDECREF(__pyx_t_1);
5105  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5106  __pyx_r = NULL;
5107  __pyx_L0:;
5108  __Pyx_XGIVEREF(__pyx_r);
5109  __Pyx_RefNannyFinishContext();
5110  return __pyx_r;
5111 }
5112 
5113 /* "PyClical.pyx":349
5114  * return self.instance.min()
5115  *
5116  * def max(self): # <<<<<<<<<<<<<<
5117  * """
5118  * Maximum member.
5119  */
5120 
5121 /* Python wrapper */
5122 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5123 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5124 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5125  PyObject *__pyx_r = 0;
5126  __Pyx_RefNannyDeclarations
5127  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5128  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5129 
5130  /* function exit code */
5131  __Pyx_RefNannyFinishContext();
5132  return __pyx_r;
5133 }
5134 
5135 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5136  PyObject *__pyx_r = NULL;
5137  __Pyx_RefNannyDeclarations
5138  PyObject *__pyx_t_1 = NULL;
5139  __Pyx_RefNannySetupContext("max", 0);
5140 
5141  /* "PyClical.pyx":356
5142  * 2
5143  * """
5144  * return self.instance.max() # <<<<<<<<<<<<<<
5145  *
5146  * def hash_fn(self):
5147  */
5148  __Pyx_XDECREF(__pyx_r);
5149  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5150  __Pyx_GOTREF(__pyx_t_1);
5151  __pyx_r = __pyx_t_1;
5152  __pyx_t_1 = 0;
5153  goto __pyx_L0;
5154 
5155  /* "PyClical.pyx":349
5156  * return self.instance.min()
5157  *
5158  * def max(self): # <<<<<<<<<<<<<<
5159  * """
5160  * Maximum member.
5161  */
5162 
5163  /* function exit code */
5164  __pyx_L1_error:;
5165  __Pyx_XDECREF(__pyx_t_1);
5166  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5167  __pyx_r = NULL;
5168  __pyx_L0:;
5169  __Pyx_XGIVEREF(__pyx_r);
5170  __Pyx_RefNannyFinishContext();
5171  return __pyx_r;
5172 }
5173 
5174 /* "PyClical.pyx":358
5175  * return self.instance.max()
5176  *
5177  * def hash_fn(self): # <<<<<<<<<<<<<<
5178  * """
5179  * Hash function.
5180  */
5181 
5182 /* Python wrapper */
5183 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5184 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5185 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5186  PyObject *__pyx_r = 0;
5187  __Pyx_RefNannyDeclarations
5188  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5189  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5190 
5191  /* function exit code */
5192  __Pyx_RefNannyFinishContext();
5193  return __pyx_r;
5194 }
5195 
5196 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5197  PyObject *__pyx_r = NULL;
5198  __Pyx_RefNannyDeclarations
5199  PyObject *__pyx_t_1 = NULL;
5200  __Pyx_RefNannySetupContext("hash_fn", 0);
5201 
5202  /* "PyClical.pyx":362
5203  * Hash function.
5204  * """
5205  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5206  *
5207  * def sign_of_mult(self, rhs):
5208  */
5209  __Pyx_XDECREF(__pyx_r);
5210  __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)
5211  __Pyx_GOTREF(__pyx_t_1);
5212  __pyx_r = __pyx_t_1;
5213  __pyx_t_1 = 0;
5214  goto __pyx_L0;
5215 
5216  /* "PyClical.pyx":358
5217  * return self.instance.max()
5218  *
5219  * def hash_fn(self): # <<<<<<<<<<<<<<
5220  * """
5221  * Hash function.
5222  */
5223 
5224  /* function exit code */
5225  __pyx_L1_error:;
5226  __Pyx_XDECREF(__pyx_t_1);
5227  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5228  __pyx_r = NULL;
5229  __pyx_L0:;
5230  __Pyx_XGIVEREF(__pyx_r);
5231  __Pyx_RefNannyFinishContext();
5232  return __pyx_r;
5233 }
5234 
5235 /* "PyClical.pyx":364
5236  * return self.instance.hash_fn()
5237  *
5238  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5239  * """
5240  * Sign of geometric product of two Clifford basis elements.
5241  */
5242 
5243 /* Python wrapper */
5244 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5245 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 ";
5246 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5247  PyObject *__pyx_r = 0;
5248  __Pyx_RefNannyDeclarations
5249  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5250  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5251 
5252  /* function exit code */
5253  __Pyx_RefNannyFinishContext();
5254  return __pyx_r;
5255 }
5256 
5257 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5258  PyObject *__pyx_r = NULL;
5259  __Pyx_RefNannyDeclarations
5260  PyObject *__pyx_t_1 = NULL;
5261  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5262 
5263  /* "PyClical.pyx":371
5264  * 1
5265  * """
5266  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5267  *
5268  * def sign_of_square(self):
5269  */
5270  __Pyx_XDECREF(__pyx_r);
5271  __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)
5272  __Pyx_GOTREF(__pyx_t_1);
5273  __pyx_r = __pyx_t_1;
5274  __pyx_t_1 = 0;
5275  goto __pyx_L0;
5276 
5277  /* "PyClical.pyx":364
5278  * return self.instance.hash_fn()
5279  *
5280  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5281  * """
5282  * Sign of geometric product of two Clifford basis elements.
5283  */
5284 
5285  /* function exit code */
5286  __pyx_L1_error:;
5287  __Pyx_XDECREF(__pyx_t_1);
5288  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5289  __pyx_r = NULL;
5290  __pyx_L0:;
5291  __Pyx_XGIVEREF(__pyx_r);
5292  __Pyx_RefNannyFinishContext();
5293  return __pyx_r;
5294 }
5295 
5296 /* "PyClical.pyx":373
5297  * return self.instance.sign_of_mult(toIndexSet(rhs))
5298  *
5299  * def sign_of_square(self): # <<<<<<<<<<<<<<
5300  * """
5301  * Sign of geometric square of a Clifford basis element.
5302  */
5303 
5304 /* Python wrapper */
5305 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5306 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 ";
5307 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5308  PyObject *__pyx_r = 0;
5309  __Pyx_RefNannyDeclarations
5310  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5311  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5312 
5313  /* function exit code */
5314  __Pyx_RefNannyFinishContext();
5315  return __pyx_r;
5316 }
5317 
5318 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5319  PyObject *__pyx_r = NULL;
5320  __Pyx_RefNannyDeclarations
5321  PyObject *__pyx_t_1 = NULL;
5322  __Pyx_RefNannySetupContext("sign_of_square", 0);
5323 
5324  /* "PyClical.pyx":380
5325  * -1
5326  * """
5327  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5328  *
5329  * def __repr__(self):
5330  */
5331  __Pyx_XDECREF(__pyx_r);
5332  __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)
5333  __Pyx_GOTREF(__pyx_t_1);
5334  __pyx_r = __pyx_t_1;
5335  __pyx_t_1 = 0;
5336  goto __pyx_L0;
5337 
5338  /* "PyClical.pyx":373
5339  * return self.instance.sign_of_mult(toIndexSet(rhs))
5340  *
5341  * def sign_of_square(self): # <<<<<<<<<<<<<<
5342  * """
5343  * Sign of geometric square of a Clifford basis element.
5344  */
5345 
5346  /* function exit code */
5347  __pyx_L1_error:;
5348  __Pyx_XDECREF(__pyx_t_1);
5349  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5350  __pyx_r = NULL;
5351  __pyx_L0:;
5352  __Pyx_XGIVEREF(__pyx_r);
5353  __Pyx_RefNannyFinishContext();
5354  return __pyx_r;
5355 }
5356 
5357 /* "PyClical.pyx":382
5358  * return self.instance.sign_of_square()
5359  *
5360  * def __repr__(self): # <<<<<<<<<<<<<<
5361  * """
5362  * The official string representation of self.
5363  */
5364 
5365 /* Python wrapper */
5366 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5367 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 ";
5368 #if CYTHON_COMPILING_IN_CPYTHON
5369 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5370 #endif
5371 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5372  PyObject *__pyx_r = 0;
5373  __Pyx_RefNannyDeclarations
5374  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5375  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5376 
5377  /* function exit code */
5378  __Pyx_RefNannyFinishContext();
5379  return __pyx_r;
5380 }
5381 
5382 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5383  PyObject *__pyx_r = NULL;
5384  __Pyx_RefNannyDeclarations
5385  PyObject *__pyx_t_1 = NULL;
5386  __Pyx_RefNannySetupContext("__repr__", 0);
5387 
5388  /* "PyClical.pyx":391
5389  * 'index_set({1,2})'
5390  * """
5391  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5392  *
5393  * def __str__(self):
5394  */
5395  __Pyx_XDECREF(__pyx_r);
5396  __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)
5397  __Pyx_GOTREF(__pyx_t_1);
5398  __pyx_r = __pyx_t_1;
5399  __pyx_t_1 = 0;
5400  goto __pyx_L0;
5401 
5402  /* "PyClical.pyx":382
5403  * return self.instance.sign_of_square()
5404  *
5405  * def __repr__(self): # <<<<<<<<<<<<<<
5406  * """
5407  * The official string representation of self.
5408  */
5409 
5410  /* function exit code */
5411  __pyx_L1_error:;
5412  __Pyx_XDECREF(__pyx_t_1);
5413  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5414  __pyx_r = NULL;
5415  __pyx_L0:;
5416  __Pyx_XGIVEREF(__pyx_r);
5417  __Pyx_RefNannyFinishContext();
5418  return __pyx_r;
5419 }
5420 
5421 /* "PyClical.pyx":393
5422  * return index_set_to_repr( self.unwrap() ).c_str()
5423  *
5424  * def __str__(self): # <<<<<<<<<<<<<<
5425  * """
5426  * The informal string representation of self.
5427  */
5428 
5429 /* Python wrapper */
5430 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5431 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 ";
5432 #if CYTHON_COMPILING_IN_CPYTHON
5433 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5434 #endif
5435 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5436  PyObject *__pyx_r = 0;
5437  __Pyx_RefNannyDeclarations
5438  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5439  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5440 
5441  /* function exit code */
5442  __Pyx_RefNannyFinishContext();
5443  return __pyx_r;
5444 }
5445 
5446 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5447  PyObject *__pyx_r = NULL;
5448  __Pyx_RefNannyDeclarations
5449  PyObject *__pyx_t_1 = NULL;
5450  __Pyx_RefNannySetupContext("__str__", 0);
5451 
5452  /* "PyClical.pyx":402
5453  * '{1,2}'
5454  * """
5455  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5456  *
5457  * def index_set_hidden_doctests():
5458  */
5459  __Pyx_XDECREF(__pyx_r);
5460  __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)
5461  __Pyx_GOTREF(__pyx_t_1);
5462  __pyx_r = __pyx_t_1;
5463  __pyx_t_1 = 0;
5464  goto __pyx_L0;
5465 
5466  /* "PyClical.pyx":393
5467  * return index_set_to_repr( self.unwrap() ).c_str()
5468  *
5469  * def __str__(self): # <<<<<<<<<<<<<<
5470  * """
5471  * The informal string representation of self.
5472  */
5473 
5474  /* function exit code */
5475  __pyx_L1_error:;
5476  __Pyx_XDECREF(__pyx_t_1);
5477  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5478  __pyx_r = NULL;
5479  __pyx_L0:;
5480  __Pyx_XGIVEREF(__pyx_r);
5481  __Pyx_RefNannyFinishContext();
5482  return __pyx_r;
5483 }
5484 
5485 /* "(tree fragment)":1
5486  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5487  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5488  * def __setstate_cython__(self, __pyx_state):
5489  */
5490 
5491 /* Python wrapper */
5492 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5493 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5494  PyObject *__pyx_r = 0;
5495  __Pyx_RefNannyDeclarations
5496  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5497  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5498 
5499  /* function exit code */
5500  __Pyx_RefNannyFinishContext();
5501  return __pyx_r;
5502 }
5503 
5504 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5505  PyObject *__pyx_r = NULL;
5506  __Pyx_RefNannyDeclarations
5507  PyObject *__pyx_t_1 = NULL;
5508  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5509 
5510  /* "(tree fragment)":2
5511  * def __reduce_cython__(self):
5512  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5513  * def __setstate_cython__(self, __pyx_state):
5514  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5515  */
5516  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
5517  __Pyx_GOTREF(__pyx_t_1);
5518  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5519  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5520  __PYX_ERR(1, 2, __pyx_L1_error)
5521 
5522  /* "(tree fragment)":1
5523  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5524  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5525  * def __setstate_cython__(self, __pyx_state):
5526  */
5527 
5528  /* function exit code */
5529  __pyx_L1_error:;
5530  __Pyx_XDECREF(__pyx_t_1);
5531  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5532  __pyx_r = NULL;
5533  __Pyx_XGIVEREF(__pyx_r);
5534  __Pyx_RefNannyFinishContext();
5535  return __pyx_r;
5536 }
5537 
5538 /* "(tree fragment)":3
5539  * def __reduce_cython__(self):
5540  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5541  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5542  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5543  */
5544 
5545 /* Python wrapper */
5546 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5547 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5548  PyObject *__pyx_r = 0;
5549  __Pyx_RefNannyDeclarations
5550  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5551  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5552 
5553  /* function exit code */
5554  __Pyx_RefNannyFinishContext();
5555  return __pyx_r;
5556 }
5557 
5558 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) {
5559  PyObject *__pyx_r = NULL;
5560  __Pyx_RefNannyDeclarations
5561  PyObject *__pyx_t_1 = NULL;
5562  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5563 
5564  /* "(tree fragment)":4
5565  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5566  * def __setstate_cython__(self, __pyx_state):
5567  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5568  */
5569  __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)
5570  __Pyx_GOTREF(__pyx_t_1);
5571  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5572  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5573  __PYX_ERR(1, 4, __pyx_L1_error)
5574 
5575  /* "(tree fragment)":3
5576  * def __reduce_cython__(self):
5577  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5578  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5579  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5580  */
5581 
5582  /* function exit code */
5583  __pyx_L1_error:;
5584  __Pyx_XDECREF(__pyx_t_1);
5585  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5586  __pyx_r = NULL;
5587  __Pyx_XGIVEREF(__pyx_r);
5588  __Pyx_RefNannyFinishContext();
5589  return __pyx_r;
5590 }
5591 
5592 /* "PyClical.pyx":404
5593  * return index_set_to_str( self.unwrap() ).c_str()
5594  *
5595  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5596  * """
5597  * Tests for functions that Doctest cannot see.
5598  */
5599 
5600 /* Python wrapper */
5601 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5602 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 ";
5603  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};
5604  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5605  PyObject *__pyx_r = 0;
5606  __Pyx_RefNannyDeclarations
5607  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5608  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5609 
5610  /* function exit code */
5611  __Pyx_RefNannyFinishContext();
5612  return __pyx_r;
5613  }
5614 
5615  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5616  PyObject *__pyx_r = NULL;
5617  __Pyx_RefNannyDeclarations
5618  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5619 
5620  /* "PyClical.pyx":488
5621  * False
5622  * """
5623  * return # <<<<<<<<<<<<<<
5624  *
5625  * cpdef inline compare(lhs,rhs):
5626  */
5627  __Pyx_XDECREF(__pyx_r);
5628  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5629  goto __pyx_L0;
5630 
5631  /* "PyClical.pyx":404
5632  * return index_set_to_str( self.unwrap() ).c_str()
5633  *
5634  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5635  * """
5636  * Tests for functions that Doctest cannot see.
5637  */
5638 
5639  /* function exit code */
5640  __pyx_L0:;
5641  __Pyx_XGIVEREF(__pyx_r);
5642  __Pyx_RefNannyFinishContext();
5643  return __pyx_r;
5644  }
5645 
5646  /* "PyClical.pyx":490
5647  * return
5648  *
5649  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5650  * """
5651  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5652  */
5653 
5654  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5655  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5656  PyObject *__pyx_r = NULL;
5657  __Pyx_RefNannyDeclarations
5658  PyObject *__pyx_t_1 = NULL;
5659  __Pyx_RefNannySetupContext("compare", 0);
5660 
5661  /* "PyClical.pyx":500
5662  * 1
5663  * """
5664  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5665  *
5666  * cpdef inline min_neg(obj):
5667  */
5668  __Pyx_XDECREF(__pyx_r);
5669  __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)
5670  __Pyx_GOTREF(__pyx_t_1);
5671  __pyx_r = __pyx_t_1;
5672  __pyx_t_1 = 0;
5673  goto __pyx_L0;
5674 
5675  /* "PyClical.pyx":490
5676  * return
5677  *
5678  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5679  * """
5680  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5681  */
5682 
5683  /* function exit code */
5684  __pyx_L1_error:;
5685  __Pyx_XDECREF(__pyx_t_1);
5686  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5687  __pyx_r = 0;
5688  __pyx_L0:;
5689  __Pyx_XGIVEREF(__pyx_r);
5690  __Pyx_RefNannyFinishContext();
5691  return __pyx_r;
5692  }
5693 
5694  /* Python wrapper */
5695  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5696  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 ";
5697  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5698  PyObject *__pyx_v_lhs = 0;
5699  PyObject *__pyx_v_rhs = 0;
5700  PyObject *__pyx_r = 0;
5701  __Pyx_RefNannyDeclarations
5702  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5703  {
5704  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5705  PyObject* values[2] = {0,0};
5706  if (unlikely(__pyx_kwds)) {
5707  Py_ssize_t kw_args;
5708  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5709  switch (pos_args) {
5710  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5711  CYTHON_FALLTHROUGH;
5712  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5713  CYTHON_FALLTHROUGH;
5714  case 0: break;
5715  default: goto __pyx_L5_argtuple_error;
5716  }
5717  kw_args = PyDict_Size(__pyx_kwds);
5718  switch (pos_args) {
5719  case 0:
5720  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5721  else goto __pyx_L5_argtuple_error;
5722  CYTHON_FALLTHROUGH;
5723  case 1:
5724  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5725  else {
5726  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5727  }
5728  }
5729  if (unlikely(kw_args > 0)) {
5730  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5731  }
5732  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5733  goto __pyx_L5_argtuple_error;
5734  } else {
5735  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5736  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5737  }
5738  __pyx_v_lhs = values[0];
5739  __pyx_v_rhs = values[1];
5740  }
5741  goto __pyx_L4_argument_unpacking_done;
5742  __pyx_L5_argtuple_error:;
5743  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5744  __pyx_L3_error:;
5745  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5746  __Pyx_RefNannyFinishContext();
5747  return NULL;
5748  __pyx_L4_argument_unpacking_done:;
5749  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5750 
5751  /* function exit code */
5752  __Pyx_RefNannyFinishContext();
5753  return __pyx_r;
5754  }
5755 
5756  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5757  PyObject *__pyx_r = NULL;
5758  __Pyx_RefNannyDeclarations
5759  PyObject *__pyx_t_1 = NULL;
5760  __Pyx_RefNannySetupContext("compare", 0);
5761  __Pyx_XDECREF(__pyx_r);
5762  __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)
5763  __Pyx_GOTREF(__pyx_t_1);
5764  __pyx_r = __pyx_t_1;
5765  __pyx_t_1 = 0;
5766  goto __pyx_L0;
5767 
5768  /* function exit code */
5769  __pyx_L1_error:;
5770  __Pyx_XDECREF(__pyx_t_1);
5771  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5772  __pyx_r = NULL;
5773  __pyx_L0:;
5774  __Pyx_XGIVEREF(__pyx_r);
5775  __Pyx_RefNannyFinishContext();
5776  return __pyx_r;
5777  }
5778 
5779  /* "PyClical.pyx":502
5780  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5781  *
5782  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5783  * """
5784  * Minimum negative index, or 0 if none.
5785  */
5786 
5787  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5788  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5789  PyObject *__pyx_r = NULL;
5790  __Pyx_RefNannyDeclarations
5791  PyObject *__pyx_t_1 = NULL;
5792  __Pyx_RefNannySetupContext("min_neg", 0);
5793 
5794  /* "PyClical.pyx":509
5795  * 0
5796  * """
5797  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5798  *
5799  * cpdef inline max_pos(obj):
5800  */
5801  __Pyx_XDECREF(__pyx_r);
5802  __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)
5803  __Pyx_GOTREF(__pyx_t_1);
5804  __pyx_r = __pyx_t_1;
5805  __pyx_t_1 = 0;
5806  goto __pyx_L0;
5807 
5808  /* "PyClical.pyx":502
5809  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5810  *
5811  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5812  * """
5813  * Minimum negative index, or 0 if none.
5814  */
5815 
5816  /* function exit code */
5817  __pyx_L1_error:;
5818  __Pyx_XDECREF(__pyx_t_1);
5819  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5820  __pyx_r = 0;
5821  __pyx_L0:;
5822  __Pyx_XGIVEREF(__pyx_r);
5823  __Pyx_RefNannyFinishContext();
5824  return __pyx_r;
5825  }
5826 
5827  /* Python wrapper */
5828  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5829  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 ";
5830  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5831  PyObject *__pyx_r = 0;
5832  __Pyx_RefNannyDeclarations
5833  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5834  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5835 
5836  /* function exit code */
5837  __Pyx_RefNannyFinishContext();
5838  return __pyx_r;
5839  }
5840 
5841  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5842  PyObject *__pyx_r = NULL;
5843  __Pyx_RefNannyDeclarations
5844  PyObject *__pyx_t_1 = NULL;
5845  __Pyx_RefNannySetupContext("min_neg", 0);
5846  __Pyx_XDECREF(__pyx_r);
5847  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5848  __Pyx_GOTREF(__pyx_t_1);
5849  __pyx_r = __pyx_t_1;
5850  __pyx_t_1 = 0;
5851  goto __pyx_L0;
5852 
5853  /* function exit code */
5854  __pyx_L1_error:;
5855  __Pyx_XDECREF(__pyx_t_1);
5856  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5857  __pyx_r = NULL;
5858  __pyx_L0:;
5859  __Pyx_XGIVEREF(__pyx_r);
5860  __Pyx_RefNannyFinishContext();
5861  return __pyx_r;
5862  }
5863 
5864  /* "PyClical.pyx":511
5865  * return glucat.min_neg( toIndexSet(obj) )
5866  *
5867  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5868  * """
5869  * Maximum positive index, or 0 if none.
5870  */
5871 
5872  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5873  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5874  PyObject *__pyx_r = NULL;
5875  __Pyx_RefNannyDeclarations
5876  PyObject *__pyx_t_1 = NULL;
5877  __Pyx_RefNannySetupContext("max_pos", 0);
5878 
5879  /* "PyClical.pyx":518
5880  * 2
5881  * """
5882  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5883  *
5884  * cdef inline vector[scalar_t] list_to_vector(lst):
5885  */
5886  __Pyx_XDECREF(__pyx_r);
5887  __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)
5888  __Pyx_GOTREF(__pyx_t_1);
5889  __pyx_r = __pyx_t_1;
5890  __pyx_t_1 = 0;
5891  goto __pyx_L0;
5892 
5893  /* "PyClical.pyx":511
5894  * return glucat.min_neg( toIndexSet(obj) )
5895  *
5896  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5897  * """
5898  * Maximum positive index, or 0 if none.
5899  */
5900 
5901  /* function exit code */
5902  __pyx_L1_error:;
5903  __Pyx_XDECREF(__pyx_t_1);
5904  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5905  __pyx_r = 0;
5906  __pyx_L0:;
5907  __Pyx_XGIVEREF(__pyx_r);
5908  __Pyx_RefNannyFinishContext();
5909  return __pyx_r;
5910  }
5911 
5912  /* Python wrapper */
5913  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5914  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 ";
5915  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5916  PyObject *__pyx_r = 0;
5917  __Pyx_RefNannyDeclarations
5918  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5919  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5920 
5921  /* function exit code */
5922  __Pyx_RefNannyFinishContext();
5923  return __pyx_r;
5924  }
5925 
5926  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5927  PyObject *__pyx_r = NULL;
5928  __Pyx_RefNannyDeclarations
5929  PyObject *__pyx_t_1 = NULL;
5930  __Pyx_RefNannySetupContext("max_pos", 0);
5931  __Pyx_XDECREF(__pyx_r);
5932  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5933  __Pyx_GOTREF(__pyx_t_1);
5934  __pyx_r = __pyx_t_1;
5935  __pyx_t_1 = 0;
5936  goto __pyx_L0;
5937 
5938  /* function exit code */
5939  __pyx_L1_error:;
5940  __Pyx_XDECREF(__pyx_t_1);
5941  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5942  __pyx_r = NULL;
5943  __pyx_L0:;
5944  __Pyx_XGIVEREF(__pyx_r);
5945  __Pyx_RefNannyFinishContext();
5946  return __pyx_r;
5947  }
5948 
5949  /* "PyClical.pyx":520
5950  * return glucat.max_pos( toIndexSet(obj) )
5951  *
5952  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5953  * """
5954  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5955  */
5956 
5957  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5958  std::vector<scalar_t> __pyx_v_v;
5959  PyObject *__pyx_v_s = NULL;
5960  std::vector<scalar_t> __pyx_r;
5961  __Pyx_RefNannyDeclarations
5962  PyObject *__pyx_t_1 = NULL;
5963  Py_ssize_t __pyx_t_2;
5964  PyObject *(*__pyx_t_3)(PyObject *);
5965  PyObject *__pyx_t_4 = NULL;
5966  scalar_t __pyx_t_5;
5967  __Pyx_RefNannySetupContext("list_to_vector", 0);
5968 
5969  /* "PyClical.pyx":525
5970  * """
5971  * cdef vector[scalar_t] v
5972  * for s in lst: # <<<<<<<<<<<<<<
5973  * v.push_back(<scalar_t>s)
5974  * return v
5975  */
5976  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5977  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5978  __pyx_t_3 = NULL;
5979  } else {
5980  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5981  __Pyx_GOTREF(__pyx_t_1);
5982  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5983  }
5984  for (;;) {
5985  if (likely(!__pyx_t_3)) {
5986  if (likely(PyList_CheckExact(__pyx_t_1))) {
5987  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5988  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5989  __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)
5990  #else
5991  __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)
5992  __Pyx_GOTREF(__pyx_t_4);
5993  #endif
5994  } else {
5995  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5996  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5997  __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)
5998  #else
5999  __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)
6000  __Pyx_GOTREF(__pyx_t_4);
6001  #endif
6002  }
6003  } else {
6004  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6005  if (unlikely(!__pyx_t_4)) {
6006  PyObject* exc_type = PyErr_Occurred();
6007  if (exc_type) {
6008  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6009  else __PYX_ERR(0, 525, __pyx_L1_error)
6010  }
6011  break;
6012  }
6013  __Pyx_GOTREF(__pyx_t_4);
6014  }
6015  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6016  __pyx_t_4 = 0;
6017 
6018  /* "PyClical.pyx":526
6019  * cdef vector[scalar_t] v
6020  * for s in lst:
6021  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6022  * return v
6023  *
6024  */
6025  __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)
6026  try {
6027  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6028  } catch(...) {
6029  __Pyx_CppExn2PyErr();
6030  __PYX_ERR(0, 526, __pyx_L1_error)
6031  }
6032 
6033  /* "PyClical.pyx":525
6034  * """
6035  * cdef vector[scalar_t] v
6036  * for s in lst: # <<<<<<<<<<<<<<
6037  * v.push_back(<scalar_t>s)
6038  * return v
6039  */
6040  }
6041  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6042 
6043  /* "PyClical.pyx":527
6044  * for s in lst:
6045  * v.push_back(<scalar_t>s)
6046  * return v # <<<<<<<<<<<<<<
6047  *
6048  * # Forward reference.
6049  */
6050  __pyx_r = __pyx_v_v;
6051  goto __pyx_L0;
6052 
6053  /* "PyClical.pyx":520
6054  * return glucat.max_pos( toIndexSet(obj) )
6055  *
6056  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6057  * """
6058  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6059  */
6060 
6061  /* function exit code */
6062  __pyx_L1_error:;
6063  __Pyx_XDECREF(__pyx_t_1);
6064  __Pyx_XDECREF(__pyx_t_4);
6065  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6066  __Pyx_pretend_to_initialize(&__pyx_r);
6067  __pyx_L0:;
6068  __Pyx_XDECREF(__pyx_v_s);
6069  __Pyx_RefNannyFinishContext();
6070  return __pyx_r;
6071  }
6072 
6073  /* "PyClical.pyx":532
6074  * cdef class clifford
6075  *
6076  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6077  * return clifford(obj).instance[0]
6078  *
6079  */
6080 
6081  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6082  Clifford __pyx_r;
6083  __Pyx_RefNannyDeclarations
6084  PyObject *__pyx_t_1 = NULL;
6085  __Pyx_RefNannySetupContext("toClifford", 0);
6086 
6087  /* "PyClical.pyx":533
6088  *
6089  * cdef inline Clifford toClifford(obj):
6090  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6091  *
6092  * cdef class clifford:
6093  */
6094  __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)
6095  __Pyx_GOTREF(__pyx_t_1);
6096  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6097  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6098  goto __pyx_L0;
6099 
6100  /* "PyClical.pyx":532
6101  * cdef class clifford
6102  *
6103  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6104  * return clifford(obj).instance[0]
6105  *
6106  */
6107 
6108  /* function exit code */
6109  __pyx_L1_error:;
6110  __Pyx_XDECREF(__pyx_t_1);
6111  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6112  __Pyx_pretend_to_initialize(&__pyx_r);
6113  __pyx_L0:;
6114  __Pyx_RefNannyFinishContext();
6115  return __pyx_r;
6116  }
6117 
6118  /* "PyClical.pyx":541
6119  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6120  *
6121  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6122  * """
6123  * Wrap an instance of the C++ class Clifford.
6124  */
6125 
6126  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6127  PyObject *__pyx_r = NULL;
6128  __Pyx_RefNannyDeclarations
6129  __Pyx_RefNannySetupContext("wrap", 0);
6130 
6131  /* "PyClical.pyx":545
6132  * Wrap an instance of the C++ class Clifford.
6133  * """
6134  * self.instance[0] = other # <<<<<<<<<<<<<<
6135  * return self
6136  *
6137  */
6138  (__pyx_v_self->instance[0]) = __pyx_v_other;
6139 
6140  /* "PyClical.pyx":546
6141  * """
6142  * self.instance[0] = other
6143  * return self # <<<<<<<<<<<<<<
6144  *
6145  * cdef inline Clifford unwrap(clifford self):
6146  */
6147  __Pyx_XDECREF(__pyx_r);
6148  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6149  __pyx_r = ((PyObject *)__pyx_v_self);
6150  goto __pyx_L0;
6151 
6152  /* "PyClical.pyx":541
6153  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6154  *
6155  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6156  * """
6157  * Wrap an instance of the C++ class Clifford.
6158  */
6159 
6160  /* function exit code */
6161  __pyx_L0:;
6162  __Pyx_XGIVEREF(__pyx_r);
6163  __Pyx_RefNannyFinishContext();
6164  return __pyx_r;
6165  }
6166 
6167  /* "PyClical.pyx":548
6168  * return self
6169  *
6170  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6171  * """
6172  * Return the wrapped C++ Clifford instance.
6173  */
6174 
6175  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6176  Clifford __pyx_r;
6177  __Pyx_RefNannyDeclarations
6178  __Pyx_RefNannySetupContext("unwrap", 0);
6179 
6180  /* "PyClical.pyx":552
6181  * Return the wrapped C++ Clifford instance.
6182  * """
6183  * return self.instance[0] # <<<<<<<<<<<<<<
6184  *
6185  * cpdef copy(clifford self):
6186  */
6187  __pyx_r = (__pyx_v_self->instance[0]);
6188  goto __pyx_L0;
6189 
6190  /* "PyClical.pyx":548
6191  * return self
6192  *
6193  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6194  * """
6195  * Return the wrapped C++ Clifford instance.
6196  */
6197 
6198  /* function exit code */
6199  __pyx_L0:;
6200  __Pyx_RefNannyFinishContext();
6201  return __pyx_r;
6202  }
6203 
6204  /* "PyClical.pyx":554
6205  * return self.instance[0]
6206  *
6207  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6208  * """
6209  * Copy this clifford object.
6210  */
6211 
6212  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6213  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6214  PyObject *__pyx_r = NULL;
6215  __Pyx_RefNannyDeclarations
6216  PyObject *__pyx_t_1 = NULL;
6217  PyObject *__pyx_t_2 = NULL;
6218  PyObject *__pyx_t_3 = NULL;
6219  PyObject *__pyx_t_4 = NULL;
6220  __Pyx_RefNannySetupContext("copy", 0);
6221  /* Check if called by wrapper */
6222  if (unlikely(__pyx_skip_dispatch)) ;
6223  /* Check if overridden in Python */
6224  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)))) {
6225  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6226  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6227  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6228  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6229  #endif
6230  __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)
6231  __Pyx_GOTREF(__pyx_t_1);
6232  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6233  __Pyx_XDECREF(__pyx_r);
6234  __Pyx_INCREF(__pyx_t_1);
6235  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6236  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6237  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6238  if (likely(__pyx_t_4)) {
6239  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6240  __Pyx_INCREF(__pyx_t_4);
6241  __Pyx_INCREF(function);
6242  __Pyx_DECREF_SET(__pyx_t_3, function);
6243  }
6244  }
6245  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6246  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6247  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6248  __Pyx_GOTREF(__pyx_t_2);
6249  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6250  __pyx_r = __pyx_t_2;
6251  __pyx_t_2 = 0;
6252  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6253  goto __pyx_L0;
6254  }
6255  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6256  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6257  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6258  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6259  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6260  }
6261  #endif
6262  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6263  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6264  }
6265  #endif
6266  }
6267 
6268  /* "PyClical.pyx":561
6269  * {2}
6270  * """
6271  * return clifford(self) # <<<<<<<<<<<<<<
6272  *
6273  * def __cinit__(self, other = 0, ixt = None):
6274  */
6275  __Pyx_XDECREF(__pyx_r);
6276  __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)
6277  __Pyx_GOTREF(__pyx_t_1);
6278  __pyx_r = __pyx_t_1;
6279  __pyx_t_1 = 0;
6280  goto __pyx_L0;
6281 
6282  /* "PyClical.pyx":554
6283  * return self.instance[0]
6284  *
6285  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6286  * """
6287  * Copy this clifford object.
6288  */
6289 
6290  /* function exit code */
6291  __pyx_L1_error:;
6292  __Pyx_XDECREF(__pyx_t_1);
6293  __Pyx_XDECREF(__pyx_t_2);
6294  __Pyx_XDECREF(__pyx_t_3);
6295  __Pyx_XDECREF(__pyx_t_4);
6296  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6297  __pyx_r = 0;
6298  __pyx_L0:;
6299  __Pyx_XGIVEREF(__pyx_r);
6300  __Pyx_RefNannyFinishContext();
6301  return __pyx_r;
6302  }
6303 
6304  /* Python wrapper */
6305  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6306  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 ";
6307  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6308  PyObject *__pyx_r = 0;
6309  __Pyx_RefNannyDeclarations
6310  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6311  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6312 
6313  /* function exit code */
6314  __Pyx_RefNannyFinishContext();
6315  return __pyx_r;
6316  }
6317 
6318  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6319  PyObject *__pyx_r = NULL;
6320  __Pyx_RefNannyDeclarations
6321  PyObject *__pyx_t_1 = NULL;
6322  __Pyx_RefNannySetupContext("copy", 0);
6323  __Pyx_XDECREF(__pyx_r);
6324  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6325  __Pyx_GOTREF(__pyx_t_1);
6326  __pyx_r = __pyx_t_1;
6327  __pyx_t_1 = 0;
6328  goto __pyx_L0;
6329 
6330  /* function exit code */
6331  __pyx_L1_error:;
6332  __Pyx_XDECREF(__pyx_t_1);
6333  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6334  __pyx_r = NULL;
6335  __pyx_L0:;
6336  __Pyx_XGIVEREF(__pyx_r);
6337  __Pyx_RefNannyFinishContext();
6338  return __pyx_r;
6339  }
6340 
6341  /* "PyClical.pyx":563
6342  * return clifford(self)
6343  *
6344  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6345  * """
6346  * Construct an object of type clifford.
6347  */
6348 
6349  /* Python wrapper */
6350  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6351  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6352  PyObject *__pyx_v_other = 0;
6353  PyObject *__pyx_v_ixt = 0;
6354  int __pyx_r;
6355  __Pyx_RefNannyDeclarations
6356  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6357  {
6358  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6359  PyObject* values[2] = {0,0};
6360  values[0] = ((PyObject *)__pyx_int_0);
6361  values[1] = ((PyObject *)Py_None);
6362  if (unlikely(__pyx_kwds)) {
6363  Py_ssize_t kw_args;
6364  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6365  switch (pos_args) {
6366  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6367  CYTHON_FALLTHROUGH;
6368  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6369  CYTHON_FALLTHROUGH;
6370  case 0: break;
6371  default: goto __pyx_L5_argtuple_error;
6372  }
6373  kw_args = PyDict_Size(__pyx_kwds);
6374  switch (pos_args) {
6375  case 0:
6376  if (kw_args > 0) {
6377  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6378  if (value) { values[0] = value; kw_args--; }
6379  }
6380  CYTHON_FALLTHROUGH;
6381  case 1:
6382  if (kw_args > 0) {
6383  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6384  if (value) { values[1] = value; kw_args--; }
6385  }
6386  }
6387  if (unlikely(kw_args > 0)) {
6388  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6389  }
6390  } else {
6391  switch (PyTuple_GET_SIZE(__pyx_args)) {
6392  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6393  CYTHON_FALLTHROUGH;
6394  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6395  CYTHON_FALLTHROUGH;
6396  case 0: break;
6397  default: goto __pyx_L5_argtuple_error;
6398  }
6399  }
6400  __pyx_v_other = values[0];
6401  __pyx_v_ixt = values[1];
6402  }
6403  goto __pyx_L4_argument_unpacking_done;
6404  __pyx_L5_argtuple_error:;
6405  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6406  __pyx_L3_error:;
6407  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6408  __Pyx_RefNannyFinishContext();
6409  return -1;
6410  __pyx_L4_argument_unpacking_done:;
6411  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6412 
6413  /* function exit code */
6414  __Pyx_RefNannyFinishContext();
6415  return __pyx_r;
6416  }
6417 
6418  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6419  PyObject *__pyx_v_error_msg_prefix = NULL;
6420  PyObject *__pyx_v_err = NULL;
6421  int __pyx_r;
6422  __Pyx_RefNannyDeclarations
6423  int __pyx_t_1;
6424  int __pyx_t_2;
6425  PyObject *__pyx_t_3 = NULL;
6426  PyObject *__pyx_t_4 = NULL;
6427  PyObject *__pyx_t_5 = NULL;
6428  Clifford *__pyx_t_6;
6429  PyObject *__pyx_t_7 = NULL;
6430  PyObject *__pyx_t_8 = NULL;
6431  scalar_t __pyx_t_9;
6432  PyObject *__pyx_t_10 = NULL;
6433  PyObject *__pyx_t_11 = NULL;
6434  PyObject *__pyx_t_12 = NULL;
6435  char *__pyx_t_13;
6436  int __pyx_t_14;
6437  PyObject *__pyx_t_15 = NULL;
6438  PyObject *__pyx_t_16 = NULL;
6439  PyObject *__pyx_t_17 = NULL;
6440  PyObject *__pyx_t_18 = NULL;
6441  __Pyx_RefNannySetupContext("__cinit__", 0);
6442 
6443  /* "PyClical.pyx":588
6444  * 2{1}+3{2}
6445  * """
6446  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6447  * if ixt is None:
6448  * try:
6449  */
6450  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6451  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6452 
6453  /* "PyClical.pyx":589
6454  * """
6455  * error_msg_prefix = "Cannot initialize clifford object from"
6456  * if ixt is None: # <<<<<<<<<<<<<<
6457  * try:
6458  * if isinstance(other, clifford):
6459  */
6460  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6461  __pyx_t_2 = (__pyx_t_1 != 0);
6462  if (__pyx_t_2) {
6463 
6464  /* "PyClical.pyx":590
6465  * error_msg_prefix = "Cannot initialize clifford object from"
6466  * if ixt is None:
6467  * try: # <<<<<<<<<<<<<<
6468  * if isinstance(other, clifford):
6469  * self.instance = new Clifford((<clifford>other).unwrap())
6470  */
6471  {
6472  __Pyx_PyThreadState_declare
6473  __Pyx_PyThreadState_assign
6474  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6475  __Pyx_XGOTREF(__pyx_t_3);
6476  __Pyx_XGOTREF(__pyx_t_4);
6477  __Pyx_XGOTREF(__pyx_t_5);
6478  /*try:*/ {
6479 
6480  /* "PyClical.pyx":591
6481  * if ixt is None:
6482  * try:
6483  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6484  * self.instance = new Clifford((<clifford>other).unwrap())
6485  * elif isinstance(other, index_set):
6486  */
6487  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6488  __pyx_t_1 = (__pyx_t_2 != 0);
6489  if (__pyx_t_1) {
6490 
6491  /* "PyClical.pyx":592
6492  * try:
6493  * if isinstance(other, clifford):
6494  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6495  * elif isinstance(other, index_set):
6496  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6497  */
6498  try {
6499  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6500  } catch(...) {
6501  __Pyx_CppExn2PyErr();
6502  __PYX_ERR(0, 592, __pyx_L4_error)
6503  }
6504  __pyx_v_self->instance = __pyx_t_6;
6505 
6506  /* "PyClical.pyx":591
6507  * if ixt is None:
6508  * try:
6509  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6510  * self.instance = new Clifford((<clifford>other).unwrap())
6511  * elif isinstance(other, index_set):
6512  */
6513  goto __pyx_L10;
6514  }
6515 
6516  /* "PyClical.pyx":593
6517  * if isinstance(other, clifford):
6518  * self.instance = new Clifford((<clifford>other).unwrap())
6519  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6520  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6521  * elif isinstance(other, numbers.Real):
6522  */
6523  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6524  __pyx_t_2 = (__pyx_t_1 != 0);
6525  if (__pyx_t_2) {
6526 
6527  /* "PyClical.pyx":594
6528  * self.instance = new Clifford((<clifford>other).unwrap())
6529  * elif isinstance(other, index_set):
6530  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6531  * elif isinstance(other, numbers.Real):
6532  * self.instance = new Clifford(<scalar_t>other)
6533  */
6534  try {
6535  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6536  } catch(...) {
6537  __Pyx_CppExn2PyErr();
6538  __PYX_ERR(0, 594, __pyx_L4_error)
6539  }
6540  __pyx_v_self->instance = __pyx_t_6;
6541 
6542  /* "PyClical.pyx":593
6543  * if isinstance(other, clifford):
6544  * self.instance = new Clifford((<clifford>other).unwrap())
6545  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6546  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6547  * elif isinstance(other, numbers.Real):
6548  */
6549  goto __pyx_L10;
6550  }
6551 
6552  /* "PyClical.pyx":595
6553  * elif isinstance(other, index_set):
6554  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6555  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6556  * self.instance = new Clifford(<scalar_t>other)
6557  * elif isinstance(other, str):
6558  */
6559  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6560  __Pyx_GOTREF(__pyx_t_7);
6561  __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)
6562  __Pyx_GOTREF(__pyx_t_8);
6563  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6564  __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)
6565  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6566  __pyx_t_1 = (__pyx_t_2 != 0);
6567  if (__pyx_t_1) {
6568 
6569  /* "PyClical.pyx":596
6570  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6571  * elif isinstance(other, numbers.Real):
6572  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6573  * elif isinstance(other, str):
6574  * try:
6575  */
6576  __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)
6577  try {
6578  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6579  } catch(...) {
6580  __Pyx_CppExn2PyErr();
6581  __PYX_ERR(0, 596, __pyx_L4_error)
6582  }
6583  __pyx_v_self->instance = __pyx_t_6;
6584 
6585  /* "PyClical.pyx":595
6586  * elif isinstance(other, index_set):
6587  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6588  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6589  * self.instance = new Clifford(<scalar_t>other)
6590  * elif isinstance(other, str):
6591  */
6592  goto __pyx_L10;
6593  }
6594 
6595  /* "PyClical.pyx":597
6596  * elif isinstance(other, numbers.Real):
6597  * self.instance = new Clifford(<scalar_t>other)
6598  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6599  * try:
6600  * self.instance = new Clifford(<char *>other)
6601  */
6602  __pyx_t_1 = PyString_Check(__pyx_v_other);
6603  __pyx_t_2 = (__pyx_t_1 != 0);
6604  if (likely(__pyx_t_2)) {
6605 
6606  /* "PyClical.pyx":598
6607  * self.instance = new Clifford(<scalar_t>other)
6608  * elif isinstance(other, str):
6609  * try: # <<<<<<<<<<<<<<
6610  * self.instance = new Clifford(<char *>other)
6611  * except RuntimeError:
6612  */
6613  {
6614  __Pyx_PyThreadState_declare
6615  __Pyx_PyThreadState_assign
6616  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6617  __Pyx_XGOTREF(__pyx_t_10);
6618  __Pyx_XGOTREF(__pyx_t_11);
6619  __Pyx_XGOTREF(__pyx_t_12);
6620  /*try:*/ {
6621 
6622  /* "PyClical.pyx":599
6623  * elif isinstance(other, str):
6624  * try:
6625  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6626  * except RuntimeError:
6627  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6628  */
6629  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6630  try {
6631  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6632  } catch(...) {
6633  __Pyx_CppExn2PyErr();
6634  __PYX_ERR(0, 599, __pyx_L11_error)
6635  }
6636  __pyx_v_self->instance = __pyx_t_6;
6637 
6638  /* "PyClical.pyx":598
6639  * self.instance = new Clifford(<scalar_t>other)
6640  * elif isinstance(other, str):
6641  * try: # <<<<<<<<<<<<<<
6642  * self.instance = new Clifford(<char *>other)
6643  * except RuntimeError:
6644  */
6645  }
6646  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6647  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6648  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6649  goto __pyx_L16_try_end;
6650  __pyx_L11_error:;
6651  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6652  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6653 
6654  /* "PyClical.pyx":600
6655  * try:
6656  * self.instance = new Clifford(<char *>other)
6657  * except RuntimeError: # <<<<<<<<<<<<<<
6658  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6659  * else:
6660  */
6661  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6662  if (__pyx_t_14) {
6663  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6664  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6665  __Pyx_GOTREF(__pyx_t_8);
6666  __Pyx_GOTREF(__pyx_t_7);
6667  __Pyx_GOTREF(__pyx_t_15);
6668 
6669  /* "PyClical.pyx":601
6670  * self.instance = new Clifford(<char *>other)
6671  * except RuntimeError:
6672  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6673  * else:
6674  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6675  */
6676  __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)
6677  __Pyx_GOTREF(__pyx_t_16);
6678  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6679  __Pyx_GOTREF(__pyx_t_17);
6680  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6681  __Pyx_GOTREF(__pyx_t_18);
6682  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6683  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6684  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6685  __Pyx_GOTREF(__pyx_t_17);
6686  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6687  __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)
6688  __Pyx_GOTREF(__pyx_t_18);
6689  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6690  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6691  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6692  __PYX_ERR(0, 601, __pyx_L13_except_error)
6693  }
6694  goto __pyx_L13_except_error;
6695  __pyx_L13_except_error:;
6696 
6697  /* "PyClical.pyx":598
6698  * self.instance = new Clifford(<scalar_t>other)
6699  * elif isinstance(other, str):
6700  * try: # <<<<<<<<<<<<<<
6701  * self.instance = new Clifford(<char *>other)
6702  * except RuntimeError:
6703  */
6704  __Pyx_XGIVEREF(__pyx_t_10);
6705  __Pyx_XGIVEREF(__pyx_t_11);
6706  __Pyx_XGIVEREF(__pyx_t_12);
6707  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6708  goto __pyx_L4_error;
6709  __pyx_L16_try_end:;
6710  }
6711 
6712  /* "PyClical.pyx":597
6713  * elif isinstance(other, numbers.Real):
6714  * self.instance = new Clifford(<scalar_t>other)
6715  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6716  * try:
6717  * self.instance = new Clifford(<char *>other)
6718  */
6719  goto __pyx_L10;
6720  }
6721 
6722  /* "PyClical.pyx":603
6723  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6724  * else:
6725  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6726  * except RuntimeError as err:
6727  * raise ValueError(error_msg_prefix + " " + str(type(other))
6728  */
6729  /*else*/ {
6730  __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)
6731  __Pyx_GOTREF(__pyx_t_15);
6732  __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)
6733  __Pyx_GOTREF(__pyx_t_7);
6734  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6735  __Pyx_GOTREF(__pyx_t_8);
6736  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6737  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6738  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6739  __Pyx_GOTREF(__pyx_t_7);
6740  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6741  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6742  __Pyx_GOTREF(__pyx_t_8);
6743  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6744  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6745  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6746  __PYX_ERR(0, 603, __pyx_L4_error)
6747  }
6748  __pyx_L10:;
6749 
6750  /* "PyClical.pyx":590
6751  * error_msg_prefix = "Cannot initialize clifford object from"
6752  * if ixt is None:
6753  * try: # <<<<<<<<<<<<<<
6754  * if isinstance(other, clifford):
6755  * self.instance = new Clifford((<clifford>other).unwrap())
6756  */
6757  }
6758  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6759  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6760  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6761  goto __pyx_L9_try_end;
6762  __pyx_L4_error:;
6763  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6764  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6765  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6766  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6767  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6768  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6769 
6770  /* "PyClical.pyx":604
6771  * else:
6772  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6773  * except RuntimeError as err: # <<<<<<<<<<<<<<
6774  * raise ValueError(error_msg_prefix + " " + str(type(other))
6775  * + " value " + repr(other) + ":"
6776  */
6777  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6778  if (__pyx_t_14) {
6779  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6780  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6781  __Pyx_GOTREF(__pyx_t_8);
6782  __Pyx_GOTREF(__pyx_t_7);
6783  __Pyx_GOTREF(__pyx_t_15);
6784  __Pyx_INCREF(__pyx_t_7);
6785  __pyx_v_err = __pyx_t_7;
6786 
6787  /* "PyClical.pyx":605
6788  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6789  * except RuntimeError as err:
6790  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6791  * + " value " + repr(other) + ":"
6792  * + "\n\t" + str(err))
6793  */
6794  __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)
6795  __Pyx_GOTREF(__pyx_t_18);
6796  __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)
6797  __Pyx_GOTREF(__pyx_t_17);
6798  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6799  __Pyx_GOTREF(__pyx_t_16);
6800  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6801  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6802 
6803  /* "PyClical.pyx":606
6804  * except RuntimeError as err:
6805  * raise ValueError(error_msg_prefix + " " + str(type(other))
6806  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6807  * + "\n\t" + str(err))
6808  * elif isinstance(ixt, index_set):
6809  */
6810  __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)
6811  __Pyx_GOTREF(__pyx_t_17);
6812  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6813  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6814  __Pyx_GOTREF(__pyx_t_16);
6815  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6816  __Pyx_GOTREF(__pyx_t_18);
6817  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6818  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6819  __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)
6820  __Pyx_GOTREF(__pyx_t_16);
6821  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6822 
6823  /* "PyClical.pyx":607
6824  * raise ValueError(error_msg_prefix + " " + str(type(other))
6825  * + " value " + repr(other) + ":"
6826  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6827  * elif isinstance(ixt, index_set):
6828  * if isinstance(other, numbers.Real):
6829  */
6830  __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)
6831  __Pyx_GOTREF(__pyx_t_18);
6832  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6833  __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)
6834  __Pyx_GOTREF(__pyx_t_16);
6835  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6836  __Pyx_GOTREF(__pyx_t_17);
6837  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6838  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6839 
6840  /* "PyClical.pyx":605
6841  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6842  * except RuntimeError as err:
6843  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6844  * + " value " + repr(other) + ":"
6845  * + "\n\t" + str(err))
6846  */
6847  __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)
6848  __Pyx_GOTREF(__pyx_t_16);
6849  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6850  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6851  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6852  __PYX_ERR(0, 605, __pyx_L6_except_error)
6853  }
6854  goto __pyx_L6_except_error;
6855  __pyx_L6_except_error:;
6856 
6857  /* "PyClical.pyx":590
6858  * error_msg_prefix = "Cannot initialize clifford object from"
6859  * if ixt is None:
6860  * try: # <<<<<<<<<<<<<<
6861  * if isinstance(other, clifford):
6862  * self.instance = new Clifford((<clifford>other).unwrap())
6863  */
6864  __Pyx_XGIVEREF(__pyx_t_3);
6865  __Pyx_XGIVEREF(__pyx_t_4);
6866  __Pyx_XGIVEREF(__pyx_t_5);
6867  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6868  goto __pyx_L1_error;
6869  __pyx_L9_try_end:;
6870  }
6871 
6872  /* "PyClical.pyx":589
6873  * """
6874  * error_msg_prefix = "Cannot initialize clifford object from"
6875  * if ixt is None: # <<<<<<<<<<<<<<
6876  * try:
6877  * if isinstance(other, clifford):
6878  */
6879  goto __pyx_L3;
6880  }
6881 
6882  /* "PyClical.pyx":608
6883  * + " value " + repr(other) + ":"
6884  * + "\n\t" + str(err))
6885  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6886  * if isinstance(other, numbers.Real):
6887  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6888  */
6889  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6890  __pyx_t_1 = (__pyx_t_2 != 0);
6891  if (likely(__pyx_t_1)) {
6892 
6893  /* "PyClical.pyx":609
6894  * + "\n\t" + str(err))
6895  * elif isinstance(ixt, index_set):
6896  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6897  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6898  * elif isinstance(other, collections.Sequence):
6899  */
6900  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6901  __Pyx_GOTREF(__pyx_t_15);
6902  __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)
6903  __Pyx_GOTREF(__pyx_t_7);
6904  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6905  __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)
6906  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6907  __pyx_t_2 = (__pyx_t_1 != 0);
6908  if (__pyx_t_2) {
6909 
6910  /* "PyClical.pyx":610
6911  * elif isinstance(ixt, index_set):
6912  * if isinstance(other, numbers.Real):
6913  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6914  * elif isinstance(other, collections.Sequence):
6915  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6916  */
6917  __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)
6918  try {
6919  __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));
6920  } catch(...) {
6921  __Pyx_CppExn2PyErr();
6922  __PYX_ERR(0, 610, __pyx_L1_error)
6923  }
6924  __pyx_v_self->instance = __pyx_t_6;
6925 
6926  /* "PyClical.pyx":609
6927  * + "\n\t" + str(err))
6928  * elif isinstance(ixt, index_set):
6929  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6930  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6931  * elif isinstance(other, collections.Sequence):
6932  */
6933  goto __pyx_L21;
6934  }
6935 
6936  /* "PyClical.pyx":611
6937  * if isinstance(other, numbers.Real):
6938  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6939  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6940  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6941  * else:
6942  */
6943  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6944  __Pyx_GOTREF(__pyx_t_7);
6945  __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)
6946  __Pyx_GOTREF(__pyx_t_15);
6947  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6948  __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)
6949  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6950  __pyx_t_1 = (__pyx_t_2 != 0);
6951  if (likely(__pyx_t_1)) {
6952 
6953  /* "PyClical.pyx":612
6954  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6955  * elif isinstance(other, collections.Sequence):
6956  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6957  * else:
6958  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6959  */
6960  try {
6961  __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)));
6962  } catch(...) {
6963  __Pyx_CppExn2PyErr();
6964  __PYX_ERR(0, 612, __pyx_L1_error)
6965  }
6966  __pyx_v_self->instance = __pyx_t_6;
6967 
6968  /* "PyClical.pyx":611
6969  * if isinstance(other, numbers.Real):
6970  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6971  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6972  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6973  * else:
6974  */
6975  goto __pyx_L21;
6976  }
6977 
6978  /* "PyClical.pyx":614
6979  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6980  * else:
6981  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6982  * + ", " + repr(ixt) + ").")
6983  * else:
6984  */
6985  /*else*/ {
6986  __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)
6987  __Pyx_GOTREF(__pyx_t_15);
6988  __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)
6989  __Pyx_GOTREF(__pyx_t_7);
6990  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6991  __Pyx_GOTREF(__pyx_t_8);
6992  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6993  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6994 
6995  /* "PyClical.pyx":615
6996  * else:
6997  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6998  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
6999  * else:
7000  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7001  */
7002  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7003  __Pyx_GOTREF(__pyx_t_7);
7004  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7005  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7006  __Pyx_GOTREF(__pyx_t_8);
7007  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
7008  __Pyx_GOTREF(__pyx_t_15);
7009  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7010  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7011  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7012  __Pyx_GOTREF(__pyx_t_8);
7013  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7014 
7015  /* "PyClical.pyx":614
7016  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7017  * else:
7018  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7019  * + ", " + repr(ixt) + ").")
7020  * else:
7021  */
7022  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7023  __Pyx_GOTREF(__pyx_t_15);
7024  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7025  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7026  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7027  __PYX_ERR(0, 614, __pyx_L1_error)
7028  }
7029  __pyx_L21:;
7030 
7031  /* "PyClical.pyx":608
7032  * + " value " + repr(other) + ":"
7033  * + "\n\t" + str(err))
7034  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7035  * if isinstance(other, numbers.Real):
7036  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7037  */
7038  goto __pyx_L3;
7039  }
7040 
7041  /* "PyClical.pyx":617
7042  * + ", " + repr(ixt) + ").")
7043  * else:
7044  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7045  * + ", " + str(type(ixt)) + ").")
7046  *
7047  */
7048  /*else*/ {
7049  __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)
7050  __Pyx_GOTREF(__pyx_t_15);
7051  __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)
7052  __Pyx_GOTREF(__pyx_t_8);
7053  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7054  __Pyx_GOTREF(__pyx_t_7);
7055  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7056  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7057 
7058  /* "PyClical.pyx":618
7059  * else:
7060  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7061  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7062  *
7063  * def __dealloc__(self):
7064  */
7065  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7066  __Pyx_GOTREF(__pyx_t_8);
7067  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7068  __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)
7069  __Pyx_GOTREF(__pyx_t_7);
7070  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7071  __Pyx_GOTREF(__pyx_t_15);
7072  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7073  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7074  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7075  __Pyx_GOTREF(__pyx_t_7);
7076  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7077 
7078  /* "PyClical.pyx":617
7079  * + ", " + repr(ixt) + ").")
7080  * else:
7081  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7082  * + ", " + str(type(ixt)) + ").")
7083  *
7084  */
7085  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7086  __Pyx_GOTREF(__pyx_t_15);
7087  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7088  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7089  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7090  __PYX_ERR(0, 617, __pyx_L1_error)
7091  }
7092  __pyx_L3:;
7093 
7094  /* "PyClical.pyx":563
7095  * return clifford(self)
7096  *
7097  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7098  * """
7099  * Construct an object of type clifford.
7100  */
7101 
7102  /* function exit code */
7103  __pyx_r = 0;
7104  goto __pyx_L0;
7105  __pyx_L1_error:;
7106  __Pyx_XDECREF(__pyx_t_7);
7107  __Pyx_XDECREF(__pyx_t_8);
7108  __Pyx_XDECREF(__pyx_t_15);
7109  __Pyx_XDECREF(__pyx_t_16);
7110  __Pyx_XDECREF(__pyx_t_17);
7111  __Pyx_XDECREF(__pyx_t_18);
7112  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7113  __pyx_r = -1;
7114  __pyx_L0:;
7115  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7116  __Pyx_XDECREF(__pyx_v_err);
7117  __Pyx_RefNannyFinishContext();
7118  return __pyx_r;
7119  }
7120 
7121  /* "PyClical.pyx":620
7122  * + ", " + str(type(ixt)) + ").")
7123  *
7124  * def __dealloc__(self): # <<<<<<<<<<<<<<
7125  * """
7126  * Clean up by deallocating the instance of C++ class Clifford.
7127  */
7128 
7129  /* Python wrapper */
7130  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7131  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7132  __Pyx_RefNannyDeclarations
7133  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7134  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7135 
7136  /* function exit code */
7137  __Pyx_RefNannyFinishContext();
7138  }
7139 
7140  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7141  __Pyx_RefNannyDeclarations
7142  __Pyx_RefNannySetupContext("__dealloc__", 0);
7143 
7144  /* "PyClical.pyx":624
7145  * Clean up by deallocating the instance of C++ class Clifford.
7146  * """
7147  * del self.instance # <<<<<<<<<<<<<<
7148  *
7149  * def __contains__(self, x):
7150  */
7151  delete __pyx_v_self->instance;
7152 
7153  /* "PyClical.pyx":620
7154  * + ", " + str(type(ixt)) + ").")
7155  *
7156  * def __dealloc__(self): # <<<<<<<<<<<<<<
7157  * """
7158  * Clean up by deallocating the instance of C++ class Clifford.
7159  */
7160 
7161  /* function exit code */
7162  __Pyx_RefNannyFinishContext();
7163  }
7164 
7165  /* "PyClical.pyx":626
7166  * del self.instance
7167  *
7168  * def __contains__(self, x): # <<<<<<<<<<<<<<
7169  * """
7170  * Not applicable.
7171  */
7172 
7173  /* Python wrapper */
7174  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7175  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 ";
7176  #if CYTHON_COMPILING_IN_CPYTHON
7177  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7178  #endif
7179  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7180  int __pyx_r;
7181  __Pyx_RefNannyDeclarations
7182  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7183  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7184 
7185  /* function exit code */
7186  __Pyx_RefNannyFinishContext();
7187  return __pyx_r;
7188  }
7189 
7190  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7191  int __pyx_r;
7192  __Pyx_RefNannyDeclarations
7193  PyObject *__pyx_t_1 = NULL;
7194  __Pyx_RefNannySetupContext("__contains__", 0);
7195 
7196  /* "PyClical.pyx":635
7197  * TypeError: Not applicable.
7198  * """
7199  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7200  *
7201  * def __iter__(self):
7202  */
7203  __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)
7204  __Pyx_GOTREF(__pyx_t_1);
7205  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7206  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7207  __PYX_ERR(0, 635, __pyx_L1_error)
7208 
7209  /* "PyClical.pyx":626
7210  * del self.instance
7211  *
7212  * def __contains__(self, x): # <<<<<<<<<<<<<<
7213  * """
7214  * Not applicable.
7215  */
7216 
7217  /* function exit code */
7218  __pyx_L1_error:;
7219  __Pyx_XDECREF(__pyx_t_1);
7220  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7221  __pyx_r = -1;
7222  __Pyx_RefNannyFinishContext();
7223  return __pyx_r;
7224  }
7225 
7226  /* "PyClical.pyx":637
7227  * raise TypeError("Not applicable.")
7228  *
7229  * def __iter__(self): # <<<<<<<<<<<<<<
7230  * """
7231  * Not applicable.
7232  */
7233 
7234  /* Python wrapper */
7235  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7236  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 ";
7237  #if CYTHON_COMPILING_IN_CPYTHON
7238  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7239  #endif
7240  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7241  PyObject *__pyx_r = 0;
7242  __Pyx_RefNannyDeclarations
7243  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7244  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7245 
7246  /* function exit code */
7247  __Pyx_RefNannyFinishContext();
7248  return __pyx_r;
7249  }
7250 
7251  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7252  PyObject *__pyx_r = NULL;
7253  __Pyx_RefNannyDeclarations
7254  PyObject *__pyx_t_1 = NULL;
7255  __Pyx_RefNannySetupContext("__iter__", 0);
7256 
7257  /* "PyClical.pyx":646
7258  * TypeError: Not applicable.
7259  * """
7260  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7261  *
7262  * def reframe(self, ixt):
7263  */
7264  __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)
7265  __Pyx_GOTREF(__pyx_t_1);
7266  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7267  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7268  __PYX_ERR(0, 646, __pyx_L1_error)
7269 
7270  /* "PyClical.pyx":637
7271  * raise TypeError("Not applicable.")
7272  *
7273  * def __iter__(self): # <<<<<<<<<<<<<<
7274  * """
7275  * Not applicable.
7276  */
7277 
7278  /* function exit code */
7279  __pyx_L1_error:;
7280  __Pyx_XDECREF(__pyx_t_1);
7281  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7282  __pyx_r = NULL;
7283  __Pyx_XGIVEREF(__pyx_r);
7284  __Pyx_RefNannyFinishContext();
7285  return __pyx_r;
7286  }
7287 
7288  /* "PyClical.pyx":648
7289  * raise TypeError("Not applicable.")
7290  *
7291  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7292  * """
7293  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7294  */
7295 
7296  /* Python wrapper */
7297  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7298  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 ";
7299  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7300  PyObject *__pyx_r = 0;
7301  __Pyx_RefNannyDeclarations
7302  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7303  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7304 
7305  /* function exit code */
7306  __Pyx_RefNannyFinishContext();
7307  return __pyx_r;
7308  }
7309 
7310  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7311  PyObject *__pyx_v_error_msg_prefix = NULL;
7312  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7313  PyObject *__pyx_v_err = NULL;
7314  PyObject *__pyx_r = NULL;
7315  __Pyx_RefNannyDeclarations
7316  int __pyx_t_1;
7317  int __pyx_t_2;
7318  PyObject *__pyx_t_3 = NULL;
7319  PyObject *__pyx_t_4 = NULL;
7320  PyObject *__pyx_t_5 = NULL;
7321  PyObject *__pyx_t_6 = NULL;
7322  Clifford *__pyx_t_7;
7323  int __pyx_t_8;
7324  PyObject *__pyx_t_9 = NULL;
7325  PyObject *__pyx_t_10 = NULL;
7326  PyObject *__pyx_t_11 = NULL;
7327  PyObject *__pyx_t_12 = NULL;
7328  PyObject *__pyx_t_13 = NULL;
7329  __Pyx_RefNannySetupContext("reframe", 0);
7330 
7331  /* "PyClical.pyx":658
7332  * True
7333  * """
7334  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7335  * if isinstance(ixt, index_set):
7336  * try:
7337  */
7338  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7339  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7340 
7341  /* "PyClical.pyx":659
7342  * """
7343  * error_msg_prefix = "Cannot reframe"
7344  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7345  * try:
7346  * result = clifford()
7347  */
7348  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7349  __pyx_t_2 = (__pyx_t_1 != 0);
7350  if (likely(__pyx_t_2)) {
7351 
7352  /* "PyClical.pyx":660
7353  * error_msg_prefix = "Cannot reframe"
7354  * if isinstance(ixt, index_set):
7355  * try: # <<<<<<<<<<<<<<
7356  * result = clifford()
7357  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7358  */
7359  {
7360  __Pyx_PyThreadState_declare
7361  __Pyx_PyThreadState_assign
7362  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7363  __Pyx_XGOTREF(__pyx_t_3);
7364  __Pyx_XGOTREF(__pyx_t_4);
7365  __Pyx_XGOTREF(__pyx_t_5);
7366  /*try:*/ {
7367 
7368  /* "PyClical.pyx":661
7369  * if isinstance(ixt, index_set):
7370  * try:
7371  * result = clifford() # <<<<<<<<<<<<<<
7372  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7373  * except RuntimeError as err:
7374  */
7375  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7376  __Pyx_GOTREF(__pyx_t_6);
7377  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7378  __pyx_t_6 = 0;
7379 
7380  /* "PyClical.pyx":662
7381  * try:
7382  * result = clifford()
7383  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7384  * except RuntimeError as err:
7385  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7386  */
7387  try {
7388  __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)));
7389  } catch(...) {
7390  __Pyx_CppExn2PyErr();
7391  __PYX_ERR(0, 662, __pyx_L4_error)
7392  }
7393  __pyx_v_result->instance = __pyx_t_7;
7394 
7395  /* "PyClical.pyx":660
7396  * error_msg_prefix = "Cannot reframe"
7397  * if isinstance(ixt, index_set):
7398  * try: # <<<<<<<<<<<<<<
7399  * result = clifford()
7400  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7401  */
7402  }
7403  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7404  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7405  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7406  goto __pyx_L9_try_end;
7407  __pyx_L4_error:;
7408  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7409 
7410  /* "PyClical.pyx":663
7411  * result = clifford()
7412  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7413  * except RuntimeError as err: # <<<<<<<<<<<<<<
7414  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7415  * + str(ixt) + ":"
7416  */
7417  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7418  if (__pyx_t_8) {
7419  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7420  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7421  __Pyx_GOTREF(__pyx_t_6);
7422  __Pyx_GOTREF(__pyx_t_9);
7423  __Pyx_GOTREF(__pyx_t_10);
7424  __Pyx_INCREF(__pyx_t_9);
7425  __pyx_v_err = __pyx_t_9;
7426 
7427  /* "PyClical.pyx":664
7428  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7429  * except RuntimeError as err:
7430  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7431  * + str(ixt) + ":"
7432  * + "\n\t" + str(err))
7433  */
7434  __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)
7435  __Pyx_GOTREF(__pyx_t_11);
7436  __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)
7437  __Pyx_GOTREF(__pyx_t_12);
7438  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7439  __Pyx_GOTREF(__pyx_t_13);
7440  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7441  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7442  __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)
7443  __Pyx_GOTREF(__pyx_t_12);
7444  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7445 
7446  /* "PyClical.pyx":665
7447  * except RuntimeError as err:
7448  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7449  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7450  * + "\n\t" + str(err))
7451  * else:
7452  */
7453  __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)
7454  __Pyx_GOTREF(__pyx_t_13);
7455  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7456  __Pyx_GOTREF(__pyx_t_11);
7457  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7458  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7459  __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)
7460  __Pyx_GOTREF(__pyx_t_13);
7461  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7462 
7463  /* "PyClical.pyx":666
7464  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7465  * + str(ixt) + ":"
7466  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7467  * else:
7468  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7469  */
7470  __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)
7471  __Pyx_GOTREF(__pyx_t_11);
7472  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7473  __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)
7474  __Pyx_GOTREF(__pyx_t_13);
7475  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7476  __Pyx_GOTREF(__pyx_t_12);
7477  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7478  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7479 
7480  /* "PyClical.pyx":664
7481  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7482  * except RuntimeError as err:
7483  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7484  * + str(ixt) + ":"
7485  * + "\n\t" + str(err))
7486  */
7487  __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)
7488  __Pyx_GOTREF(__pyx_t_13);
7489  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7490  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7491  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7492  __PYX_ERR(0, 664, __pyx_L6_except_error)
7493  }
7494  goto __pyx_L6_except_error;
7495  __pyx_L6_except_error:;
7496 
7497  /* "PyClical.pyx":660
7498  * error_msg_prefix = "Cannot reframe"
7499  * if isinstance(ixt, index_set):
7500  * try: # <<<<<<<<<<<<<<
7501  * result = clifford()
7502  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7503  */
7504  __Pyx_XGIVEREF(__pyx_t_3);
7505  __Pyx_XGIVEREF(__pyx_t_4);
7506  __Pyx_XGIVEREF(__pyx_t_5);
7507  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7508  goto __pyx_L1_error;
7509  __pyx_L9_try_end:;
7510  }
7511 
7512  /* "PyClical.pyx":659
7513  * """
7514  * error_msg_prefix = "Cannot reframe"
7515  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7516  * try:
7517  * result = clifford()
7518  */
7519  goto __pyx_L3;
7520  }
7521 
7522  /* "PyClical.pyx":668
7523  * + "\n\t" + str(err))
7524  * else:
7525  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7526  * return result
7527  *
7528  */
7529  /*else*/ {
7530  __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)
7531  __Pyx_GOTREF(__pyx_t_10);
7532  __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)
7533  __Pyx_GOTREF(__pyx_t_9);
7534  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7535  __Pyx_GOTREF(__pyx_t_6);
7536  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7537  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7538  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7539  __Pyx_GOTREF(__pyx_t_9);
7540  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7541  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7542  __Pyx_GOTREF(__pyx_t_6);
7543  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7544  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7545  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7546  __PYX_ERR(0, 668, __pyx_L1_error)
7547  }
7548  __pyx_L3:;
7549 
7550  /* "PyClical.pyx":669
7551  * else:
7552  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7553  * return result # <<<<<<<<<<<<<<
7554  *
7555  * def __richcmp__(lhs, rhs, int op):
7556  */
7557  __Pyx_XDECREF(__pyx_r);
7558  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7559  __pyx_r = ((PyObject *)__pyx_v_result);
7560  goto __pyx_L0;
7561 
7562  /* "PyClical.pyx":648
7563  * raise TypeError("Not applicable.")
7564  *
7565  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7566  * """
7567  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7568  */
7569 
7570  /* function exit code */
7571  __pyx_L1_error:;
7572  __Pyx_XDECREF(__pyx_t_6);
7573  __Pyx_XDECREF(__pyx_t_9);
7574  __Pyx_XDECREF(__pyx_t_10);
7575  __Pyx_XDECREF(__pyx_t_11);
7576  __Pyx_XDECREF(__pyx_t_12);
7577  __Pyx_XDECREF(__pyx_t_13);
7578  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7579  __pyx_r = NULL;
7580  __pyx_L0:;
7581  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7582  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7583  __Pyx_XDECREF(__pyx_v_err);
7584  __Pyx_XGIVEREF(__pyx_r);
7585  __Pyx_RefNannyFinishContext();
7586  return __pyx_r;
7587  }
7588 
7589  /* "PyClical.pyx":671
7590  * return result
7591  *
7592  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7593  * """
7594  * Compare objects of type clifford.
7595  */
7596 
7597  /* Python wrapper */
7598  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7599  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7600  PyObject *__pyx_r = 0;
7601  __Pyx_RefNannyDeclarations
7602  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7603  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7604 
7605  /* function exit code */
7606  __Pyx_RefNannyFinishContext();
7607  return __pyx_r;
7608  }
7609 
7610  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7611  PyObject *__pyx_r = NULL;
7612  __Pyx_RefNannyDeclarations
7613  int __pyx_t_1;
7614  int __pyx_t_2;
7615  int __pyx_t_3;
7616  PyObject *__pyx_t_4 = NULL;
7617  PyObject *__pyx_t_5 = NULL;
7618  PyObject *__pyx_t_6 = NULL;
7619  __Pyx_RefNannySetupContext("__richcmp__", 0);
7620 
7621  /* "PyClical.pyx":690
7622  * True
7623  * """
7624  * if op == 2: # == # <<<<<<<<<<<<<<
7625  * if (lhs is None) or (rhs is None):
7626  * return bool(lhs is rhs)
7627  */
7628  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7629  if (__pyx_t_1) {
7630 
7631  /* "PyClical.pyx":691
7632  * """
7633  * if op == 2: # ==
7634  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7635  * return bool(lhs is rhs)
7636  * else:
7637  */
7638  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7639  __pyx_t_3 = (__pyx_t_2 != 0);
7640  if (!__pyx_t_3) {
7641  } else {
7642  __pyx_t_1 = __pyx_t_3;
7643  goto __pyx_L5_bool_binop_done;
7644  }
7645  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7646  __pyx_t_2 = (__pyx_t_3 != 0);
7647  __pyx_t_1 = __pyx_t_2;
7648  __pyx_L5_bool_binop_done:;
7649  if (__pyx_t_1) {
7650 
7651  /* "PyClical.pyx":692
7652  * if op == 2: # ==
7653  * if (lhs is None) or (rhs is None):
7654  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7655  * else:
7656  * return bool( toClifford(lhs) == toClifford(rhs) )
7657  */
7658  __Pyx_XDECREF(__pyx_r);
7659  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7660  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7661  __Pyx_GOTREF(__pyx_t_4);
7662  __pyx_r = __pyx_t_4;
7663  __pyx_t_4 = 0;
7664  goto __pyx_L0;
7665 
7666  /* "PyClical.pyx":691
7667  * """
7668  * if op == 2: # ==
7669  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7670  * return bool(lhs is rhs)
7671  * else:
7672  */
7673  }
7674 
7675  /* "PyClical.pyx":694
7676  * return bool(lhs is rhs)
7677  * else:
7678  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7679  * elif op == 3: # !=
7680  * if (lhs is None) or (rhs is None):
7681  */
7682  /*else*/ {
7683  __Pyx_XDECREF(__pyx_r);
7684  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7685  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7686  __Pyx_GOTREF(__pyx_t_4);
7687  __pyx_r = __pyx_t_4;
7688  __pyx_t_4 = 0;
7689  goto __pyx_L0;
7690  }
7691 
7692  /* "PyClical.pyx":690
7693  * True
7694  * """
7695  * if op == 2: # == # <<<<<<<<<<<<<<
7696  * if (lhs is None) or (rhs is None):
7697  * return bool(lhs is rhs)
7698  */
7699  }
7700 
7701  /* "PyClical.pyx":695
7702  * else:
7703  * return bool( toClifford(lhs) == toClifford(rhs) )
7704  * elif op == 3: # != # <<<<<<<<<<<<<<
7705  * if (lhs is None) or (rhs is None):
7706  * return not bool(lhs is rhs)
7707  */
7708  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7709  if (__pyx_t_1) {
7710 
7711  /* "PyClical.pyx":696
7712  * return bool( toClifford(lhs) == toClifford(rhs) )
7713  * elif op == 3: # !=
7714  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7715  * return not bool(lhs is rhs)
7716  * else:
7717  */
7718  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7719  __pyx_t_3 = (__pyx_t_2 != 0);
7720  if (!__pyx_t_3) {
7721  } else {
7722  __pyx_t_1 = __pyx_t_3;
7723  goto __pyx_L8_bool_binop_done;
7724  }
7725  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7726  __pyx_t_2 = (__pyx_t_3 != 0);
7727  __pyx_t_1 = __pyx_t_2;
7728  __pyx_L8_bool_binop_done:;
7729  if (__pyx_t_1) {
7730 
7731  /* "PyClical.pyx":697
7732  * elif op == 3: # !=
7733  * if (lhs is None) or (rhs is None):
7734  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7735  * else:
7736  * return bool( toClifford(lhs) != toClifford(rhs) )
7737  */
7738  __Pyx_XDECREF(__pyx_r);
7739  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7740  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7741  __Pyx_GOTREF(__pyx_t_4);
7742  __pyx_r = __pyx_t_4;
7743  __pyx_t_4 = 0;
7744  goto __pyx_L0;
7745 
7746  /* "PyClical.pyx":696
7747  * return bool( toClifford(lhs) == toClifford(rhs) )
7748  * elif op == 3: # !=
7749  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7750  * return not bool(lhs is rhs)
7751  * else:
7752  */
7753  }
7754 
7755  /* "PyClical.pyx":699
7756  * return not bool(lhs is rhs)
7757  * else:
7758  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7759  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7760  * raise TypeError("This comparison operator is not implemented for "
7761  */
7762  /*else*/ {
7763  __Pyx_XDECREF(__pyx_r);
7764  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7765  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7766  __Pyx_GOTREF(__pyx_t_4);
7767  __pyx_r = __pyx_t_4;
7768  __pyx_t_4 = 0;
7769  goto __pyx_L0;
7770  }
7771 
7772  /* "PyClical.pyx":695
7773  * else:
7774  * return bool( toClifford(lhs) == toClifford(rhs) )
7775  * elif op == 3: # != # <<<<<<<<<<<<<<
7776  * if (lhs is None) or (rhs is None):
7777  * return not bool(lhs is rhs)
7778  */
7779  }
7780 
7781  /* "PyClical.pyx":700
7782  * else:
7783  * return bool( toClifford(lhs) != toClifford(rhs) )
7784  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7785  * raise TypeError("This comparison operator is not implemented for "
7786  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7787  */
7788  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7789  __pyx_t_3 = (__pyx_t_2 != 0);
7790  if (!__pyx_t_3) {
7791  } else {
7792  __pyx_t_1 = __pyx_t_3;
7793  goto __pyx_L10_bool_binop_done;
7794  }
7795  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7796  __pyx_t_2 = (__pyx_t_3 != 0);
7797  __pyx_t_1 = __pyx_t_2;
7798  __pyx_L10_bool_binop_done:;
7799  if (unlikely(__pyx_t_1)) {
7800 
7801  /* "PyClical.pyx":702
7802  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7803  * raise TypeError("This comparison operator is not implemented for "
7804  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7805  * else:
7806  * return NotImplemented
7807  */
7808  __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)
7809  __Pyx_GOTREF(__pyx_t_4);
7810  __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)
7811  __Pyx_GOTREF(__pyx_t_5);
7812  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7813  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7814  __Pyx_GOTREF(__pyx_t_4);
7815  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7816  __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)
7817  __Pyx_GOTREF(__pyx_t_5);
7818  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7819  __Pyx_GOTREF(__pyx_t_6);
7820  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7821  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7822  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7823  __Pyx_GOTREF(__pyx_t_5);
7824  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7825 
7826  /* "PyClical.pyx":701
7827  * return bool( toClifford(lhs) != toClifford(rhs) )
7828  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7829  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7830  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7831  * else:
7832  */
7833  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7834  __Pyx_GOTREF(__pyx_t_6);
7835  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7836  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7837  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7838  __PYX_ERR(0, 701, __pyx_L1_error)
7839 
7840  /* "PyClical.pyx":700
7841  * else:
7842  * return bool( toClifford(lhs) != toClifford(rhs) )
7843  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7844  * raise TypeError("This comparison operator is not implemented for "
7845  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7846  */
7847  }
7848 
7849  /* "PyClical.pyx":704
7850  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7851  * else:
7852  * return NotImplemented # <<<<<<<<<<<<<<
7853  *
7854  * def __getitem__(self, ixt):
7855  */
7856  /*else*/ {
7857  __Pyx_XDECREF(__pyx_r);
7858  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7859  __pyx_r = __pyx_builtin_NotImplemented;
7860  goto __pyx_L0;
7861  }
7862 
7863  /* "PyClical.pyx":671
7864  * return result
7865  *
7866  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7867  * """
7868  * Compare objects of type clifford.
7869  */
7870 
7871  /* function exit code */
7872  __pyx_L1_error:;
7873  __Pyx_XDECREF(__pyx_t_4);
7874  __Pyx_XDECREF(__pyx_t_5);
7875  __Pyx_XDECREF(__pyx_t_6);
7876  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7877  __pyx_r = NULL;
7878  __pyx_L0:;
7879  __Pyx_XGIVEREF(__pyx_r);
7880  __Pyx_RefNannyFinishContext();
7881  return __pyx_r;
7882  }
7883 
7884  /* "PyClical.pyx":706
7885  * return NotImplemented
7886  *
7887  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7888  * """
7889  * Subscripting: map from index set to scalar coordinate.
7890  */
7891 
7892  /* Python wrapper */
7893  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7894  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 ";
7895  #if CYTHON_COMPILING_IN_CPYTHON
7896  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7897  #endif
7898  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7899  PyObject *__pyx_r = 0;
7900  __Pyx_RefNannyDeclarations
7901  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7902  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7903 
7904  /* function exit code */
7905  __Pyx_RefNannyFinishContext();
7906  return __pyx_r;
7907  }
7908 
7909  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7910  PyObject *__pyx_r = NULL;
7911  __Pyx_RefNannyDeclarations
7912  PyObject *__pyx_t_1 = NULL;
7913  __Pyx_RefNannySetupContext("__getitem__", 0);
7914 
7915  /* "PyClical.pyx":719
7916  * 2.0
7917  * """
7918  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7919  *
7920  * def __neg__(self):
7921  */
7922  __Pyx_XDECREF(__pyx_r);
7923  __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)
7924  __Pyx_GOTREF(__pyx_t_1);
7925  __pyx_r = __pyx_t_1;
7926  __pyx_t_1 = 0;
7927  goto __pyx_L0;
7928 
7929  /* "PyClical.pyx":706
7930  * return NotImplemented
7931  *
7932  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7933  * """
7934  * Subscripting: map from index set to scalar coordinate.
7935  */
7936 
7937  /* function exit code */
7938  __pyx_L1_error:;
7939  __Pyx_XDECREF(__pyx_t_1);
7940  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7941  __pyx_r = NULL;
7942  __pyx_L0:;
7943  __Pyx_XGIVEREF(__pyx_r);
7944  __Pyx_RefNannyFinishContext();
7945  return __pyx_r;
7946  }
7947 
7948  /* "PyClical.pyx":721
7949  * return self.instance.getitem(toIndexSet(ixt))
7950  *
7951  * def __neg__(self): # <<<<<<<<<<<<<<
7952  * """
7953  * Unary -.
7954  */
7955 
7956  /* Python wrapper */
7957  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7958  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7959  #if CYTHON_COMPILING_IN_CPYTHON
7960  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7961  #endif
7962  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7963  PyObject *__pyx_r = 0;
7964  __Pyx_RefNannyDeclarations
7965  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7966  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7967 
7968  /* function exit code */
7969  __Pyx_RefNannyFinishContext();
7970  return __pyx_r;
7971  }
7972 
7973  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7974  PyObject *__pyx_r = NULL;
7975  __Pyx_RefNannyDeclarations
7976  PyObject *__pyx_t_1 = NULL;
7977  PyObject *__pyx_t_2 = NULL;
7978  __Pyx_RefNannySetupContext("__neg__", 0);
7979 
7980  /* "PyClical.pyx":728
7981  * -{1}
7982  * """
7983  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7984  *
7985  * def __pos__(self):
7986  */
7987  __Pyx_XDECREF(__pyx_r);
7988  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7989  __Pyx_GOTREF(__pyx_t_1);
7990  __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)
7991  __Pyx_GOTREF(__pyx_t_2);
7992  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7993  __pyx_r = __pyx_t_2;
7994  __pyx_t_2 = 0;
7995  goto __pyx_L0;
7996 
7997  /* "PyClical.pyx":721
7998  * return self.instance.getitem(toIndexSet(ixt))
7999  *
8000  * def __neg__(self): # <<<<<<<<<<<<<<
8001  * """
8002  * Unary -.
8003  */
8004 
8005  /* function exit code */
8006  __pyx_L1_error:;
8007  __Pyx_XDECREF(__pyx_t_1);
8008  __Pyx_XDECREF(__pyx_t_2);
8009  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8010  __pyx_r = NULL;
8011  __pyx_L0:;
8012  __Pyx_XGIVEREF(__pyx_r);
8013  __Pyx_RefNannyFinishContext();
8014  return __pyx_r;
8015  }
8016 
8017  /* "PyClical.pyx":730
8018  * return clifford().wrap( self.instance.neg() )
8019  *
8020  * def __pos__(self): # <<<<<<<<<<<<<<
8021  * """
8022  * Unary +.
8023  */
8024 
8025  /* Python wrapper */
8026  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8027  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8028  #if CYTHON_COMPILING_IN_CPYTHON
8029  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8030  #endif
8031  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8032  PyObject *__pyx_r = 0;
8033  __Pyx_RefNannyDeclarations
8034  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8035  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8036 
8037  /* function exit code */
8038  __Pyx_RefNannyFinishContext();
8039  return __pyx_r;
8040  }
8041 
8042  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8043  PyObject *__pyx_r = NULL;
8044  __Pyx_RefNannyDeclarations
8045  PyObject *__pyx_t_1 = NULL;
8046  __Pyx_RefNannySetupContext("__pos__", 0);
8047 
8048  /* "PyClical.pyx":737
8049  * {1}
8050  * """
8051  * return clifford(self) # <<<<<<<<<<<<<<
8052  *
8053  * def __add__(lhs, rhs):
8054  */
8055  __Pyx_XDECREF(__pyx_r);
8056  __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)
8057  __Pyx_GOTREF(__pyx_t_1);
8058  __pyx_r = __pyx_t_1;
8059  __pyx_t_1 = 0;
8060  goto __pyx_L0;
8061 
8062  /* "PyClical.pyx":730
8063  * return clifford().wrap( self.instance.neg() )
8064  *
8065  * def __pos__(self): # <<<<<<<<<<<<<<
8066  * """
8067  * Unary +.
8068  */
8069 
8070  /* function exit code */
8071  __pyx_L1_error:;
8072  __Pyx_XDECREF(__pyx_t_1);
8073  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8074  __pyx_r = NULL;
8075  __pyx_L0:;
8076  __Pyx_XGIVEREF(__pyx_r);
8077  __Pyx_RefNannyFinishContext();
8078  return __pyx_r;
8079  }
8080 
8081  /* "PyClical.pyx":739
8082  * return clifford(self)
8083  *
8084  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8085  * """
8086  * Geometric sum.
8087  */
8088 
8089  /* Python wrapper */
8090  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8091  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 ";
8092  #if CYTHON_COMPILING_IN_CPYTHON
8093  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8094  #endif
8095  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8096  PyObject *__pyx_r = 0;
8097  __Pyx_RefNannyDeclarations
8098  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8099  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8100 
8101  /* function exit code */
8102  __Pyx_RefNannyFinishContext();
8103  return __pyx_r;
8104  }
8105 
8106  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8107  PyObject *__pyx_r = NULL;
8108  __Pyx_RefNannyDeclarations
8109  PyObject *__pyx_t_1 = NULL;
8110  PyObject *__pyx_t_2 = NULL;
8111  __Pyx_RefNannySetupContext("__add__", 0);
8112 
8113  /* "PyClical.pyx":748
8114  * {1}+{2}
8115  * """
8116  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8117  *
8118  * def __iadd__(self, rhs):
8119  */
8120  __Pyx_XDECREF(__pyx_r);
8121  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8122  __Pyx_GOTREF(__pyx_t_1);
8123  __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)
8124  __Pyx_GOTREF(__pyx_t_2);
8125  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8126  __pyx_r = __pyx_t_2;
8127  __pyx_t_2 = 0;
8128  goto __pyx_L0;
8129 
8130  /* "PyClical.pyx":739
8131  * return clifford(self)
8132  *
8133  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8134  * """
8135  * Geometric sum.
8136  */
8137 
8138  /* function exit code */
8139  __pyx_L1_error:;
8140  __Pyx_XDECREF(__pyx_t_1);
8141  __Pyx_XDECREF(__pyx_t_2);
8142  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8143  __pyx_r = NULL;
8144  __pyx_L0:;
8145  __Pyx_XGIVEREF(__pyx_r);
8146  __Pyx_RefNannyFinishContext();
8147  return __pyx_r;
8148  }
8149 
8150  /* "PyClical.pyx":750
8151  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8152  *
8153  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8154  * """
8155  * Geometric sum.
8156  */
8157 
8158  /* Python wrapper */
8159  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8160  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 ";
8161  #if CYTHON_COMPILING_IN_CPYTHON
8162  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8163  #endif
8164  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8165  PyObject *__pyx_r = 0;
8166  __Pyx_RefNannyDeclarations
8167  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8168  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8169 
8170  /* function exit code */
8171  __Pyx_RefNannyFinishContext();
8172  return __pyx_r;
8173  }
8174 
8175  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8176  PyObject *__pyx_r = NULL;
8177  __Pyx_RefNannyDeclarations
8178  PyObject *__pyx_t_1 = NULL;
8179  __Pyx_RefNannySetupContext("__iadd__", 0);
8180 
8181  /* "PyClical.pyx":757
8182  * 1+{2}
8183  * """
8184  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8185  *
8186  * def __sub__(lhs, rhs):
8187  */
8188  __Pyx_XDECREF(__pyx_r);
8189  __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)
8190  __Pyx_GOTREF(__pyx_t_1);
8191  __pyx_r = __pyx_t_1;
8192  __pyx_t_1 = 0;
8193  goto __pyx_L0;
8194 
8195  /* "PyClical.pyx":750
8196  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8197  *
8198  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8199  * """
8200  * Geometric sum.
8201  */
8202 
8203  /* function exit code */
8204  __pyx_L1_error:;
8205  __Pyx_XDECREF(__pyx_t_1);
8206  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8207  __pyx_r = NULL;
8208  __pyx_L0:;
8209  __Pyx_XGIVEREF(__pyx_r);
8210  __Pyx_RefNannyFinishContext();
8211  return __pyx_r;
8212  }
8213 
8214  /* "PyClical.pyx":759
8215  * return self.wrap( self.unwrap() + toClifford(rhs) )
8216  *
8217  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8218  * """
8219  * Geometric difference.
8220  */
8221 
8222  /* Python wrapper */
8223  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8224  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 ";
8225  #if CYTHON_COMPILING_IN_CPYTHON
8226  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8227  #endif
8228  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8229  PyObject *__pyx_r = 0;
8230  __Pyx_RefNannyDeclarations
8231  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8232  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8233 
8234  /* function exit code */
8235  __Pyx_RefNannyFinishContext();
8236  return __pyx_r;
8237  }
8238 
8239  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8240  PyObject *__pyx_r = NULL;
8241  __Pyx_RefNannyDeclarations
8242  PyObject *__pyx_t_1 = NULL;
8243  PyObject *__pyx_t_2 = NULL;
8244  __Pyx_RefNannySetupContext("__sub__", 0);
8245 
8246  /* "PyClical.pyx":768
8247  * {1}-{2}
8248  * """
8249  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8250  *
8251  * def __isub__(self, rhs):
8252  */
8253  __Pyx_XDECREF(__pyx_r);
8254  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8255  __Pyx_GOTREF(__pyx_t_1);
8256  __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)
8257  __Pyx_GOTREF(__pyx_t_2);
8258  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8259  __pyx_r = __pyx_t_2;
8260  __pyx_t_2 = 0;
8261  goto __pyx_L0;
8262 
8263  /* "PyClical.pyx":759
8264  * return self.wrap( self.unwrap() + toClifford(rhs) )
8265  *
8266  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8267  * """
8268  * Geometric difference.
8269  */
8270 
8271  /* function exit code */
8272  __pyx_L1_error:;
8273  __Pyx_XDECREF(__pyx_t_1);
8274  __Pyx_XDECREF(__pyx_t_2);
8275  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8276  __pyx_r = NULL;
8277  __pyx_L0:;
8278  __Pyx_XGIVEREF(__pyx_r);
8279  __Pyx_RefNannyFinishContext();
8280  return __pyx_r;
8281  }
8282 
8283  /* "PyClical.pyx":770
8284  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8285  *
8286  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8287  * """
8288  * Geometric difference.
8289  */
8290 
8291  /* Python wrapper */
8292  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8293  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 ";
8294  #if CYTHON_COMPILING_IN_CPYTHON
8295  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8296  #endif
8297  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8298  PyObject *__pyx_r = 0;
8299  __Pyx_RefNannyDeclarations
8300  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8301  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8302 
8303  /* function exit code */
8304  __Pyx_RefNannyFinishContext();
8305  return __pyx_r;
8306  }
8307 
8308  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8309  PyObject *__pyx_r = NULL;
8310  __Pyx_RefNannyDeclarations
8311  PyObject *__pyx_t_1 = NULL;
8312  __Pyx_RefNannySetupContext("__isub__", 0);
8313 
8314  /* "PyClical.pyx":777
8315  * 1-{2}
8316  * """
8317  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8318  *
8319  * def __mul__(lhs, rhs):
8320  */
8321  __Pyx_XDECREF(__pyx_r);
8322  __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)
8323  __Pyx_GOTREF(__pyx_t_1);
8324  __pyx_r = __pyx_t_1;
8325  __pyx_t_1 = 0;
8326  goto __pyx_L0;
8327 
8328  /* "PyClical.pyx":770
8329  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8330  *
8331  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8332  * """
8333  * Geometric difference.
8334  */
8335 
8336  /* function exit code */
8337  __pyx_L1_error:;
8338  __Pyx_XDECREF(__pyx_t_1);
8339  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8340  __pyx_r = NULL;
8341  __pyx_L0:;
8342  __Pyx_XGIVEREF(__pyx_r);
8343  __Pyx_RefNannyFinishContext();
8344  return __pyx_r;
8345  }
8346 
8347  /* "PyClical.pyx":779
8348  * return self.wrap( self.unwrap() - toClifford(rhs) )
8349  *
8350  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8351  * """
8352  * Geometric product.
8353  */
8354 
8355  /* Python wrapper */
8356  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8357  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 ";
8358  #if CYTHON_COMPILING_IN_CPYTHON
8359  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8360  #endif
8361  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8362  PyObject *__pyx_r = 0;
8363  __Pyx_RefNannyDeclarations
8364  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8365  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8366 
8367  /* function exit code */
8368  __Pyx_RefNannyFinishContext();
8369  return __pyx_r;
8370  }
8371 
8372  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8373  PyObject *__pyx_r = NULL;
8374  __Pyx_RefNannyDeclarations
8375  PyObject *__pyx_t_1 = NULL;
8376  PyObject *__pyx_t_2 = NULL;
8377  __Pyx_RefNannySetupContext("__mul__", 0);
8378 
8379  /* "PyClical.pyx":790
8380  * {2}
8381  * """
8382  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8383  *
8384  * def __imul__(self, rhs):
8385  */
8386  __Pyx_XDECREF(__pyx_r);
8387  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8388  __Pyx_GOTREF(__pyx_t_1);
8389  __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)
8390  __Pyx_GOTREF(__pyx_t_2);
8391  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8392  __pyx_r = __pyx_t_2;
8393  __pyx_t_2 = 0;
8394  goto __pyx_L0;
8395 
8396  /* "PyClical.pyx":779
8397  * return self.wrap( self.unwrap() - toClifford(rhs) )
8398  *
8399  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8400  * """
8401  * Geometric product.
8402  */
8403 
8404  /* function exit code */
8405  __pyx_L1_error:;
8406  __Pyx_XDECREF(__pyx_t_1);
8407  __Pyx_XDECREF(__pyx_t_2);
8408  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8409  __pyx_r = NULL;
8410  __pyx_L0:;
8411  __Pyx_XGIVEREF(__pyx_r);
8412  __Pyx_RefNannyFinishContext();
8413  return __pyx_r;
8414  }
8415 
8416  /* "PyClical.pyx":792
8417  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8418  *
8419  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8420  * """
8421  * Geometric product.
8422  */
8423 
8424  /* Python wrapper */
8425  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8426  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 ";
8427  #if CYTHON_COMPILING_IN_CPYTHON
8428  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8429  #endif
8430  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8431  PyObject *__pyx_r = 0;
8432  __Pyx_RefNannyDeclarations
8433  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8434  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8435 
8436  /* function exit code */
8437  __Pyx_RefNannyFinishContext();
8438  return __pyx_r;
8439  }
8440 
8441  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8442  PyObject *__pyx_r = NULL;
8443  __Pyx_RefNannyDeclarations
8444  PyObject *__pyx_t_1 = NULL;
8445  __Pyx_RefNannySetupContext("__imul__", 0);
8446 
8447  /* "PyClical.pyx":803
8448  * {2}
8449  * """
8450  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8451  *
8452  * def __mod__(lhs, rhs):
8453  */
8454  __Pyx_XDECREF(__pyx_r);
8455  __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)
8456  __Pyx_GOTREF(__pyx_t_1);
8457  __pyx_r = __pyx_t_1;
8458  __pyx_t_1 = 0;
8459  goto __pyx_L0;
8460 
8461  /* "PyClical.pyx":792
8462  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8463  *
8464  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8465  * """
8466  * Geometric product.
8467  */
8468 
8469  /* function exit code */
8470  __pyx_L1_error:;
8471  __Pyx_XDECREF(__pyx_t_1);
8472  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8473  __pyx_r = NULL;
8474  __pyx_L0:;
8475  __Pyx_XGIVEREF(__pyx_r);
8476  __Pyx_RefNannyFinishContext();
8477  return __pyx_r;
8478  }
8479 
8480  /* "PyClical.pyx":805
8481  * return self.wrap( self.unwrap() * toClifford(rhs) )
8482  *
8483  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8484  * """
8485  * Contraction.
8486  */
8487 
8488  /* Python wrapper */
8489  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8490  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 ";
8491  #if CYTHON_COMPILING_IN_CPYTHON
8492  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8493  #endif
8494  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8495  PyObject *__pyx_r = 0;
8496  __Pyx_RefNannyDeclarations
8497  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8498  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8499 
8500  /* function exit code */
8501  __Pyx_RefNannyFinishContext();
8502  return __pyx_r;
8503  }
8504 
8505  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8506  PyObject *__pyx_r = NULL;
8507  __Pyx_RefNannyDeclarations
8508  PyObject *__pyx_t_1 = NULL;
8509  PyObject *__pyx_t_2 = NULL;
8510  __Pyx_RefNannySetupContext("__mod__", 0);
8511 
8512  /* "PyClical.pyx":818
8513  * {2}
8514  * """
8515  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8516  *
8517  * def __imod__(self, rhs):
8518  */
8519  __Pyx_XDECREF(__pyx_r);
8520  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8521  __Pyx_GOTREF(__pyx_t_1);
8522  __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)
8523  __Pyx_GOTREF(__pyx_t_2);
8524  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8525  __pyx_r = __pyx_t_2;
8526  __pyx_t_2 = 0;
8527  goto __pyx_L0;
8528 
8529  /* "PyClical.pyx":805
8530  * return self.wrap( self.unwrap() * toClifford(rhs) )
8531  *
8532  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8533  * """
8534  * Contraction.
8535  */
8536 
8537  /* function exit code */
8538  __pyx_L1_error:;
8539  __Pyx_XDECREF(__pyx_t_1);
8540  __Pyx_XDECREF(__pyx_t_2);
8541  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8542  __pyx_r = NULL;
8543  __pyx_L0:;
8544  __Pyx_XGIVEREF(__pyx_r);
8545  __Pyx_RefNannyFinishContext();
8546  return __pyx_r;
8547  }
8548 
8549  /* "PyClical.pyx":820
8550  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8551  *
8552  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8553  * """
8554  * Contraction.
8555  */
8556 
8557  /* Python wrapper */
8558  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8559  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 ";
8560  #if CYTHON_COMPILING_IN_CPYTHON
8561  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8562  #endif
8563  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8564  PyObject *__pyx_r = 0;
8565  __Pyx_RefNannyDeclarations
8566  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8567  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8568 
8569  /* function exit code */
8570  __Pyx_RefNannyFinishContext();
8571  return __pyx_r;
8572  }
8573 
8574  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8575  PyObject *__pyx_r = NULL;
8576  __Pyx_RefNannyDeclarations
8577  PyObject *__pyx_t_1 = NULL;
8578  __Pyx_RefNannySetupContext("__imod__", 0);
8579 
8580  /* "PyClical.pyx":833
8581  * {2}
8582  * """
8583  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8584  *
8585  * def __and__(lhs, rhs):
8586  */
8587  __Pyx_XDECREF(__pyx_r);
8588  __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)
8589  __Pyx_GOTREF(__pyx_t_1);
8590  __pyx_r = __pyx_t_1;
8591  __pyx_t_1 = 0;
8592  goto __pyx_L0;
8593 
8594  /* "PyClical.pyx":820
8595  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8596  *
8597  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8598  * """
8599  * Contraction.
8600  */
8601 
8602  /* function exit code */
8603  __pyx_L1_error:;
8604  __Pyx_XDECREF(__pyx_t_1);
8605  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8606  __pyx_r = NULL;
8607  __pyx_L0:;
8608  __Pyx_XGIVEREF(__pyx_r);
8609  __Pyx_RefNannyFinishContext();
8610  return __pyx_r;
8611  }
8612 
8613  /* "PyClical.pyx":835
8614  * return self.wrap( self.unwrap() % toClifford(rhs) )
8615  *
8616  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8617  * """
8618  * Inner product.
8619  */
8620 
8621  /* Python wrapper */
8622  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8623  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 ";
8624  #if CYTHON_COMPILING_IN_CPYTHON
8625  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8626  #endif
8627  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8628  PyObject *__pyx_r = 0;
8629  __Pyx_RefNannyDeclarations
8630  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8631  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8632 
8633  /* function exit code */
8634  __Pyx_RefNannyFinishContext();
8635  return __pyx_r;
8636  }
8637 
8638  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8639  PyObject *__pyx_r = NULL;
8640  __Pyx_RefNannyDeclarations
8641  PyObject *__pyx_t_1 = NULL;
8642  PyObject *__pyx_t_2 = NULL;
8643  __Pyx_RefNannySetupContext("__and__", 0);
8644 
8645  /* "PyClical.pyx":848
8646  * {2}
8647  * """
8648  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8649  *
8650  * def __iand__(self, rhs):
8651  */
8652  __Pyx_XDECREF(__pyx_r);
8653  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8654  __Pyx_GOTREF(__pyx_t_1);
8655  __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)
8656  __Pyx_GOTREF(__pyx_t_2);
8657  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8658  __pyx_r = __pyx_t_2;
8659  __pyx_t_2 = 0;
8660  goto __pyx_L0;
8661 
8662  /* "PyClical.pyx":835
8663  * return self.wrap( self.unwrap() % toClifford(rhs) )
8664  *
8665  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8666  * """
8667  * Inner product.
8668  */
8669 
8670  /* function exit code */
8671  __pyx_L1_error:;
8672  __Pyx_XDECREF(__pyx_t_1);
8673  __Pyx_XDECREF(__pyx_t_2);
8674  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8675  __pyx_r = NULL;
8676  __pyx_L0:;
8677  __Pyx_XGIVEREF(__pyx_r);
8678  __Pyx_RefNannyFinishContext();
8679  return __pyx_r;
8680  }
8681 
8682  /* "PyClical.pyx":850
8683  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8684  *
8685  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8686  * """
8687  * Inner product.
8688  */
8689 
8690  /* Python wrapper */
8691  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8692  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 ";
8693  #if CYTHON_COMPILING_IN_CPYTHON
8694  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8695  #endif
8696  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8697  PyObject *__pyx_r = 0;
8698  __Pyx_RefNannyDeclarations
8699  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8700  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8701 
8702  /* function exit code */
8703  __Pyx_RefNannyFinishContext();
8704  return __pyx_r;
8705  }
8706 
8707  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8708  PyObject *__pyx_r = NULL;
8709  __Pyx_RefNannyDeclarations
8710  PyObject *__pyx_t_1 = NULL;
8711  __Pyx_RefNannySetupContext("__iand__", 0);
8712 
8713  /* "PyClical.pyx":863
8714  * {2}
8715  * """
8716  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8717  *
8718  * def __xor__(lhs, rhs):
8719  */
8720  __Pyx_XDECREF(__pyx_r);
8721  __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)
8722  __Pyx_GOTREF(__pyx_t_1);
8723  __pyx_r = __pyx_t_1;
8724  __pyx_t_1 = 0;
8725  goto __pyx_L0;
8726 
8727  /* "PyClical.pyx":850
8728  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8729  *
8730  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8731  * """
8732  * Inner product.
8733  */
8734 
8735  /* function exit code */
8736  __pyx_L1_error:;
8737  __Pyx_XDECREF(__pyx_t_1);
8738  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8739  __pyx_r = NULL;
8740  __pyx_L0:;
8741  __Pyx_XGIVEREF(__pyx_r);
8742  __Pyx_RefNannyFinishContext();
8743  return __pyx_r;
8744  }
8745 
8746  /* "PyClical.pyx":865
8747  * return self.wrap( self.unwrap() & toClifford(rhs) )
8748  *
8749  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8750  * """
8751  * Outer product.
8752  */
8753 
8754  /* Python wrapper */
8755  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8756  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 ";
8757  #if CYTHON_COMPILING_IN_CPYTHON
8758  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8759  #endif
8760  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8761  PyObject *__pyx_r = 0;
8762  __Pyx_RefNannyDeclarations
8763  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8764  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8765 
8766  /* function exit code */
8767  __Pyx_RefNannyFinishContext();
8768  return __pyx_r;
8769  }
8770 
8771  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8772  PyObject *__pyx_r = NULL;
8773  __Pyx_RefNannyDeclarations
8774  PyObject *__pyx_t_1 = NULL;
8775  PyObject *__pyx_t_2 = NULL;
8776  __Pyx_RefNannySetupContext("__xor__", 0);
8777 
8778  /* "PyClical.pyx":878
8779  * 0
8780  * """
8781  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8782  *
8783  * def __ixor__(self, rhs):
8784  */
8785  __Pyx_XDECREF(__pyx_r);
8786  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8787  __Pyx_GOTREF(__pyx_t_1);
8788  __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)
8789  __Pyx_GOTREF(__pyx_t_2);
8790  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8791  __pyx_r = __pyx_t_2;
8792  __pyx_t_2 = 0;
8793  goto __pyx_L0;
8794 
8795  /* "PyClical.pyx":865
8796  * return self.wrap( self.unwrap() & toClifford(rhs) )
8797  *
8798  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8799  * """
8800  * Outer product.
8801  */
8802 
8803  /* function exit code */
8804  __pyx_L1_error:;
8805  __Pyx_XDECREF(__pyx_t_1);
8806  __Pyx_XDECREF(__pyx_t_2);
8807  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8808  __pyx_r = NULL;
8809  __pyx_L0:;
8810  __Pyx_XGIVEREF(__pyx_r);
8811  __Pyx_RefNannyFinishContext();
8812  return __pyx_r;
8813  }
8814 
8815  /* "PyClical.pyx":880
8816  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8817  *
8818  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8819  * """
8820  * Outer product.
8821  */
8822 
8823  /* Python wrapper */
8824  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8825  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 ";
8826  #if CYTHON_COMPILING_IN_CPYTHON
8827  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8828  #endif
8829  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8830  PyObject *__pyx_r = 0;
8831  __Pyx_RefNannyDeclarations
8832  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8833  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8834 
8835  /* function exit code */
8836  __Pyx_RefNannyFinishContext();
8837  return __pyx_r;
8838  }
8839 
8840  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8841  PyObject *__pyx_r = NULL;
8842  __Pyx_RefNannyDeclarations
8843  PyObject *__pyx_t_1 = NULL;
8844  __Pyx_RefNannySetupContext("__ixor__", 0);
8845 
8846  /* "PyClical.pyx":893
8847  * 0
8848  * """
8849  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8850  *
8851  * def __div__(lhs, rhs):
8852  */
8853  __Pyx_XDECREF(__pyx_r);
8854  __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)
8855  __Pyx_GOTREF(__pyx_t_1);
8856  __pyx_r = __pyx_t_1;
8857  __pyx_t_1 = 0;
8858  goto __pyx_L0;
8859 
8860  /* "PyClical.pyx":880
8861  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8862  *
8863  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8864  * """
8865  * Outer product.
8866  */
8867 
8868  /* function exit code */
8869  __pyx_L1_error:;
8870  __Pyx_XDECREF(__pyx_t_1);
8871  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8872  __pyx_r = NULL;
8873  __pyx_L0:;
8874  __Pyx_XGIVEREF(__pyx_r);
8875  __Pyx_RefNannyFinishContext();
8876  return __pyx_r;
8877  }
8878 
8879  /* "PyClical.pyx":895
8880  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8881  *
8882  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8883  * """
8884  * Geometric quotient.
8885  */
8886 
8887  /* Python wrapper */
8888  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8889  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8890  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 ";
8891  #if CYTHON_COMPILING_IN_CPYTHON
8892  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8893  #endif
8894  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8895  PyObject *__pyx_r = 0;
8896  __Pyx_RefNannyDeclarations
8897  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8898  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8899 
8900  /* function exit code */
8901  __Pyx_RefNannyFinishContext();
8902  return __pyx_r;
8903  }
8904  #endif
8906  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8907  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8908  PyObject *__pyx_r = NULL;
8909  __Pyx_RefNannyDeclarations
8910  PyObject *__pyx_t_1 = NULL;
8911  PyObject *__pyx_t_2 = NULL;
8912  __Pyx_RefNannySetupContext("__div__", 0);
8913 
8914  /* "PyClical.pyx":908
8915  * -{2}
8916  * """
8917  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8918  *
8919  * def __idiv__(self, rhs):
8920  */
8921  __Pyx_XDECREF(__pyx_r);
8922  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8923  __Pyx_GOTREF(__pyx_t_1);
8924  __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)
8925  __Pyx_GOTREF(__pyx_t_2);
8926  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8927  __pyx_r = __pyx_t_2;
8928  __pyx_t_2 = 0;
8929  goto __pyx_L0;
8930 
8931  /* "PyClical.pyx":895
8932  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8933  *
8934  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8935  * """
8936  * Geometric quotient.
8937  */
8938 
8939  /* function exit code */
8940  __pyx_L1_error:;
8941  __Pyx_XDECREF(__pyx_t_1);
8942  __Pyx_XDECREF(__pyx_t_2);
8943  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8944  __pyx_r = NULL;
8945  __pyx_L0:;
8946  __Pyx_XGIVEREF(__pyx_r);
8947  __Pyx_RefNannyFinishContext();
8948  return __pyx_r;
8949  }
8950  #endif
8952  /* "PyClical.pyx":910
8953  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8954  *
8955  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8956  * """
8957  * Geometric quotient.
8958  */
8959 
8960  /* Python wrapper */
8961  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8962  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8963  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 ";
8964  #if CYTHON_COMPILING_IN_CPYTHON
8965  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8966  #endif
8967  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8968  PyObject *__pyx_r = 0;
8969  __Pyx_RefNannyDeclarations
8970  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8971  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8972 
8973  /* function exit code */
8974  __Pyx_RefNannyFinishContext();
8975  return __pyx_r;
8976  }
8977  #endif
8979  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8980  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8981  PyObject *__pyx_r = NULL;
8982  __Pyx_RefNannyDeclarations
8983  PyObject *__pyx_t_1 = NULL;
8984  __Pyx_RefNannySetupContext("__idiv__", 0);
8985 
8986  /* "PyClical.pyx":923
8987  * -{2}
8988  * """
8989  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8990  *
8991  * def inv(self):
8992  */
8993  __Pyx_XDECREF(__pyx_r);
8994  __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)
8995  __Pyx_GOTREF(__pyx_t_1);
8996  __pyx_r = __pyx_t_1;
8997  __pyx_t_1 = 0;
8998  goto __pyx_L0;
8999 
9000  /* "PyClical.pyx":910
9001  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9002  *
9003  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9004  * """
9005  * Geometric quotient.
9006  */
9007 
9008  /* function exit code */
9009  __pyx_L1_error:;
9010  __Pyx_XDECREF(__pyx_t_1);
9011  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9012  __pyx_r = NULL;
9013  __pyx_L0:;
9014  __Pyx_XGIVEREF(__pyx_r);
9015  __Pyx_RefNannyFinishContext();
9016  return __pyx_r;
9017  }
9018  #endif
9020  /* "PyClical.pyx":925
9021  * return self.wrap( self.unwrap() / toClifford(rhs) )
9022  *
9023  * def inv(self): # <<<<<<<<<<<<<<
9024  * """
9025  * Geometric multiplicative inverse.
9026  */
9027 
9028  /* Python wrapper */
9029  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9030  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 ";
9031  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9032  PyObject *__pyx_r = 0;
9033  __Pyx_RefNannyDeclarations
9034  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9035  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9036 
9037  /* function exit code */
9038  __Pyx_RefNannyFinishContext();
9039  return __pyx_r;
9040  }
9041 
9042  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9043  PyObject *__pyx_r = NULL;
9044  __Pyx_RefNannyDeclarations
9045  PyObject *__pyx_t_1 = NULL;
9046  PyObject *__pyx_t_2 = NULL;
9047  __Pyx_RefNannySetupContext("inv", 0);
9048 
9049  /* "PyClical.pyx":936
9050  * -{1,2}
9051  * """
9052  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9053  *
9054  * def __or__(lhs, rhs):
9055  */
9056  __Pyx_XDECREF(__pyx_r);
9057  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
9058  __Pyx_GOTREF(__pyx_t_1);
9059  __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)
9060  __Pyx_GOTREF(__pyx_t_2);
9061  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9062  __pyx_r = __pyx_t_2;
9063  __pyx_t_2 = 0;
9064  goto __pyx_L0;
9065 
9066  /* "PyClical.pyx":925
9067  * return self.wrap( self.unwrap() / toClifford(rhs) )
9068  *
9069  * def inv(self): # <<<<<<<<<<<<<<
9070  * """
9071  * Geometric multiplicative inverse.
9072  */
9073 
9074  /* function exit code */
9075  __pyx_L1_error:;
9076  __Pyx_XDECREF(__pyx_t_1);
9077  __Pyx_XDECREF(__pyx_t_2);
9078  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9079  __pyx_r = NULL;
9080  __pyx_L0:;
9081  __Pyx_XGIVEREF(__pyx_r);
9082  __Pyx_RefNannyFinishContext();
9083  return __pyx_r;
9084  }
9085 
9086  /* "PyClical.pyx":938
9087  * return clifford().wrap( self.instance.inv() )
9088  *
9089  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9090  * """
9091  * Transform left hand side, using right hand side as a transformation.
9092  */
9093 
9094  /* Python wrapper */
9095  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9096  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 ";
9097  #if CYTHON_COMPILING_IN_CPYTHON
9098  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9099  #endif
9100  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9101  PyObject *__pyx_r = 0;
9102  __Pyx_RefNannyDeclarations
9103  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9104  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9105 
9106  /* function exit code */
9107  __Pyx_RefNannyFinishContext();
9108  return __pyx_r;
9109  }
9110 
9111  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9112  PyObject *__pyx_r = NULL;
9113  __Pyx_RefNannyDeclarations
9114  PyObject *__pyx_t_1 = NULL;
9115  PyObject *__pyx_t_2 = NULL;
9116  __Pyx_RefNannySetupContext("__or__", 0);
9117 
9118  /* "PyClical.pyx":947
9119  * -{1}
9120  * """
9121  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9122  *
9123  * def __ior__(self, rhs):
9124  */
9125  __Pyx_XDECREF(__pyx_r);
9126  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9127  __Pyx_GOTREF(__pyx_t_1);
9128  __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)
9129  __Pyx_GOTREF(__pyx_t_2);
9130  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9131  __pyx_r = __pyx_t_2;
9132  __pyx_t_2 = 0;
9133  goto __pyx_L0;
9134 
9135  /* "PyClical.pyx":938
9136  * return clifford().wrap( self.instance.inv() )
9137  *
9138  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9139  * """
9140  * Transform left hand side, using right hand side as a transformation.
9141  */
9142 
9143  /* function exit code */
9144  __pyx_L1_error:;
9145  __Pyx_XDECREF(__pyx_t_1);
9146  __Pyx_XDECREF(__pyx_t_2);
9147  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9148  __pyx_r = NULL;
9149  __pyx_L0:;
9150  __Pyx_XGIVEREF(__pyx_r);
9151  __Pyx_RefNannyFinishContext();
9152  return __pyx_r;
9153  }
9154 
9155  /* "PyClical.pyx":949
9156  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9157  *
9158  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9159  * """
9160  * Transform left hand side, using right hand side as a transformation.
9161  */
9162 
9163  /* Python wrapper */
9164  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9165  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 ";
9166  #if CYTHON_COMPILING_IN_CPYTHON
9167  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9168  #endif
9169  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9170  PyObject *__pyx_r = 0;
9171  __Pyx_RefNannyDeclarations
9172  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9173  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9174 
9175  /* function exit code */
9176  __Pyx_RefNannyFinishContext();
9177  return __pyx_r;
9178  }
9179 
9180  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9181  PyObject *__pyx_r = NULL;
9182  __Pyx_RefNannyDeclarations
9183  PyObject *__pyx_t_1 = NULL;
9184  __Pyx_RefNannySetupContext("__ior__", 0);
9185 
9186  /* "PyClical.pyx":958
9187  * -{1}
9188  * """
9189  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9190  *
9191  * def __pow__(self, m, dummy):
9192  */
9193  __Pyx_XDECREF(__pyx_r);
9194  __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)
9195  __Pyx_GOTREF(__pyx_t_1);
9196  __pyx_r = __pyx_t_1;
9197  __pyx_t_1 = 0;
9198  goto __pyx_L0;
9199 
9200  /* "PyClical.pyx":949
9201  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9202  *
9203  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9204  * """
9205  * Transform left hand side, using right hand side as a transformation.
9206  */
9207 
9208  /* function exit code */
9209  __pyx_L1_error:;
9210  __Pyx_XDECREF(__pyx_t_1);
9211  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9212  __pyx_r = NULL;
9213  __pyx_L0:;
9214  __Pyx_XGIVEREF(__pyx_r);
9215  __Pyx_RefNannyFinishContext();
9216  return __pyx_r;
9217  }
9218 
9219  /* "PyClical.pyx":960
9220  * return self.wrap( self.unwrap() | toClifford(rhs) )
9221  *
9222  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9223  * """
9224  * Power: self to the m.
9225  */
9226 
9227  /* Python wrapper */
9228  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9229  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 ";
9230  #if CYTHON_COMPILING_IN_CPYTHON
9231  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9232  #endif
9233  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9234  PyObject *__pyx_r = 0;
9235  __Pyx_RefNannyDeclarations
9236  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9237  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9238 
9239  /* function exit code */
9240  __Pyx_RefNannyFinishContext();
9241  return __pyx_r;
9242  }
9243 
9244  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9245  PyObject *__pyx_r = NULL;
9246  __Pyx_RefNannyDeclarations
9247  PyObject *__pyx_t_1 = NULL;
9248  __Pyx_RefNannySetupContext("__pow__", 0);
9249 
9250  /* "PyClical.pyx":977
9251  * 1
9252  * """
9253  * return pow(self, m) # <<<<<<<<<<<<<<
9254  *
9255  * def pow(self, m):
9256  */
9257  __Pyx_XDECREF(__pyx_r);
9258  __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)
9259  __Pyx_GOTREF(__pyx_t_1);
9260  __pyx_r = __pyx_t_1;
9261  __pyx_t_1 = 0;
9262  goto __pyx_L0;
9263 
9264  /* "PyClical.pyx":960
9265  * return self.wrap( self.unwrap() | toClifford(rhs) )
9266  *
9267  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9268  * """
9269  * Power: self to the m.
9270  */
9271 
9272  /* function exit code */
9273  __pyx_L1_error:;
9274  __Pyx_XDECREF(__pyx_t_1);
9275  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9276  __pyx_r = NULL;
9277  __pyx_L0:;
9278  __Pyx_XGIVEREF(__pyx_r);
9279  __Pyx_RefNannyFinishContext();
9280  return __pyx_r;
9281  }
9282 
9283  /* "PyClical.pyx":979
9284  * return pow(self, m)
9285  *
9286  * def pow(self, m): # <<<<<<<<<<<<<<
9287  * """
9288  * Power: self to the m.
9289  */
9290 
9291  /* Python wrapper */
9292  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9293  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 ";
9294  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9295  PyObject *__pyx_r = 0;
9296  __Pyx_RefNannyDeclarations
9297  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9298  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9299 
9300  /* function exit code */
9301  __Pyx_RefNannyFinishContext();
9302  return __pyx_r;
9303  }
9304 
9305  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9306  PyObject *__pyx_r = NULL;
9307  __Pyx_RefNannyDeclarations
9308  PyObject *__pyx_t_1 = NULL;
9309  PyObject *__pyx_t_2 = NULL;
9310  int __pyx_t_3;
9311  int __pyx_t_4;
9312  int __pyx_t_5;
9313  __Pyx_RefNannySetupContext("pow", 0);
9314 
9315  /* "PyClical.pyx":998
9316  * 1
9317  * """
9318  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9319  * return clifford().wrap( self.instance.pow(m) )
9320  * else:
9321  */
9322  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9323  __Pyx_GOTREF(__pyx_t_1);
9324  __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)
9325  __Pyx_GOTREF(__pyx_t_2);
9326  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9327  __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)
9328  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9329  __pyx_t_4 = (__pyx_t_3 != 0);
9330  if (__pyx_t_4) {
9331 
9332  /* "PyClical.pyx":999
9333  * """
9334  * if isinstance(m, numbers.Integral):
9335  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9336  * else:
9337  * return exp(m * log(self))
9338  */
9339  __Pyx_XDECREF(__pyx_r);
9340  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9341  __Pyx_GOTREF(__pyx_t_2);
9342  __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)
9343  __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)
9344  __Pyx_GOTREF(__pyx_t_1);
9345  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9346  __pyx_r = __pyx_t_1;
9347  __pyx_t_1 = 0;
9348  goto __pyx_L0;
9349 
9350  /* "PyClical.pyx":998
9351  * 1
9352  * """
9353  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9354  * return clifford().wrap( self.instance.pow(m) )
9355  * else:
9356  */
9357  }
9358 
9359  /* "PyClical.pyx":1001
9360  * return clifford().wrap( self.instance.pow(m) )
9361  * else:
9362  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9363  *
9364  * def outer_pow(self, m):
9365  */
9366  /*else*/ {
9367  __Pyx_XDECREF(__pyx_r);
9368  __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)
9369  __Pyx_GOTREF(__pyx_t_1);
9370  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9371  __Pyx_GOTREF(__pyx_t_2);
9372  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9373  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9374  __Pyx_GOTREF(__pyx_t_1);
9375  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9376  __pyx_r = __pyx_t_1;
9377  __pyx_t_1 = 0;
9378  goto __pyx_L0;
9379  }
9380 
9381  /* "PyClical.pyx":979
9382  * return pow(self, m)
9383  *
9384  * def pow(self, m): # <<<<<<<<<<<<<<
9385  * """
9386  * Power: self to the m.
9387  */
9388 
9389  /* function exit code */
9390  __pyx_L1_error:;
9391  __Pyx_XDECREF(__pyx_t_1);
9392  __Pyx_XDECREF(__pyx_t_2);
9393  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9394  __pyx_r = NULL;
9395  __pyx_L0:;
9396  __Pyx_XGIVEREF(__pyx_r);
9397  __Pyx_RefNannyFinishContext();
9398  return __pyx_r;
9399  }
9400 
9401  /* "PyClical.pyx":1003
9402  * return exp(m * log(self))
9403  *
9404  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9405  * """
9406  * Outer product power.
9407  */
9408 
9409  /* Python wrapper */
9410  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9411  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 ";
9412  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9413  PyObject *__pyx_r = 0;
9414  __Pyx_RefNannyDeclarations
9415  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9416  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9417 
9418  /* function exit code */
9419  __Pyx_RefNannyFinishContext();
9420  return __pyx_r;
9421  }
9422 
9423  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9424  PyObject *__pyx_r = NULL;
9425  __Pyx_RefNannyDeclarations
9426  PyObject *__pyx_t_1 = NULL;
9427  int __pyx_t_2;
9428  PyObject *__pyx_t_3 = NULL;
9429  __Pyx_RefNannySetupContext("outer_pow", 0);
9430 
9431  /* "PyClical.pyx":1017
9432  *
9433  * """
9434  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9435  *
9436  * def __call__(self, grade):
9437  */
9438  __Pyx_XDECREF(__pyx_r);
9439  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9440  __Pyx_GOTREF(__pyx_t_1);
9441  __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)
9442  __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)
9443  __Pyx_GOTREF(__pyx_t_3);
9444  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9445  __pyx_r = __pyx_t_3;
9446  __pyx_t_3 = 0;
9447  goto __pyx_L0;
9448 
9449  /* "PyClical.pyx":1003
9450  * return exp(m * log(self))
9451  *
9452  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9453  * """
9454  * Outer product power.
9455  */
9456 
9457  /* function exit code */
9458  __pyx_L1_error:;
9459  __Pyx_XDECREF(__pyx_t_1);
9460  __Pyx_XDECREF(__pyx_t_3);
9461  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9462  __pyx_r = NULL;
9463  __pyx_L0:;
9464  __Pyx_XGIVEREF(__pyx_r);
9465  __Pyx_RefNannyFinishContext();
9466  return __pyx_r;
9467  }
9468 
9469  /* "PyClical.pyx":1019
9470  * return clifford().wrap( self.instance.outer_pow(m) )
9471  *
9472  * def __call__(self, grade): # <<<<<<<<<<<<<<
9473  * """
9474  * Pure grade-vector part.
9475  */
9476 
9477  /* Python wrapper */
9478  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9479  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 ";
9480  #if CYTHON_COMPILING_IN_CPYTHON
9481  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9482  #endif
9483  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9484  PyObject *__pyx_v_grade = 0;
9485  PyObject *__pyx_r = 0;
9486  __Pyx_RefNannyDeclarations
9487  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9488  {
9489  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9490  PyObject* values[1] = {0};
9491  if (unlikely(__pyx_kwds)) {
9492  Py_ssize_t kw_args;
9493  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9494  switch (pos_args) {
9495  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9496  CYTHON_FALLTHROUGH;
9497  case 0: break;
9498  default: goto __pyx_L5_argtuple_error;
9499  }
9500  kw_args = PyDict_Size(__pyx_kwds);
9501  switch (pos_args) {
9502  case 0:
9503  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9504  else goto __pyx_L5_argtuple_error;
9505  }
9506  if (unlikely(kw_args > 0)) {
9507  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9508  }
9509  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9510  goto __pyx_L5_argtuple_error;
9511  } else {
9512  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9513  }
9514  __pyx_v_grade = values[0];
9515  }
9516  goto __pyx_L4_argument_unpacking_done;
9517  __pyx_L5_argtuple_error:;
9518  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9519  __pyx_L3_error:;
9520  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9521  __Pyx_RefNannyFinishContext();
9522  return NULL;
9523  __pyx_L4_argument_unpacking_done:;
9524  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9525 
9526  /* function exit code */
9527  __Pyx_RefNannyFinishContext();
9528  return __pyx_r;
9529  }
9530 
9531  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9532  PyObject *__pyx_r = NULL;
9533  __Pyx_RefNannyDeclarations
9534  PyObject *__pyx_t_1 = NULL;
9535  int __pyx_t_2;
9536  PyObject *__pyx_t_3 = NULL;
9537  __Pyx_RefNannySetupContext("__call__", 0);
9538 
9539  /* "PyClical.pyx":1036
9540  * 0
9541  * """
9542  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9543  *
9544  * def scalar(self):
9545  */
9546  __Pyx_XDECREF(__pyx_r);
9547  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9548  __Pyx_GOTREF(__pyx_t_1);
9549  __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)
9550  __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)
9551  __Pyx_GOTREF(__pyx_t_3);
9552  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9553  __pyx_r = __pyx_t_3;
9554  __pyx_t_3 = 0;
9555  goto __pyx_L0;
9556 
9557  /* "PyClical.pyx":1019
9558  * return clifford().wrap( self.instance.outer_pow(m) )
9559  *
9560  * def __call__(self, grade): # <<<<<<<<<<<<<<
9561  * """
9562  * Pure grade-vector part.
9563  */
9564 
9565  /* function exit code */
9566  __pyx_L1_error:;
9567  __Pyx_XDECREF(__pyx_t_1);
9568  __Pyx_XDECREF(__pyx_t_3);
9569  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9570  __pyx_r = NULL;
9571  __pyx_L0:;
9572  __Pyx_XGIVEREF(__pyx_r);
9573  __Pyx_RefNannyFinishContext();
9574  return __pyx_r;
9575  }
9576 
9577  /* "PyClical.pyx":1038
9578  * return clifford().wrap( self.instance.call(grade) )
9579  *
9580  * def scalar(self): # <<<<<<<<<<<<<<
9581  * """
9582  * Scalar part.
9583  */
9584 
9585  /* Python wrapper */
9586  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9587  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 ";
9588  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9589  PyObject *__pyx_r = 0;
9590  __Pyx_RefNannyDeclarations
9591  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9592  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9593 
9594  /* function exit code */
9595  __Pyx_RefNannyFinishContext();
9596  return __pyx_r;
9597  }
9598 
9599  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9600  PyObject *__pyx_r = NULL;
9601  __Pyx_RefNannyDeclarations
9602  PyObject *__pyx_t_1 = NULL;
9603  __Pyx_RefNannySetupContext("scalar", 0);
9604 
9605  /* "PyClical.pyx":1047
9606  * 0.0
9607  * """
9608  * return self.instance.scalar() # <<<<<<<<<<<<<<
9609  *
9610  * def pure(self):
9611  */
9612  __Pyx_XDECREF(__pyx_r);
9613  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9614  __Pyx_GOTREF(__pyx_t_1);
9615  __pyx_r = __pyx_t_1;
9616  __pyx_t_1 = 0;
9617  goto __pyx_L0;
9618 
9619  /* "PyClical.pyx":1038
9620  * return clifford().wrap( self.instance.call(grade) )
9621  *
9622  * def scalar(self): # <<<<<<<<<<<<<<
9623  * """
9624  * Scalar part.
9625  */
9626 
9627  /* function exit code */
9628  __pyx_L1_error:;
9629  __Pyx_XDECREF(__pyx_t_1);
9630  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9631  __pyx_r = NULL;
9632  __pyx_L0:;
9633  __Pyx_XGIVEREF(__pyx_r);
9634  __Pyx_RefNannyFinishContext();
9635  return __pyx_r;
9636  }
9637 
9638  /* "PyClical.pyx":1049
9639  * return self.instance.scalar()
9640  *
9641  * def pure(self): # <<<<<<<<<<<<<<
9642  * """
9643  * Pure part.
9644  */
9645 
9646  /* Python wrapper */
9647  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9648  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 ";
9649  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9650  PyObject *__pyx_r = 0;
9651  __Pyx_RefNannyDeclarations
9652  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9653  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9654 
9655  /* function exit code */
9656  __Pyx_RefNannyFinishContext();
9657  return __pyx_r;
9658  }
9659 
9660  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9661  PyObject *__pyx_r = NULL;
9662  __Pyx_RefNannyDeclarations
9663  PyObject *__pyx_t_1 = NULL;
9664  PyObject *__pyx_t_2 = NULL;
9665  __Pyx_RefNannySetupContext("pure", 0);
9666 
9667  /* "PyClical.pyx":1058
9668  * {1,2}
9669  * """
9670  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9671  *
9672  * def even(self):
9673  */
9674  __Pyx_XDECREF(__pyx_r);
9675  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9676  __Pyx_GOTREF(__pyx_t_1);
9677  __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)
9678  __Pyx_GOTREF(__pyx_t_2);
9679  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9680  __pyx_r = __pyx_t_2;
9681  __pyx_t_2 = 0;
9682  goto __pyx_L0;
9683 
9684  /* "PyClical.pyx":1049
9685  * return self.instance.scalar()
9686  *
9687  * def pure(self): # <<<<<<<<<<<<<<
9688  * """
9689  * Pure part.
9690  */
9691 
9692  /* function exit code */
9693  __pyx_L1_error:;
9694  __Pyx_XDECREF(__pyx_t_1);
9695  __Pyx_XDECREF(__pyx_t_2);
9696  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9697  __pyx_r = NULL;
9698  __pyx_L0:;
9699  __Pyx_XGIVEREF(__pyx_r);
9700  __Pyx_RefNannyFinishContext();
9701  return __pyx_r;
9702  }
9703 
9704  /* "PyClical.pyx":1060
9705  * return clifford().wrap( self.instance.pure() )
9706  *
9707  * def even(self): # <<<<<<<<<<<<<<
9708  * """
9709  * Even part of multivector, sum of even grade terms.
9710  */
9711 
9712  /* Python wrapper */
9713  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9714  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 ";
9715  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9716  PyObject *__pyx_r = 0;
9717  __Pyx_RefNannyDeclarations
9718  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9719  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9720 
9721  /* function exit code */
9722  __Pyx_RefNannyFinishContext();
9723  return __pyx_r;
9724  }
9725 
9726  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9727  PyObject *__pyx_r = NULL;
9728  __Pyx_RefNannyDeclarations
9729  PyObject *__pyx_t_1 = NULL;
9730  PyObject *__pyx_t_2 = NULL;
9731  __Pyx_RefNannySetupContext("even", 0);
9732 
9733  /* "PyClical.pyx":1067
9734  * 1+{1,2}
9735  * """
9736  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9737  *
9738  * def odd(self):
9739  */
9740  __Pyx_XDECREF(__pyx_r);
9741  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9742  __Pyx_GOTREF(__pyx_t_1);
9743  __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)
9744  __Pyx_GOTREF(__pyx_t_2);
9745  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9746  __pyx_r = __pyx_t_2;
9747  __pyx_t_2 = 0;
9748  goto __pyx_L0;
9749 
9750  /* "PyClical.pyx":1060
9751  * return clifford().wrap( self.instance.pure() )
9752  *
9753  * def even(self): # <<<<<<<<<<<<<<
9754  * """
9755  * Even part of multivector, sum of even grade terms.
9756  */
9757 
9758  /* function exit code */
9759  __pyx_L1_error:;
9760  __Pyx_XDECREF(__pyx_t_1);
9761  __Pyx_XDECREF(__pyx_t_2);
9762  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9763  __pyx_r = NULL;
9764  __pyx_L0:;
9765  __Pyx_XGIVEREF(__pyx_r);
9766  __Pyx_RefNannyFinishContext();
9767  return __pyx_r;
9768  }
9769 
9770  /* "PyClical.pyx":1069
9771  * return clifford().wrap( self.instance.even() )
9772  *
9773  * def odd(self): # <<<<<<<<<<<<<<
9774  * """
9775  * Odd part of multivector, sum of odd grade terms.
9776  */
9777 
9778  /* Python wrapper */
9779  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9780  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 ";
9781  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9782  PyObject *__pyx_r = 0;
9783  __Pyx_RefNannyDeclarations
9784  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9785  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9786 
9787  /* function exit code */
9788  __Pyx_RefNannyFinishContext();
9789  return __pyx_r;
9790  }
9791 
9792  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9793  PyObject *__pyx_r = NULL;
9794  __Pyx_RefNannyDeclarations
9795  PyObject *__pyx_t_1 = NULL;
9796  PyObject *__pyx_t_2 = NULL;
9797  __Pyx_RefNannySetupContext("odd", 0);
9798 
9799  /* "PyClical.pyx":1076
9800  * {1}
9801  * """
9802  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9803  *
9804  * def vector_part(self, frm = None):
9805  */
9806  __Pyx_XDECREF(__pyx_r);
9807  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9808  __Pyx_GOTREF(__pyx_t_1);
9809  __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)
9810  __Pyx_GOTREF(__pyx_t_2);
9811  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9812  __pyx_r = __pyx_t_2;
9813  __pyx_t_2 = 0;
9814  goto __pyx_L0;
9815 
9816  /* "PyClical.pyx":1069
9817  * return clifford().wrap( self.instance.even() )
9818  *
9819  * def odd(self): # <<<<<<<<<<<<<<
9820  * """
9821  * Odd part of multivector, sum of odd grade terms.
9822  */
9823 
9824  /* function exit code */
9825  __pyx_L1_error:;
9826  __Pyx_XDECREF(__pyx_t_1);
9827  __Pyx_XDECREF(__pyx_t_2);
9828  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9829  __pyx_r = NULL;
9830  __pyx_L0:;
9831  __Pyx_XGIVEREF(__pyx_r);
9832  __Pyx_RefNannyFinishContext();
9833  return __pyx_r;
9834  }
9835 
9836  /* "PyClical.pyx":1078
9837  * return clifford().wrap( self.instance.odd() )
9838  *
9839  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9840  * """
9841  * Vector part of multivector, as a Python list, with respect to frm.
9842  */
9843 
9844  /* Python wrapper */
9845  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9846  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 ";
9847  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9848  PyObject *__pyx_v_frm = 0;
9849  PyObject *__pyx_r = 0;
9850  __Pyx_RefNannyDeclarations
9851  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9852  {
9853  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9854  PyObject* values[1] = {0};
9855  values[0] = ((PyObject *)Py_None);
9856  if (unlikely(__pyx_kwds)) {
9857  Py_ssize_t kw_args;
9858  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9859  switch (pos_args) {
9860  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9861  CYTHON_FALLTHROUGH;
9862  case 0: break;
9863  default: goto __pyx_L5_argtuple_error;
9864  }
9865  kw_args = PyDict_Size(__pyx_kwds);
9866  switch (pos_args) {
9867  case 0:
9868  if (kw_args > 0) {
9869  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9870  if (value) { values[0] = value; kw_args--; }
9871  }
9872  }
9873  if (unlikely(kw_args > 0)) {
9874  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9875  }
9876  } else {
9877  switch (PyTuple_GET_SIZE(__pyx_args)) {
9878  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9879  CYTHON_FALLTHROUGH;
9880  case 0: break;
9881  default: goto __pyx_L5_argtuple_error;
9882  }
9883  }
9884  __pyx_v_frm = values[0];
9885  }
9886  goto __pyx_L4_argument_unpacking_done;
9887  __pyx_L5_argtuple_error:;
9888  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9889  __pyx_L3_error:;
9890  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9891  __Pyx_RefNannyFinishContext();
9892  return NULL;
9893  __pyx_L4_argument_unpacking_done:;
9894  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9895 
9896  /* function exit code */
9897  __Pyx_RefNannyFinishContext();
9898  return __pyx_r;
9899  }
9900 
9901  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9902  PyObject *__pyx_v_error_msg_prefix = NULL;
9903  std::vector<scalar_t> __pyx_v_vec;
9904  int __pyx_v_n;
9905  int __pyx_v_i;
9906  PyObject *__pyx_v_lst = NULL;
9907  PyObject *__pyx_v_err = NULL;
9908  PyObject *__pyx_r = NULL;
9909  __Pyx_RefNannyDeclarations
9910  PyObject *__pyx_t_1 = NULL;
9911  PyObject *__pyx_t_2 = NULL;
9912  PyObject *__pyx_t_3 = NULL;
9913  int __pyx_t_4;
9914  int __pyx_t_5;
9915  std::vector<scalar_t> __pyx_t_6;
9916  PyObject *__pyx_t_7 = NULL;
9917  int __pyx_t_8;
9918  int __pyx_t_9;
9919  int __pyx_t_10;
9920  PyObject *__pyx_t_11 = NULL;
9921  PyObject *__pyx_t_12 = NULL;
9922  PyObject *__pyx_t_13 = NULL;
9923  PyObject *__pyx_t_14 = NULL;
9924  PyObject *__pyx_t_15 = NULL;
9925  __Pyx_RefNannySetupContext("vector_part", 0);
9926 
9927  /* "PyClical.pyx":1087
9928  * [0.0, 2.0, 3.0]
9929  * """
9930  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9931  * cdef vector[scalar_t] vec
9932  * cdef int n
9933  */
9934  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9935  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9936 
9937  /* "PyClical.pyx":1091
9938  * cdef int n
9939  * cdef int i
9940  * try: # <<<<<<<<<<<<<<
9941  * if frm is None:
9942  * vec = self.instance.vector_part()
9943  */
9944  {
9945  __Pyx_PyThreadState_declare
9946  __Pyx_PyThreadState_assign
9947  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9948  __Pyx_XGOTREF(__pyx_t_1);
9949  __Pyx_XGOTREF(__pyx_t_2);
9950  __Pyx_XGOTREF(__pyx_t_3);
9951  /*try:*/ {
9952 
9953  /* "PyClical.pyx":1092
9954  * cdef int i
9955  * try:
9956  * if frm is None: # <<<<<<<<<<<<<<
9957  * vec = self.instance.vector_part()
9958  * else:
9959  */
9960  __pyx_t_4 = (__pyx_v_frm == Py_None);
9961  __pyx_t_5 = (__pyx_t_4 != 0);
9962  if (__pyx_t_5) {
9963 
9964  /* "PyClical.pyx":1093
9965  * try:
9966  * if frm is None:
9967  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9968  * else:
9969  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9970  */
9971  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9972  __pyx_v_vec = __pyx_t_6;
9973 
9974  /* "PyClical.pyx":1092
9975  * cdef int i
9976  * try:
9977  * if frm is None: # <<<<<<<<<<<<<<
9978  * vec = self.instance.vector_part()
9979  * else:
9980  */
9981  goto __pyx_L9;
9982  }
9983 
9984  /* "PyClical.pyx":1095
9985  * vec = self.instance.vector_part()
9986  * else:
9987  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9988  * n = vec.size()
9989  * lst = [0.0]*n
9990  */
9991  /*else*/ {
9992  try {
9993  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9994  } catch(...) {
9995  __Pyx_CppExn2PyErr();
9996  __PYX_ERR(0, 1095, __pyx_L3_error)
9997  }
9998  __pyx_v_vec = __pyx_t_6;
9999  }
10000  __pyx_L9:;
10001 
10002  /* "PyClical.pyx":1096
10003  * else:
10004  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10005  * n = vec.size() # <<<<<<<<<<<<<<
10006  * lst = [0.0]*n
10007  * for i in xrange(n):
10008  */
10009  __pyx_v_n = __pyx_v_vec.size();
10010 
10011  /* "PyClical.pyx":1097
10012  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10013  * n = vec.size()
10014  * lst = [0.0]*n # <<<<<<<<<<<<<<
10015  * for i in xrange(n):
10016  * lst[i] = vec[i]
10017  */
10018  __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)
10019  __Pyx_GOTREF(__pyx_t_7);
10020  { Py_ssize_t __pyx_temp;
10021  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10022  __Pyx_INCREF(__pyx_float_0_0);
10023  __Pyx_GIVEREF(__pyx_float_0_0);
10024  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10025  }
10026  }
10027  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10028  __pyx_t_7 = 0;
10029 
10030  /* "PyClical.pyx":1098
10031  * n = vec.size()
10032  * lst = [0.0]*n
10033  * for i in xrange(n): # <<<<<<<<<<<<<<
10034  * lst[i] = vec[i]
10035  * return lst
10036  */
10037  __pyx_t_8 = __pyx_v_n;
10038  __pyx_t_9 = __pyx_t_8;
10039  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10040  __pyx_v_i = __pyx_t_10;
10041 
10042  /* "PyClical.pyx":1099
10043  * lst = [0.0]*n
10044  * for i in xrange(n):
10045  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10046  * return lst
10047  * except RuntimeError as err:
10048  */
10049  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10050  __Pyx_GOTREF(__pyx_t_7);
10051  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)
10052  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10053  }
10054 
10055  /* "PyClical.pyx":1100
10056  * for i in xrange(n):
10057  * lst[i] = vec[i]
10058  * return lst # <<<<<<<<<<<<<<
10059  * except RuntimeError as err:
10060  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10061  */
10062  __Pyx_XDECREF(__pyx_r);
10063  __Pyx_INCREF(__pyx_v_lst);
10064  __pyx_r = __pyx_v_lst;
10065  goto __pyx_L7_try_return;
10066 
10067  /* "PyClical.pyx":1091
10068  * cdef int n
10069  * cdef int i
10070  * try: # <<<<<<<<<<<<<<
10071  * if frm is None:
10072  * vec = self.instance.vector_part()
10073  */
10074  }
10075  __pyx_L3_error:;
10076  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10077 
10078  /* "PyClical.pyx":1101
10079  * lst[i] = vec[i]
10080  * return lst
10081  * except RuntimeError as err: # <<<<<<<<<<<<<<
10082  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10083  * + repr(frm) + " as frame:\n\t"
10084  */
10085  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10086  if (__pyx_t_8) {
10087  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10088  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10089  __Pyx_GOTREF(__pyx_t_7);
10090  __Pyx_GOTREF(__pyx_t_11);
10091  __Pyx_GOTREF(__pyx_t_12);
10092  __Pyx_INCREF(__pyx_t_11);
10093  __pyx_v_err = __pyx_t_11;
10094 
10095  /* "PyClical.pyx":1102
10096  * return lst
10097  * except RuntimeError as err:
10098  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10099  * + repr(frm) + " as frame:\n\t"
10100  * + str(err))
10101  */
10102  __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)
10103  __Pyx_GOTREF(__pyx_t_13);
10104  __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)
10105  __Pyx_GOTREF(__pyx_t_14);
10106  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10107  __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)
10108  __Pyx_GOTREF(__pyx_t_13);
10109  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10110 
10111  /* "PyClical.pyx":1103
10112  * except RuntimeError as err:
10113  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10114  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10115  * + str(err))
10116  *
10117  */
10118  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10119  __Pyx_GOTREF(__pyx_t_14);
10120  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10121  __Pyx_GOTREF(__pyx_t_15);
10122  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10123  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10124  __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)
10125  __Pyx_GOTREF(__pyx_t_14);
10126  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10127 
10128  /* "PyClical.pyx":1104
10129  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10130  * + repr(frm) + " as frame:\n\t"
10131  * + str(err)) # <<<<<<<<<<<<<<
10132  *
10133  * def involute(self):
10134  */
10135  __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)
10136  __Pyx_GOTREF(__pyx_t_15);
10137  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10138  __Pyx_GOTREF(__pyx_t_13);
10139  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10140  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10141 
10142  /* "PyClical.pyx":1102
10143  * return lst
10144  * except RuntimeError as err:
10145  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10146  * + repr(frm) + " as frame:\n\t"
10147  * + str(err))
10148  */
10149  __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)
10150  __Pyx_GOTREF(__pyx_t_15);
10151  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10152  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10153  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10154  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10155  }
10156  goto __pyx_L5_except_error;
10157  __pyx_L5_except_error:;
10158 
10159  /* "PyClical.pyx":1091
10160  * cdef int n
10161  * cdef int i
10162  * try: # <<<<<<<<<<<<<<
10163  * if frm is None:
10164  * vec = self.instance.vector_part()
10165  */
10166  __Pyx_XGIVEREF(__pyx_t_1);
10167  __Pyx_XGIVEREF(__pyx_t_2);
10168  __Pyx_XGIVEREF(__pyx_t_3);
10169  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10170  goto __pyx_L1_error;
10171  __pyx_L7_try_return:;
10172  __Pyx_XGIVEREF(__pyx_t_1);
10173  __Pyx_XGIVEREF(__pyx_t_2);
10174  __Pyx_XGIVEREF(__pyx_t_3);
10175  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10176  goto __pyx_L0;
10177  }
10178 
10179  /* "PyClical.pyx":1078
10180  * return clifford().wrap( self.instance.odd() )
10181  *
10182  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10183  * """
10184  * Vector part of multivector, as a Python list, with respect to frm.
10185  */
10186 
10187  /* function exit code */
10188  __pyx_L1_error:;
10189  __Pyx_XDECREF(__pyx_t_7);
10190  __Pyx_XDECREF(__pyx_t_11);
10191  __Pyx_XDECREF(__pyx_t_12);
10192  __Pyx_XDECREF(__pyx_t_13);
10193  __Pyx_XDECREF(__pyx_t_14);
10194  __Pyx_XDECREF(__pyx_t_15);
10195  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10196  __pyx_r = NULL;
10197  __pyx_L0:;
10198  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10199  __Pyx_XDECREF(__pyx_v_lst);
10200  __Pyx_XDECREF(__pyx_v_err);
10201  __Pyx_XGIVEREF(__pyx_r);
10202  __Pyx_RefNannyFinishContext();
10203  return __pyx_r;
10204  }
10205 
10206  /* "PyClical.pyx":1106
10207  * + str(err))
10208  *
10209  * def involute(self): # <<<<<<<<<<<<<<
10210  * """
10211  * Main involution, each {i} is replaced by -{i} in each term,
10212  */
10213 
10214  /* Python wrapper */
10215  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10216  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 ";
10217  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10218  PyObject *__pyx_r = 0;
10219  __Pyx_RefNannyDeclarations
10220  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10221  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10222 
10223  /* function exit code */
10224  __Pyx_RefNannyFinishContext();
10225  return __pyx_r;
10226  }
10227 
10228  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10229  PyObject *__pyx_r = NULL;
10230  __Pyx_RefNannyDeclarations
10231  PyObject *__pyx_t_1 = NULL;
10232  PyObject *__pyx_t_2 = NULL;
10233  __Pyx_RefNannySetupContext("involute", 0);
10234 
10235  /* "PyClical.pyx":1120
10236  * 1-{1}+{1,2}
10237  * """
10238  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10239  *
10240  * def reverse(self):
10241  */
10242  __Pyx_XDECREF(__pyx_r);
10243  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10244  __Pyx_GOTREF(__pyx_t_1);
10245  __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)
10246  __Pyx_GOTREF(__pyx_t_2);
10247  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10248  __pyx_r = __pyx_t_2;
10249  __pyx_t_2 = 0;
10250  goto __pyx_L0;
10251 
10252  /* "PyClical.pyx":1106
10253  * + str(err))
10254  *
10255  * def involute(self): # <<<<<<<<<<<<<<
10256  * """
10257  * Main involution, each {i} is replaced by -{i} in each term,
10258  */
10259 
10260  /* function exit code */
10261  __pyx_L1_error:;
10262  __Pyx_XDECREF(__pyx_t_1);
10263  __Pyx_XDECREF(__pyx_t_2);
10264  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10265  __pyx_r = NULL;
10266  __pyx_L0:;
10267  __Pyx_XGIVEREF(__pyx_r);
10268  __Pyx_RefNannyFinishContext();
10269  return __pyx_r;
10270  }
10271 
10272  /* "PyClical.pyx":1122
10273  * return clifford().wrap( self.instance.involute() )
10274  *
10275  * def reverse(self): # <<<<<<<<<<<<<<
10276  * """
10277  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10278  */
10279 
10280  /* Python wrapper */
10281  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10282  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 ";
10283  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10284  PyObject *__pyx_r = 0;
10285  __Pyx_RefNannyDeclarations
10286  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10287  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10288 
10289  /* function exit code */
10290  __Pyx_RefNannyFinishContext();
10291  return __pyx_r;
10292  }
10293 
10294  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10295  PyObject *__pyx_r = NULL;
10296  __Pyx_RefNannyDeclarations
10297  PyObject *__pyx_t_1 = NULL;
10298  PyObject *__pyx_t_2 = NULL;
10299  __Pyx_RefNannySetupContext("reverse", 0);
10300 
10301  /* "PyClical.pyx":1135
10302  * 1+{1}-{1,2}
10303  * """
10304  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10305  *
10306  * def conj(self):
10307  */
10308  __Pyx_XDECREF(__pyx_r);
10309  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10310  __Pyx_GOTREF(__pyx_t_1);
10311  __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)
10312  __Pyx_GOTREF(__pyx_t_2);
10313  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10314  __pyx_r = __pyx_t_2;
10315  __pyx_t_2 = 0;
10316  goto __pyx_L0;
10317 
10318  /* "PyClical.pyx":1122
10319  * return clifford().wrap( self.instance.involute() )
10320  *
10321  * def reverse(self): # <<<<<<<<<<<<<<
10322  * """
10323  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10324  */
10325 
10326  /* function exit code */
10327  __pyx_L1_error:;
10328  __Pyx_XDECREF(__pyx_t_1);
10329  __Pyx_XDECREF(__pyx_t_2);
10330  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10331  __pyx_r = NULL;
10332  __pyx_L0:;
10333  __Pyx_XGIVEREF(__pyx_r);
10334  __Pyx_RefNannyFinishContext();
10335  return __pyx_r;
10336  }
10337 
10338  /* "PyClical.pyx":1137
10339  * return clifford().wrap( self.instance.reverse() )
10340  *
10341  * def conj(self): # <<<<<<<<<<<<<<
10342  * """
10343  * Conjugation, reverse o involute == involute o reverse.
10344  */
10345 
10346  /* Python wrapper */
10347  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10348  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 ";
10349  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10350  PyObject *__pyx_r = 0;
10351  __Pyx_RefNannyDeclarations
10352  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10353  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10354 
10355  /* function exit code */
10356  __Pyx_RefNannyFinishContext();
10357  return __pyx_r;
10358  }
10359 
10360  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10361  PyObject *__pyx_r = NULL;
10362  __Pyx_RefNannyDeclarations
10363  PyObject *__pyx_t_1 = NULL;
10364  PyObject *__pyx_t_2 = NULL;
10365  __Pyx_RefNannySetupContext("conj", 0);
10366 
10367  /* "PyClical.pyx":1150
10368  * 1-{1}-{1,2}
10369  * """
10370  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10371  *
10372  * def quad(self):
10373  */
10374  __Pyx_XDECREF(__pyx_r);
10375  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10376  __Pyx_GOTREF(__pyx_t_1);
10377  __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)
10378  __Pyx_GOTREF(__pyx_t_2);
10379  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10380  __pyx_r = __pyx_t_2;
10381  __pyx_t_2 = 0;
10382  goto __pyx_L0;
10383 
10384  /* "PyClical.pyx":1137
10385  * return clifford().wrap( self.instance.reverse() )
10386  *
10387  * def conj(self): # <<<<<<<<<<<<<<
10388  * """
10389  * Conjugation, reverse o involute == involute o reverse.
10390  */
10391 
10392  /* function exit code */
10393  __pyx_L1_error:;
10394  __Pyx_XDECREF(__pyx_t_1);
10395  __Pyx_XDECREF(__pyx_t_2);
10396  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10397  __pyx_r = NULL;
10398  __pyx_L0:;
10399  __Pyx_XGIVEREF(__pyx_r);
10400  __Pyx_RefNannyFinishContext();
10401  return __pyx_r;
10402  }
10403 
10404  /* "PyClical.pyx":1152
10405  * return clifford().wrap( self.instance.conj() )
10406  *
10407  * def quad(self): # <<<<<<<<<<<<<<
10408  * """
10409  * Quadratic form == (rev(x)*x)(0).
10410  */
10411 
10412  /* Python wrapper */
10413  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10414  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 ";
10415  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10416  PyObject *__pyx_r = 0;
10417  __Pyx_RefNannyDeclarations
10418  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10419  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10420 
10421  /* function exit code */
10422  __Pyx_RefNannyFinishContext();
10423  return __pyx_r;
10424  }
10425 
10426  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10427  PyObject *__pyx_r = NULL;
10428  __Pyx_RefNannyDeclarations
10429  PyObject *__pyx_t_1 = NULL;
10430  __Pyx_RefNannySetupContext("quad", 0);
10431 
10432  /* "PyClical.pyx":1161
10433  * 2.0
10434  * """
10435  * return self.instance.quad() # <<<<<<<<<<<<<<
10436  *
10437  * def norm(self):
10438  */
10439  __Pyx_XDECREF(__pyx_r);
10440  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10441  __Pyx_GOTREF(__pyx_t_1);
10442  __pyx_r = __pyx_t_1;
10443  __pyx_t_1 = 0;
10444  goto __pyx_L0;
10445 
10446  /* "PyClical.pyx":1152
10447  * return clifford().wrap( self.instance.conj() )
10448  *
10449  * def quad(self): # <<<<<<<<<<<<<<
10450  * """
10451  * Quadratic form == (rev(x)*x)(0).
10452  */
10453 
10454  /* function exit code */
10455  __pyx_L1_error:;
10456  __Pyx_XDECREF(__pyx_t_1);
10457  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10458  __pyx_r = NULL;
10459  __pyx_L0:;
10460  __Pyx_XGIVEREF(__pyx_r);
10461  __Pyx_RefNannyFinishContext();
10462  return __pyx_r;
10463  }
10464 
10465  /* "PyClical.pyx":1163
10466  * return self.instance.quad()
10467  *
10468  * def norm(self): # <<<<<<<<<<<<<<
10469  * """
10470  * Norm == sum of squares of coordinates.
10471  */
10472 
10473  /* Python wrapper */
10474  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10475  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 ";
10476  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10477  PyObject *__pyx_r = 0;
10478  __Pyx_RefNannyDeclarations
10479  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10480  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10481 
10482  /* function exit code */
10483  __Pyx_RefNannyFinishContext();
10484  return __pyx_r;
10485  }
10486 
10487  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10488  PyObject *__pyx_r = NULL;
10489  __Pyx_RefNannyDeclarations
10490  PyObject *__pyx_t_1 = NULL;
10491  __Pyx_RefNannySetupContext("norm", 0);
10492 
10493  /* "PyClical.pyx":1172
10494  * 4.0
10495  * """
10496  * return self.instance.norm() # <<<<<<<<<<<<<<
10497  *
10498  * def abs(self):
10499  */
10500  __Pyx_XDECREF(__pyx_r);
10501  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10502  __Pyx_GOTREF(__pyx_t_1);
10503  __pyx_r = __pyx_t_1;
10504  __pyx_t_1 = 0;
10505  goto __pyx_L0;
10506 
10507  /* "PyClical.pyx":1163
10508  * return self.instance.quad()
10509  *
10510  * def norm(self): # <<<<<<<<<<<<<<
10511  * """
10512  * Norm == sum of squares of coordinates.
10513  */
10514 
10515  /* function exit code */
10516  __pyx_L1_error:;
10517  __Pyx_XDECREF(__pyx_t_1);
10518  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10519  __pyx_r = NULL;
10520  __pyx_L0:;
10521  __Pyx_XGIVEREF(__pyx_r);
10522  __Pyx_RefNannyFinishContext();
10523  return __pyx_r;
10524  }
10525 
10526  /* "PyClical.pyx":1174
10527  * return self.instance.norm()
10528  *
10529  * def abs(self): # <<<<<<<<<<<<<<
10530  * """
10531  * Absolute value: square root of norm.
10532  */
10533 
10534  /* Python wrapper */
10535  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10536  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 ";
10537  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10538  PyObject *__pyx_r = 0;
10539  __Pyx_RefNannyDeclarations
10540  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10541  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10542 
10543  /* function exit code */
10544  __Pyx_RefNannyFinishContext();
10545  return __pyx_r;
10546  }
10547 
10548  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10549  PyObject *__pyx_r = NULL;
10550  __Pyx_RefNannyDeclarations
10551  PyObject *__pyx_t_1 = NULL;
10552  __Pyx_RefNannySetupContext("abs", 0);
10553 
10554  /* "PyClical.pyx":1181
10555  * 2.0
10556  * """
10557  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10558  *
10559  * def max_abs(self):
10560  */
10561  __Pyx_XDECREF(__pyx_r);
10562  __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)
10563  __Pyx_GOTREF(__pyx_t_1);
10564  __pyx_r = __pyx_t_1;
10565  __pyx_t_1 = 0;
10566  goto __pyx_L0;
10567 
10568  /* "PyClical.pyx":1174
10569  * return self.instance.norm()
10570  *
10571  * def abs(self): # <<<<<<<<<<<<<<
10572  * """
10573  * Absolute value: square root of norm.
10574  */
10575 
10576  /* function exit code */
10577  __pyx_L1_error:;
10578  __Pyx_XDECREF(__pyx_t_1);
10579  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10580  __pyx_r = NULL;
10581  __pyx_L0:;
10582  __Pyx_XGIVEREF(__pyx_r);
10583  __Pyx_RefNannyFinishContext();
10584  return __pyx_r;
10585  }
10586 
10587  /* "PyClical.pyx":1183
10588  * return glucat.abs( self.unwrap() )
10589  *
10590  * def max_abs(self): # <<<<<<<<<<<<<<
10591  * """
10592  * Maximum of absolute values of components of multivector: multivector infinity norm.
10593  */
10594 
10595  /* Python wrapper */
10596  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10597  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 ";
10598  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10599  PyObject *__pyx_r = 0;
10600  __Pyx_RefNannyDeclarations
10601  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10602  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10603 
10604  /* function exit code */
10605  __Pyx_RefNannyFinishContext();
10606  return __pyx_r;
10607  }
10608 
10609  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10610  PyObject *__pyx_r = NULL;
10611  __Pyx_RefNannyDeclarations
10612  PyObject *__pyx_t_1 = NULL;
10613  __Pyx_RefNannySetupContext("max_abs", 0);
10614 
10615  /* "PyClical.pyx":1192
10616  * 3.0
10617  * """
10618  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10619  *
10620  * def truncated(self, limit):
10621  */
10622  __Pyx_XDECREF(__pyx_r);
10623  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10624  __Pyx_GOTREF(__pyx_t_1);
10625  __pyx_r = __pyx_t_1;
10626  __pyx_t_1 = 0;
10627  goto __pyx_L0;
10628 
10629  /* "PyClical.pyx":1183
10630  * return glucat.abs( self.unwrap() )
10631  *
10632  * def max_abs(self): # <<<<<<<<<<<<<<
10633  * """
10634  * Maximum of absolute values of components of multivector: multivector infinity norm.
10635  */
10636 
10637  /* function exit code */
10638  __pyx_L1_error:;
10639  __Pyx_XDECREF(__pyx_t_1);
10640  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10641  __pyx_r = NULL;
10642  __pyx_L0:;
10643  __Pyx_XGIVEREF(__pyx_r);
10644  __Pyx_RefNannyFinishContext();
10645  return __pyx_r;
10646  }
10647 
10648  /* "PyClical.pyx":1194
10649  * return self.instance.max_abs()
10650  *
10651  * def truncated(self, limit): # <<<<<<<<<<<<<<
10652  * """
10653  * Remove all terms of self with relative size smaller than limit.
10654  */
10655 
10656  /* Python wrapper */
10657  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10658  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 ";
10659  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10660  PyObject *__pyx_r = 0;
10661  __Pyx_RefNannyDeclarations
10662  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10663  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10664 
10665  /* function exit code */
10666  __Pyx_RefNannyFinishContext();
10667  return __pyx_r;
10668  }
10669 
10670  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10671  PyObject *__pyx_r = NULL;
10672  __Pyx_RefNannyDeclarations
10673  PyObject *__pyx_t_1 = NULL;
10674  scalar_t __pyx_t_2;
10675  PyObject *__pyx_t_3 = NULL;
10676  __Pyx_RefNannySetupContext("truncated", 0);
10677 
10678  /* "PyClical.pyx":1203
10679  * clifford("10000+{1}")
10680  * """
10681  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10682  *
10683  * def isnan(self):
10684  */
10685  __Pyx_XDECREF(__pyx_r);
10686  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10687  __Pyx_GOTREF(__pyx_t_1);
10688  __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)
10689  __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)
10690  __Pyx_GOTREF(__pyx_t_3);
10691  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10692  __pyx_r = __pyx_t_3;
10693  __pyx_t_3 = 0;
10694  goto __pyx_L0;
10695 
10696  /* "PyClical.pyx":1194
10697  * return self.instance.max_abs()
10698  *
10699  * def truncated(self, limit): # <<<<<<<<<<<<<<
10700  * """
10701  * Remove all terms of self with relative size smaller than limit.
10702  */
10703 
10704  /* function exit code */
10705  __pyx_L1_error:;
10706  __Pyx_XDECREF(__pyx_t_1);
10707  __Pyx_XDECREF(__pyx_t_3);
10708  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10709  __pyx_r = NULL;
10710  __pyx_L0:;
10711  __Pyx_XGIVEREF(__pyx_r);
10712  __Pyx_RefNannyFinishContext();
10713  return __pyx_r;
10714  }
10715 
10716  /* "PyClical.pyx":1205
10717  * return clifford().wrap( self.instance.truncated(limit) )
10718  *
10719  * def isnan(self): # <<<<<<<<<<<<<<
10720  * """
10721  * Check if a multivector contains any IEEE NaN values.
10722  */
10723 
10724  /* Python wrapper */
10725  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10726  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10727  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10728  PyObject *__pyx_r = 0;
10729  __Pyx_RefNannyDeclarations
10730  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10731  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10732 
10733  /* function exit code */
10734  __Pyx_RefNannyFinishContext();
10735  return __pyx_r;
10736  }
10737 
10738  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10739  PyObject *__pyx_r = NULL;
10740  __Pyx_RefNannyDeclarations
10741  PyObject *__pyx_t_1 = NULL;
10742  __Pyx_RefNannySetupContext("isnan", 0);
10743 
10744  /* "PyClical.pyx":1212
10745  * False
10746  * """
10747  * return self.instance.isnan() # <<<<<<<<<<<<<<
10748  *
10749  * def frame(self):
10750  */
10751  __Pyx_XDECREF(__pyx_r);
10752  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10753  __Pyx_GOTREF(__pyx_t_1);
10754  __pyx_r = __pyx_t_1;
10755  __pyx_t_1 = 0;
10756  goto __pyx_L0;
10757 
10758  /* "PyClical.pyx":1205
10759  * return clifford().wrap( self.instance.truncated(limit) )
10760  *
10761  * def isnan(self): # <<<<<<<<<<<<<<
10762  * """
10763  * Check if a multivector contains any IEEE NaN values.
10764  */
10765 
10766  /* function exit code */
10767  __pyx_L1_error:;
10768  __Pyx_XDECREF(__pyx_t_1);
10769  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10770  __pyx_r = NULL;
10771  __pyx_L0:;
10772  __Pyx_XGIVEREF(__pyx_r);
10773  __Pyx_RefNannyFinishContext();
10774  return __pyx_r;
10775  }
10776 
10777  /* "PyClical.pyx":1214
10778  * return self.instance.isnan()
10779  *
10780  * def frame(self): # <<<<<<<<<<<<<<
10781  * """
10782  * Subalgebra generated by all generators of terms of given multivector.
10783  */
10784 
10785  /* Python wrapper */
10786  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10787  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 ";
10788  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10789  PyObject *__pyx_r = 0;
10790  __Pyx_RefNannyDeclarations
10791  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10792  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10793 
10794  /* function exit code */
10795  __Pyx_RefNannyFinishContext();
10796  return __pyx_r;
10797  }
10798 
10799  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10800  PyObject *__pyx_r = NULL;
10801  __Pyx_RefNannyDeclarations
10802  PyObject *__pyx_t_1 = NULL;
10803  PyObject *__pyx_t_2 = NULL;
10804  __Pyx_RefNannySetupContext("frame", 0);
10805 
10806  /* "PyClical.pyx":1223
10807  * <type 'PyClical.index_set'>
10808  * """
10809  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10810  *
10811  * def __repr__(self):
10812  */
10813  __Pyx_XDECREF(__pyx_r);
10814  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10815  __Pyx_GOTREF(__pyx_t_1);
10816  __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)
10817  __Pyx_GOTREF(__pyx_t_2);
10818  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10819  __pyx_r = __pyx_t_2;
10820  __pyx_t_2 = 0;
10821  goto __pyx_L0;
10822 
10823  /* "PyClical.pyx":1214
10824  * return self.instance.isnan()
10825  *
10826  * def frame(self): # <<<<<<<<<<<<<<
10827  * """
10828  * Subalgebra generated by all generators of terms of given multivector.
10829  */
10830 
10831  /* function exit code */
10832  __pyx_L1_error:;
10833  __Pyx_XDECREF(__pyx_t_1);
10834  __Pyx_XDECREF(__pyx_t_2);
10835  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10836  __pyx_r = NULL;
10837  __pyx_L0:;
10838  __Pyx_XGIVEREF(__pyx_r);
10839  __Pyx_RefNannyFinishContext();
10840  return __pyx_r;
10841  }
10842 
10843  /* "PyClical.pyx":1225
10844  * return index_set().wrap( self.instance.frame() )
10845  *
10846  * def __repr__(self): # <<<<<<<<<<<<<<
10847  * """
10848  * The official string representation of self.
10849  */
10850 
10851  /* Python wrapper */
10852  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10853  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 ";
10854  #if CYTHON_COMPILING_IN_CPYTHON
10855  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10856  #endif
10857  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10858  PyObject *__pyx_r = 0;
10859  __Pyx_RefNannyDeclarations
10860  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10861  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10862 
10863  /* function exit code */
10864  __Pyx_RefNannyFinishContext();
10865  return __pyx_r;
10866  }
10867 
10868  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10869  PyObject *__pyx_r = NULL;
10870  __Pyx_RefNannyDeclarations
10871  PyObject *__pyx_t_1 = NULL;
10872  __Pyx_RefNannySetupContext("__repr__", 0);
10873 
10874  /* "PyClical.pyx":1232
10875  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10876  * """
10877  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10878  *
10879  * def __str__(self):
10880  */
10881  __Pyx_XDECREF(__pyx_r);
10882  __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)
10883  __Pyx_GOTREF(__pyx_t_1);
10884  __pyx_r = __pyx_t_1;
10885  __pyx_t_1 = 0;
10886  goto __pyx_L0;
10887 
10888  /* "PyClical.pyx":1225
10889  * return index_set().wrap( self.instance.frame() )
10890  *
10891  * def __repr__(self): # <<<<<<<<<<<<<<
10892  * """
10893  * The official string representation of self.
10894  */
10895 
10896  /* function exit code */
10897  __pyx_L1_error:;
10898  __Pyx_XDECREF(__pyx_t_1);
10899  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10900  __pyx_r = NULL;
10901  __pyx_L0:;
10902  __Pyx_XGIVEREF(__pyx_r);
10903  __Pyx_RefNannyFinishContext();
10904  return __pyx_r;
10905  }
10906 
10907  /* "PyClical.pyx":1234
10908  * return clifford_to_repr( self.unwrap() ).c_str()
10909  *
10910  * def __str__(self): # <<<<<<<<<<<<<<
10911  * """
10912  * The informal string representation of self.
10913  */
10914 
10915  /* Python wrapper */
10916  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10917  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 ";
10918  #if CYTHON_COMPILING_IN_CPYTHON
10919  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10920  #endif
10921  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10922  PyObject *__pyx_r = 0;
10923  __Pyx_RefNannyDeclarations
10924  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10925  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10926 
10927  /* function exit code */
10928  __Pyx_RefNannyFinishContext();
10929  return __pyx_r;
10930  }
10931 
10932  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10933  PyObject *__pyx_r = NULL;
10934  __Pyx_RefNannyDeclarations
10935  PyObject *__pyx_t_1 = NULL;
10936  __Pyx_RefNannySetupContext("__str__", 0);
10937 
10938  /* "PyClical.pyx":1241
10939  * '1+3{-1}+2{1,2}+4{-2,7}'
10940  * """
10941  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10942  *
10943  * def clifford_hidden_doctests():
10944  */
10945  __Pyx_XDECREF(__pyx_r);
10946  __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)
10947  __Pyx_GOTREF(__pyx_t_1);
10948  __pyx_r = __pyx_t_1;
10949  __pyx_t_1 = 0;
10950  goto __pyx_L0;
10951 
10952  /* "PyClical.pyx":1234
10953  * return clifford_to_repr( self.unwrap() ).c_str()
10954  *
10955  * def __str__(self): # <<<<<<<<<<<<<<
10956  * """
10957  * The informal string representation of self.
10958  */
10959 
10960  /* function exit code */
10961  __pyx_L1_error:;
10962  __Pyx_XDECREF(__pyx_t_1);
10963  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10964  __pyx_r = NULL;
10965  __pyx_L0:;
10966  __Pyx_XGIVEREF(__pyx_r);
10967  __Pyx_RefNannyFinishContext();
10968  return __pyx_r;
10969  }
10970 
10971  /* "(tree fragment)":1
10972  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10973  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10974  * def __setstate_cython__(self, __pyx_state):
10975  */
10976 
10977  /* Python wrapper */
10978  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10979  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10980  PyObject *__pyx_r = 0;
10981  __Pyx_RefNannyDeclarations
10982  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10983  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10984 
10985  /* function exit code */
10986  __Pyx_RefNannyFinishContext();
10987  return __pyx_r;
10988  }
10989 
10990  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10991  PyObject *__pyx_r = NULL;
10992  __Pyx_RefNannyDeclarations
10993  PyObject *__pyx_t_1 = NULL;
10994  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10995 
10996  /* "(tree fragment)":2
10997  * def __reduce_cython__(self):
10998  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
10999  * def __setstate_cython__(self, __pyx_state):
11000  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11001  */
11002  __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)
11003  __Pyx_GOTREF(__pyx_t_1);
11004  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11005  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11006  __PYX_ERR(1, 2, __pyx_L1_error)
11007 
11008  /* "(tree fragment)":1
11009  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11010  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11011  * def __setstate_cython__(self, __pyx_state):
11012  */
11013 
11014  /* function exit code */
11015  __pyx_L1_error:;
11016  __Pyx_XDECREF(__pyx_t_1);
11017  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11018  __pyx_r = NULL;
11019  __Pyx_XGIVEREF(__pyx_r);
11020  __Pyx_RefNannyFinishContext();
11021  return __pyx_r;
11022  }
11023 
11024  /* "(tree fragment)":3
11025  * def __reduce_cython__(self):
11026  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11027  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11028  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11029  */
11030 
11031  /* Python wrapper */
11032  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11033  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11034  PyObject *__pyx_r = 0;
11035  __Pyx_RefNannyDeclarations
11036  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11037  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11038 
11039  /* function exit code */
11040  __Pyx_RefNannyFinishContext();
11041  return __pyx_r;
11042  }
11043 
11044  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) {
11045  PyObject *__pyx_r = NULL;
11046  __Pyx_RefNannyDeclarations
11047  PyObject *__pyx_t_1 = NULL;
11048  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11049 
11050  /* "(tree fragment)":4
11051  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11052  * def __setstate_cython__(self, __pyx_state):
11053  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11054  */
11055  __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)
11056  __Pyx_GOTREF(__pyx_t_1);
11057  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11058  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11059  __PYX_ERR(1, 4, __pyx_L1_error)
11060 
11061  /* "(tree fragment)":3
11062  * def __reduce_cython__(self):
11063  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11064  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11065  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11066  */
11067 
11068  /* function exit code */
11069  __pyx_L1_error:;
11070  __Pyx_XDECREF(__pyx_t_1);
11071  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11072  __pyx_r = NULL;
11073  __Pyx_XGIVEREF(__pyx_r);
11074  __Pyx_RefNannyFinishContext();
11075  return __pyx_r;
11076  }
11077 
11078  /* "PyClical.pyx":1243
11079  * return clifford_to_str( self.unwrap() ).c_str()
11080  *
11081  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11082  * """
11083  * Tests for functions that Doctest cannot see.
11084  */
11085 
11086  /* Python wrapper */
11087  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11088  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 ";
11089  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};
11090  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11091  PyObject *__pyx_r = 0;
11092  __Pyx_RefNannyDeclarations
11093  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11094  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11095 
11096  /* function exit code */
11097  __Pyx_RefNannyFinishContext();
11098  return __pyx_r;
11099  }
11100 
11101  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11102  PyObject *__pyx_r = NULL;
11103  __Pyx_RefNannyDeclarations
11104  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11105 
11106  /* "PyClical.pyx":1327
11107  * True
11108  * """
11109  * return # <<<<<<<<<<<<<<
11110  *
11111  * cpdef inline inv(obj):
11112  */
11113  __Pyx_XDECREF(__pyx_r);
11114  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11115  goto __pyx_L0;
11116 
11117  /* "PyClical.pyx":1243
11118  * return clifford_to_str( self.unwrap() ).c_str()
11119  *
11120  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11121  * """
11122  * Tests for functions that Doctest cannot see.
11123  */
11124 
11125  /* function exit code */
11126  __pyx_L0:;
11127  __Pyx_XGIVEREF(__pyx_r);
11128  __Pyx_RefNannyFinishContext();
11129  return __pyx_r;
11130  }
11131 
11132  /* "PyClical.pyx":1329
11133  * return
11134  *
11135  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11136  * """
11137  * Geometric multiplicative inverse.
11138  */
11139 
11140  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11141  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11142  PyObject *__pyx_r = NULL;
11143  __Pyx_RefNannyDeclarations
11144  PyObject *__pyx_t_1 = NULL;
11145  PyObject *__pyx_t_2 = NULL;
11146  PyObject *__pyx_t_3 = NULL;
11147  __Pyx_RefNannySetupContext("inv", 0);
11148 
11149  /* "PyClical.pyx":1342
11150  * nan
11151  * """
11152  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11153  *
11154  * cpdef inline scalar(obj):
11155  */
11156  __Pyx_XDECREF(__pyx_r);
11157  __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)
11158  __Pyx_GOTREF(__pyx_t_2);
11159  __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)
11160  __Pyx_GOTREF(__pyx_t_3);
11161  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11162  __pyx_t_2 = NULL;
11163  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11164  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11165  if (likely(__pyx_t_2)) {
11166  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11167  __Pyx_INCREF(__pyx_t_2);
11168  __Pyx_INCREF(function);
11169  __Pyx_DECREF_SET(__pyx_t_3, function);
11170  }
11171  }
11172  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11173  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11174  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11175  __Pyx_GOTREF(__pyx_t_1);
11176  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11177  __pyx_r = __pyx_t_1;
11178  __pyx_t_1 = 0;
11179  goto __pyx_L0;
11180 
11181  /* "PyClical.pyx":1329
11182  * return
11183  *
11184  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11185  * """
11186  * Geometric multiplicative inverse.
11187  */
11188 
11189  /* function exit code */
11190  __pyx_L1_error:;
11191  __Pyx_XDECREF(__pyx_t_1);
11192  __Pyx_XDECREF(__pyx_t_2);
11193  __Pyx_XDECREF(__pyx_t_3);
11194  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11195  __pyx_r = 0;
11196  __pyx_L0:;
11197  __Pyx_XGIVEREF(__pyx_r);
11198  __Pyx_RefNannyFinishContext();
11199  return __pyx_r;
11200  }
11201 
11202  /* Python wrapper */
11203  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11204  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 ";
11205  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11206  PyObject *__pyx_r = 0;
11207  __Pyx_RefNannyDeclarations
11208  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11209  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11210 
11211  /* function exit code */
11212  __Pyx_RefNannyFinishContext();
11213  return __pyx_r;
11214  }
11215 
11216  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11217  PyObject *__pyx_r = NULL;
11218  __Pyx_RefNannyDeclarations
11219  PyObject *__pyx_t_1 = NULL;
11220  __Pyx_RefNannySetupContext("inv", 0);
11221  __Pyx_XDECREF(__pyx_r);
11222  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11223  __Pyx_GOTREF(__pyx_t_1);
11224  __pyx_r = __pyx_t_1;
11225  __pyx_t_1 = 0;
11226  goto __pyx_L0;
11227 
11228  /* function exit code */
11229  __pyx_L1_error:;
11230  __Pyx_XDECREF(__pyx_t_1);
11231  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11232  __pyx_r = NULL;
11233  __pyx_L0:;
11234  __Pyx_XGIVEREF(__pyx_r);
11235  __Pyx_RefNannyFinishContext();
11236  return __pyx_r;
11237  }
11238 
11239  /* "PyClical.pyx":1344
11240  * return clifford(obj).inv()
11241  *
11242  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11243  * """
11244  * Scalar part.
11245  */
11246 
11247  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11248  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11249  PyObject *__pyx_r = NULL;
11250  __Pyx_RefNannyDeclarations
11251  PyObject *__pyx_t_1 = NULL;
11252  PyObject *__pyx_t_2 = NULL;
11253  PyObject *__pyx_t_3 = NULL;
11254  __Pyx_RefNannySetupContext("scalar", 0);
11255 
11256  /* "PyClical.pyx":1353
11257  * 0.0
11258  * """
11259  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11260  *
11261  * cpdef inline real(obj):
11262  */
11263  __Pyx_XDECREF(__pyx_r);
11264  __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)
11265  __Pyx_GOTREF(__pyx_t_2);
11266  __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)
11267  __Pyx_GOTREF(__pyx_t_3);
11268  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11269  __pyx_t_2 = NULL;
11270  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11271  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11272  if (likely(__pyx_t_2)) {
11273  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11274  __Pyx_INCREF(__pyx_t_2);
11275  __Pyx_INCREF(function);
11276  __Pyx_DECREF_SET(__pyx_t_3, function);
11277  }
11278  }
11279  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11280  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11281  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11282  __Pyx_GOTREF(__pyx_t_1);
11283  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11284  __pyx_r = __pyx_t_1;
11285  __pyx_t_1 = 0;
11286  goto __pyx_L0;
11287 
11288  /* "PyClical.pyx":1344
11289  * return clifford(obj).inv()
11290  *
11291  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11292  * """
11293  * Scalar part.
11294  */
11295 
11296  /* function exit code */
11297  __pyx_L1_error:;
11298  __Pyx_XDECREF(__pyx_t_1);
11299  __Pyx_XDECREF(__pyx_t_2);
11300  __Pyx_XDECREF(__pyx_t_3);
11301  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11302  __pyx_r = 0;
11303  __pyx_L0:;
11304  __Pyx_XGIVEREF(__pyx_r);
11305  __Pyx_RefNannyFinishContext();
11306  return __pyx_r;
11307  }
11308 
11309  /* Python wrapper */
11310  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11311  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 ";
11312  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11313  PyObject *__pyx_r = 0;
11314  __Pyx_RefNannyDeclarations
11315  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11316  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11317 
11318  /* function exit code */
11319  __Pyx_RefNannyFinishContext();
11320  return __pyx_r;
11321  }
11322 
11323  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11324  PyObject *__pyx_r = NULL;
11325  __Pyx_RefNannyDeclarations
11326  PyObject *__pyx_t_1 = NULL;
11327  __Pyx_RefNannySetupContext("scalar", 0);
11328  __Pyx_XDECREF(__pyx_r);
11329  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11330  __Pyx_GOTREF(__pyx_t_1);
11331  __pyx_r = __pyx_t_1;
11332  __pyx_t_1 = 0;
11333  goto __pyx_L0;
11334 
11335  /* function exit code */
11336  __pyx_L1_error:;
11337  __Pyx_XDECREF(__pyx_t_1);
11338  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11339  __pyx_r = NULL;
11340  __pyx_L0:;
11341  __Pyx_XGIVEREF(__pyx_r);
11342  __Pyx_RefNannyFinishContext();
11343  return __pyx_r;
11344  }
11345 
11346  /* "PyClical.pyx":1355
11347  * return clifford(obj).scalar()
11348  *
11349  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11350  * """
11351  * Real part: synonym for scalar part.
11352  */
11353 
11354  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11355  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11356  PyObject *__pyx_r = NULL;
11357  __Pyx_RefNannyDeclarations
11358  PyObject *__pyx_t_1 = NULL;
11359  PyObject *__pyx_t_2 = NULL;
11360  PyObject *__pyx_t_3 = NULL;
11361  __Pyx_RefNannySetupContext("real", 0);
11362 
11363  /* "PyClical.pyx":1364
11364  * 0.0
11365  * """
11366  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11367  *
11368  * cpdef inline imag(obj):
11369  */
11370  __Pyx_XDECREF(__pyx_r);
11371  __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)
11372  __Pyx_GOTREF(__pyx_t_2);
11373  __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)
11374  __Pyx_GOTREF(__pyx_t_3);
11375  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11376  __pyx_t_2 = NULL;
11377  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11378  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11379  if (likely(__pyx_t_2)) {
11380  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11381  __Pyx_INCREF(__pyx_t_2);
11382  __Pyx_INCREF(function);
11383  __Pyx_DECREF_SET(__pyx_t_3, function);
11384  }
11385  }
11386  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11387  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11388  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11389  __Pyx_GOTREF(__pyx_t_1);
11390  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11391  __pyx_r = __pyx_t_1;
11392  __pyx_t_1 = 0;
11393  goto __pyx_L0;
11394 
11395  /* "PyClical.pyx":1355
11396  * return clifford(obj).scalar()
11397  *
11398  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11399  * """
11400  * Real part: synonym for scalar part.
11401  */
11402 
11403  /* function exit code */
11404  __pyx_L1_error:;
11405  __Pyx_XDECREF(__pyx_t_1);
11406  __Pyx_XDECREF(__pyx_t_2);
11407  __Pyx_XDECREF(__pyx_t_3);
11408  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11409  __pyx_r = 0;
11410  __pyx_L0:;
11411  __Pyx_XGIVEREF(__pyx_r);
11412  __Pyx_RefNannyFinishContext();
11413  return __pyx_r;
11414  }
11415 
11416  /* Python wrapper */
11417  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11418  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 ";
11419  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11420  PyObject *__pyx_r = 0;
11421  __Pyx_RefNannyDeclarations
11422  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11423  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11424 
11425  /* function exit code */
11426  __Pyx_RefNannyFinishContext();
11427  return __pyx_r;
11428  }
11429 
11430  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11431  PyObject *__pyx_r = NULL;
11432  __Pyx_RefNannyDeclarations
11433  PyObject *__pyx_t_1 = NULL;
11434  __Pyx_RefNannySetupContext("real", 0);
11435  __Pyx_XDECREF(__pyx_r);
11436  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11437  __Pyx_GOTREF(__pyx_t_1);
11438  __pyx_r = __pyx_t_1;
11439  __pyx_t_1 = 0;
11440  goto __pyx_L0;
11441 
11442  /* function exit code */
11443  __pyx_L1_error:;
11444  __Pyx_XDECREF(__pyx_t_1);
11445  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11446  __pyx_r = NULL;
11447  __pyx_L0:;
11448  __Pyx_XGIVEREF(__pyx_r);
11449  __Pyx_RefNannyFinishContext();
11450  return __pyx_r;
11451  }
11452 
11453  /* "PyClical.pyx":1366
11454  * return clifford(obj).scalar()
11455  *
11456  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11457  * """
11458  * Imaginary part: deprecated (always 0).
11459  */
11460 
11461  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11462  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11463  PyObject *__pyx_r = NULL;
11464  __Pyx_RefNannyDeclarations
11465  __Pyx_RefNannySetupContext("imag", 0);
11466 
11467  /* "PyClical.pyx":1375
11468  * 0.0
11469  * """
11470  * return 0.0 # <<<<<<<<<<<<<<
11471  *
11472  * cpdef inline pure(obj):
11473  */
11474  __Pyx_XDECREF(__pyx_r);
11475  __Pyx_INCREF(__pyx_float_0_0);
11476  __pyx_r = __pyx_float_0_0;
11477  goto __pyx_L0;
11478 
11479  /* "PyClical.pyx":1366
11480  * return clifford(obj).scalar()
11481  *
11482  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11483  * """
11484  * Imaginary part: deprecated (always 0).
11485  */
11486 
11487  /* function exit code */
11488  __pyx_L0:;
11489  __Pyx_XGIVEREF(__pyx_r);
11490  __Pyx_RefNannyFinishContext();
11491  return __pyx_r;
11492  }
11493 
11494  /* Python wrapper */
11495  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11496  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 ";
11497  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11498  PyObject *__pyx_r = 0;
11499  __Pyx_RefNannyDeclarations
11500  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11501  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11502 
11503  /* function exit code */
11504  __Pyx_RefNannyFinishContext();
11505  return __pyx_r;
11506  }
11507 
11508  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11509  PyObject *__pyx_r = NULL;
11510  __Pyx_RefNannyDeclarations
11511  PyObject *__pyx_t_1 = NULL;
11512  __Pyx_RefNannySetupContext("imag", 0);
11513  __Pyx_XDECREF(__pyx_r);
11514  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11515  __Pyx_GOTREF(__pyx_t_1);
11516  __pyx_r = __pyx_t_1;
11517  __pyx_t_1 = 0;
11518  goto __pyx_L0;
11519 
11520  /* function exit code */
11521  __pyx_L1_error:;
11522  __Pyx_XDECREF(__pyx_t_1);
11523  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11524  __pyx_r = NULL;
11525  __pyx_L0:;
11526  __Pyx_XGIVEREF(__pyx_r);
11527  __Pyx_RefNannyFinishContext();
11528  return __pyx_r;
11529  }
11530 
11531  /* "PyClical.pyx":1377
11532  * return 0.0
11533  *
11534  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11535  * """
11536  * Pure part
11537  */
11538 
11539  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11540  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11541  PyObject *__pyx_r = NULL;
11542  __Pyx_RefNannyDeclarations
11543  PyObject *__pyx_t_1 = NULL;
11544  PyObject *__pyx_t_2 = NULL;
11545  PyObject *__pyx_t_3 = NULL;
11546  __Pyx_RefNannySetupContext("pure", 0);
11547 
11548  /* "PyClical.pyx":1386
11549  * {1,2}
11550  * """
11551  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11552  *
11553  * cpdef inline even(obj):
11554  */
11555  __Pyx_XDECREF(__pyx_r);
11556  __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)
11557  __Pyx_GOTREF(__pyx_t_2);
11558  __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)
11559  __Pyx_GOTREF(__pyx_t_3);
11560  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11561  __pyx_t_2 = NULL;
11562  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11563  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11564  if (likely(__pyx_t_2)) {
11565  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11566  __Pyx_INCREF(__pyx_t_2);
11567  __Pyx_INCREF(function);
11568  __Pyx_DECREF_SET(__pyx_t_3, function);
11569  }
11570  }
11571  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11572  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11573  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11574  __Pyx_GOTREF(__pyx_t_1);
11575  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11576  __pyx_r = __pyx_t_1;
11577  __pyx_t_1 = 0;
11578  goto __pyx_L0;
11579 
11580  /* "PyClical.pyx":1377
11581  * return 0.0
11582  *
11583  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11584  * """
11585  * Pure part
11586  */
11587 
11588  /* function exit code */
11589  __pyx_L1_error:;
11590  __Pyx_XDECREF(__pyx_t_1);
11591  __Pyx_XDECREF(__pyx_t_2);
11592  __Pyx_XDECREF(__pyx_t_3);
11593  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11594  __pyx_r = 0;
11595  __pyx_L0:;
11596  __Pyx_XGIVEREF(__pyx_r);
11597  __Pyx_RefNannyFinishContext();
11598  return __pyx_r;
11599  }
11600 
11601  /* Python wrapper */
11602  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11603  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 ";
11604  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11605  PyObject *__pyx_r = 0;
11606  __Pyx_RefNannyDeclarations
11607  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11608  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11609 
11610  /* function exit code */
11611  __Pyx_RefNannyFinishContext();
11612  return __pyx_r;
11613  }
11614 
11615  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11616  PyObject *__pyx_r = NULL;
11617  __Pyx_RefNannyDeclarations
11618  PyObject *__pyx_t_1 = NULL;
11619  __Pyx_RefNannySetupContext("pure", 0);
11620  __Pyx_XDECREF(__pyx_r);
11621  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11622  __Pyx_GOTREF(__pyx_t_1);
11623  __pyx_r = __pyx_t_1;
11624  __pyx_t_1 = 0;
11625  goto __pyx_L0;
11626 
11627  /* function exit code */
11628  __pyx_L1_error:;
11629  __Pyx_XDECREF(__pyx_t_1);
11630  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11631  __pyx_r = NULL;
11632  __pyx_L0:;
11633  __Pyx_XGIVEREF(__pyx_r);
11634  __Pyx_RefNannyFinishContext();
11635  return __pyx_r;
11636  }
11637 
11638  /* "PyClical.pyx":1388
11639  * return clifford(obj).pure()
11640  *
11641  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11642  * """
11643  * Even part of multivector, sum of even grade terms.
11644  */
11645 
11646  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11647  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11648  PyObject *__pyx_r = NULL;
11649  __Pyx_RefNannyDeclarations
11650  PyObject *__pyx_t_1 = NULL;
11651  PyObject *__pyx_t_2 = NULL;
11652  PyObject *__pyx_t_3 = NULL;
11653  __Pyx_RefNannySetupContext("even", 0);
11654 
11655  /* "PyClical.pyx":1395
11656  * 1+{1,2}
11657  * """
11658  * return clifford(obj).even() # <<<<<<<<<<<<<<
11659  *
11660  * cpdef inline odd(obj):
11661  */
11662  __Pyx_XDECREF(__pyx_r);
11663  __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)
11664  __Pyx_GOTREF(__pyx_t_2);
11665  __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)
11666  __Pyx_GOTREF(__pyx_t_3);
11667  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11668  __pyx_t_2 = NULL;
11669  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11670  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11671  if (likely(__pyx_t_2)) {
11672  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11673  __Pyx_INCREF(__pyx_t_2);
11674  __Pyx_INCREF(function);
11675  __Pyx_DECREF_SET(__pyx_t_3, function);
11676  }
11677  }
11678  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11679  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11680  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11681  __Pyx_GOTREF(__pyx_t_1);
11682  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11683  __pyx_r = __pyx_t_1;
11684  __pyx_t_1 = 0;
11685  goto __pyx_L0;
11686 
11687  /* "PyClical.pyx":1388
11688  * return clifford(obj).pure()
11689  *
11690  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11691  * """
11692  * Even part of multivector, sum of even grade terms.
11693  */
11694 
11695  /* function exit code */
11696  __pyx_L1_error:;
11697  __Pyx_XDECREF(__pyx_t_1);
11698  __Pyx_XDECREF(__pyx_t_2);
11699  __Pyx_XDECREF(__pyx_t_3);
11700  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11701  __pyx_r = 0;
11702  __pyx_L0:;
11703  __Pyx_XGIVEREF(__pyx_r);
11704  __Pyx_RefNannyFinishContext();
11705  return __pyx_r;
11706  }
11707 
11708  /* Python wrapper */
11709  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11710  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 ";
11711  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11712  PyObject *__pyx_r = 0;
11713  __Pyx_RefNannyDeclarations
11714  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11715  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11716 
11717  /* function exit code */
11718  __Pyx_RefNannyFinishContext();
11719  return __pyx_r;
11720  }
11721 
11722  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11723  PyObject *__pyx_r = NULL;
11724  __Pyx_RefNannyDeclarations
11725  PyObject *__pyx_t_1 = NULL;
11726  __Pyx_RefNannySetupContext("even", 0);
11727  __Pyx_XDECREF(__pyx_r);
11728  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11729  __Pyx_GOTREF(__pyx_t_1);
11730  __pyx_r = __pyx_t_1;
11731  __pyx_t_1 = 0;
11732  goto __pyx_L0;
11733 
11734  /* function exit code */
11735  __pyx_L1_error:;
11736  __Pyx_XDECREF(__pyx_t_1);
11737  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11738  __pyx_r = NULL;
11739  __pyx_L0:;
11740  __Pyx_XGIVEREF(__pyx_r);
11741  __Pyx_RefNannyFinishContext();
11742  return __pyx_r;
11743  }
11744 
11745  /* "PyClical.pyx":1397
11746  * return clifford(obj).even()
11747  *
11748  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11749  * """
11750  * Odd part of multivector, sum of odd grade terms.
11751  */
11752 
11753  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11754  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11755  PyObject *__pyx_r = NULL;
11756  __Pyx_RefNannyDeclarations
11757  PyObject *__pyx_t_1 = NULL;
11758  PyObject *__pyx_t_2 = NULL;
11759  PyObject *__pyx_t_3 = NULL;
11760  __Pyx_RefNannySetupContext("odd", 0);
11761 
11762  /* "PyClical.pyx":1404
11763  * {1}
11764  * """
11765  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11766  *
11767  * cpdef inline involute(obj):
11768  */
11769  __Pyx_XDECREF(__pyx_r);
11770  __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)
11771  __Pyx_GOTREF(__pyx_t_2);
11772  __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)
11773  __Pyx_GOTREF(__pyx_t_3);
11774  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11775  __pyx_t_2 = NULL;
11776  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11777  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11778  if (likely(__pyx_t_2)) {
11779  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11780  __Pyx_INCREF(__pyx_t_2);
11781  __Pyx_INCREF(function);
11782  __Pyx_DECREF_SET(__pyx_t_3, function);
11783  }
11784  }
11785  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11786  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11787  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11788  __Pyx_GOTREF(__pyx_t_1);
11789  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11790  __pyx_r = __pyx_t_1;
11791  __pyx_t_1 = 0;
11792  goto __pyx_L0;
11793 
11794  /* "PyClical.pyx":1397
11795  * return clifford(obj).even()
11796  *
11797  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11798  * """
11799  * Odd part of multivector, sum of odd grade terms.
11800  */
11801 
11802  /* function exit code */
11803  __pyx_L1_error:;
11804  __Pyx_XDECREF(__pyx_t_1);
11805  __Pyx_XDECREF(__pyx_t_2);
11806  __Pyx_XDECREF(__pyx_t_3);
11807  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11808  __pyx_r = 0;
11809  __pyx_L0:;
11810  __Pyx_XGIVEREF(__pyx_r);
11811  __Pyx_RefNannyFinishContext();
11812  return __pyx_r;
11813  }
11814 
11815  /* Python wrapper */
11816  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11817  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 ";
11818  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11819  PyObject *__pyx_r = 0;
11820  __Pyx_RefNannyDeclarations
11821  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11822  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11823 
11824  /* function exit code */
11825  __Pyx_RefNannyFinishContext();
11826  return __pyx_r;
11827  }
11828 
11829  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11830  PyObject *__pyx_r = NULL;
11831  __Pyx_RefNannyDeclarations
11832  PyObject *__pyx_t_1 = NULL;
11833  __Pyx_RefNannySetupContext("odd", 0);
11834  __Pyx_XDECREF(__pyx_r);
11835  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11836  __Pyx_GOTREF(__pyx_t_1);
11837  __pyx_r = __pyx_t_1;
11838  __pyx_t_1 = 0;
11839  goto __pyx_L0;
11840 
11841  /* function exit code */
11842  __pyx_L1_error:;
11843  __Pyx_XDECREF(__pyx_t_1);
11844  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11845  __pyx_r = NULL;
11846  __pyx_L0:;
11847  __Pyx_XGIVEREF(__pyx_r);
11848  __Pyx_RefNannyFinishContext();
11849  return __pyx_r;
11850  }
11851 
11852  /* "PyClical.pyx":1406
11853  * return clifford(obj).odd()
11854  *
11855  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11856  * """
11857  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11858  */
11859 
11860  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11861  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11862  PyObject *__pyx_r = NULL;
11863  __Pyx_RefNannyDeclarations
11864  PyObject *__pyx_t_1 = NULL;
11865  PyObject *__pyx_t_2 = NULL;
11866  PyObject *__pyx_t_3 = NULL;
11867  __Pyx_RefNannySetupContext("involute", 0);
11868 
11869  /* "PyClical.pyx":1419
11870  * 1-{1}+{1,2}
11871  * """
11872  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11873  *
11874  * cpdef inline reverse(obj):
11875  */
11876  __Pyx_XDECREF(__pyx_r);
11877  __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)
11878  __Pyx_GOTREF(__pyx_t_2);
11879  __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)
11880  __Pyx_GOTREF(__pyx_t_3);
11881  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11882  __pyx_t_2 = NULL;
11883  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11884  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11885  if (likely(__pyx_t_2)) {
11886  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11887  __Pyx_INCREF(__pyx_t_2);
11888  __Pyx_INCREF(function);
11889  __Pyx_DECREF_SET(__pyx_t_3, function);
11890  }
11891  }
11892  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11893  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11894  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11895  __Pyx_GOTREF(__pyx_t_1);
11896  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11897  __pyx_r = __pyx_t_1;
11898  __pyx_t_1 = 0;
11899  goto __pyx_L0;
11900 
11901  /* "PyClical.pyx":1406
11902  * return clifford(obj).odd()
11903  *
11904  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11905  * """
11906  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11907  */
11908 
11909  /* function exit code */
11910  __pyx_L1_error:;
11911  __Pyx_XDECREF(__pyx_t_1);
11912  __Pyx_XDECREF(__pyx_t_2);
11913  __Pyx_XDECREF(__pyx_t_3);
11914  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11915  __pyx_r = 0;
11916  __pyx_L0:;
11917  __Pyx_XGIVEREF(__pyx_r);
11918  __Pyx_RefNannyFinishContext();
11919  return __pyx_r;
11920  }
11921 
11922  /* Python wrapper */
11923  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11924  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 ";
11925  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11926  PyObject *__pyx_r = 0;
11927  __Pyx_RefNannyDeclarations
11928  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11929  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11930 
11931  /* function exit code */
11932  __Pyx_RefNannyFinishContext();
11933  return __pyx_r;
11934  }
11935 
11936  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11937  PyObject *__pyx_r = NULL;
11938  __Pyx_RefNannyDeclarations
11939  PyObject *__pyx_t_1 = NULL;
11940  __Pyx_RefNannySetupContext("involute", 0);
11941  __Pyx_XDECREF(__pyx_r);
11942  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11943  __Pyx_GOTREF(__pyx_t_1);
11944  __pyx_r = __pyx_t_1;
11945  __pyx_t_1 = 0;
11946  goto __pyx_L0;
11947 
11948  /* function exit code */
11949  __pyx_L1_error:;
11950  __Pyx_XDECREF(__pyx_t_1);
11951  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11952  __pyx_r = NULL;
11953  __pyx_L0:;
11954  __Pyx_XGIVEREF(__pyx_r);
11955  __Pyx_RefNannyFinishContext();
11956  return __pyx_r;
11957  }
11958 
11959  /* "PyClical.pyx":1421
11960  * return clifford(obj).involute()
11961  *
11962  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11963  * """
11964  * Reversion, eg. {1}*{2} -> {2}*{1}
11965  */
11966 
11967  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11968  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11969  PyObject *__pyx_r = NULL;
11970  __Pyx_RefNannyDeclarations
11971  PyObject *__pyx_t_1 = NULL;
11972  PyObject *__pyx_t_2 = NULL;
11973  PyObject *__pyx_t_3 = NULL;
11974  __Pyx_RefNannySetupContext("reverse", 0);
11975 
11976  /* "PyClical.pyx":1434
11977  * 1+{1}-{1,2}
11978  * """
11979  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11980  *
11981  * cpdef inline conj(obj):
11982  */
11983  __Pyx_XDECREF(__pyx_r);
11984  __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)
11985  __Pyx_GOTREF(__pyx_t_2);
11986  __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)
11987  __Pyx_GOTREF(__pyx_t_3);
11988  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11989  __pyx_t_2 = NULL;
11990  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11991  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11992  if (likely(__pyx_t_2)) {
11993  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11994  __Pyx_INCREF(__pyx_t_2);
11995  __Pyx_INCREF(function);
11996  __Pyx_DECREF_SET(__pyx_t_3, function);
11997  }
11998  }
11999  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12000  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12001  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12002  __Pyx_GOTREF(__pyx_t_1);
12003  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12004  __pyx_r = __pyx_t_1;
12005  __pyx_t_1 = 0;
12006  goto __pyx_L0;
12007 
12008  /* "PyClical.pyx":1421
12009  * return clifford(obj).involute()
12010  *
12011  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12012  * """
12013  * Reversion, eg. {1}*{2} -> {2}*{1}
12014  */
12015 
12016  /* function exit code */
12017  __pyx_L1_error:;
12018  __Pyx_XDECREF(__pyx_t_1);
12019  __Pyx_XDECREF(__pyx_t_2);
12020  __Pyx_XDECREF(__pyx_t_3);
12021  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12022  __pyx_r = 0;
12023  __pyx_L0:;
12024  __Pyx_XGIVEREF(__pyx_r);
12025  __Pyx_RefNannyFinishContext();
12026  return __pyx_r;
12027  }
12028 
12029  /* Python wrapper */
12030  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12031  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 ";
12032  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12033  PyObject *__pyx_r = 0;
12034  __Pyx_RefNannyDeclarations
12035  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12036  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12037 
12038  /* function exit code */
12039  __Pyx_RefNannyFinishContext();
12040  return __pyx_r;
12041  }
12042 
12043  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12044  PyObject *__pyx_r = NULL;
12045  __Pyx_RefNannyDeclarations
12046  PyObject *__pyx_t_1 = NULL;
12047  __Pyx_RefNannySetupContext("reverse", 0);
12048  __Pyx_XDECREF(__pyx_r);
12049  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12050  __Pyx_GOTREF(__pyx_t_1);
12051  __pyx_r = __pyx_t_1;
12052  __pyx_t_1 = 0;
12053  goto __pyx_L0;
12054 
12055  /* function exit code */
12056  __pyx_L1_error:;
12057  __Pyx_XDECREF(__pyx_t_1);
12058  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12059  __pyx_r = NULL;
12060  __pyx_L0:;
12061  __Pyx_XGIVEREF(__pyx_r);
12062  __Pyx_RefNannyFinishContext();
12063  return __pyx_r;
12064  }
12065 
12066  /* "PyClical.pyx":1436
12067  * return clifford(obj).reverse()
12068  *
12069  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12070  * """
12071  * Conjugation, reverse o involute == involute o reverse.
12072  */
12073 
12074  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12075  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12076  PyObject *__pyx_r = NULL;
12077  __Pyx_RefNannyDeclarations
12078  PyObject *__pyx_t_1 = NULL;
12079  PyObject *__pyx_t_2 = NULL;
12080  PyObject *__pyx_t_3 = NULL;
12081  __Pyx_RefNannySetupContext("conj", 0);
12082 
12083  /* "PyClical.pyx":1449
12084  * 1-{1}-{1,2}
12085  * """
12086  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12087  *
12088  * cpdef inline quad(obj):
12089  */
12090  __Pyx_XDECREF(__pyx_r);
12091  __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)
12092  __Pyx_GOTREF(__pyx_t_2);
12093  __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)
12094  __Pyx_GOTREF(__pyx_t_3);
12095  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12096  __pyx_t_2 = NULL;
12097  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12098  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12099  if (likely(__pyx_t_2)) {
12100  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12101  __Pyx_INCREF(__pyx_t_2);
12102  __Pyx_INCREF(function);
12103  __Pyx_DECREF_SET(__pyx_t_3, function);
12104  }
12105  }
12106  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12107  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12108  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12109  __Pyx_GOTREF(__pyx_t_1);
12110  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12111  __pyx_r = __pyx_t_1;
12112  __pyx_t_1 = 0;
12113  goto __pyx_L0;
12114 
12115  /* "PyClical.pyx":1436
12116  * return clifford(obj).reverse()
12117  *
12118  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12119  * """
12120  * Conjugation, reverse o involute == involute o reverse.
12121  */
12122 
12123  /* function exit code */
12124  __pyx_L1_error:;
12125  __Pyx_XDECREF(__pyx_t_1);
12126  __Pyx_XDECREF(__pyx_t_2);
12127  __Pyx_XDECREF(__pyx_t_3);
12128  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12129  __pyx_r = 0;
12130  __pyx_L0:;
12131  __Pyx_XGIVEREF(__pyx_r);
12132  __Pyx_RefNannyFinishContext();
12133  return __pyx_r;
12134  }
12135 
12136  /* Python wrapper */
12137  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12138  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 ";
12139  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12140  PyObject *__pyx_r = 0;
12141  __Pyx_RefNannyDeclarations
12142  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12143  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12144 
12145  /* function exit code */
12146  __Pyx_RefNannyFinishContext();
12147  return __pyx_r;
12148  }
12149 
12150  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12151  PyObject *__pyx_r = NULL;
12152  __Pyx_RefNannyDeclarations
12153  PyObject *__pyx_t_1 = NULL;
12154  __Pyx_RefNannySetupContext("conj", 0);
12155  __Pyx_XDECREF(__pyx_r);
12156  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12157  __Pyx_GOTREF(__pyx_t_1);
12158  __pyx_r = __pyx_t_1;
12159  __pyx_t_1 = 0;
12160  goto __pyx_L0;
12161 
12162  /* function exit code */
12163  __pyx_L1_error:;
12164  __Pyx_XDECREF(__pyx_t_1);
12165  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12166  __pyx_r = NULL;
12167  __pyx_L0:;
12168  __Pyx_XGIVEREF(__pyx_r);
12169  __Pyx_RefNannyFinishContext();
12170  return __pyx_r;
12171  }
12172 
12173  /* "PyClical.pyx":1451
12174  * return clifford(obj).conj()
12175  *
12176  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12177  * """
12178  * Quadratic form == (rev(x)*x)(0).
12179  */
12180 
12181  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12182  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12183  PyObject *__pyx_r = NULL;
12184  __Pyx_RefNannyDeclarations
12185  PyObject *__pyx_t_1 = NULL;
12186  PyObject *__pyx_t_2 = NULL;
12187  PyObject *__pyx_t_3 = NULL;
12188  __Pyx_RefNannySetupContext("quad", 0);
12189 
12190  /* "PyClical.pyx":1460
12191  * 2.0
12192  * """
12193  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12194  *
12195  * cpdef inline norm(obj):
12196  */
12197  __Pyx_XDECREF(__pyx_r);
12198  __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)
12199  __Pyx_GOTREF(__pyx_t_2);
12200  __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)
12201  __Pyx_GOTREF(__pyx_t_3);
12202  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12203  __pyx_t_2 = NULL;
12204  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12205  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12206  if (likely(__pyx_t_2)) {
12207  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12208  __Pyx_INCREF(__pyx_t_2);
12209  __Pyx_INCREF(function);
12210  __Pyx_DECREF_SET(__pyx_t_3, function);
12211  }
12212  }
12213  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12214  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12215  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12216  __Pyx_GOTREF(__pyx_t_1);
12217  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12218  __pyx_r = __pyx_t_1;
12219  __pyx_t_1 = 0;
12220  goto __pyx_L0;
12221 
12222  /* "PyClical.pyx":1451
12223  * return clifford(obj).conj()
12224  *
12225  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12226  * """
12227  * Quadratic form == (rev(x)*x)(0).
12228  */
12229 
12230  /* function exit code */
12231  __pyx_L1_error:;
12232  __Pyx_XDECREF(__pyx_t_1);
12233  __Pyx_XDECREF(__pyx_t_2);
12234  __Pyx_XDECREF(__pyx_t_3);
12235  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12236  __pyx_r = 0;
12237  __pyx_L0:;
12238  __Pyx_XGIVEREF(__pyx_r);
12239  __Pyx_RefNannyFinishContext();
12240  return __pyx_r;
12241  }
12242 
12243  /* Python wrapper */
12244  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12245  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 ";
12246  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12247  PyObject *__pyx_r = 0;
12248  __Pyx_RefNannyDeclarations
12249  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12250  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12251 
12252  /* function exit code */
12253  __Pyx_RefNannyFinishContext();
12254  return __pyx_r;
12255  }
12256 
12257  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12258  PyObject *__pyx_r = NULL;
12259  __Pyx_RefNannyDeclarations
12260  PyObject *__pyx_t_1 = NULL;
12261  __Pyx_RefNannySetupContext("quad", 0);
12262  __Pyx_XDECREF(__pyx_r);
12263  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12264  __Pyx_GOTREF(__pyx_t_1);
12265  __pyx_r = __pyx_t_1;
12266  __pyx_t_1 = 0;
12267  goto __pyx_L0;
12268 
12269  /* function exit code */
12270  __pyx_L1_error:;
12271  __Pyx_XDECREF(__pyx_t_1);
12272  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12273  __pyx_r = NULL;
12274  __pyx_L0:;
12275  __Pyx_XGIVEREF(__pyx_r);
12276  __Pyx_RefNannyFinishContext();
12277  return __pyx_r;
12278  }
12279 
12280  /* "PyClical.pyx":1462
12281  * return clifford(obj).quad()
12282  *
12283  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12284  * """
12285  * norm == sum of squares of coordinates.
12286  */
12287 
12288  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12289  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12290  PyObject *__pyx_r = NULL;
12291  __Pyx_RefNannyDeclarations
12292  PyObject *__pyx_t_1 = NULL;
12293  PyObject *__pyx_t_2 = NULL;
12294  PyObject *__pyx_t_3 = NULL;
12295  __Pyx_RefNannySetupContext("norm", 0);
12296 
12297  /* "PyClical.pyx":1471
12298  * 4.0
12299  * """
12300  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12301  *
12302  * cpdef inline abs(obj):
12303  */
12304  __Pyx_XDECREF(__pyx_r);
12305  __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)
12306  __Pyx_GOTREF(__pyx_t_2);
12307  __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)
12308  __Pyx_GOTREF(__pyx_t_3);
12309  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12310  __pyx_t_2 = NULL;
12311  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12312  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12313  if (likely(__pyx_t_2)) {
12314  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12315  __Pyx_INCREF(__pyx_t_2);
12316  __Pyx_INCREF(function);
12317  __Pyx_DECREF_SET(__pyx_t_3, function);
12318  }
12319  }
12320  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12321  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12322  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12323  __Pyx_GOTREF(__pyx_t_1);
12324  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12325  __pyx_r = __pyx_t_1;
12326  __pyx_t_1 = 0;
12327  goto __pyx_L0;
12328 
12329  /* "PyClical.pyx":1462
12330  * return clifford(obj).quad()
12331  *
12332  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12333  * """
12334  * norm == sum of squares of coordinates.
12335  */
12336 
12337  /* function exit code */
12338  __pyx_L1_error:;
12339  __Pyx_XDECREF(__pyx_t_1);
12340  __Pyx_XDECREF(__pyx_t_2);
12341  __Pyx_XDECREF(__pyx_t_3);
12342  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12343  __pyx_r = 0;
12344  __pyx_L0:;
12345  __Pyx_XGIVEREF(__pyx_r);
12346  __Pyx_RefNannyFinishContext();
12347  return __pyx_r;
12348  }
12349 
12350  /* Python wrapper */
12351  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12352  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 ";
12353  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12354  PyObject *__pyx_r = 0;
12355  __Pyx_RefNannyDeclarations
12356  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12357  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12358 
12359  /* function exit code */
12360  __Pyx_RefNannyFinishContext();
12361  return __pyx_r;
12362  }
12363 
12364  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12365  PyObject *__pyx_r = NULL;
12366  __Pyx_RefNannyDeclarations
12367  PyObject *__pyx_t_1 = NULL;
12368  __Pyx_RefNannySetupContext("norm", 0);
12369  __Pyx_XDECREF(__pyx_r);
12370  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12371  __Pyx_GOTREF(__pyx_t_1);
12372  __pyx_r = __pyx_t_1;
12373  __pyx_t_1 = 0;
12374  goto __pyx_L0;
12375 
12376  /* function exit code */
12377  __pyx_L1_error:;
12378  __Pyx_XDECREF(__pyx_t_1);
12379  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12380  __pyx_r = NULL;
12381  __pyx_L0:;
12382  __Pyx_XGIVEREF(__pyx_r);
12383  __Pyx_RefNannyFinishContext();
12384  return __pyx_r;
12385  }
12386 
12387  /* "PyClical.pyx":1473
12388  * return clifford(obj).norm()
12389  *
12390  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12391  * """
12392  * Absolute value of multivector: multivector 2-norm.
12393  */
12394 
12395  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12396  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12397  PyObject *__pyx_r = NULL;
12398  __Pyx_RefNannyDeclarations
12399  PyObject *__pyx_t_1 = NULL;
12400  __Pyx_RefNannySetupContext("abs", 0);
12401 
12402  /* "PyClical.pyx":1480
12403  * 2.0
12404  * """
12405  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12406  *
12407  * cpdef inline max_abs(obj):
12408  */
12409  __Pyx_XDECREF(__pyx_r);
12410  __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)
12411  __Pyx_GOTREF(__pyx_t_1);
12412  __pyx_r = __pyx_t_1;
12413  __pyx_t_1 = 0;
12414  goto __pyx_L0;
12415 
12416  /* "PyClical.pyx":1473
12417  * return clifford(obj).norm()
12418  *
12419  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12420  * """
12421  * Absolute value of multivector: multivector 2-norm.
12422  */
12423 
12424  /* function exit code */
12425  __pyx_L1_error:;
12426  __Pyx_XDECREF(__pyx_t_1);
12427  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12428  __pyx_r = 0;
12429  __pyx_L0:;
12430  __Pyx_XGIVEREF(__pyx_r);
12431  __Pyx_RefNannyFinishContext();
12432  return __pyx_r;
12433  }
12434 
12435  /* Python wrapper */
12436  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12437  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 ";
12438  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12439  PyObject *__pyx_r = 0;
12440  __Pyx_RefNannyDeclarations
12441  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12442  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12443 
12444  /* function exit code */
12445  __Pyx_RefNannyFinishContext();
12446  return __pyx_r;
12447  }
12448 
12449  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12450  PyObject *__pyx_r = NULL;
12451  __Pyx_RefNannyDeclarations
12452  PyObject *__pyx_t_1 = NULL;
12453  __Pyx_RefNannySetupContext("abs", 0);
12454  __Pyx_XDECREF(__pyx_r);
12455  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12456  __Pyx_GOTREF(__pyx_t_1);
12457  __pyx_r = __pyx_t_1;
12458  __pyx_t_1 = 0;
12459  goto __pyx_L0;
12460 
12461  /* function exit code */
12462  __pyx_L1_error:;
12463  __Pyx_XDECREF(__pyx_t_1);
12464  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12465  __pyx_r = NULL;
12466  __pyx_L0:;
12467  __Pyx_XGIVEREF(__pyx_r);
12468  __Pyx_RefNannyFinishContext();
12469  return __pyx_r;
12470  }
12471 
12472  /* "PyClical.pyx":1482
12473  * return glucat.abs(toClifford(obj))
12474  *
12475  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12476  * """
12477  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12478  */
12479 
12480  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12481  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12482  PyObject *__pyx_r = NULL;
12483  __Pyx_RefNannyDeclarations
12484  PyObject *__pyx_t_1 = NULL;
12485  __Pyx_RefNannySetupContext("max_abs", 0);
12486 
12487  /* "PyClical.pyx":1492
12488  *
12489  * """
12490  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12491  *
12492  * cpdef inline pow(obj, m):
12493  */
12494  __Pyx_XDECREF(__pyx_r);
12495  __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)
12496  __Pyx_GOTREF(__pyx_t_1);
12497  __pyx_r = __pyx_t_1;
12498  __pyx_t_1 = 0;
12499  goto __pyx_L0;
12500 
12501  /* "PyClical.pyx":1482
12502  * return glucat.abs(toClifford(obj))
12503  *
12504  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12505  * """
12506  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12507  */
12508 
12509  /* function exit code */
12510  __pyx_L1_error:;
12511  __Pyx_XDECREF(__pyx_t_1);
12512  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12513  __pyx_r = 0;
12514  __pyx_L0:;
12515  __Pyx_XGIVEREF(__pyx_r);
12516  __Pyx_RefNannyFinishContext();
12517  return __pyx_r;
12518  }
12519 
12520  /* Python wrapper */
12521  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12522  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 ";
12523  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12524  PyObject *__pyx_r = 0;
12525  __Pyx_RefNannyDeclarations
12526  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12527  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12528 
12529  /* function exit code */
12530  __Pyx_RefNannyFinishContext();
12531  return __pyx_r;
12532  }
12533 
12534  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12535  PyObject *__pyx_r = NULL;
12536  __Pyx_RefNannyDeclarations
12537  PyObject *__pyx_t_1 = NULL;
12538  __Pyx_RefNannySetupContext("max_abs", 0);
12539  __Pyx_XDECREF(__pyx_r);
12540  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12541  __Pyx_GOTREF(__pyx_t_1);
12542  __pyx_r = __pyx_t_1;
12543  __pyx_t_1 = 0;
12544  goto __pyx_L0;
12545 
12546  /* function exit code */
12547  __pyx_L1_error:;
12548  __Pyx_XDECREF(__pyx_t_1);
12549  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12550  __pyx_r = NULL;
12551  __pyx_L0:;
12552  __Pyx_XGIVEREF(__pyx_r);
12553  __Pyx_RefNannyFinishContext();
12554  return __pyx_r;
12555  }
12556 
12557  /* "PyClical.pyx":1494
12558  * return glucat.max_abs(toClifford(obj))
12559  *
12560  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12561  * """
12562  * Integer power of multivector: obj to the m.
12563  */
12564 
12565  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12566  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12567  PyObject *__pyx_r = NULL;
12568  __Pyx_RefNannyDeclarations
12569  PyObject *__pyx_t_1 = NULL;
12570  PyObject *__pyx_t_2 = NULL;
12571  PyObject *__pyx_t_3 = NULL;
12572  PyObject *__pyx_t_4 = NULL;
12573  PyObject *__pyx_t_5 = NULL;
12574  PyObject *__pyx_t_6 = NULL;
12575  int __pyx_t_7;
12576  PyObject *__pyx_t_8 = NULL;
12577  PyObject *__pyx_t_9 = NULL;
12578  PyObject *__pyx_t_10 = NULL;
12579  __Pyx_RefNannySetupContext("pow", 0);
12580 
12581  /* "PyClical.pyx":1513
12582  * 1
12583  * """
12584  * try: # <<<<<<<<<<<<<<
12585  * math.pow(obj, m)
12586  * except:
12587  */
12588  {
12589  __Pyx_PyThreadState_declare
12590  __Pyx_PyThreadState_assign
12591  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12592  __Pyx_XGOTREF(__pyx_t_1);
12593  __Pyx_XGOTREF(__pyx_t_2);
12594  __Pyx_XGOTREF(__pyx_t_3);
12595  /*try:*/ {
12596 
12597  /* "PyClical.pyx":1514
12598  * """
12599  * try:
12600  * math.pow(obj, m) # <<<<<<<<<<<<<<
12601  * except:
12602  * return clifford(obj).pow(m)
12603  */
12604  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12605  __Pyx_GOTREF(__pyx_t_5);
12606  __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)
12607  __Pyx_GOTREF(__pyx_t_6);
12608  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12609  __pyx_t_5 = NULL;
12610  __pyx_t_7 = 0;
12611  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12612  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12613  if (likely(__pyx_t_5)) {
12614  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12615  __Pyx_INCREF(__pyx_t_5);
12616  __Pyx_INCREF(function);
12617  __Pyx_DECREF_SET(__pyx_t_6, function);
12618  __pyx_t_7 = 1;
12619  }
12620  }
12621  #if CYTHON_FAST_PYCALL
12622  if (PyFunction_Check(__pyx_t_6)) {
12623  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12624  __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)
12625  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12626  __Pyx_GOTREF(__pyx_t_4);
12627  } else
12628  #endif
12629  #if CYTHON_FAST_PYCCALL
12630  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12631  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12632  __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)
12633  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12634  __Pyx_GOTREF(__pyx_t_4);
12635  } else
12636  #endif
12637  {
12638  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12639  __Pyx_GOTREF(__pyx_t_8);
12640  if (__pyx_t_5) {
12641  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12642  }
12643  __Pyx_INCREF(__pyx_v_obj);
12644  __Pyx_GIVEREF(__pyx_v_obj);
12645  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12646  __Pyx_INCREF(__pyx_v_m);
12647  __Pyx_GIVEREF(__pyx_v_m);
12648  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12649  __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)
12650  __Pyx_GOTREF(__pyx_t_4);
12651  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12652  }
12653  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12654  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12655 
12656  /* "PyClical.pyx":1513
12657  * 1
12658  * """
12659  * try: # <<<<<<<<<<<<<<
12660  * math.pow(obj, m)
12661  * except:
12662  */
12663  }
12664  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12665  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12666  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12667  goto __pyx_L8_try_end;
12668  __pyx_L3_error:;
12669  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12670  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12671  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12672  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12673 
12674  /* "PyClical.pyx":1515
12675  * try:
12676  * math.pow(obj, m)
12677  * except: # <<<<<<<<<<<<<<
12678  * return clifford(obj).pow(m)
12679  *
12680  */
12681  /*except:*/ {
12682  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12683  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12684  __Pyx_GOTREF(__pyx_t_4);
12685  __Pyx_GOTREF(__pyx_t_6);
12686  __Pyx_GOTREF(__pyx_t_8);
12687 
12688  /* "PyClical.pyx":1516
12689  * math.pow(obj, m)
12690  * except:
12691  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12692  *
12693  * cpdef inline outer_pow(obj, m):
12694  */
12695  __Pyx_XDECREF(__pyx_r);
12696  __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)
12697  __Pyx_GOTREF(__pyx_t_9);
12698  __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)
12699  __Pyx_GOTREF(__pyx_t_10);
12700  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12701  __pyx_t_9 = NULL;
12702  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12703  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12704  if (likely(__pyx_t_9)) {
12705  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12706  __Pyx_INCREF(__pyx_t_9);
12707  __Pyx_INCREF(function);
12708  __Pyx_DECREF_SET(__pyx_t_10, function);
12709  }
12710  }
12711  __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);
12712  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12713  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12714  __Pyx_GOTREF(__pyx_t_5);
12715  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12716  __pyx_r = __pyx_t_5;
12717  __pyx_t_5 = 0;
12718  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12719  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12720  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12721  goto __pyx_L6_except_return;
12722  }
12723  __pyx_L5_except_error:;
12724 
12725  /* "PyClical.pyx":1513
12726  * 1
12727  * """
12728  * try: # <<<<<<<<<<<<<<
12729  * math.pow(obj, m)
12730  * except:
12731  */
12732  __Pyx_XGIVEREF(__pyx_t_1);
12733  __Pyx_XGIVEREF(__pyx_t_2);
12734  __Pyx_XGIVEREF(__pyx_t_3);
12735  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12736  goto __pyx_L1_error;
12737  __pyx_L6_except_return:;
12738  __Pyx_XGIVEREF(__pyx_t_1);
12739  __Pyx_XGIVEREF(__pyx_t_2);
12740  __Pyx_XGIVEREF(__pyx_t_3);
12741  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12742  goto __pyx_L0;
12743  __pyx_L8_try_end:;
12744  }
12745 
12746  /* "PyClical.pyx":1494
12747  * return glucat.max_abs(toClifford(obj))
12748  *
12749  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12750  * """
12751  * Integer power of multivector: obj to the m.
12752  */
12753 
12754  /* function exit code */
12755  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12756  goto __pyx_L0;
12757  __pyx_L1_error:;
12758  __Pyx_XDECREF(__pyx_t_4);
12759  __Pyx_XDECREF(__pyx_t_5);
12760  __Pyx_XDECREF(__pyx_t_6);
12761  __Pyx_XDECREF(__pyx_t_8);
12762  __Pyx_XDECREF(__pyx_t_9);
12763  __Pyx_XDECREF(__pyx_t_10);
12764  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12765  __pyx_r = 0;
12766  __pyx_L0:;
12767  __Pyx_XGIVEREF(__pyx_r);
12768  __Pyx_RefNannyFinishContext();
12769  return __pyx_r;
12770  }
12771 
12772  /* Python wrapper */
12773  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12774  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 ";
12775  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12776  PyObject *__pyx_v_obj = 0;
12777  PyObject *__pyx_v_m = 0;
12778  PyObject *__pyx_r = 0;
12779  __Pyx_RefNannyDeclarations
12780  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12781  {
12782  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12783  PyObject* values[2] = {0,0};
12784  if (unlikely(__pyx_kwds)) {
12785  Py_ssize_t kw_args;
12786  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12787  switch (pos_args) {
12788  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12789  CYTHON_FALLTHROUGH;
12790  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12791  CYTHON_FALLTHROUGH;
12792  case 0: break;
12793  default: goto __pyx_L5_argtuple_error;
12794  }
12795  kw_args = PyDict_Size(__pyx_kwds);
12796  switch (pos_args) {
12797  case 0:
12798  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12799  else goto __pyx_L5_argtuple_error;
12800  CYTHON_FALLTHROUGH;
12801  case 1:
12802  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12803  else {
12804  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12805  }
12806  }
12807  if (unlikely(kw_args > 0)) {
12808  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12809  }
12810  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12811  goto __pyx_L5_argtuple_error;
12812  } else {
12813  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12814  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12815  }
12816  __pyx_v_obj = values[0];
12817  __pyx_v_m = values[1];
12818  }
12819  goto __pyx_L4_argument_unpacking_done;
12820  __pyx_L5_argtuple_error:;
12821  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12822  __pyx_L3_error:;
12823  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12824  __Pyx_RefNannyFinishContext();
12825  return NULL;
12826  __pyx_L4_argument_unpacking_done:;
12827  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12828 
12829  /* function exit code */
12830  __Pyx_RefNannyFinishContext();
12831  return __pyx_r;
12832  }
12833 
12834  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12835  PyObject *__pyx_r = NULL;
12836  __Pyx_RefNannyDeclarations
12837  PyObject *__pyx_t_1 = NULL;
12838  __Pyx_RefNannySetupContext("pow", 0);
12839  __Pyx_XDECREF(__pyx_r);
12840  __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)
12841  __Pyx_GOTREF(__pyx_t_1);
12842  __pyx_r = __pyx_t_1;
12843  __pyx_t_1 = 0;
12844  goto __pyx_L0;
12845 
12846  /* function exit code */
12847  __pyx_L1_error:;
12848  __Pyx_XDECREF(__pyx_t_1);
12849  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12850  __pyx_r = NULL;
12851  __pyx_L0:;
12852  __Pyx_XGIVEREF(__pyx_r);
12853  __Pyx_RefNannyFinishContext();
12854  return __pyx_r;
12855  }
12856 
12857  /* "PyClical.pyx":1518
12858  * return clifford(obj).pow(m)
12859  *
12860  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12861  * """
12862  * Outer product power of multivector.
12863  */
12864 
12865  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12866  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12867  PyObject *__pyx_r = NULL;
12868  __Pyx_RefNannyDeclarations
12869  PyObject *__pyx_t_1 = NULL;
12870  PyObject *__pyx_t_2 = NULL;
12871  PyObject *__pyx_t_3 = NULL;
12872  __Pyx_RefNannySetupContext("outer_pow", 0);
12873 
12874  /* "PyClical.pyx":1525
12875  * 1+3{1}+3{1,2}
12876  * """
12877  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12878  *
12879  * cpdef inline complexifier(obj):
12880  */
12881  __Pyx_XDECREF(__pyx_r);
12882  __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)
12883  __Pyx_GOTREF(__pyx_t_2);
12884  __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)
12885  __Pyx_GOTREF(__pyx_t_3);
12886  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12887  __pyx_t_2 = NULL;
12888  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12889  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12890  if (likely(__pyx_t_2)) {
12891  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12892  __Pyx_INCREF(__pyx_t_2);
12893  __Pyx_INCREF(function);
12894  __Pyx_DECREF_SET(__pyx_t_3, function);
12895  }
12896  }
12897  __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);
12898  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12899  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12900  __Pyx_GOTREF(__pyx_t_1);
12901  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12902  __pyx_r = __pyx_t_1;
12903  __pyx_t_1 = 0;
12904  goto __pyx_L0;
12905 
12906  /* "PyClical.pyx":1518
12907  * return clifford(obj).pow(m)
12908  *
12909  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12910  * """
12911  * Outer product power of multivector.
12912  */
12913 
12914  /* function exit code */
12915  __pyx_L1_error:;
12916  __Pyx_XDECREF(__pyx_t_1);
12917  __Pyx_XDECREF(__pyx_t_2);
12918  __Pyx_XDECREF(__pyx_t_3);
12919  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12920  __pyx_r = 0;
12921  __pyx_L0:;
12922  __Pyx_XGIVEREF(__pyx_r);
12923  __Pyx_RefNannyFinishContext();
12924  return __pyx_r;
12925  }
12926 
12927  /* Python wrapper */
12928  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12929  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 ";
12930  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12931  PyObject *__pyx_v_obj = 0;
12932  PyObject *__pyx_v_m = 0;
12933  PyObject *__pyx_r = 0;
12934  __Pyx_RefNannyDeclarations
12935  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12936  {
12937  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12938  PyObject* values[2] = {0,0};
12939  if (unlikely(__pyx_kwds)) {
12940  Py_ssize_t kw_args;
12941  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12942  switch (pos_args) {
12943  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12944  CYTHON_FALLTHROUGH;
12945  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12946  CYTHON_FALLTHROUGH;
12947  case 0: break;
12948  default: goto __pyx_L5_argtuple_error;
12949  }
12950  kw_args = PyDict_Size(__pyx_kwds);
12951  switch (pos_args) {
12952  case 0:
12953  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12954  else goto __pyx_L5_argtuple_error;
12955  CYTHON_FALLTHROUGH;
12956  case 1:
12957  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12958  else {
12959  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12960  }
12961  }
12962  if (unlikely(kw_args > 0)) {
12963  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12964  }
12965  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12966  goto __pyx_L5_argtuple_error;
12967  } else {
12968  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12969  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12970  }
12971  __pyx_v_obj = values[0];
12972  __pyx_v_m = values[1];
12973  }
12974  goto __pyx_L4_argument_unpacking_done;
12975  __pyx_L5_argtuple_error:;
12976  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
12977  __pyx_L3_error:;
12978  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12979  __Pyx_RefNannyFinishContext();
12980  return NULL;
12981  __pyx_L4_argument_unpacking_done:;
12982  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12983 
12984  /* function exit code */
12985  __Pyx_RefNannyFinishContext();
12986  return __pyx_r;
12987  }
12988 
12989  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12990  PyObject *__pyx_r = NULL;
12991  __Pyx_RefNannyDeclarations
12992  PyObject *__pyx_t_1 = NULL;
12993  __Pyx_RefNannySetupContext("outer_pow", 0);
12994  __Pyx_XDECREF(__pyx_r);
12995  __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)
12996  __Pyx_GOTREF(__pyx_t_1);
12997  __pyx_r = __pyx_t_1;
12998  __pyx_t_1 = 0;
12999  goto __pyx_L0;
13000 
13001  /* function exit code */
13002  __pyx_L1_error:;
13003  __Pyx_XDECREF(__pyx_t_1);
13004  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13005  __pyx_r = NULL;
13006  __pyx_L0:;
13007  __Pyx_XGIVEREF(__pyx_r);
13008  __Pyx_RefNannyFinishContext();
13009  return __pyx_r;
13010  }
13011 
13012  /* "PyClical.pyx":1527
13013  * return clifford(obj).outer_pow(m)
13014  *
13015  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13016  * """
13017  * Square root of -1 which commutes with all members of the frame of the given multivector.
13018  */
13019 
13020  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13021  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13022  PyObject *__pyx_r = NULL;
13023  __Pyx_RefNannyDeclarations
13024  PyObject *__pyx_t_1 = NULL;
13025  PyObject *__pyx_t_2 = NULL;
13026  __Pyx_RefNannySetupContext("complexifier", 0);
13027 
13028  /* "PyClical.pyx":1540
13029  * {-1}
13030  * """
13031  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13032  *
13033  * cpdef inline sqrt(obj, i = None):
13034  */
13035  __Pyx_XDECREF(__pyx_r);
13036  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13037  __Pyx_GOTREF(__pyx_t_1);
13038  __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)
13039  __Pyx_GOTREF(__pyx_t_2);
13040  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13041  __pyx_r = __pyx_t_2;
13042  __pyx_t_2 = 0;
13043  goto __pyx_L0;
13044 
13045  /* "PyClical.pyx":1527
13046  * return clifford(obj).outer_pow(m)
13047  *
13048  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13049  * """
13050  * Square root of -1 which commutes with all members of the frame of the given multivector.
13051  */
13052 
13053  /* function exit code */
13054  __pyx_L1_error:;
13055  __Pyx_XDECREF(__pyx_t_1);
13056  __Pyx_XDECREF(__pyx_t_2);
13057  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13058  __pyx_r = 0;
13059  __pyx_L0:;
13060  __Pyx_XGIVEREF(__pyx_r);
13061  __Pyx_RefNannyFinishContext();
13062  return __pyx_r;
13063  }
13064 
13065  /* Python wrapper */
13066  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13067  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 ";
13068  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13069  PyObject *__pyx_r = 0;
13070  __Pyx_RefNannyDeclarations
13071  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13072  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13073 
13074  /* function exit code */
13075  __Pyx_RefNannyFinishContext();
13076  return __pyx_r;
13077  }
13078 
13079  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13080  PyObject *__pyx_r = NULL;
13081  __Pyx_RefNannyDeclarations
13082  PyObject *__pyx_t_1 = NULL;
13083  __Pyx_RefNannySetupContext("complexifier", 0);
13084  __Pyx_XDECREF(__pyx_r);
13085  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13086  __Pyx_GOTREF(__pyx_t_1);
13087  __pyx_r = __pyx_t_1;
13088  __pyx_t_1 = 0;
13089  goto __pyx_L0;
13090 
13091  /* function exit code */
13092  __pyx_L1_error:;
13093  __Pyx_XDECREF(__pyx_t_1);
13094  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13095  __pyx_r = NULL;
13096  __pyx_L0:;
13097  __Pyx_XGIVEREF(__pyx_r);
13098  __Pyx_RefNannyFinishContext();
13099  return __pyx_r;
13100  }
13101 
13102  /* "PyClical.pyx":1542
13103  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13104  *
13105  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13106  * """
13107  * Square root of multivector with optional complexifier.
13108  */
13109 
13110  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13111  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) {
13112  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13113  PyObject *__pyx_r = NULL;
13114  __Pyx_RefNannyDeclarations
13115  int __pyx_t_1;
13116  int __pyx_t_2;
13117  PyObject *__pyx_t_3 = NULL;
13118  Clifford __pyx_t_4;
13119  PyObject *__pyx_t_5 = NULL;
13120  PyObject *__pyx_t_6 = NULL;
13121  PyObject *__pyx_t_7 = NULL;
13122  PyObject *__pyx_t_8 = NULL;
13123  PyObject *__pyx_t_9 = NULL;
13124  PyObject *__pyx_t_10 = NULL;
13125  PyObject *__pyx_t_11 = NULL;
13126  __Pyx_RefNannySetupContext("sqrt", 0);
13127  if (__pyx_optional_args) {
13128  if (__pyx_optional_args->__pyx_n > 0) {
13129  __pyx_v_i = __pyx_optional_args->i;
13130  }
13131  }
13132 
13133  /* "PyClical.pyx":1557
13134  * -1
13135  * """
13136  * if not (i is None): # <<<<<<<<<<<<<<
13137  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13138  * else:
13139  */
13140  __pyx_t_1 = (__pyx_v_i != Py_None);
13141  __pyx_t_2 = (__pyx_t_1 != 0);
13142  if (__pyx_t_2) {
13143 
13144  /* "PyClical.pyx":1558
13145  * """
13146  * if not (i is None):
13147  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13148  * else:
13149  * try:
13150  */
13151  __Pyx_XDECREF(__pyx_r);
13152  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13153  __Pyx_GOTREF(__pyx_t_3);
13154  try {
13155  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13156  } catch(...) {
13157  __Pyx_CppExn2PyErr();
13158  __PYX_ERR(0, 1558, __pyx_L1_error)
13159  }
13160  __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)
13161  __Pyx_GOTREF(__pyx_t_5);
13162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13163  __pyx_r = __pyx_t_5;
13164  __pyx_t_5 = 0;
13165  goto __pyx_L0;
13166 
13167  /* "PyClical.pyx":1557
13168  * -1
13169  * """
13170  * if not (i is None): # <<<<<<<<<<<<<<
13171  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13172  * else:
13173  */
13174  }
13175 
13176  /* "PyClical.pyx":1560
13177  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13178  * else:
13179  * try: # <<<<<<<<<<<<<<
13180  * return math.sqrt(obj)
13181  * except:
13182  */
13183  /*else*/ {
13184  {
13185  __Pyx_PyThreadState_declare
13186  __Pyx_PyThreadState_assign
13187  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13188  __Pyx_XGOTREF(__pyx_t_6);
13189  __Pyx_XGOTREF(__pyx_t_7);
13190  __Pyx_XGOTREF(__pyx_t_8);
13191  /*try:*/ {
13192 
13193  /* "PyClical.pyx":1561
13194  * else:
13195  * try:
13196  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13197  * except:
13198  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13199  */
13200  __Pyx_XDECREF(__pyx_r);
13201  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13202  __Pyx_GOTREF(__pyx_t_3);
13203  __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)
13204  __Pyx_GOTREF(__pyx_t_9);
13205  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13206  __pyx_t_3 = NULL;
13207  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13208  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13209  if (likely(__pyx_t_3)) {
13210  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13211  __Pyx_INCREF(__pyx_t_3);
13212  __Pyx_INCREF(function);
13213  __Pyx_DECREF_SET(__pyx_t_9, function);
13214  }
13215  }
13216  __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);
13217  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13218  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13219  __Pyx_GOTREF(__pyx_t_5);
13220  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13221  __pyx_r = __pyx_t_5;
13222  __pyx_t_5 = 0;
13223  goto __pyx_L8_try_return;
13224 
13225  /* "PyClical.pyx":1560
13226  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13227  * else:
13228  * try: # <<<<<<<<<<<<<<
13229  * return math.sqrt(obj)
13230  * except:
13231  */
13232  }
13233  __pyx_L4_error:;
13234  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13235  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13236  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13237 
13238  /* "PyClical.pyx":1562
13239  * try:
13240  * return math.sqrt(obj)
13241  * except: # <<<<<<<<<<<<<<
13242  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13243  *
13244  */
13245  /*except:*/ {
13246  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13247  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13248  __Pyx_GOTREF(__pyx_t_5);
13249  __Pyx_GOTREF(__pyx_t_9);
13250  __Pyx_GOTREF(__pyx_t_3);
13251 
13252  /* "PyClical.pyx":1563
13253  * return math.sqrt(obj)
13254  * except:
13255  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13256  *
13257  * cpdef inline exp(obj):
13258  */
13259  __Pyx_XDECREF(__pyx_r);
13260  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13261  __Pyx_GOTREF(__pyx_t_10);
13262  __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)
13263  __Pyx_GOTREF(__pyx_t_11);
13264  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13265  __pyx_r = __pyx_t_11;
13266  __pyx_t_11 = 0;
13267  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13268  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13269  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13270  goto __pyx_L7_except_return;
13271  }
13272  __pyx_L6_except_error:;
13273 
13274  /* "PyClical.pyx":1560
13275  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13276  * else:
13277  * try: # <<<<<<<<<<<<<<
13278  * return math.sqrt(obj)
13279  * except:
13280  */
13281  __Pyx_XGIVEREF(__pyx_t_6);
13282  __Pyx_XGIVEREF(__pyx_t_7);
13283  __Pyx_XGIVEREF(__pyx_t_8);
13284  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13285  goto __pyx_L1_error;
13286  __pyx_L8_try_return:;
13287  __Pyx_XGIVEREF(__pyx_t_6);
13288  __Pyx_XGIVEREF(__pyx_t_7);
13289  __Pyx_XGIVEREF(__pyx_t_8);
13290  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13291  goto __pyx_L0;
13292  __pyx_L7_except_return:;
13293  __Pyx_XGIVEREF(__pyx_t_6);
13294  __Pyx_XGIVEREF(__pyx_t_7);
13295  __Pyx_XGIVEREF(__pyx_t_8);
13296  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13297  goto __pyx_L0;
13298  }
13299  }
13300 
13301  /* "PyClical.pyx":1542
13302  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13303  *
13304  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13305  * """
13306  * Square root of multivector with optional complexifier.
13307  */
13308 
13309  /* function exit code */
13310  __pyx_L1_error:;
13311  __Pyx_XDECREF(__pyx_t_3);
13312  __Pyx_XDECREF(__pyx_t_5);
13313  __Pyx_XDECREF(__pyx_t_9);
13314  __Pyx_XDECREF(__pyx_t_10);
13315  __Pyx_XDECREF(__pyx_t_11);
13316  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13317  __pyx_r = 0;
13318  __pyx_L0:;
13319  __Pyx_XGIVEREF(__pyx_r);
13320  __Pyx_RefNannyFinishContext();
13321  return __pyx_r;
13322  }
13323 
13324  /* Python wrapper */
13325  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13326  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 ";
13327  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13328  PyObject *__pyx_v_obj = 0;
13329  PyObject *__pyx_v_i = 0;
13330  PyObject *__pyx_r = 0;
13331  __Pyx_RefNannyDeclarations
13332  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13333  {
13334  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13335  PyObject* values[2] = {0,0};
13336  values[1] = ((PyObject *)Py_None);
13337  if (unlikely(__pyx_kwds)) {
13338  Py_ssize_t kw_args;
13339  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13340  switch (pos_args) {
13341  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13342  CYTHON_FALLTHROUGH;
13343  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13344  CYTHON_FALLTHROUGH;
13345  case 0: break;
13346  default: goto __pyx_L5_argtuple_error;
13347  }
13348  kw_args = PyDict_Size(__pyx_kwds);
13349  switch (pos_args) {
13350  case 0:
13351  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13352  else goto __pyx_L5_argtuple_error;
13353  CYTHON_FALLTHROUGH;
13354  case 1:
13355  if (kw_args > 0) {
13356  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13357  if (value) { values[1] = value; kw_args--; }
13358  }
13359  }
13360  if (unlikely(kw_args > 0)) {
13361  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13362  }
13363  } else {
13364  switch (PyTuple_GET_SIZE(__pyx_args)) {
13365  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13366  CYTHON_FALLTHROUGH;
13367  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13368  break;
13369  default: goto __pyx_L5_argtuple_error;
13370  }
13371  }
13372  __pyx_v_obj = values[0];
13373  __pyx_v_i = values[1];
13374  }
13375  goto __pyx_L4_argument_unpacking_done;
13376  __pyx_L5_argtuple_error:;
13377  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13378  __pyx_L3_error:;
13379  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13380  __Pyx_RefNannyFinishContext();
13381  return NULL;
13382  __pyx_L4_argument_unpacking_done:;
13383  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13384 
13385  /* function exit code */
13386  __Pyx_RefNannyFinishContext();
13387  return __pyx_r;
13388  }
13389 
13390  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13391  PyObject *__pyx_r = NULL;
13392  __Pyx_RefNannyDeclarations
13393  PyObject *__pyx_t_1 = NULL;
13394  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13395  __Pyx_RefNannySetupContext("sqrt", 0);
13396  __Pyx_XDECREF(__pyx_r);
13397  __pyx_t_2.__pyx_n = 1;
13398  __pyx_t_2.i = __pyx_v_i;
13399  __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)
13400  __Pyx_GOTREF(__pyx_t_1);
13401  __pyx_r = __pyx_t_1;
13402  __pyx_t_1 = 0;
13403  goto __pyx_L0;
13404 
13405  /* function exit code */
13406  __pyx_L1_error:;
13407  __Pyx_XDECREF(__pyx_t_1);
13408  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13409  __pyx_r = NULL;
13410  __pyx_L0:;
13411  __Pyx_XGIVEREF(__pyx_r);
13412  __Pyx_RefNannyFinishContext();
13413  return __pyx_r;
13414  }
13415 
13416  /* "PyClical.pyx":1565
13417  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13418  *
13419  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13420  * """
13421  * Exponential of multivector.
13422  */
13423 
13424  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13425  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13426  PyObject *__pyx_r = NULL;
13427  __Pyx_RefNannyDeclarations
13428  PyObject *__pyx_t_1 = NULL;
13429  PyObject *__pyx_t_2 = NULL;
13430  PyObject *__pyx_t_3 = NULL;
13431  PyObject *__pyx_t_4 = NULL;
13432  PyObject *__pyx_t_5 = NULL;
13433  PyObject *__pyx_t_6 = NULL;
13434  PyObject *__pyx_t_7 = NULL;
13435  PyObject *__pyx_t_8 = NULL;
13436  __Pyx_RefNannySetupContext("exp", 0);
13437 
13438  /* "PyClical.pyx":1574
13439  * {1,2}
13440  * """
13441  * try: # <<<<<<<<<<<<<<
13442  * return math.exp(obj)
13443  * except:
13444  */
13445  {
13446  __Pyx_PyThreadState_declare
13447  __Pyx_PyThreadState_assign
13448  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13449  __Pyx_XGOTREF(__pyx_t_1);
13450  __Pyx_XGOTREF(__pyx_t_2);
13451  __Pyx_XGOTREF(__pyx_t_3);
13452  /*try:*/ {
13453 
13454  /* "PyClical.pyx":1575
13455  * """
13456  * try:
13457  * return math.exp(obj) # <<<<<<<<<<<<<<
13458  * except:
13459  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13460  */
13461  __Pyx_XDECREF(__pyx_r);
13462  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13463  __Pyx_GOTREF(__pyx_t_5);
13464  __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)
13465  __Pyx_GOTREF(__pyx_t_6);
13466  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13467  __pyx_t_5 = NULL;
13468  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13469  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13470  if (likely(__pyx_t_5)) {
13471  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13472  __Pyx_INCREF(__pyx_t_5);
13473  __Pyx_INCREF(function);
13474  __Pyx_DECREF_SET(__pyx_t_6, function);
13475  }
13476  }
13477  __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);
13478  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13479  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13480  __Pyx_GOTREF(__pyx_t_4);
13481  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13482  __pyx_r = __pyx_t_4;
13483  __pyx_t_4 = 0;
13484  goto __pyx_L7_try_return;
13485 
13486  /* "PyClical.pyx":1574
13487  * {1,2}
13488  * """
13489  * try: # <<<<<<<<<<<<<<
13490  * return math.exp(obj)
13491  * except:
13492  */
13493  }
13494  __pyx_L3_error:;
13495  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13496  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13497  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13498 
13499  /* "PyClical.pyx":1576
13500  * try:
13501  * return math.exp(obj)
13502  * except: # <<<<<<<<<<<<<<
13503  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13504  *
13505  */
13506  /*except:*/ {
13507  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13508  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13509  __Pyx_GOTREF(__pyx_t_4);
13510  __Pyx_GOTREF(__pyx_t_6);
13511  __Pyx_GOTREF(__pyx_t_5);
13512 
13513  /* "PyClical.pyx":1577
13514  * return math.exp(obj)
13515  * except:
13516  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13517  *
13518  * cpdef inline log(obj,i = None):
13519  */
13520  __Pyx_XDECREF(__pyx_r);
13521  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13522  __Pyx_GOTREF(__pyx_t_7);
13523  __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)
13524  __Pyx_GOTREF(__pyx_t_8);
13525  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13526  __pyx_r = __pyx_t_8;
13527  __pyx_t_8 = 0;
13528  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13529  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13530  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13531  goto __pyx_L6_except_return;
13532  }
13533  __pyx_L5_except_error:;
13534 
13535  /* "PyClical.pyx":1574
13536  * {1,2}
13537  * """
13538  * try: # <<<<<<<<<<<<<<
13539  * return math.exp(obj)
13540  * except:
13541  */
13542  __Pyx_XGIVEREF(__pyx_t_1);
13543  __Pyx_XGIVEREF(__pyx_t_2);
13544  __Pyx_XGIVEREF(__pyx_t_3);
13545  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13546  goto __pyx_L1_error;
13547  __pyx_L7_try_return:;
13548  __Pyx_XGIVEREF(__pyx_t_1);
13549  __Pyx_XGIVEREF(__pyx_t_2);
13550  __Pyx_XGIVEREF(__pyx_t_3);
13551  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13552  goto __pyx_L0;
13553  __pyx_L6_except_return:;
13554  __Pyx_XGIVEREF(__pyx_t_1);
13555  __Pyx_XGIVEREF(__pyx_t_2);
13556  __Pyx_XGIVEREF(__pyx_t_3);
13557  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13558  goto __pyx_L0;
13559  }
13560 
13561  /* "PyClical.pyx":1565
13562  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13563  *
13564  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13565  * """
13566  * Exponential of multivector.
13567  */
13568 
13569  /* function exit code */
13570  __pyx_L1_error:;
13571  __Pyx_XDECREF(__pyx_t_4);
13572  __Pyx_XDECREF(__pyx_t_5);
13573  __Pyx_XDECREF(__pyx_t_6);
13574  __Pyx_XDECREF(__pyx_t_7);
13575  __Pyx_XDECREF(__pyx_t_8);
13576  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13577  __pyx_r = 0;
13578  __pyx_L0:;
13579  __Pyx_XGIVEREF(__pyx_r);
13580  __Pyx_RefNannyFinishContext();
13581  return __pyx_r;
13582  }
13583 
13584  /* Python wrapper */
13585  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13586  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 ";
13587  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13588  PyObject *__pyx_r = 0;
13589  __Pyx_RefNannyDeclarations
13590  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13591  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13592 
13593  /* function exit code */
13594  __Pyx_RefNannyFinishContext();
13595  return __pyx_r;
13596  }
13597 
13598  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13599  PyObject *__pyx_r = NULL;
13600  __Pyx_RefNannyDeclarations
13601  PyObject *__pyx_t_1 = NULL;
13602  __Pyx_RefNannySetupContext("exp", 0);
13603  __Pyx_XDECREF(__pyx_r);
13604  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13605  __Pyx_GOTREF(__pyx_t_1);
13606  __pyx_r = __pyx_t_1;
13607  __pyx_t_1 = 0;
13608  goto __pyx_L0;
13609 
13610  /* function exit code */
13611  __pyx_L1_error:;
13612  __Pyx_XDECREF(__pyx_t_1);
13613  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13614  __pyx_r = NULL;
13615  __pyx_L0:;
13616  __Pyx_XGIVEREF(__pyx_r);
13617  __Pyx_RefNannyFinishContext();
13618  return __pyx_r;
13619  }
13620 
13621  /* "PyClical.pyx":1579
13622  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13623  *
13624  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13625  * """
13626  * Natural logarithm of multivector with optional complexifier.
13627  */
13628 
13629  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13630  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) {
13631  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13632  PyObject *__pyx_r = NULL;
13633  __Pyx_RefNannyDeclarations
13634  int __pyx_t_1;
13635  int __pyx_t_2;
13636  PyObject *__pyx_t_3 = NULL;
13637  Clifford __pyx_t_4;
13638  PyObject *__pyx_t_5 = NULL;
13639  PyObject *__pyx_t_6 = NULL;
13640  PyObject *__pyx_t_7 = NULL;
13641  PyObject *__pyx_t_8 = NULL;
13642  PyObject *__pyx_t_9 = NULL;
13643  PyObject *__pyx_t_10 = NULL;
13644  PyObject *__pyx_t_11 = NULL;
13645  __Pyx_RefNannySetupContext("log", 0);
13646  if (__pyx_optional_args) {
13647  if (__pyx_optional_args->__pyx_n > 0) {
13648  __pyx_v_i = __pyx_optional_args->i;
13649  }
13650  }
13651 
13652  /* "PyClical.pyx":1594
13653  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13654  * """
13655  * if not (i is None): # <<<<<<<<<<<<<<
13656  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13657  * else:
13658  */
13659  __pyx_t_1 = (__pyx_v_i != Py_None);
13660  __pyx_t_2 = (__pyx_t_1 != 0);
13661  if (__pyx_t_2) {
13662 
13663  /* "PyClical.pyx":1595
13664  * """
13665  * if not (i is None):
13666  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13667  * else:
13668  * try:
13669  */
13670  __Pyx_XDECREF(__pyx_r);
13671  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13672  __Pyx_GOTREF(__pyx_t_3);
13673  try {
13674  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13675  } catch(...) {
13676  __Pyx_CppExn2PyErr();
13677  __PYX_ERR(0, 1595, __pyx_L1_error)
13678  }
13679  __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)
13680  __Pyx_GOTREF(__pyx_t_5);
13681  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13682  __pyx_r = __pyx_t_5;
13683  __pyx_t_5 = 0;
13684  goto __pyx_L0;
13685 
13686  /* "PyClical.pyx":1594
13687  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13688  * """
13689  * if not (i is None): # <<<<<<<<<<<<<<
13690  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13691  * else:
13692  */
13693  }
13694 
13695  /* "PyClical.pyx":1597
13696  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13697  * else:
13698  * try: # <<<<<<<<<<<<<<
13699  * return math.log(obj)
13700  * except:
13701  */
13702  /*else*/ {
13703  {
13704  __Pyx_PyThreadState_declare
13705  __Pyx_PyThreadState_assign
13706  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13707  __Pyx_XGOTREF(__pyx_t_6);
13708  __Pyx_XGOTREF(__pyx_t_7);
13709  __Pyx_XGOTREF(__pyx_t_8);
13710  /*try:*/ {
13711 
13712  /* "PyClical.pyx":1598
13713  * else:
13714  * try:
13715  * return math.log(obj) # <<<<<<<<<<<<<<
13716  * except:
13717  * return clifford().wrap( glucat.log(toClifford(obj)) )
13718  */
13719  __Pyx_XDECREF(__pyx_r);
13720  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13721  __Pyx_GOTREF(__pyx_t_3);
13722  __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)
13723  __Pyx_GOTREF(__pyx_t_9);
13724  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13725  __pyx_t_3 = NULL;
13726  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13727  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13728  if (likely(__pyx_t_3)) {
13729  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13730  __Pyx_INCREF(__pyx_t_3);
13731  __Pyx_INCREF(function);
13732  __Pyx_DECREF_SET(__pyx_t_9, function);
13733  }
13734  }
13735  __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);
13736  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13737  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13738  __Pyx_GOTREF(__pyx_t_5);
13739  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13740  __pyx_r = __pyx_t_5;
13741  __pyx_t_5 = 0;
13742  goto __pyx_L8_try_return;
13743 
13744  /* "PyClical.pyx":1597
13745  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13746  * else:
13747  * try: # <<<<<<<<<<<<<<
13748  * return math.log(obj)
13749  * except:
13750  */
13751  }
13752  __pyx_L4_error:;
13753  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13754  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13755  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13756 
13757  /* "PyClical.pyx":1599
13758  * try:
13759  * return math.log(obj)
13760  * except: # <<<<<<<<<<<<<<
13761  * return clifford().wrap( glucat.log(toClifford(obj)) )
13762  *
13763  */
13764  /*except:*/ {
13765  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13766  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13767  __Pyx_GOTREF(__pyx_t_5);
13768  __Pyx_GOTREF(__pyx_t_9);
13769  __Pyx_GOTREF(__pyx_t_3);
13770 
13771  /* "PyClical.pyx":1600
13772  * return math.log(obj)
13773  * except:
13774  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13775  *
13776  * cpdef inline cos(obj,i = None):
13777  */
13778  __Pyx_XDECREF(__pyx_r);
13779  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13780  __Pyx_GOTREF(__pyx_t_10);
13781  __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)
13782  __Pyx_GOTREF(__pyx_t_11);
13783  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13784  __pyx_r = __pyx_t_11;
13785  __pyx_t_11 = 0;
13786  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13787  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13788  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13789  goto __pyx_L7_except_return;
13790  }
13791  __pyx_L6_except_error:;
13792 
13793  /* "PyClical.pyx":1597
13794  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13795  * else:
13796  * try: # <<<<<<<<<<<<<<
13797  * return math.log(obj)
13798  * except:
13799  */
13800  __Pyx_XGIVEREF(__pyx_t_6);
13801  __Pyx_XGIVEREF(__pyx_t_7);
13802  __Pyx_XGIVEREF(__pyx_t_8);
13803  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13804  goto __pyx_L1_error;
13805  __pyx_L8_try_return:;
13806  __Pyx_XGIVEREF(__pyx_t_6);
13807  __Pyx_XGIVEREF(__pyx_t_7);
13808  __Pyx_XGIVEREF(__pyx_t_8);
13809  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13810  goto __pyx_L0;
13811  __pyx_L7_except_return:;
13812  __Pyx_XGIVEREF(__pyx_t_6);
13813  __Pyx_XGIVEREF(__pyx_t_7);
13814  __Pyx_XGIVEREF(__pyx_t_8);
13815  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13816  goto __pyx_L0;
13817  }
13818  }
13819 
13820  /* "PyClical.pyx":1579
13821  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13822  *
13823  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13824  * """
13825  * Natural logarithm of multivector with optional complexifier.
13826  */
13827 
13828  /* function exit code */
13829  __pyx_L1_error:;
13830  __Pyx_XDECREF(__pyx_t_3);
13831  __Pyx_XDECREF(__pyx_t_5);
13832  __Pyx_XDECREF(__pyx_t_9);
13833  __Pyx_XDECREF(__pyx_t_10);
13834  __Pyx_XDECREF(__pyx_t_11);
13835  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13836  __pyx_r = 0;
13837  __pyx_L0:;
13838  __Pyx_XGIVEREF(__pyx_r);
13839  __Pyx_RefNannyFinishContext();
13840  return __pyx_r;
13841  }
13842 
13843  /* Python wrapper */
13844  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13845  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 ";
13846  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13847  PyObject *__pyx_v_obj = 0;
13848  PyObject *__pyx_v_i = 0;
13849  PyObject *__pyx_r = 0;
13850  __Pyx_RefNannyDeclarations
13851  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13852  {
13853  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13854  PyObject* values[2] = {0,0};
13855  values[1] = ((PyObject *)Py_None);
13856  if (unlikely(__pyx_kwds)) {
13857  Py_ssize_t kw_args;
13858  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13859  switch (pos_args) {
13860  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13861  CYTHON_FALLTHROUGH;
13862  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13863  CYTHON_FALLTHROUGH;
13864  case 0: break;
13865  default: goto __pyx_L5_argtuple_error;
13866  }
13867  kw_args = PyDict_Size(__pyx_kwds);
13868  switch (pos_args) {
13869  case 0:
13870  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13871  else goto __pyx_L5_argtuple_error;
13872  CYTHON_FALLTHROUGH;
13873  case 1:
13874  if (kw_args > 0) {
13875  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13876  if (value) { values[1] = value; kw_args--; }
13877  }
13878  }
13879  if (unlikely(kw_args > 0)) {
13880  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13881  }
13882  } else {
13883  switch (PyTuple_GET_SIZE(__pyx_args)) {
13884  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13885  CYTHON_FALLTHROUGH;
13886  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13887  break;
13888  default: goto __pyx_L5_argtuple_error;
13889  }
13890  }
13891  __pyx_v_obj = values[0];
13892  __pyx_v_i = values[1];
13893  }
13894  goto __pyx_L4_argument_unpacking_done;
13895  __pyx_L5_argtuple_error:;
13896  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
13897  __pyx_L3_error:;
13898  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13899  __Pyx_RefNannyFinishContext();
13900  return NULL;
13901  __pyx_L4_argument_unpacking_done:;
13902  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13903 
13904  /* function exit code */
13905  __Pyx_RefNannyFinishContext();
13906  return __pyx_r;
13907  }
13908 
13909  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13910  PyObject *__pyx_r = NULL;
13911  __Pyx_RefNannyDeclarations
13912  PyObject *__pyx_t_1 = NULL;
13913  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13914  __Pyx_RefNannySetupContext("log", 0);
13915  __Pyx_XDECREF(__pyx_r);
13916  __pyx_t_2.__pyx_n = 1;
13917  __pyx_t_2.i = __pyx_v_i;
13918  __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)
13919  __Pyx_GOTREF(__pyx_t_1);
13920  __pyx_r = __pyx_t_1;
13921  __pyx_t_1 = 0;
13922  goto __pyx_L0;
13923 
13924  /* function exit code */
13925  __pyx_L1_error:;
13926  __Pyx_XDECREF(__pyx_t_1);
13927  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13928  __pyx_r = NULL;
13929  __pyx_L0:;
13930  __Pyx_XGIVEREF(__pyx_r);
13931  __Pyx_RefNannyFinishContext();
13932  return __pyx_r;
13933  }
13934 
13935  /* "PyClical.pyx":1602
13936  * return clifford().wrap( glucat.log(toClifford(obj)) )
13937  *
13938  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13939  * """
13940  * Cosine of multivector with optional complexifier.
13941  */
13942 
13943  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13944  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) {
13945  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13946  PyObject *__pyx_r = NULL;
13947  __Pyx_RefNannyDeclarations
13948  int __pyx_t_1;
13949  int __pyx_t_2;
13950  PyObject *__pyx_t_3 = NULL;
13951  Clifford __pyx_t_4;
13952  PyObject *__pyx_t_5 = NULL;
13953  PyObject *__pyx_t_6 = NULL;
13954  PyObject *__pyx_t_7 = NULL;
13955  PyObject *__pyx_t_8 = NULL;
13956  PyObject *__pyx_t_9 = NULL;
13957  PyObject *__pyx_t_10 = NULL;
13958  PyObject *__pyx_t_11 = NULL;
13959  __Pyx_RefNannySetupContext("cos", 0);
13960  if (__pyx_optional_args) {
13961  if (__pyx_optional_args->__pyx_n > 0) {
13962  __pyx_v_i = __pyx_optional_args->i;
13963  }
13964  }
13965 
13966  /* "PyClical.pyx":1611
13967  * {1,2}
13968  * """
13969  * if not (i is None): # <<<<<<<<<<<<<<
13970  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13971  * else:
13972  */
13973  __pyx_t_1 = (__pyx_v_i != Py_None);
13974  __pyx_t_2 = (__pyx_t_1 != 0);
13975  if (__pyx_t_2) {
13976 
13977  /* "PyClical.pyx":1612
13978  * """
13979  * if not (i is None):
13980  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13981  * else:
13982  * try:
13983  */
13984  __Pyx_XDECREF(__pyx_r);
13985  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
13986  __Pyx_GOTREF(__pyx_t_3);
13987  try {
13988  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13989  } catch(...) {
13990  __Pyx_CppExn2PyErr();
13991  __PYX_ERR(0, 1612, __pyx_L1_error)
13992  }
13993  __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)
13994  __Pyx_GOTREF(__pyx_t_5);
13995  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13996  __pyx_r = __pyx_t_5;
13997  __pyx_t_5 = 0;
13998  goto __pyx_L0;
13999 
14000  /* "PyClical.pyx":1611
14001  * {1,2}
14002  * """
14003  * if not (i is None): # <<<<<<<<<<<<<<
14004  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14005  * else:
14006  */
14007  }
14008 
14009  /* "PyClical.pyx":1614
14010  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14011  * else:
14012  * try: # <<<<<<<<<<<<<<
14013  * return math.cos(obj)
14014  * except:
14015  */
14016  /*else*/ {
14017  {
14018  __Pyx_PyThreadState_declare
14019  __Pyx_PyThreadState_assign
14020  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14021  __Pyx_XGOTREF(__pyx_t_6);
14022  __Pyx_XGOTREF(__pyx_t_7);
14023  __Pyx_XGOTREF(__pyx_t_8);
14024  /*try:*/ {
14025 
14026  /* "PyClical.pyx":1615
14027  * else:
14028  * try:
14029  * return math.cos(obj) # <<<<<<<<<<<<<<
14030  * except:
14031  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14032  */
14033  __Pyx_XDECREF(__pyx_r);
14034  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14035  __Pyx_GOTREF(__pyx_t_3);
14036  __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)
14037  __Pyx_GOTREF(__pyx_t_9);
14038  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14039  __pyx_t_3 = NULL;
14040  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14041  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14042  if (likely(__pyx_t_3)) {
14043  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14044  __Pyx_INCREF(__pyx_t_3);
14045  __Pyx_INCREF(function);
14046  __Pyx_DECREF_SET(__pyx_t_9, function);
14047  }
14048  }
14049  __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);
14050  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14051  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14052  __Pyx_GOTREF(__pyx_t_5);
14053  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14054  __pyx_r = __pyx_t_5;
14055  __pyx_t_5 = 0;
14056  goto __pyx_L8_try_return;
14057 
14058  /* "PyClical.pyx":1614
14059  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14060  * else:
14061  * try: # <<<<<<<<<<<<<<
14062  * return math.cos(obj)
14063  * except:
14064  */
14065  }
14066  __pyx_L4_error:;
14067  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14068  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14069  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14070 
14071  /* "PyClical.pyx":1616
14072  * try:
14073  * return math.cos(obj)
14074  * except: # <<<<<<<<<<<<<<
14075  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14076  *
14077  */
14078  /*except:*/ {
14079  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14080  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14081  __Pyx_GOTREF(__pyx_t_5);
14082  __Pyx_GOTREF(__pyx_t_9);
14083  __Pyx_GOTREF(__pyx_t_3);
14084 
14085  /* "PyClical.pyx":1617
14086  * return math.cos(obj)
14087  * except:
14088  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14089  *
14090  * cpdef inline acos(obj,i = None):
14091  */
14092  __Pyx_XDECREF(__pyx_r);
14093  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14094  __Pyx_GOTREF(__pyx_t_10);
14095  __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)
14096  __Pyx_GOTREF(__pyx_t_11);
14097  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14098  __pyx_r = __pyx_t_11;
14099  __pyx_t_11 = 0;
14100  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14101  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14102  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14103  goto __pyx_L7_except_return;
14104  }
14105  __pyx_L6_except_error:;
14106 
14107  /* "PyClical.pyx":1614
14108  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14109  * else:
14110  * try: # <<<<<<<<<<<<<<
14111  * return math.cos(obj)
14112  * except:
14113  */
14114  __Pyx_XGIVEREF(__pyx_t_6);
14115  __Pyx_XGIVEREF(__pyx_t_7);
14116  __Pyx_XGIVEREF(__pyx_t_8);
14117  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14118  goto __pyx_L1_error;
14119  __pyx_L8_try_return:;
14120  __Pyx_XGIVEREF(__pyx_t_6);
14121  __Pyx_XGIVEREF(__pyx_t_7);
14122  __Pyx_XGIVEREF(__pyx_t_8);
14123  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14124  goto __pyx_L0;
14125  __pyx_L7_except_return:;
14126  __Pyx_XGIVEREF(__pyx_t_6);
14127  __Pyx_XGIVEREF(__pyx_t_7);
14128  __Pyx_XGIVEREF(__pyx_t_8);
14129  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14130  goto __pyx_L0;
14131  }
14132  }
14133 
14134  /* "PyClical.pyx":1602
14135  * return clifford().wrap( glucat.log(toClifford(obj)) )
14136  *
14137  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14138  * """
14139  * Cosine of multivector with optional complexifier.
14140  */
14141 
14142  /* function exit code */
14143  __pyx_L1_error:;
14144  __Pyx_XDECREF(__pyx_t_3);
14145  __Pyx_XDECREF(__pyx_t_5);
14146  __Pyx_XDECREF(__pyx_t_9);
14147  __Pyx_XDECREF(__pyx_t_10);
14148  __Pyx_XDECREF(__pyx_t_11);
14149  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14150  __pyx_r = 0;
14151  __pyx_L0:;
14152  __Pyx_XGIVEREF(__pyx_r);
14153  __Pyx_RefNannyFinishContext();
14154  return __pyx_r;
14155  }
14156 
14157  /* Python wrapper */
14158  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14159  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 ";
14160  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14161  PyObject *__pyx_v_obj = 0;
14162  PyObject *__pyx_v_i = 0;
14163  PyObject *__pyx_r = 0;
14164  __Pyx_RefNannyDeclarations
14165  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14166  {
14167  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14168  PyObject* values[2] = {0,0};
14169  values[1] = ((PyObject *)Py_None);
14170  if (unlikely(__pyx_kwds)) {
14171  Py_ssize_t kw_args;
14172  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14173  switch (pos_args) {
14174  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14175  CYTHON_FALLTHROUGH;
14176  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14177  CYTHON_FALLTHROUGH;
14178  case 0: break;
14179  default: goto __pyx_L5_argtuple_error;
14180  }
14181  kw_args = PyDict_Size(__pyx_kwds);
14182  switch (pos_args) {
14183  case 0:
14184  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14185  else goto __pyx_L5_argtuple_error;
14186  CYTHON_FALLTHROUGH;
14187  case 1:
14188  if (kw_args > 0) {
14189  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14190  if (value) { values[1] = value; kw_args--; }
14191  }
14192  }
14193  if (unlikely(kw_args > 0)) {
14194  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14195  }
14196  } else {
14197  switch (PyTuple_GET_SIZE(__pyx_args)) {
14198  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14199  CYTHON_FALLTHROUGH;
14200  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14201  break;
14202  default: goto __pyx_L5_argtuple_error;
14203  }
14204  }
14205  __pyx_v_obj = values[0];
14206  __pyx_v_i = values[1];
14207  }
14208  goto __pyx_L4_argument_unpacking_done;
14209  __pyx_L5_argtuple_error:;
14210  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14211  __pyx_L3_error:;
14212  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14213  __Pyx_RefNannyFinishContext();
14214  return NULL;
14215  __pyx_L4_argument_unpacking_done:;
14216  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14217 
14218  /* function exit code */
14219  __Pyx_RefNannyFinishContext();
14220  return __pyx_r;
14221  }
14222 
14223  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14224  PyObject *__pyx_r = NULL;
14225  __Pyx_RefNannyDeclarations
14226  PyObject *__pyx_t_1 = NULL;
14227  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14228  __Pyx_RefNannySetupContext("cos", 0);
14229  __Pyx_XDECREF(__pyx_r);
14230  __pyx_t_2.__pyx_n = 1;
14231  __pyx_t_2.i = __pyx_v_i;
14232  __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)
14233  __Pyx_GOTREF(__pyx_t_1);
14234  __pyx_r = __pyx_t_1;
14235  __pyx_t_1 = 0;
14236  goto __pyx_L0;
14237 
14238  /* function exit code */
14239  __pyx_L1_error:;
14240  __Pyx_XDECREF(__pyx_t_1);
14241  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14242  __pyx_r = NULL;
14243  __pyx_L0:;
14244  __Pyx_XGIVEREF(__pyx_r);
14245  __Pyx_RefNannyFinishContext();
14246  return __pyx_r;
14247  }
14248 
14249  /* "PyClical.pyx":1619
14250  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14251  *
14252  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14253  * """
14254  * Inverse cosine of multivector with optional complexifier.
14255  */
14256 
14257  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14258  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) {
14259  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14260  PyObject *__pyx_r = NULL;
14261  __Pyx_RefNannyDeclarations
14262  int __pyx_t_1;
14263  int __pyx_t_2;
14264  PyObject *__pyx_t_3 = NULL;
14265  Clifford __pyx_t_4;
14266  PyObject *__pyx_t_5 = NULL;
14267  PyObject *__pyx_t_6 = NULL;
14268  PyObject *__pyx_t_7 = NULL;
14269  PyObject *__pyx_t_8 = NULL;
14270  PyObject *__pyx_t_9 = NULL;
14271  PyObject *__pyx_t_10 = NULL;
14272  PyObject *__pyx_t_11 = NULL;
14273  __Pyx_RefNannySetupContext("acos", 0);
14274  if (__pyx_optional_args) {
14275  if (__pyx_optional_args->__pyx_n > 0) {
14276  __pyx_v_i = __pyx_optional_args->i;
14277  }
14278  }
14279 
14280  /* "PyClical.pyx":1632
14281  * {1,2}
14282  * """
14283  * if not (i is None): # <<<<<<<<<<<<<<
14284  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14285  * else:
14286  */
14287  __pyx_t_1 = (__pyx_v_i != Py_None);
14288  __pyx_t_2 = (__pyx_t_1 != 0);
14289  if (__pyx_t_2) {
14290 
14291  /* "PyClical.pyx":1633
14292  * """
14293  * if not (i is None):
14294  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14295  * else:
14296  * try:
14297  */
14298  __Pyx_XDECREF(__pyx_r);
14299  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14300  __Pyx_GOTREF(__pyx_t_3);
14301  try {
14302  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14303  } catch(...) {
14304  __Pyx_CppExn2PyErr();
14305  __PYX_ERR(0, 1633, __pyx_L1_error)
14306  }
14307  __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)
14308  __Pyx_GOTREF(__pyx_t_5);
14309  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14310  __pyx_r = __pyx_t_5;
14311  __pyx_t_5 = 0;
14312  goto __pyx_L0;
14313 
14314  /* "PyClical.pyx":1632
14315  * {1,2}
14316  * """
14317  * if not (i is None): # <<<<<<<<<<<<<<
14318  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14319  * else:
14320  */
14321  }
14322 
14323  /* "PyClical.pyx":1635
14324  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14325  * else:
14326  * try: # <<<<<<<<<<<<<<
14327  * return math.acos(obj)
14328  * except:
14329  */
14330  /*else*/ {
14331  {
14332  __Pyx_PyThreadState_declare
14333  __Pyx_PyThreadState_assign
14334  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14335  __Pyx_XGOTREF(__pyx_t_6);
14336  __Pyx_XGOTREF(__pyx_t_7);
14337  __Pyx_XGOTREF(__pyx_t_8);
14338  /*try:*/ {
14339 
14340  /* "PyClical.pyx":1636
14341  * else:
14342  * try:
14343  * return math.acos(obj) # <<<<<<<<<<<<<<
14344  * except:
14345  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14346  */
14347  __Pyx_XDECREF(__pyx_r);
14348  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14349  __Pyx_GOTREF(__pyx_t_3);
14350  __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)
14351  __Pyx_GOTREF(__pyx_t_9);
14352  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14353  __pyx_t_3 = NULL;
14354  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14355  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14356  if (likely(__pyx_t_3)) {
14357  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14358  __Pyx_INCREF(__pyx_t_3);
14359  __Pyx_INCREF(function);
14360  __Pyx_DECREF_SET(__pyx_t_9, function);
14361  }
14362  }
14363  __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);
14364  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14365  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14366  __Pyx_GOTREF(__pyx_t_5);
14367  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14368  __pyx_r = __pyx_t_5;
14369  __pyx_t_5 = 0;
14370  goto __pyx_L8_try_return;
14371 
14372  /* "PyClical.pyx":1635
14373  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14374  * else:
14375  * try: # <<<<<<<<<<<<<<
14376  * return math.acos(obj)
14377  * except:
14378  */
14379  }
14380  __pyx_L4_error:;
14381  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14382  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14383  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14384 
14385  /* "PyClical.pyx":1637
14386  * try:
14387  * return math.acos(obj)
14388  * except: # <<<<<<<<<<<<<<
14389  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14390  *
14391  */
14392  /*except:*/ {
14393  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14394  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14395  __Pyx_GOTREF(__pyx_t_5);
14396  __Pyx_GOTREF(__pyx_t_9);
14397  __Pyx_GOTREF(__pyx_t_3);
14398 
14399  /* "PyClical.pyx":1638
14400  * return math.acos(obj)
14401  * except:
14402  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14403  *
14404  * cpdef inline cosh(obj):
14405  */
14406  __Pyx_XDECREF(__pyx_r);
14407  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14408  __Pyx_GOTREF(__pyx_t_10);
14409  __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)
14410  __Pyx_GOTREF(__pyx_t_11);
14411  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14412  __pyx_r = __pyx_t_11;
14413  __pyx_t_11 = 0;
14414  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14415  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14416  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14417  goto __pyx_L7_except_return;
14418  }
14419  __pyx_L6_except_error:;
14420 
14421  /* "PyClical.pyx":1635
14422  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14423  * else:
14424  * try: # <<<<<<<<<<<<<<
14425  * return math.acos(obj)
14426  * except:
14427  */
14428  __Pyx_XGIVEREF(__pyx_t_6);
14429  __Pyx_XGIVEREF(__pyx_t_7);
14430  __Pyx_XGIVEREF(__pyx_t_8);
14431  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14432  goto __pyx_L1_error;
14433  __pyx_L8_try_return:;
14434  __Pyx_XGIVEREF(__pyx_t_6);
14435  __Pyx_XGIVEREF(__pyx_t_7);
14436  __Pyx_XGIVEREF(__pyx_t_8);
14437  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14438  goto __pyx_L0;
14439  __pyx_L7_except_return:;
14440  __Pyx_XGIVEREF(__pyx_t_6);
14441  __Pyx_XGIVEREF(__pyx_t_7);
14442  __Pyx_XGIVEREF(__pyx_t_8);
14443  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14444  goto __pyx_L0;
14445  }
14446  }
14447 
14448  /* "PyClical.pyx":1619
14449  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14450  *
14451  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14452  * """
14453  * Inverse cosine of multivector with optional complexifier.
14454  */
14455 
14456  /* function exit code */
14457  __pyx_L1_error:;
14458  __Pyx_XDECREF(__pyx_t_3);
14459  __Pyx_XDECREF(__pyx_t_5);
14460  __Pyx_XDECREF(__pyx_t_9);
14461  __Pyx_XDECREF(__pyx_t_10);
14462  __Pyx_XDECREF(__pyx_t_11);
14463  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14464  __pyx_r = 0;
14465  __pyx_L0:;
14466  __Pyx_XGIVEREF(__pyx_r);
14467  __Pyx_RefNannyFinishContext();
14468  return __pyx_r;
14469  }
14470 
14471  /* Python wrapper */
14472  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14473  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 ";
14474  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14475  PyObject *__pyx_v_obj = 0;
14476  PyObject *__pyx_v_i = 0;
14477  PyObject *__pyx_r = 0;
14478  __Pyx_RefNannyDeclarations
14479  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14480  {
14481  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14482  PyObject* values[2] = {0,0};
14483  values[1] = ((PyObject *)Py_None);
14484  if (unlikely(__pyx_kwds)) {
14485  Py_ssize_t kw_args;
14486  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14487  switch (pos_args) {
14488  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14489  CYTHON_FALLTHROUGH;
14490  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14491  CYTHON_FALLTHROUGH;
14492  case 0: break;
14493  default: goto __pyx_L5_argtuple_error;
14494  }
14495  kw_args = PyDict_Size(__pyx_kwds);
14496  switch (pos_args) {
14497  case 0:
14498  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14499  else goto __pyx_L5_argtuple_error;
14500  CYTHON_FALLTHROUGH;
14501  case 1:
14502  if (kw_args > 0) {
14503  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14504  if (value) { values[1] = value; kw_args--; }
14505  }
14506  }
14507  if (unlikely(kw_args > 0)) {
14508  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14509  }
14510  } else {
14511  switch (PyTuple_GET_SIZE(__pyx_args)) {
14512  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14513  CYTHON_FALLTHROUGH;
14514  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14515  break;
14516  default: goto __pyx_L5_argtuple_error;
14517  }
14518  }
14519  __pyx_v_obj = values[0];
14520  __pyx_v_i = values[1];
14521  }
14522  goto __pyx_L4_argument_unpacking_done;
14523  __pyx_L5_argtuple_error:;
14524  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14525  __pyx_L3_error:;
14526  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14527  __Pyx_RefNannyFinishContext();
14528  return NULL;
14529  __pyx_L4_argument_unpacking_done:;
14530  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14531 
14532  /* function exit code */
14533  __Pyx_RefNannyFinishContext();
14534  return __pyx_r;
14535  }
14536 
14537  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14538  PyObject *__pyx_r = NULL;
14539  __Pyx_RefNannyDeclarations
14540  PyObject *__pyx_t_1 = NULL;
14541  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14542  __Pyx_RefNannySetupContext("acos", 0);
14543  __Pyx_XDECREF(__pyx_r);
14544  __pyx_t_2.__pyx_n = 1;
14545  __pyx_t_2.i = __pyx_v_i;
14546  __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)
14547  __Pyx_GOTREF(__pyx_t_1);
14548  __pyx_r = __pyx_t_1;
14549  __pyx_t_1 = 0;
14550  goto __pyx_L0;
14551 
14552  /* function exit code */
14553  __pyx_L1_error:;
14554  __Pyx_XDECREF(__pyx_t_1);
14555  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14556  __pyx_r = NULL;
14557  __pyx_L0:;
14558  __Pyx_XGIVEREF(__pyx_r);
14559  __Pyx_RefNannyFinishContext();
14560  return __pyx_r;
14561  }
14562 
14563  /* "PyClical.pyx":1640
14564  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14565  *
14566  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14567  * """
14568  * Hyperbolic cosine of multivector.
14569  */
14570 
14571  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14572  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14573  PyObject *__pyx_r = NULL;
14574  __Pyx_RefNannyDeclarations
14575  PyObject *__pyx_t_1 = NULL;
14576  PyObject *__pyx_t_2 = NULL;
14577  PyObject *__pyx_t_3 = NULL;
14578  PyObject *__pyx_t_4 = NULL;
14579  PyObject *__pyx_t_5 = NULL;
14580  PyObject *__pyx_t_6 = NULL;
14581  PyObject *__pyx_t_7 = NULL;
14582  PyObject *__pyx_t_8 = NULL;
14583  __Pyx_RefNannySetupContext("cosh", 0);
14584 
14585  /* "PyClical.pyx":1651
14586  * {1,2}
14587  * """
14588  * try: # <<<<<<<<<<<<<<
14589  * return math.cosh(obj)
14590  * except:
14591  */
14592  {
14593  __Pyx_PyThreadState_declare
14594  __Pyx_PyThreadState_assign
14595  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14596  __Pyx_XGOTREF(__pyx_t_1);
14597  __Pyx_XGOTREF(__pyx_t_2);
14598  __Pyx_XGOTREF(__pyx_t_3);
14599  /*try:*/ {
14600 
14601  /* "PyClical.pyx":1652
14602  * """
14603  * try:
14604  * return math.cosh(obj) # <<<<<<<<<<<<<<
14605  * except:
14606  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14607  */
14608  __Pyx_XDECREF(__pyx_r);
14609  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14610  __Pyx_GOTREF(__pyx_t_5);
14611  __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)
14612  __Pyx_GOTREF(__pyx_t_6);
14613  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14614  __pyx_t_5 = NULL;
14615  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14616  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14617  if (likely(__pyx_t_5)) {
14618  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14619  __Pyx_INCREF(__pyx_t_5);
14620  __Pyx_INCREF(function);
14621  __Pyx_DECREF_SET(__pyx_t_6, function);
14622  }
14623  }
14624  __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);
14625  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14626  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14627  __Pyx_GOTREF(__pyx_t_4);
14628  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14629  __pyx_r = __pyx_t_4;
14630  __pyx_t_4 = 0;
14631  goto __pyx_L7_try_return;
14632 
14633  /* "PyClical.pyx":1651
14634  * {1,2}
14635  * """
14636  * try: # <<<<<<<<<<<<<<
14637  * return math.cosh(obj)
14638  * except:
14639  */
14640  }
14641  __pyx_L3_error:;
14642  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14643  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14644  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14645 
14646  /* "PyClical.pyx":1653
14647  * try:
14648  * return math.cosh(obj)
14649  * except: # <<<<<<<<<<<<<<
14650  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14651  *
14652  */
14653  /*except:*/ {
14654  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14655  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14656  __Pyx_GOTREF(__pyx_t_4);
14657  __Pyx_GOTREF(__pyx_t_6);
14658  __Pyx_GOTREF(__pyx_t_5);
14659 
14660  /* "PyClical.pyx":1654
14661  * return math.cosh(obj)
14662  * except:
14663  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14664  *
14665  * cpdef inline acosh(obj,i = None):
14666  */
14667  __Pyx_XDECREF(__pyx_r);
14668  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14669  __Pyx_GOTREF(__pyx_t_7);
14670  __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)
14671  __Pyx_GOTREF(__pyx_t_8);
14672  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14673  __pyx_r = __pyx_t_8;
14674  __pyx_t_8 = 0;
14675  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14676  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14677  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14678  goto __pyx_L6_except_return;
14679  }
14680  __pyx_L5_except_error:;
14681 
14682  /* "PyClical.pyx":1651
14683  * {1,2}
14684  * """
14685  * try: # <<<<<<<<<<<<<<
14686  * return math.cosh(obj)
14687  * except:
14688  */
14689  __Pyx_XGIVEREF(__pyx_t_1);
14690  __Pyx_XGIVEREF(__pyx_t_2);
14691  __Pyx_XGIVEREF(__pyx_t_3);
14692  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14693  goto __pyx_L1_error;
14694  __pyx_L7_try_return:;
14695  __Pyx_XGIVEREF(__pyx_t_1);
14696  __Pyx_XGIVEREF(__pyx_t_2);
14697  __Pyx_XGIVEREF(__pyx_t_3);
14698  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14699  goto __pyx_L0;
14700  __pyx_L6_except_return:;
14701  __Pyx_XGIVEREF(__pyx_t_1);
14702  __Pyx_XGIVEREF(__pyx_t_2);
14703  __Pyx_XGIVEREF(__pyx_t_3);
14704  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14705  goto __pyx_L0;
14706  }
14707 
14708  /* "PyClical.pyx":1640
14709  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14710  *
14711  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14712  * """
14713  * Hyperbolic cosine of multivector.
14714  */
14715 
14716  /* function exit code */
14717  __pyx_L1_error:;
14718  __Pyx_XDECREF(__pyx_t_4);
14719  __Pyx_XDECREF(__pyx_t_5);
14720  __Pyx_XDECREF(__pyx_t_6);
14721  __Pyx_XDECREF(__pyx_t_7);
14722  __Pyx_XDECREF(__pyx_t_8);
14723  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14724  __pyx_r = 0;
14725  __pyx_L0:;
14726  __Pyx_XGIVEREF(__pyx_r);
14727  __Pyx_RefNannyFinishContext();
14728  return __pyx_r;
14729  }
14730 
14731  /* Python wrapper */
14732  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14733  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 ";
14734  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14735  PyObject *__pyx_r = 0;
14736  __Pyx_RefNannyDeclarations
14737  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14738  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14739 
14740  /* function exit code */
14741  __Pyx_RefNannyFinishContext();
14742  return __pyx_r;
14743  }
14744 
14745  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14746  PyObject *__pyx_r = NULL;
14747  __Pyx_RefNannyDeclarations
14748  PyObject *__pyx_t_1 = NULL;
14749  __Pyx_RefNannySetupContext("cosh", 0);
14750  __Pyx_XDECREF(__pyx_r);
14751  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14752  __Pyx_GOTREF(__pyx_t_1);
14753  __pyx_r = __pyx_t_1;
14754  __pyx_t_1 = 0;
14755  goto __pyx_L0;
14756 
14757  /* function exit code */
14758  __pyx_L1_error:;
14759  __Pyx_XDECREF(__pyx_t_1);
14760  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14761  __pyx_r = NULL;
14762  __pyx_L0:;
14763  __Pyx_XGIVEREF(__pyx_r);
14764  __Pyx_RefNannyFinishContext();
14765  return __pyx_r;
14766  }
14767 
14768  /* "PyClical.pyx":1656
14769  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14770  *
14771  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14772  * """
14773  * Inverse hyperbolic cosine of multivector with optional complexifier.
14774  */
14775 
14776  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14777  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) {
14778  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14779  PyObject *__pyx_r = NULL;
14780  __Pyx_RefNannyDeclarations
14781  int __pyx_t_1;
14782  int __pyx_t_2;
14783  PyObject *__pyx_t_3 = NULL;
14784  Clifford __pyx_t_4;
14785  PyObject *__pyx_t_5 = NULL;
14786  PyObject *__pyx_t_6 = NULL;
14787  PyObject *__pyx_t_7 = NULL;
14788  PyObject *__pyx_t_8 = NULL;
14789  PyObject *__pyx_t_9 = NULL;
14790  PyObject *__pyx_t_10 = NULL;
14791  PyObject *__pyx_t_11 = NULL;
14792  __Pyx_RefNannySetupContext("acosh", 0);
14793  if (__pyx_optional_args) {
14794  if (__pyx_optional_args->__pyx_n > 0) {
14795  __pyx_v_i = __pyx_optional_args->i;
14796  }
14797  }
14798 
14799  /* "PyClical.pyx":1671
14800  * {1,2}
14801  * """
14802  * if not (i is None): # <<<<<<<<<<<<<<
14803  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14804  * else:
14805  */
14806  __pyx_t_1 = (__pyx_v_i != Py_None);
14807  __pyx_t_2 = (__pyx_t_1 != 0);
14808  if (__pyx_t_2) {
14809 
14810  /* "PyClical.pyx":1672
14811  * """
14812  * if not (i is None):
14813  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14814  * else:
14815  * try:
14816  */
14817  __Pyx_XDECREF(__pyx_r);
14818  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
14819  __Pyx_GOTREF(__pyx_t_3);
14820  try {
14821  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14822  } catch(...) {
14823  __Pyx_CppExn2PyErr();
14824  __PYX_ERR(0, 1672, __pyx_L1_error)
14825  }
14826  __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)
14827  __Pyx_GOTREF(__pyx_t_5);
14828  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14829  __pyx_r = __pyx_t_5;
14830  __pyx_t_5 = 0;
14831  goto __pyx_L0;
14832 
14833  /* "PyClical.pyx":1671
14834  * {1,2}
14835  * """
14836  * if not (i is None): # <<<<<<<<<<<<<<
14837  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14838  * else:
14839  */
14840  }
14841 
14842  /* "PyClical.pyx":1674
14843  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14844  * else:
14845  * try: # <<<<<<<<<<<<<<
14846  * return math.acosh(obj)
14847  * except:
14848  */
14849  /*else*/ {
14850  {
14851  __Pyx_PyThreadState_declare
14852  __Pyx_PyThreadState_assign
14853  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14854  __Pyx_XGOTREF(__pyx_t_6);
14855  __Pyx_XGOTREF(__pyx_t_7);
14856  __Pyx_XGOTREF(__pyx_t_8);
14857  /*try:*/ {
14858 
14859  /* "PyClical.pyx":1675
14860  * else:
14861  * try:
14862  * return math.acosh(obj) # <<<<<<<<<<<<<<
14863  * except:
14864  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14865  */
14866  __Pyx_XDECREF(__pyx_r);
14867  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
14868  __Pyx_GOTREF(__pyx_t_3);
14869  __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)
14870  __Pyx_GOTREF(__pyx_t_9);
14871  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14872  __pyx_t_3 = NULL;
14873  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14874  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14875  if (likely(__pyx_t_3)) {
14876  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14877  __Pyx_INCREF(__pyx_t_3);
14878  __Pyx_INCREF(function);
14879  __Pyx_DECREF_SET(__pyx_t_9, function);
14880  }
14881  }
14882  __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);
14883  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14884  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
14885  __Pyx_GOTREF(__pyx_t_5);
14886  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14887  __pyx_r = __pyx_t_5;
14888  __pyx_t_5 = 0;
14889  goto __pyx_L8_try_return;
14890 
14891  /* "PyClical.pyx":1674
14892  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14893  * else:
14894  * try: # <<<<<<<<<<<<<<
14895  * return math.acosh(obj)
14896  * except:
14897  */
14898  }
14899  __pyx_L4_error:;
14900  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14901  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14902  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14903 
14904  /* "PyClical.pyx":1676
14905  * try:
14906  * return math.acosh(obj)
14907  * except: # <<<<<<<<<<<<<<
14908  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14909  *
14910  */
14911  /*except:*/ {
14912  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14913  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
14914  __Pyx_GOTREF(__pyx_t_5);
14915  __Pyx_GOTREF(__pyx_t_9);
14916  __Pyx_GOTREF(__pyx_t_3);
14917 
14918  /* "PyClical.pyx":1677
14919  * return math.acosh(obj)
14920  * except:
14921  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14922  *
14923  * cpdef inline sin(obj,i = None):
14924  */
14925  __Pyx_XDECREF(__pyx_r);
14926  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14927  __Pyx_GOTREF(__pyx_t_10);
14928  __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)
14929  __Pyx_GOTREF(__pyx_t_11);
14930  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14931  __pyx_r = __pyx_t_11;
14932  __pyx_t_11 = 0;
14933  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14934  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14935  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14936  goto __pyx_L7_except_return;
14937  }
14938  __pyx_L6_except_error:;
14939 
14940  /* "PyClical.pyx":1674
14941  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14942  * else:
14943  * try: # <<<<<<<<<<<<<<
14944  * return math.acosh(obj)
14945  * except:
14946  */
14947  __Pyx_XGIVEREF(__pyx_t_6);
14948  __Pyx_XGIVEREF(__pyx_t_7);
14949  __Pyx_XGIVEREF(__pyx_t_8);
14950  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14951  goto __pyx_L1_error;
14952  __pyx_L8_try_return:;
14953  __Pyx_XGIVEREF(__pyx_t_6);
14954  __Pyx_XGIVEREF(__pyx_t_7);
14955  __Pyx_XGIVEREF(__pyx_t_8);
14956  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14957  goto __pyx_L0;
14958  __pyx_L7_except_return:;
14959  __Pyx_XGIVEREF(__pyx_t_6);
14960  __Pyx_XGIVEREF(__pyx_t_7);
14961  __Pyx_XGIVEREF(__pyx_t_8);
14962  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14963  goto __pyx_L0;
14964  }
14965  }
14966 
14967  /* "PyClical.pyx":1656
14968  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14969  *
14970  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14971  * """
14972  * Inverse hyperbolic cosine of multivector with optional complexifier.
14973  */
14974 
14975  /* function exit code */
14976  __pyx_L1_error:;
14977  __Pyx_XDECREF(__pyx_t_3);
14978  __Pyx_XDECREF(__pyx_t_5);
14979  __Pyx_XDECREF(__pyx_t_9);
14980  __Pyx_XDECREF(__pyx_t_10);
14981  __Pyx_XDECREF(__pyx_t_11);
14982  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14983  __pyx_r = 0;
14984  __pyx_L0:;
14985  __Pyx_XGIVEREF(__pyx_r);
14986  __Pyx_RefNannyFinishContext();
14987  return __pyx_r;
14988  }
14989 
14990  /* Python wrapper */
14991  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14992  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 ";
14993  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14994  PyObject *__pyx_v_obj = 0;
14995  PyObject *__pyx_v_i = 0;
14996  PyObject *__pyx_r = 0;
14997  __Pyx_RefNannyDeclarations
14998  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
14999  {
15000  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15001  PyObject* values[2] = {0,0};
15002  values[1] = ((PyObject *)Py_None);
15003  if (unlikely(__pyx_kwds)) {
15004  Py_ssize_t kw_args;
15005  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15006  switch (pos_args) {
15007  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15008  CYTHON_FALLTHROUGH;
15009  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15010  CYTHON_FALLTHROUGH;
15011  case 0: break;
15012  default: goto __pyx_L5_argtuple_error;
15013  }
15014  kw_args = PyDict_Size(__pyx_kwds);
15015  switch (pos_args) {
15016  case 0:
15017  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15018  else goto __pyx_L5_argtuple_error;
15019  CYTHON_FALLTHROUGH;
15020  case 1:
15021  if (kw_args > 0) {
15022  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15023  if (value) { values[1] = value; kw_args--; }
15024  }
15025  }
15026  if (unlikely(kw_args > 0)) {
15027  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15028  }
15029  } else {
15030  switch (PyTuple_GET_SIZE(__pyx_args)) {
15031  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15032  CYTHON_FALLTHROUGH;
15033  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15034  break;
15035  default: goto __pyx_L5_argtuple_error;
15036  }
15037  }
15038  __pyx_v_obj = values[0];
15039  __pyx_v_i = values[1];
15040  }
15041  goto __pyx_L4_argument_unpacking_done;
15042  __pyx_L5_argtuple_error:;
15043  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15044  __pyx_L3_error:;
15045  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15046  __Pyx_RefNannyFinishContext();
15047  return NULL;
15048  __pyx_L4_argument_unpacking_done:;
15049  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15050 
15051  /* function exit code */
15052  __Pyx_RefNannyFinishContext();
15053  return __pyx_r;
15054  }
15055 
15056  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15057  PyObject *__pyx_r = NULL;
15058  __Pyx_RefNannyDeclarations
15059  PyObject *__pyx_t_1 = NULL;
15060  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15061  __Pyx_RefNannySetupContext("acosh", 0);
15062  __Pyx_XDECREF(__pyx_r);
15063  __pyx_t_2.__pyx_n = 1;
15064  __pyx_t_2.i = __pyx_v_i;
15065  __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)
15066  __Pyx_GOTREF(__pyx_t_1);
15067  __pyx_r = __pyx_t_1;
15068  __pyx_t_1 = 0;
15069  goto __pyx_L0;
15070 
15071  /* function exit code */
15072  __pyx_L1_error:;
15073  __Pyx_XDECREF(__pyx_t_1);
15074  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15075  __pyx_r = NULL;
15076  __pyx_L0:;
15077  __Pyx_XGIVEREF(__pyx_r);
15078  __Pyx_RefNannyFinishContext();
15079  return __pyx_r;
15080  }
15081 
15082  /* "PyClical.pyx":1679
15083  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15084  *
15085  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15086  * """
15087  * Sine of multivector with optional complexifier.
15088  */
15089 
15090  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15091  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) {
15092  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15093  PyObject *__pyx_r = NULL;
15094  __Pyx_RefNannyDeclarations
15095  int __pyx_t_1;
15096  int __pyx_t_2;
15097  PyObject *__pyx_t_3 = NULL;
15098  Clifford __pyx_t_4;
15099  PyObject *__pyx_t_5 = NULL;
15100  PyObject *__pyx_t_6 = NULL;
15101  PyObject *__pyx_t_7 = NULL;
15102  PyObject *__pyx_t_8 = NULL;
15103  PyObject *__pyx_t_9 = NULL;
15104  PyObject *__pyx_t_10 = NULL;
15105  PyObject *__pyx_t_11 = NULL;
15106  __Pyx_RefNannySetupContext("sin", 0);
15107  if (__pyx_optional_args) {
15108  if (__pyx_optional_args->__pyx_n > 0) {
15109  __pyx_v_i = __pyx_optional_args->i;
15110  }
15111  }
15112 
15113  /* "PyClical.pyx":1690
15114  * {1,2,3}
15115  * """
15116  * if not (i is None): # <<<<<<<<<<<<<<
15117  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15118  * else:
15119  */
15120  __pyx_t_1 = (__pyx_v_i != Py_None);
15121  __pyx_t_2 = (__pyx_t_1 != 0);
15122  if (__pyx_t_2) {
15123 
15124  /* "PyClical.pyx":1691
15125  * """
15126  * if not (i is None):
15127  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15128  * else:
15129  * try:
15130  */
15131  __Pyx_XDECREF(__pyx_r);
15132  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15133  __Pyx_GOTREF(__pyx_t_3);
15134  try {
15135  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15136  } catch(...) {
15137  __Pyx_CppExn2PyErr();
15138  __PYX_ERR(0, 1691, __pyx_L1_error)
15139  }
15140  __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)
15141  __Pyx_GOTREF(__pyx_t_5);
15142  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15143  __pyx_r = __pyx_t_5;
15144  __pyx_t_5 = 0;
15145  goto __pyx_L0;
15146 
15147  /* "PyClical.pyx":1690
15148  * {1,2,3}
15149  * """
15150  * if not (i is None): # <<<<<<<<<<<<<<
15151  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15152  * else:
15153  */
15154  }
15155 
15156  /* "PyClical.pyx":1693
15157  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15158  * else:
15159  * try: # <<<<<<<<<<<<<<
15160  * return math.sin(obj)
15161  * except:
15162  */
15163  /*else*/ {
15164  {
15165  __Pyx_PyThreadState_declare
15166  __Pyx_PyThreadState_assign
15167  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15168  __Pyx_XGOTREF(__pyx_t_6);
15169  __Pyx_XGOTREF(__pyx_t_7);
15170  __Pyx_XGOTREF(__pyx_t_8);
15171  /*try:*/ {
15172 
15173  /* "PyClical.pyx":1694
15174  * else:
15175  * try:
15176  * return math.sin(obj) # <<<<<<<<<<<<<<
15177  * except:
15178  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15179  */
15180  __Pyx_XDECREF(__pyx_r);
15181  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15182  __Pyx_GOTREF(__pyx_t_3);
15183  __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)
15184  __Pyx_GOTREF(__pyx_t_9);
15185  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15186  __pyx_t_3 = NULL;
15187  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15188  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15189  if (likely(__pyx_t_3)) {
15190  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15191  __Pyx_INCREF(__pyx_t_3);
15192  __Pyx_INCREF(function);
15193  __Pyx_DECREF_SET(__pyx_t_9, function);
15194  }
15195  }
15196  __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);
15197  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15198  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15199  __Pyx_GOTREF(__pyx_t_5);
15200  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15201  __pyx_r = __pyx_t_5;
15202  __pyx_t_5 = 0;
15203  goto __pyx_L8_try_return;
15204 
15205  /* "PyClical.pyx":1693
15206  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15207  * else:
15208  * try: # <<<<<<<<<<<<<<
15209  * return math.sin(obj)
15210  * except:
15211  */
15212  }
15213  __pyx_L4_error:;
15214  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15215  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15216  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15217 
15218  /* "PyClical.pyx":1695
15219  * try:
15220  * return math.sin(obj)
15221  * except: # <<<<<<<<<<<<<<
15222  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15223  *
15224  */
15225  /*except:*/ {
15226  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15227  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15228  __Pyx_GOTREF(__pyx_t_5);
15229  __Pyx_GOTREF(__pyx_t_9);
15230  __Pyx_GOTREF(__pyx_t_3);
15231 
15232  /* "PyClical.pyx":1696
15233  * return math.sin(obj)
15234  * except:
15235  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15236  *
15237  * cpdef inline asin(obj,i = None):
15238  */
15239  __Pyx_XDECREF(__pyx_r);
15240  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15241  __Pyx_GOTREF(__pyx_t_10);
15242  __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)
15243  __Pyx_GOTREF(__pyx_t_11);
15244  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15245  __pyx_r = __pyx_t_11;
15246  __pyx_t_11 = 0;
15247  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15248  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15249  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15250  goto __pyx_L7_except_return;
15251  }
15252  __pyx_L6_except_error:;
15253 
15254  /* "PyClical.pyx":1693
15255  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15256  * else:
15257  * try: # <<<<<<<<<<<<<<
15258  * return math.sin(obj)
15259  * except:
15260  */
15261  __Pyx_XGIVEREF(__pyx_t_6);
15262  __Pyx_XGIVEREF(__pyx_t_7);
15263  __Pyx_XGIVEREF(__pyx_t_8);
15264  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15265  goto __pyx_L1_error;
15266  __pyx_L8_try_return:;
15267  __Pyx_XGIVEREF(__pyx_t_6);
15268  __Pyx_XGIVEREF(__pyx_t_7);
15269  __Pyx_XGIVEREF(__pyx_t_8);
15270  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15271  goto __pyx_L0;
15272  __pyx_L7_except_return:;
15273  __Pyx_XGIVEREF(__pyx_t_6);
15274  __Pyx_XGIVEREF(__pyx_t_7);
15275  __Pyx_XGIVEREF(__pyx_t_8);
15276  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15277  goto __pyx_L0;
15278  }
15279  }
15280 
15281  /* "PyClical.pyx":1679
15282  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15283  *
15284  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15285  * """
15286  * Sine of multivector with optional complexifier.
15287  */
15288 
15289  /* function exit code */
15290  __pyx_L1_error:;
15291  __Pyx_XDECREF(__pyx_t_3);
15292  __Pyx_XDECREF(__pyx_t_5);
15293  __Pyx_XDECREF(__pyx_t_9);
15294  __Pyx_XDECREF(__pyx_t_10);
15295  __Pyx_XDECREF(__pyx_t_11);
15296  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15297  __pyx_r = 0;
15298  __pyx_L0:;
15299  __Pyx_XGIVEREF(__pyx_r);
15300  __Pyx_RefNannyFinishContext();
15301  return __pyx_r;
15302  }
15303 
15304  /* Python wrapper */
15305  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15306  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 ";
15307  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15308  PyObject *__pyx_v_obj = 0;
15309  PyObject *__pyx_v_i = 0;
15310  PyObject *__pyx_r = 0;
15311  __Pyx_RefNannyDeclarations
15312  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15313  {
15314  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15315  PyObject* values[2] = {0,0};
15316  values[1] = ((PyObject *)Py_None);
15317  if (unlikely(__pyx_kwds)) {
15318  Py_ssize_t kw_args;
15319  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15320  switch (pos_args) {
15321  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15322  CYTHON_FALLTHROUGH;
15323  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15324  CYTHON_FALLTHROUGH;
15325  case 0: break;
15326  default: goto __pyx_L5_argtuple_error;
15327  }
15328  kw_args = PyDict_Size(__pyx_kwds);
15329  switch (pos_args) {
15330  case 0:
15331  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15332  else goto __pyx_L5_argtuple_error;
15333  CYTHON_FALLTHROUGH;
15334  case 1:
15335  if (kw_args > 0) {
15336  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15337  if (value) { values[1] = value; kw_args--; }
15338  }
15339  }
15340  if (unlikely(kw_args > 0)) {
15341  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15342  }
15343  } else {
15344  switch (PyTuple_GET_SIZE(__pyx_args)) {
15345  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15346  CYTHON_FALLTHROUGH;
15347  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15348  break;
15349  default: goto __pyx_L5_argtuple_error;
15350  }
15351  }
15352  __pyx_v_obj = values[0];
15353  __pyx_v_i = values[1];
15354  }
15355  goto __pyx_L4_argument_unpacking_done;
15356  __pyx_L5_argtuple_error:;
15357  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15358  __pyx_L3_error:;
15359  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15360  __Pyx_RefNannyFinishContext();
15361  return NULL;
15362  __pyx_L4_argument_unpacking_done:;
15363  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15364 
15365  /* function exit code */
15366  __Pyx_RefNannyFinishContext();
15367  return __pyx_r;
15368  }
15369 
15370  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15371  PyObject *__pyx_r = NULL;
15372  __Pyx_RefNannyDeclarations
15373  PyObject *__pyx_t_1 = NULL;
15374  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15375  __Pyx_RefNannySetupContext("sin", 0);
15376  __Pyx_XDECREF(__pyx_r);
15377  __pyx_t_2.__pyx_n = 1;
15378  __pyx_t_2.i = __pyx_v_i;
15379  __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)
15380  __Pyx_GOTREF(__pyx_t_1);
15381  __pyx_r = __pyx_t_1;
15382  __pyx_t_1 = 0;
15383  goto __pyx_L0;
15384 
15385  /* function exit code */
15386  __pyx_L1_error:;
15387  __Pyx_XDECREF(__pyx_t_1);
15388  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15389  __pyx_r = NULL;
15390  __pyx_L0:;
15391  __Pyx_XGIVEREF(__pyx_r);
15392  __Pyx_RefNannyFinishContext();
15393  return __pyx_r;
15394  }
15395 
15396  /* "PyClical.pyx":1698
15397  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15398  *
15399  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15400  * """
15401  * Inverse sine of multivector with optional complexifier.
15402  */
15403 
15404  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15405  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) {
15406  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15407  PyObject *__pyx_r = NULL;
15408  __Pyx_RefNannyDeclarations
15409  int __pyx_t_1;
15410  int __pyx_t_2;
15411  PyObject *__pyx_t_3 = NULL;
15412  Clifford __pyx_t_4;
15413  PyObject *__pyx_t_5 = NULL;
15414  PyObject *__pyx_t_6 = NULL;
15415  PyObject *__pyx_t_7 = NULL;
15416  PyObject *__pyx_t_8 = NULL;
15417  PyObject *__pyx_t_9 = NULL;
15418  PyObject *__pyx_t_10 = NULL;
15419  PyObject *__pyx_t_11 = NULL;
15420  __Pyx_RefNannySetupContext("asin", 0);
15421  if (__pyx_optional_args) {
15422  if (__pyx_optional_args->__pyx_n > 0) {
15423  __pyx_v_i = __pyx_optional_args->i;
15424  }
15425  }
15426 
15427  /* "PyClical.pyx":1711
15428  * {1,2,3}
15429  * """
15430  * if not (i is None): # <<<<<<<<<<<<<<
15431  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15432  * else:
15433  */
15434  __pyx_t_1 = (__pyx_v_i != Py_None);
15435  __pyx_t_2 = (__pyx_t_1 != 0);
15436  if (__pyx_t_2) {
15437 
15438  /* "PyClical.pyx":1712
15439  * """
15440  * if not (i is None):
15441  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15442  * else:
15443  * try:
15444  */
15445  __Pyx_XDECREF(__pyx_r);
15446  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15447  __Pyx_GOTREF(__pyx_t_3);
15448  try {
15449  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15450  } catch(...) {
15451  __Pyx_CppExn2PyErr();
15452  __PYX_ERR(0, 1712, __pyx_L1_error)
15453  }
15454  __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)
15455  __Pyx_GOTREF(__pyx_t_5);
15456  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15457  __pyx_r = __pyx_t_5;
15458  __pyx_t_5 = 0;
15459  goto __pyx_L0;
15460 
15461  /* "PyClical.pyx":1711
15462  * {1,2,3}
15463  * """
15464  * if not (i is None): # <<<<<<<<<<<<<<
15465  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15466  * else:
15467  */
15468  }
15469 
15470  /* "PyClical.pyx":1714
15471  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15472  * else:
15473  * try: # <<<<<<<<<<<<<<
15474  * return math.asin(obj)
15475  * except:
15476  */
15477  /*else*/ {
15478  {
15479  __Pyx_PyThreadState_declare
15480  __Pyx_PyThreadState_assign
15481  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15482  __Pyx_XGOTREF(__pyx_t_6);
15483  __Pyx_XGOTREF(__pyx_t_7);
15484  __Pyx_XGOTREF(__pyx_t_8);
15485  /*try:*/ {
15486 
15487  /* "PyClical.pyx":1715
15488  * else:
15489  * try:
15490  * return math.asin(obj) # <<<<<<<<<<<<<<
15491  * except:
15492  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15493  */
15494  __Pyx_XDECREF(__pyx_r);
15495  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15496  __Pyx_GOTREF(__pyx_t_3);
15497  __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)
15498  __Pyx_GOTREF(__pyx_t_9);
15499  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15500  __pyx_t_3 = NULL;
15501  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15502  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15503  if (likely(__pyx_t_3)) {
15504  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15505  __Pyx_INCREF(__pyx_t_3);
15506  __Pyx_INCREF(function);
15507  __Pyx_DECREF_SET(__pyx_t_9, function);
15508  }
15509  }
15510  __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);
15511  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15512  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15513  __Pyx_GOTREF(__pyx_t_5);
15514  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15515  __pyx_r = __pyx_t_5;
15516  __pyx_t_5 = 0;
15517  goto __pyx_L8_try_return;
15518 
15519  /* "PyClical.pyx":1714
15520  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15521  * else:
15522  * try: # <<<<<<<<<<<<<<
15523  * return math.asin(obj)
15524  * except:
15525  */
15526  }
15527  __pyx_L4_error:;
15528  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15529  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15530  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15531 
15532  /* "PyClical.pyx":1716
15533  * try:
15534  * return math.asin(obj)
15535  * except: # <<<<<<<<<<<<<<
15536  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15537  *
15538  */
15539  /*except:*/ {
15540  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15541  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15542  __Pyx_GOTREF(__pyx_t_5);
15543  __Pyx_GOTREF(__pyx_t_9);
15544  __Pyx_GOTREF(__pyx_t_3);
15545 
15546  /* "PyClical.pyx":1717
15547  * return math.asin(obj)
15548  * except:
15549  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15550  *
15551  * cpdef inline sinh(obj):
15552  */
15553  __Pyx_XDECREF(__pyx_r);
15554  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15555  __Pyx_GOTREF(__pyx_t_10);
15556  __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)
15557  __Pyx_GOTREF(__pyx_t_11);
15558  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15559  __pyx_r = __pyx_t_11;
15560  __pyx_t_11 = 0;
15561  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15562  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15563  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15564  goto __pyx_L7_except_return;
15565  }
15566  __pyx_L6_except_error:;
15567 
15568  /* "PyClical.pyx":1714
15569  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15570  * else:
15571  * try: # <<<<<<<<<<<<<<
15572  * return math.asin(obj)
15573  * except:
15574  */
15575  __Pyx_XGIVEREF(__pyx_t_6);
15576  __Pyx_XGIVEREF(__pyx_t_7);
15577  __Pyx_XGIVEREF(__pyx_t_8);
15578  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15579  goto __pyx_L1_error;
15580  __pyx_L8_try_return:;
15581  __Pyx_XGIVEREF(__pyx_t_6);
15582  __Pyx_XGIVEREF(__pyx_t_7);
15583  __Pyx_XGIVEREF(__pyx_t_8);
15584  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15585  goto __pyx_L0;
15586  __pyx_L7_except_return:;
15587  __Pyx_XGIVEREF(__pyx_t_6);
15588  __Pyx_XGIVEREF(__pyx_t_7);
15589  __Pyx_XGIVEREF(__pyx_t_8);
15590  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15591  goto __pyx_L0;
15592  }
15593  }
15594 
15595  /* "PyClical.pyx":1698
15596  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15597  *
15598  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15599  * """
15600  * Inverse sine of multivector with optional complexifier.
15601  */
15602 
15603  /* function exit code */
15604  __pyx_L1_error:;
15605  __Pyx_XDECREF(__pyx_t_3);
15606  __Pyx_XDECREF(__pyx_t_5);
15607  __Pyx_XDECREF(__pyx_t_9);
15608  __Pyx_XDECREF(__pyx_t_10);
15609  __Pyx_XDECREF(__pyx_t_11);
15610  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15611  __pyx_r = 0;
15612  __pyx_L0:;
15613  __Pyx_XGIVEREF(__pyx_r);
15614  __Pyx_RefNannyFinishContext();
15615  return __pyx_r;
15616  }
15617 
15618  /* Python wrapper */
15619  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15620  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 ";
15621  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15622  PyObject *__pyx_v_obj = 0;
15623  PyObject *__pyx_v_i = 0;
15624  PyObject *__pyx_r = 0;
15625  __Pyx_RefNannyDeclarations
15626  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15627  {
15628  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15629  PyObject* values[2] = {0,0};
15630  values[1] = ((PyObject *)Py_None);
15631  if (unlikely(__pyx_kwds)) {
15632  Py_ssize_t kw_args;
15633  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15634  switch (pos_args) {
15635  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15636  CYTHON_FALLTHROUGH;
15637  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15638  CYTHON_FALLTHROUGH;
15639  case 0: break;
15640  default: goto __pyx_L5_argtuple_error;
15641  }
15642  kw_args = PyDict_Size(__pyx_kwds);
15643  switch (pos_args) {
15644  case 0:
15645  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15646  else goto __pyx_L5_argtuple_error;
15647  CYTHON_FALLTHROUGH;
15648  case 1:
15649  if (kw_args > 0) {
15650  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15651  if (value) { values[1] = value; kw_args--; }
15652  }
15653  }
15654  if (unlikely(kw_args > 0)) {
15655  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15656  }
15657  } else {
15658  switch (PyTuple_GET_SIZE(__pyx_args)) {
15659  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15660  CYTHON_FALLTHROUGH;
15661  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15662  break;
15663  default: goto __pyx_L5_argtuple_error;
15664  }
15665  }
15666  __pyx_v_obj = values[0];
15667  __pyx_v_i = values[1];
15668  }
15669  goto __pyx_L4_argument_unpacking_done;
15670  __pyx_L5_argtuple_error:;
15671  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15672  __pyx_L3_error:;
15673  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15674  __Pyx_RefNannyFinishContext();
15675  return NULL;
15676  __pyx_L4_argument_unpacking_done:;
15677  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15678 
15679  /* function exit code */
15680  __Pyx_RefNannyFinishContext();
15681  return __pyx_r;
15682  }
15683 
15684  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15685  PyObject *__pyx_r = NULL;
15686  __Pyx_RefNannyDeclarations
15687  PyObject *__pyx_t_1 = NULL;
15688  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15689  __Pyx_RefNannySetupContext("asin", 0);
15690  __Pyx_XDECREF(__pyx_r);
15691  __pyx_t_2.__pyx_n = 1;
15692  __pyx_t_2.i = __pyx_v_i;
15693  __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)
15694  __Pyx_GOTREF(__pyx_t_1);
15695  __pyx_r = __pyx_t_1;
15696  __pyx_t_1 = 0;
15697  goto __pyx_L0;
15698 
15699  /* function exit code */
15700  __pyx_L1_error:;
15701  __Pyx_XDECREF(__pyx_t_1);
15702  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15703  __pyx_r = NULL;
15704  __pyx_L0:;
15705  __Pyx_XGIVEREF(__pyx_r);
15706  __Pyx_RefNannyFinishContext();
15707  return __pyx_r;
15708  }
15709 
15710  /* "PyClical.pyx":1719
15711  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15712  *
15713  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15714  * """
15715  * Hyperbolic sine of multivector.
15716  */
15717 
15718  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15719  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15720  PyObject *__pyx_r = NULL;
15721  __Pyx_RefNannyDeclarations
15722  PyObject *__pyx_t_1 = NULL;
15723  PyObject *__pyx_t_2 = NULL;
15724  PyObject *__pyx_t_3 = NULL;
15725  PyObject *__pyx_t_4 = NULL;
15726  PyObject *__pyx_t_5 = NULL;
15727  PyObject *__pyx_t_6 = NULL;
15728  PyObject *__pyx_t_7 = NULL;
15729  PyObject *__pyx_t_8 = NULL;
15730  __Pyx_RefNannySetupContext("sinh", 0);
15731 
15732  /* "PyClical.pyx":1728
15733  * 0.5{1,2}
15734  * """
15735  * try: # <<<<<<<<<<<<<<
15736  * return math.sinh(obj)
15737  * except:
15738  */
15739  {
15740  __Pyx_PyThreadState_declare
15741  __Pyx_PyThreadState_assign
15742  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15743  __Pyx_XGOTREF(__pyx_t_1);
15744  __Pyx_XGOTREF(__pyx_t_2);
15745  __Pyx_XGOTREF(__pyx_t_3);
15746  /*try:*/ {
15747 
15748  /* "PyClical.pyx":1729
15749  * """
15750  * try:
15751  * return math.sinh(obj) # <<<<<<<<<<<<<<
15752  * except:
15753  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15754  */
15755  __Pyx_XDECREF(__pyx_r);
15756  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
15757  __Pyx_GOTREF(__pyx_t_5);
15758  __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)
15759  __Pyx_GOTREF(__pyx_t_6);
15760  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15761  __pyx_t_5 = NULL;
15762  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15763  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15764  if (likely(__pyx_t_5)) {
15765  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15766  __Pyx_INCREF(__pyx_t_5);
15767  __Pyx_INCREF(function);
15768  __Pyx_DECREF_SET(__pyx_t_6, function);
15769  }
15770  }
15771  __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);
15772  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15773  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
15774  __Pyx_GOTREF(__pyx_t_4);
15775  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15776  __pyx_r = __pyx_t_4;
15777  __pyx_t_4 = 0;
15778  goto __pyx_L7_try_return;
15779 
15780  /* "PyClical.pyx":1728
15781  * 0.5{1,2}
15782  * """
15783  * try: # <<<<<<<<<<<<<<
15784  * return math.sinh(obj)
15785  * except:
15786  */
15787  }
15788  __pyx_L3_error:;
15789  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15790  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15791  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15792 
15793  /* "PyClical.pyx":1730
15794  * try:
15795  * return math.sinh(obj)
15796  * except: # <<<<<<<<<<<<<<
15797  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15798  *
15799  */
15800  /*except:*/ {
15801  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15802  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
15803  __Pyx_GOTREF(__pyx_t_4);
15804  __Pyx_GOTREF(__pyx_t_6);
15805  __Pyx_GOTREF(__pyx_t_5);
15806 
15807  /* "PyClical.pyx":1731
15808  * return math.sinh(obj)
15809  * except:
15810  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15811  *
15812  * cpdef inline asinh(obj,i = None):
15813  */
15814  __Pyx_XDECREF(__pyx_r);
15815  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15816  __Pyx_GOTREF(__pyx_t_7);
15817  __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)
15818  __Pyx_GOTREF(__pyx_t_8);
15819  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15820  __pyx_r = __pyx_t_8;
15821  __pyx_t_8 = 0;
15822  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15823  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15824  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15825  goto __pyx_L6_except_return;
15826  }
15827  __pyx_L5_except_error:;
15828 
15829  /* "PyClical.pyx":1728
15830  * 0.5{1,2}
15831  * """
15832  * try: # <<<<<<<<<<<<<<
15833  * return math.sinh(obj)
15834  * except:
15835  */
15836  __Pyx_XGIVEREF(__pyx_t_1);
15837  __Pyx_XGIVEREF(__pyx_t_2);
15838  __Pyx_XGIVEREF(__pyx_t_3);
15839  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15840  goto __pyx_L1_error;
15841  __pyx_L7_try_return:;
15842  __Pyx_XGIVEREF(__pyx_t_1);
15843  __Pyx_XGIVEREF(__pyx_t_2);
15844  __Pyx_XGIVEREF(__pyx_t_3);
15845  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15846  goto __pyx_L0;
15847  __pyx_L6_except_return:;
15848  __Pyx_XGIVEREF(__pyx_t_1);
15849  __Pyx_XGIVEREF(__pyx_t_2);
15850  __Pyx_XGIVEREF(__pyx_t_3);
15851  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15852  goto __pyx_L0;
15853  }
15854 
15855  /* "PyClical.pyx":1719
15856  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15857  *
15858  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15859  * """
15860  * Hyperbolic sine of multivector.
15861  */
15862 
15863  /* function exit code */
15864  __pyx_L1_error:;
15865  __Pyx_XDECREF(__pyx_t_4);
15866  __Pyx_XDECREF(__pyx_t_5);
15867  __Pyx_XDECREF(__pyx_t_6);
15868  __Pyx_XDECREF(__pyx_t_7);
15869  __Pyx_XDECREF(__pyx_t_8);
15870  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15871  __pyx_r = 0;
15872  __pyx_L0:;
15873  __Pyx_XGIVEREF(__pyx_r);
15874  __Pyx_RefNannyFinishContext();
15875  return __pyx_r;
15876  }
15877 
15878  /* Python wrapper */
15879  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15880  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 ";
15881  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15882  PyObject *__pyx_r = 0;
15883  __Pyx_RefNannyDeclarations
15884  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
15885  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15886 
15887  /* function exit code */
15888  __Pyx_RefNannyFinishContext();
15889  return __pyx_r;
15890  }
15891 
15892  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15893  PyObject *__pyx_r = NULL;
15894  __Pyx_RefNannyDeclarations
15895  PyObject *__pyx_t_1 = NULL;
15896  __Pyx_RefNannySetupContext("sinh", 0);
15897  __Pyx_XDECREF(__pyx_r);
15898  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
15899  __Pyx_GOTREF(__pyx_t_1);
15900  __pyx_r = __pyx_t_1;
15901  __pyx_t_1 = 0;
15902  goto __pyx_L0;
15903 
15904  /* function exit code */
15905  __pyx_L1_error:;
15906  __Pyx_XDECREF(__pyx_t_1);
15907  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15908  __pyx_r = NULL;
15909  __pyx_L0:;
15910  __Pyx_XGIVEREF(__pyx_r);
15911  __Pyx_RefNannyFinishContext();
15912  return __pyx_r;
15913  }
15914 
15915  /* "PyClical.pyx":1733
15916  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15917  *
15918  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15919  * """
15920  * Inverse hyperbolic sine of multivector with optional complexifier.
15921  */
15922 
15923  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15924  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) {
15925  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15926  PyObject *__pyx_r = NULL;
15927  __Pyx_RefNannyDeclarations
15928  int __pyx_t_1;
15929  int __pyx_t_2;
15930  PyObject *__pyx_t_3 = NULL;
15931  Clifford __pyx_t_4;
15932  PyObject *__pyx_t_5 = NULL;
15933  PyObject *__pyx_t_6 = NULL;
15934  PyObject *__pyx_t_7 = NULL;
15935  PyObject *__pyx_t_8 = NULL;
15936  PyObject *__pyx_t_9 = NULL;
15937  PyObject *__pyx_t_10 = NULL;
15938  PyObject *__pyx_t_11 = NULL;
15939  __Pyx_RefNannySetupContext("asinh", 0);
15940  if (__pyx_optional_args) {
15941  if (__pyx_optional_args->__pyx_n > 0) {
15942  __pyx_v_i = __pyx_optional_args->i;
15943  }
15944  }
15945 
15946  /* "PyClical.pyx":1744
15947  * {1,2}
15948  * """
15949  * if not (i is None): # <<<<<<<<<<<<<<
15950  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15951  * else:
15952  */
15953  __pyx_t_1 = (__pyx_v_i != Py_None);
15954  __pyx_t_2 = (__pyx_t_1 != 0);
15955  if (__pyx_t_2) {
15956 
15957  /* "PyClical.pyx":1745
15958  * """
15959  * if not (i is None):
15960  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15961  * else:
15962  * try:
15963  */
15964  __Pyx_XDECREF(__pyx_r);
15965  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
15966  __Pyx_GOTREF(__pyx_t_3);
15967  try {
15968  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15969  } catch(...) {
15970  __Pyx_CppExn2PyErr();
15971  __PYX_ERR(0, 1745, __pyx_L1_error)
15972  }
15973  __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)
15974  __Pyx_GOTREF(__pyx_t_5);
15975  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15976  __pyx_r = __pyx_t_5;
15977  __pyx_t_5 = 0;
15978  goto __pyx_L0;
15979 
15980  /* "PyClical.pyx":1744
15981  * {1,2}
15982  * """
15983  * if not (i is None): # <<<<<<<<<<<<<<
15984  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15985  * else:
15986  */
15987  }
15988 
15989  /* "PyClical.pyx":1747
15990  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15991  * else:
15992  * try: # <<<<<<<<<<<<<<
15993  * return math.asinh(obj)
15994  * except:
15995  */
15996  /*else*/ {
15997  {
15998  __Pyx_PyThreadState_declare
15999  __Pyx_PyThreadState_assign
16000  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16001  __Pyx_XGOTREF(__pyx_t_6);
16002  __Pyx_XGOTREF(__pyx_t_7);
16003  __Pyx_XGOTREF(__pyx_t_8);
16004  /*try:*/ {
16005 
16006  /* "PyClical.pyx":1748
16007  * else:
16008  * try:
16009  * return math.asinh(obj) # <<<<<<<<<<<<<<
16010  * except:
16011  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16012  */
16013  __Pyx_XDECREF(__pyx_r);
16014  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16015  __Pyx_GOTREF(__pyx_t_3);
16016  __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)
16017  __Pyx_GOTREF(__pyx_t_9);
16018  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16019  __pyx_t_3 = NULL;
16020  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16021  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16022  if (likely(__pyx_t_3)) {
16023  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16024  __Pyx_INCREF(__pyx_t_3);
16025  __Pyx_INCREF(function);
16026  __Pyx_DECREF_SET(__pyx_t_9, function);
16027  }
16028  }
16029  __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);
16030  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16031  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16032  __Pyx_GOTREF(__pyx_t_5);
16033  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16034  __pyx_r = __pyx_t_5;
16035  __pyx_t_5 = 0;
16036  goto __pyx_L8_try_return;
16037 
16038  /* "PyClical.pyx":1747
16039  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16040  * else:
16041  * try: # <<<<<<<<<<<<<<
16042  * return math.asinh(obj)
16043  * except:
16044  */
16045  }
16046  __pyx_L4_error:;
16047  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16048  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16049  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16050 
16051  /* "PyClical.pyx":1749
16052  * try:
16053  * return math.asinh(obj)
16054  * except: # <<<<<<<<<<<<<<
16055  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16056  *
16057  */
16058  /*except:*/ {
16059  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16060  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16061  __Pyx_GOTREF(__pyx_t_5);
16062  __Pyx_GOTREF(__pyx_t_9);
16063  __Pyx_GOTREF(__pyx_t_3);
16064 
16065  /* "PyClical.pyx":1750
16066  * return math.asinh(obj)
16067  * except:
16068  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16069  *
16070  * cpdef inline tan(obj,i = None):
16071  */
16072  __Pyx_XDECREF(__pyx_r);
16073  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16074  __Pyx_GOTREF(__pyx_t_10);
16075  __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)
16076  __Pyx_GOTREF(__pyx_t_11);
16077  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16078  __pyx_r = __pyx_t_11;
16079  __pyx_t_11 = 0;
16080  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16081  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16082  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16083  goto __pyx_L7_except_return;
16084  }
16085  __pyx_L6_except_error:;
16086 
16087  /* "PyClical.pyx":1747
16088  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16089  * else:
16090  * try: # <<<<<<<<<<<<<<
16091  * return math.asinh(obj)
16092  * except:
16093  */
16094  __Pyx_XGIVEREF(__pyx_t_6);
16095  __Pyx_XGIVEREF(__pyx_t_7);
16096  __Pyx_XGIVEREF(__pyx_t_8);
16097  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16098  goto __pyx_L1_error;
16099  __pyx_L8_try_return:;
16100  __Pyx_XGIVEREF(__pyx_t_6);
16101  __Pyx_XGIVEREF(__pyx_t_7);
16102  __Pyx_XGIVEREF(__pyx_t_8);
16103  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16104  goto __pyx_L0;
16105  __pyx_L7_except_return:;
16106  __Pyx_XGIVEREF(__pyx_t_6);
16107  __Pyx_XGIVEREF(__pyx_t_7);
16108  __Pyx_XGIVEREF(__pyx_t_8);
16109  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16110  goto __pyx_L0;
16111  }
16112  }
16113 
16114  /* "PyClical.pyx":1733
16115  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16116  *
16117  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16118  * """
16119  * Inverse hyperbolic sine of multivector with optional complexifier.
16120  */
16121 
16122  /* function exit code */
16123  __pyx_L1_error:;
16124  __Pyx_XDECREF(__pyx_t_3);
16125  __Pyx_XDECREF(__pyx_t_5);
16126  __Pyx_XDECREF(__pyx_t_9);
16127  __Pyx_XDECREF(__pyx_t_10);
16128  __Pyx_XDECREF(__pyx_t_11);
16129  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16130  __pyx_r = 0;
16131  __pyx_L0:;
16132  __Pyx_XGIVEREF(__pyx_r);
16133  __Pyx_RefNannyFinishContext();
16134  return __pyx_r;
16135  }
16136 
16137  /* Python wrapper */
16138  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16139  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 ";
16140  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16141  PyObject *__pyx_v_obj = 0;
16142  PyObject *__pyx_v_i = 0;
16143  PyObject *__pyx_r = 0;
16144  __Pyx_RefNannyDeclarations
16145  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16146  {
16147  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16148  PyObject* values[2] = {0,0};
16149  values[1] = ((PyObject *)Py_None);
16150  if (unlikely(__pyx_kwds)) {
16151  Py_ssize_t kw_args;
16152  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16153  switch (pos_args) {
16154  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16155  CYTHON_FALLTHROUGH;
16156  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16157  CYTHON_FALLTHROUGH;
16158  case 0: break;
16159  default: goto __pyx_L5_argtuple_error;
16160  }
16161  kw_args = PyDict_Size(__pyx_kwds);
16162  switch (pos_args) {
16163  case 0:
16164  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16165  else goto __pyx_L5_argtuple_error;
16166  CYTHON_FALLTHROUGH;
16167  case 1:
16168  if (kw_args > 0) {
16169  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16170  if (value) { values[1] = value; kw_args--; }
16171  }
16172  }
16173  if (unlikely(kw_args > 0)) {
16174  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16175  }
16176  } else {
16177  switch (PyTuple_GET_SIZE(__pyx_args)) {
16178  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16179  CYTHON_FALLTHROUGH;
16180  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16181  break;
16182  default: goto __pyx_L5_argtuple_error;
16183  }
16184  }
16185  __pyx_v_obj = values[0];
16186  __pyx_v_i = values[1];
16187  }
16188  goto __pyx_L4_argument_unpacking_done;
16189  __pyx_L5_argtuple_error:;
16190  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16191  __pyx_L3_error:;
16192  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16193  __Pyx_RefNannyFinishContext();
16194  return NULL;
16195  __pyx_L4_argument_unpacking_done:;
16196  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16197 
16198  /* function exit code */
16199  __Pyx_RefNannyFinishContext();
16200  return __pyx_r;
16201  }
16202 
16203  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16204  PyObject *__pyx_r = NULL;
16205  __Pyx_RefNannyDeclarations
16206  PyObject *__pyx_t_1 = NULL;
16207  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16208  __Pyx_RefNannySetupContext("asinh", 0);
16209  __Pyx_XDECREF(__pyx_r);
16210  __pyx_t_2.__pyx_n = 1;
16211  __pyx_t_2.i = __pyx_v_i;
16212  __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)
16213  __Pyx_GOTREF(__pyx_t_1);
16214  __pyx_r = __pyx_t_1;
16215  __pyx_t_1 = 0;
16216  goto __pyx_L0;
16217 
16218  /* function exit code */
16219  __pyx_L1_error:;
16220  __Pyx_XDECREF(__pyx_t_1);
16221  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16222  __pyx_r = NULL;
16223  __pyx_L0:;
16224  __Pyx_XGIVEREF(__pyx_r);
16225  __Pyx_RefNannyFinishContext();
16226  return __pyx_r;
16227  }
16228 
16229  /* "PyClical.pyx":1752
16230  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16231  *
16232  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16233  * """
16234  * Tangent of multivector with optional complexifier.
16235  */
16236 
16237  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16238  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) {
16239  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16240  PyObject *__pyx_r = NULL;
16241  __Pyx_RefNannyDeclarations
16242  int __pyx_t_1;
16243  int __pyx_t_2;
16244  PyObject *__pyx_t_3 = NULL;
16245  Clifford __pyx_t_4;
16246  PyObject *__pyx_t_5 = NULL;
16247  PyObject *__pyx_t_6 = NULL;
16248  PyObject *__pyx_t_7 = NULL;
16249  PyObject *__pyx_t_8 = NULL;
16250  PyObject *__pyx_t_9 = NULL;
16251  PyObject *__pyx_t_10 = NULL;
16252  PyObject *__pyx_t_11 = NULL;
16253  __Pyx_RefNannySetupContext("tan", 0);
16254  if (__pyx_optional_args) {
16255  if (__pyx_optional_args->__pyx_n > 0) {
16256  __pyx_v_i = __pyx_optional_args->i;
16257  }
16258  }
16259 
16260  /* "PyClical.pyx":1761
16261  * 0.7616{1,2}
16262  * """
16263  * if not (i is None): # <<<<<<<<<<<<<<
16264  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16265  * else:
16266  */
16267  __pyx_t_1 = (__pyx_v_i != Py_None);
16268  __pyx_t_2 = (__pyx_t_1 != 0);
16269  if (__pyx_t_2) {
16270 
16271  /* "PyClical.pyx":1762
16272  * """
16273  * if not (i is None):
16274  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16275  * else:
16276  * try:
16277  */
16278  __Pyx_XDECREF(__pyx_r);
16279  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16280  __Pyx_GOTREF(__pyx_t_3);
16281  try {
16282  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16283  } catch(...) {
16284  __Pyx_CppExn2PyErr();
16285  __PYX_ERR(0, 1762, __pyx_L1_error)
16286  }
16287  __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)
16288  __Pyx_GOTREF(__pyx_t_5);
16289  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16290  __pyx_r = __pyx_t_5;
16291  __pyx_t_5 = 0;
16292  goto __pyx_L0;
16293 
16294  /* "PyClical.pyx":1761
16295  * 0.7616{1,2}
16296  * """
16297  * if not (i is None): # <<<<<<<<<<<<<<
16298  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16299  * else:
16300  */
16301  }
16302 
16303  /* "PyClical.pyx":1764
16304  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16305  * else:
16306  * try: # <<<<<<<<<<<<<<
16307  * return math.tan(obj)
16308  * except:
16309  */
16310  /*else*/ {
16311  {
16312  __Pyx_PyThreadState_declare
16313  __Pyx_PyThreadState_assign
16314  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16315  __Pyx_XGOTREF(__pyx_t_6);
16316  __Pyx_XGOTREF(__pyx_t_7);
16317  __Pyx_XGOTREF(__pyx_t_8);
16318  /*try:*/ {
16319 
16320  /* "PyClical.pyx":1765
16321  * else:
16322  * try:
16323  * return math.tan(obj) # <<<<<<<<<<<<<<
16324  * except:
16325  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16326  */
16327  __Pyx_XDECREF(__pyx_r);
16328  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16329  __Pyx_GOTREF(__pyx_t_3);
16330  __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)
16331  __Pyx_GOTREF(__pyx_t_9);
16332  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16333  __pyx_t_3 = NULL;
16334  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16335  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16336  if (likely(__pyx_t_3)) {
16337  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16338  __Pyx_INCREF(__pyx_t_3);
16339  __Pyx_INCREF(function);
16340  __Pyx_DECREF_SET(__pyx_t_9, function);
16341  }
16342  }
16343  __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);
16344  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16345  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16346  __Pyx_GOTREF(__pyx_t_5);
16347  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16348  __pyx_r = __pyx_t_5;
16349  __pyx_t_5 = 0;
16350  goto __pyx_L8_try_return;
16351 
16352  /* "PyClical.pyx":1764
16353  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16354  * else:
16355  * try: # <<<<<<<<<<<<<<
16356  * return math.tan(obj)
16357  * except:
16358  */
16359  }
16360  __pyx_L4_error:;
16361  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16362  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16363  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16364 
16365  /* "PyClical.pyx":1766
16366  * try:
16367  * return math.tan(obj)
16368  * except: # <<<<<<<<<<<<<<
16369  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16370  *
16371  */
16372  /*except:*/ {
16373  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16374  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16375  __Pyx_GOTREF(__pyx_t_5);
16376  __Pyx_GOTREF(__pyx_t_9);
16377  __Pyx_GOTREF(__pyx_t_3);
16378 
16379  /* "PyClical.pyx":1767
16380  * return math.tan(obj)
16381  * except:
16382  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16383  *
16384  * cpdef inline atan(obj,i = None):
16385  */
16386  __Pyx_XDECREF(__pyx_r);
16387  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16388  __Pyx_GOTREF(__pyx_t_10);
16389  __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)
16390  __Pyx_GOTREF(__pyx_t_11);
16391  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16392  __pyx_r = __pyx_t_11;
16393  __pyx_t_11 = 0;
16394  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16395  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16396  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16397  goto __pyx_L7_except_return;
16398  }
16399  __pyx_L6_except_error:;
16400 
16401  /* "PyClical.pyx":1764
16402  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16403  * else:
16404  * try: # <<<<<<<<<<<<<<
16405  * return math.tan(obj)
16406  * except:
16407  */
16408  __Pyx_XGIVEREF(__pyx_t_6);
16409  __Pyx_XGIVEREF(__pyx_t_7);
16410  __Pyx_XGIVEREF(__pyx_t_8);
16411  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16412  goto __pyx_L1_error;
16413  __pyx_L8_try_return:;
16414  __Pyx_XGIVEREF(__pyx_t_6);
16415  __Pyx_XGIVEREF(__pyx_t_7);
16416  __Pyx_XGIVEREF(__pyx_t_8);
16417  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16418  goto __pyx_L0;
16419  __pyx_L7_except_return:;
16420  __Pyx_XGIVEREF(__pyx_t_6);
16421  __Pyx_XGIVEREF(__pyx_t_7);
16422  __Pyx_XGIVEREF(__pyx_t_8);
16423  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16424  goto __pyx_L0;
16425  }
16426  }
16427 
16428  /* "PyClical.pyx":1752
16429  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16430  *
16431  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16432  * """
16433  * Tangent of multivector with optional complexifier.
16434  */
16435 
16436  /* function exit code */
16437  __pyx_L1_error:;
16438  __Pyx_XDECREF(__pyx_t_3);
16439  __Pyx_XDECREF(__pyx_t_5);
16440  __Pyx_XDECREF(__pyx_t_9);
16441  __Pyx_XDECREF(__pyx_t_10);
16442  __Pyx_XDECREF(__pyx_t_11);
16443  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16444  __pyx_r = 0;
16445  __pyx_L0:;
16446  __Pyx_XGIVEREF(__pyx_r);
16447  __Pyx_RefNannyFinishContext();
16448  return __pyx_r;
16449  }
16450 
16451  /* Python wrapper */
16452  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16453  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 ";
16454  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16455  PyObject *__pyx_v_obj = 0;
16456  PyObject *__pyx_v_i = 0;
16457  PyObject *__pyx_r = 0;
16458  __Pyx_RefNannyDeclarations
16459  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16460  {
16461  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16462  PyObject* values[2] = {0,0};
16463  values[1] = ((PyObject *)Py_None);
16464  if (unlikely(__pyx_kwds)) {
16465  Py_ssize_t kw_args;
16466  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16467  switch (pos_args) {
16468  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16469  CYTHON_FALLTHROUGH;
16470  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16471  CYTHON_FALLTHROUGH;
16472  case 0: break;
16473  default: goto __pyx_L5_argtuple_error;
16474  }
16475  kw_args = PyDict_Size(__pyx_kwds);
16476  switch (pos_args) {
16477  case 0:
16478  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16479  else goto __pyx_L5_argtuple_error;
16480  CYTHON_FALLTHROUGH;
16481  case 1:
16482  if (kw_args > 0) {
16483  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16484  if (value) { values[1] = value; kw_args--; }
16485  }
16486  }
16487  if (unlikely(kw_args > 0)) {
16488  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16489  }
16490  } else {
16491  switch (PyTuple_GET_SIZE(__pyx_args)) {
16492  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16493  CYTHON_FALLTHROUGH;
16494  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16495  break;
16496  default: goto __pyx_L5_argtuple_error;
16497  }
16498  }
16499  __pyx_v_obj = values[0];
16500  __pyx_v_i = values[1];
16501  }
16502  goto __pyx_L4_argument_unpacking_done;
16503  __pyx_L5_argtuple_error:;
16504  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16505  __pyx_L3_error:;
16506  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16507  __Pyx_RefNannyFinishContext();
16508  return NULL;
16509  __pyx_L4_argument_unpacking_done:;
16510  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16511 
16512  /* function exit code */
16513  __Pyx_RefNannyFinishContext();
16514  return __pyx_r;
16515  }
16516 
16517  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16518  PyObject *__pyx_r = NULL;
16519  __Pyx_RefNannyDeclarations
16520  PyObject *__pyx_t_1 = NULL;
16521  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16522  __Pyx_RefNannySetupContext("tan", 0);
16523  __Pyx_XDECREF(__pyx_r);
16524  __pyx_t_2.__pyx_n = 1;
16525  __pyx_t_2.i = __pyx_v_i;
16526  __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)
16527  __Pyx_GOTREF(__pyx_t_1);
16528  __pyx_r = __pyx_t_1;
16529  __pyx_t_1 = 0;
16530  goto __pyx_L0;
16531 
16532  /* function exit code */
16533  __pyx_L1_error:;
16534  __Pyx_XDECREF(__pyx_t_1);
16535  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16536  __pyx_r = NULL;
16537  __pyx_L0:;
16538  __Pyx_XGIVEREF(__pyx_r);
16539  __Pyx_RefNannyFinishContext();
16540  return __pyx_r;
16541  }
16542 
16543  /* "PyClical.pyx":1769
16544  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16545  *
16546  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16547  * """
16548  * Inverse tangent of multivector with optional complexifier.
16549  */
16550 
16551  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16552  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) {
16553  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16554  PyObject *__pyx_r = NULL;
16555  __Pyx_RefNannyDeclarations
16556  int __pyx_t_1;
16557  int __pyx_t_2;
16558  PyObject *__pyx_t_3 = NULL;
16559  Clifford __pyx_t_4;
16560  PyObject *__pyx_t_5 = NULL;
16561  PyObject *__pyx_t_6 = NULL;
16562  PyObject *__pyx_t_7 = NULL;
16563  PyObject *__pyx_t_8 = NULL;
16564  PyObject *__pyx_t_9 = NULL;
16565  PyObject *__pyx_t_10 = NULL;
16566  PyObject *__pyx_t_11 = NULL;
16567  __Pyx_RefNannySetupContext("atan", 0);
16568  if (__pyx_optional_args) {
16569  if (__pyx_optional_args->__pyx_n > 0) {
16570  __pyx_v_i = __pyx_optional_args->i;
16571  }
16572  }
16573 
16574  /* "PyClical.pyx":1778
16575  * {1}
16576  * """
16577  * if not (i is None): # <<<<<<<<<<<<<<
16578  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16579  * else:
16580  */
16581  __pyx_t_1 = (__pyx_v_i != Py_None);
16582  __pyx_t_2 = (__pyx_t_1 != 0);
16583  if (__pyx_t_2) {
16584 
16585  /* "PyClical.pyx":1779
16586  * """
16587  * if not (i is None):
16588  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16589  * else:
16590  * try:
16591  */
16592  __Pyx_XDECREF(__pyx_r);
16593  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16594  __Pyx_GOTREF(__pyx_t_3);
16595  try {
16596  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16597  } catch(...) {
16598  __Pyx_CppExn2PyErr();
16599  __PYX_ERR(0, 1779, __pyx_L1_error)
16600  }
16601  __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)
16602  __Pyx_GOTREF(__pyx_t_5);
16603  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16604  __pyx_r = __pyx_t_5;
16605  __pyx_t_5 = 0;
16606  goto __pyx_L0;
16607 
16608  /* "PyClical.pyx":1778
16609  * {1}
16610  * """
16611  * if not (i is None): # <<<<<<<<<<<<<<
16612  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16613  * else:
16614  */
16615  }
16616 
16617  /* "PyClical.pyx":1781
16618  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16619  * else:
16620  * try: # <<<<<<<<<<<<<<
16621  * return math.atan(obj)
16622  * except:
16623  */
16624  /*else*/ {
16625  {
16626  __Pyx_PyThreadState_declare
16627  __Pyx_PyThreadState_assign
16628  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16629  __Pyx_XGOTREF(__pyx_t_6);
16630  __Pyx_XGOTREF(__pyx_t_7);
16631  __Pyx_XGOTREF(__pyx_t_8);
16632  /*try:*/ {
16633 
16634  /* "PyClical.pyx":1782
16635  * else:
16636  * try:
16637  * return math.atan(obj) # <<<<<<<<<<<<<<
16638  * except:
16639  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16640  */
16641  __Pyx_XDECREF(__pyx_r);
16642  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
16643  __Pyx_GOTREF(__pyx_t_3);
16644  __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)
16645  __Pyx_GOTREF(__pyx_t_9);
16646  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16647  __pyx_t_3 = NULL;
16648  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16649  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16650  if (likely(__pyx_t_3)) {
16651  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16652  __Pyx_INCREF(__pyx_t_3);
16653  __Pyx_INCREF(function);
16654  __Pyx_DECREF_SET(__pyx_t_9, function);
16655  }
16656  }
16657  __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);
16658  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16659  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
16660  __Pyx_GOTREF(__pyx_t_5);
16661  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16662  __pyx_r = __pyx_t_5;
16663  __pyx_t_5 = 0;
16664  goto __pyx_L8_try_return;
16665 
16666  /* "PyClical.pyx":1781
16667  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16668  * else:
16669  * try: # <<<<<<<<<<<<<<
16670  * return math.atan(obj)
16671  * except:
16672  */
16673  }
16674  __pyx_L4_error:;
16675  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16676  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16677  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16678 
16679  /* "PyClical.pyx":1783
16680  * try:
16681  * return math.atan(obj)
16682  * except: # <<<<<<<<<<<<<<
16683  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16684  *
16685  */
16686  /*except:*/ {
16687  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16688  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
16689  __Pyx_GOTREF(__pyx_t_5);
16690  __Pyx_GOTREF(__pyx_t_9);
16691  __Pyx_GOTREF(__pyx_t_3);
16692 
16693  /* "PyClical.pyx":1784
16694  * return math.atan(obj)
16695  * except:
16696  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16697  *
16698  * cpdef inline tanh(obj):
16699  */
16700  __Pyx_XDECREF(__pyx_r);
16701  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16702  __Pyx_GOTREF(__pyx_t_10);
16703  __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)
16704  __Pyx_GOTREF(__pyx_t_11);
16705  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16706  __pyx_r = __pyx_t_11;
16707  __pyx_t_11 = 0;
16708  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16709  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16710  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16711  goto __pyx_L7_except_return;
16712  }
16713  __pyx_L6_except_error:;
16714 
16715  /* "PyClical.pyx":1781
16716  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16717  * else:
16718  * try: # <<<<<<<<<<<<<<
16719  * return math.atan(obj)
16720  * except:
16721  */
16722  __Pyx_XGIVEREF(__pyx_t_6);
16723  __Pyx_XGIVEREF(__pyx_t_7);
16724  __Pyx_XGIVEREF(__pyx_t_8);
16725  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16726  goto __pyx_L1_error;
16727  __pyx_L8_try_return:;
16728  __Pyx_XGIVEREF(__pyx_t_6);
16729  __Pyx_XGIVEREF(__pyx_t_7);
16730  __Pyx_XGIVEREF(__pyx_t_8);
16731  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16732  goto __pyx_L0;
16733  __pyx_L7_except_return:;
16734  __Pyx_XGIVEREF(__pyx_t_6);
16735  __Pyx_XGIVEREF(__pyx_t_7);
16736  __Pyx_XGIVEREF(__pyx_t_8);
16737  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16738  goto __pyx_L0;
16739  }
16740  }
16741 
16742  /* "PyClical.pyx":1769
16743  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16744  *
16745  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16746  * """
16747  * Inverse tangent of multivector with optional complexifier.
16748  */
16749 
16750  /* function exit code */
16751  __pyx_L1_error:;
16752  __Pyx_XDECREF(__pyx_t_3);
16753  __Pyx_XDECREF(__pyx_t_5);
16754  __Pyx_XDECREF(__pyx_t_9);
16755  __Pyx_XDECREF(__pyx_t_10);
16756  __Pyx_XDECREF(__pyx_t_11);
16757  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16758  __pyx_r = 0;
16759  __pyx_L0:;
16760  __Pyx_XGIVEREF(__pyx_r);
16761  __Pyx_RefNannyFinishContext();
16762  return __pyx_r;
16763  }
16764 
16765  /* Python wrapper */
16766  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16767  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 ";
16768  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16769  PyObject *__pyx_v_obj = 0;
16770  PyObject *__pyx_v_i = 0;
16771  PyObject *__pyx_r = 0;
16772  __Pyx_RefNannyDeclarations
16773  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
16774  {
16775  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16776  PyObject* values[2] = {0,0};
16777  values[1] = ((PyObject *)Py_None);
16778  if (unlikely(__pyx_kwds)) {
16779  Py_ssize_t kw_args;
16780  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16781  switch (pos_args) {
16782  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16783  CYTHON_FALLTHROUGH;
16784  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16785  CYTHON_FALLTHROUGH;
16786  case 0: break;
16787  default: goto __pyx_L5_argtuple_error;
16788  }
16789  kw_args = PyDict_Size(__pyx_kwds);
16790  switch (pos_args) {
16791  case 0:
16792  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16793  else goto __pyx_L5_argtuple_error;
16794  CYTHON_FALLTHROUGH;
16795  case 1:
16796  if (kw_args > 0) {
16797  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16798  if (value) { values[1] = value; kw_args--; }
16799  }
16800  }
16801  if (unlikely(kw_args > 0)) {
16802  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
16803  }
16804  } else {
16805  switch (PyTuple_GET_SIZE(__pyx_args)) {
16806  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16807  CYTHON_FALLTHROUGH;
16808  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16809  break;
16810  default: goto __pyx_L5_argtuple_error;
16811  }
16812  }
16813  __pyx_v_obj = values[0];
16814  __pyx_v_i = values[1];
16815  }
16816  goto __pyx_L4_argument_unpacking_done;
16817  __pyx_L5_argtuple_error:;
16818  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
16819  __pyx_L3_error:;
16820  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16821  __Pyx_RefNannyFinishContext();
16822  return NULL;
16823  __pyx_L4_argument_unpacking_done:;
16824  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16825 
16826  /* function exit code */
16827  __Pyx_RefNannyFinishContext();
16828  return __pyx_r;
16829  }
16830 
16831  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16832  PyObject *__pyx_r = NULL;
16833  __Pyx_RefNannyDeclarations
16834  PyObject *__pyx_t_1 = NULL;
16835  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16836  __Pyx_RefNannySetupContext("atan", 0);
16837  __Pyx_XDECREF(__pyx_r);
16838  __pyx_t_2.__pyx_n = 1;
16839  __pyx_t_2.i = __pyx_v_i;
16840  __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)
16841  __Pyx_GOTREF(__pyx_t_1);
16842  __pyx_r = __pyx_t_1;
16843  __pyx_t_1 = 0;
16844  goto __pyx_L0;
16845 
16846  /* function exit code */
16847  __pyx_L1_error:;
16848  __Pyx_XDECREF(__pyx_t_1);
16849  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16850  __pyx_r = NULL;
16851  __pyx_L0:;
16852  __Pyx_XGIVEREF(__pyx_r);
16853  __Pyx_RefNannyFinishContext();
16854  return __pyx_r;
16855  }
16856 
16857  /* "PyClical.pyx":1786
16858  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16859  *
16860  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16861  * """
16862  * Hyperbolic tangent of multivector.
16863  */
16864 
16865  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16866  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16867  PyObject *__pyx_r = NULL;
16868  __Pyx_RefNannyDeclarations
16869  PyObject *__pyx_t_1 = NULL;
16870  PyObject *__pyx_t_2 = NULL;
16871  PyObject *__pyx_t_3 = NULL;
16872  PyObject *__pyx_t_4 = NULL;
16873  PyObject *__pyx_t_5 = NULL;
16874  PyObject *__pyx_t_6 = NULL;
16875  PyObject *__pyx_t_7 = NULL;
16876  PyObject *__pyx_t_8 = NULL;
16877  __Pyx_RefNannySetupContext("tanh", 0);
16878 
16879  /* "PyClical.pyx":1793
16880  * {1,2}
16881  * """
16882  * try: # <<<<<<<<<<<<<<
16883  * return math.tanh(obj)
16884  * except:
16885  */
16886  {
16887  __Pyx_PyThreadState_declare
16888  __Pyx_PyThreadState_assign
16889  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16890  __Pyx_XGOTREF(__pyx_t_1);
16891  __Pyx_XGOTREF(__pyx_t_2);
16892  __Pyx_XGOTREF(__pyx_t_3);
16893  /*try:*/ {
16894 
16895  /* "PyClical.pyx":1794
16896  * """
16897  * try:
16898  * return math.tanh(obj) # <<<<<<<<<<<<<<
16899  * except:
16900  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16901  */
16902  __Pyx_XDECREF(__pyx_r);
16903  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
16904  __Pyx_GOTREF(__pyx_t_5);
16905  __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)
16906  __Pyx_GOTREF(__pyx_t_6);
16907  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16908  __pyx_t_5 = NULL;
16909  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16910  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16911  if (likely(__pyx_t_5)) {
16912  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16913  __Pyx_INCREF(__pyx_t_5);
16914  __Pyx_INCREF(function);
16915  __Pyx_DECREF_SET(__pyx_t_6, function);
16916  }
16917  }
16918  __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);
16919  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16920  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
16921  __Pyx_GOTREF(__pyx_t_4);
16922  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16923  __pyx_r = __pyx_t_4;
16924  __pyx_t_4 = 0;
16925  goto __pyx_L7_try_return;
16926 
16927  /* "PyClical.pyx":1793
16928  * {1,2}
16929  * """
16930  * try: # <<<<<<<<<<<<<<
16931  * return math.tanh(obj)
16932  * except:
16933  */
16934  }
16935  __pyx_L3_error:;
16936  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16937  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16938  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16939 
16940  /* "PyClical.pyx":1795
16941  * try:
16942  * return math.tanh(obj)
16943  * except: # <<<<<<<<<<<<<<
16944  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16945  *
16946  */
16947  /*except:*/ {
16948  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16949  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
16950  __Pyx_GOTREF(__pyx_t_4);
16951  __Pyx_GOTREF(__pyx_t_6);
16952  __Pyx_GOTREF(__pyx_t_5);
16953 
16954  /* "PyClical.pyx":1796
16955  * return math.tanh(obj)
16956  * except:
16957  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16958  *
16959  * cpdef inline atanh(obj,i = None):
16960  */
16961  __Pyx_XDECREF(__pyx_r);
16962  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16963  __Pyx_GOTREF(__pyx_t_7);
16964  __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)
16965  __Pyx_GOTREF(__pyx_t_8);
16966  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16967  __pyx_r = __pyx_t_8;
16968  __pyx_t_8 = 0;
16969  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16970  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16971  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16972  goto __pyx_L6_except_return;
16973  }
16974  __pyx_L5_except_error:;
16975 
16976  /* "PyClical.pyx":1793
16977  * {1,2}
16978  * """
16979  * try: # <<<<<<<<<<<<<<
16980  * return math.tanh(obj)
16981  * except:
16982  */
16983  __Pyx_XGIVEREF(__pyx_t_1);
16984  __Pyx_XGIVEREF(__pyx_t_2);
16985  __Pyx_XGIVEREF(__pyx_t_3);
16986  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16987  goto __pyx_L1_error;
16988  __pyx_L7_try_return:;
16989  __Pyx_XGIVEREF(__pyx_t_1);
16990  __Pyx_XGIVEREF(__pyx_t_2);
16991  __Pyx_XGIVEREF(__pyx_t_3);
16992  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16993  goto __pyx_L0;
16994  __pyx_L6_except_return:;
16995  __Pyx_XGIVEREF(__pyx_t_1);
16996  __Pyx_XGIVEREF(__pyx_t_2);
16997  __Pyx_XGIVEREF(__pyx_t_3);
16998  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16999  goto __pyx_L0;
17000  }
17001 
17002  /* "PyClical.pyx":1786
17003  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17004  *
17005  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17006  * """
17007  * Hyperbolic tangent of multivector.
17008  */
17009 
17010  /* function exit code */
17011  __pyx_L1_error:;
17012  __Pyx_XDECREF(__pyx_t_4);
17013  __Pyx_XDECREF(__pyx_t_5);
17014  __Pyx_XDECREF(__pyx_t_6);
17015  __Pyx_XDECREF(__pyx_t_7);
17016  __Pyx_XDECREF(__pyx_t_8);
17017  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17018  __pyx_r = 0;
17019  __pyx_L0:;
17020  __Pyx_XGIVEREF(__pyx_r);
17021  __Pyx_RefNannyFinishContext();
17022  return __pyx_r;
17023  }
17024 
17025  /* Python wrapper */
17026  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17027  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 ";
17028  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17029  PyObject *__pyx_r = 0;
17030  __Pyx_RefNannyDeclarations
17031  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17032  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17033 
17034  /* function exit code */
17035  __Pyx_RefNannyFinishContext();
17036  return __pyx_r;
17037  }
17038 
17039  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17040  PyObject *__pyx_r = NULL;
17041  __Pyx_RefNannyDeclarations
17042  PyObject *__pyx_t_1 = NULL;
17043  __Pyx_RefNannySetupContext("tanh", 0);
17044  __Pyx_XDECREF(__pyx_r);
17045  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17046  __Pyx_GOTREF(__pyx_t_1);
17047  __pyx_r = __pyx_t_1;
17048  __pyx_t_1 = 0;
17049  goto __pyx_L0;
17050 
17051  /* function exit code */
17052  __pyx_L1_error:;
17053  __Pyx_XDECREF(__pyx_t_1);
17054  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17055  __pyx_r = NULL;
17056  __pyx_L0:;
17057  __Pyx_XGIVEREF(__pyx_r);
17058  __Pyx_RefNannyFinishContext();
17059  return __pyx_r;
17060  }
17061 
17062  /* "PyClical.pyx":1798
17063  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17064  *
17065  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17066  * """
17067  * Inverse hyperbolic tangent of multivector with optional complexifier.
17068  */
17069 
17070  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17071  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) {
17072  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17073  PyObject *__pyx_r = NULL;
17074  __Pyx_RefNannyDeclarations
17075  int __pyx_t_1;
17076  int __pyx_t_2;
17077  PyObject *__pyx_t_3 = NULL;
17078  Clifford __pyx_t_4;
17079  PyObject *__pyx_t_5 = NULL;
17080  PyObject *__pyx_t_6 = NULL;
17081  PyObject *__pyx_t_7 = NULL;
17082  PyObject *__pyx_t_8 = NULL;
17083  PyObject *__pyx_t_9 = NULL;
17084  PyObject *__pyx_t_10 = NULL;
17085  PyObject *__pyx_t_11 = NULL;
17086  __Pyx_RefNannySetupContext("atanh", 0);
17087  if (__pyx_optional_args) {
17088  if (__pyx_optional_args->__pyx_n > 0) {
17089  __pyx_v_i = __pyx_optional_args->i;
17090  }
17091  }
17092 
17093  /* "PyClical.pyx":1807
17094  * {1,2}
17095  * """
17096  * if not (i is None): # <<<<<<<<<<<<<<
17097  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17098  * else:
17099  */
17100  __pyx_t_1 = (__pyx_v_i != Py_None);
17101  __pyx_t_2 = (__pyx_t_1 != 0);
17102  if (__pyx_t_2) {
17103 
17104  /* "PyClical.pyx":1808
17105  * """
17106  * if not (i is None):
17107  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17108  * else:
17109  * try:
17110  */
17111  __Pyx_XDECREF(__pyx_r);
17112  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17113  __Pyx_GOTREF(__pyx_t_3);
17114  try {
17115  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17116  } catch(...) {
17117  __Pyx_CppExn2PyErr();
17118  __PYX_ERR(0, 1808, __pyx_L1_error)
17119  }
17120  __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)
17121  __Pyx_GOTREF(__pyx_t_5);
17122  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17123  __pyx_r = __pyx_t_5;
17124  __pyx_t_5 = 0;
17125  goto __pyx_L0;
17126 
17127  /* "PyClical.pyx":1807
17128  * {1,2}
17129  * """
17130  * if not (i is None): # <<<<<<<<<<<<<<
17131  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17132  * else:
17133  */
17134  }
17135 
17136  /* "PyClical.pyx":1810
17137  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17138  * else:
17139  * try: # <<<<<<<<<<<<<<
17140  * return math.atanh(obj)
17141  * except:
17142  */
17143  /*else*/ {
17144  {
17145  __Pyx_PyThreadState_declare
17146  __Pyx_PyThreadState_assign
17147  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17148  __Pyx_XGOTREF(__pyx_t_6);
17149  __Pyx_XGOTREF(__pyx_t_7);
17150  __Pyx_XGOTREF(__pyx_t_8);
17151  /*try:*/ {
17152 
17153  /* "PyClical.pyx":1811
17154  * else:
17155  * try:
17156  * return math.atanh(obj) # <<<<<<<<<<<<<<
17157  * except:
17158  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17159  */
17160  __Pyx_XDECREF(__pyx_r);
17161  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17162  __Pyx_GOTREF(__pyx_t_3);
17163  __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)
17164  __Pyx_GOTREF(__pyx_t_9);
17165  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17166  __pyx_t_3 = NULL;
17167  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17168  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17169  if (likely(__pyx_t_3)) {
17170  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17171  __Pyx_INCREF(__pyx_t_3);
17172  __Pyx_INCREF(function);
17173  __Pyx_DECREF_SET(__pyx_t_9, function);
17174  }
17175  }
17176  __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);
17177  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17178  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17179  __Pyx_GOTREF(__pyx_t_5);
17180  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17181  __pyx_r = __pyx_t_5;
17182  __pyx_t_5 = 0;
17183  goto __pyx_L8_try_return;
17184 
17185  /* "PyClical.pyx":1810
17186  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17187  * else:
17188  * try: # <<<<<<<<<<<<<<
17189  * return math.atanh(obj)
17190  * except:
17191  */
17192  }
17193  __pyx_L4_error:;
17194  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17195  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17196  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17197 
17198  /* "PyClical.pyx":1812
17199  * try:
17200  * return math.atanh(obj)
17201  * except: # <<<<<<<<<<<<<<
17202  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17203  *
17204  */
17205  /*except:*/ {
17206  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17207  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17208  __Pyx_GOTREF(__pyx_t_5);
17209  __Pyx_GOTREF(__pyx_t_9);
17210  __Pyx_GOTREF(__pyx_t_3);
17211 
17212  /* "PyClical.pyx":1813
17213  * return math.atanh(obj)
17214  * except:
17215  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17216  *
17217  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17218  */
17219  __Pyx_XDECREF(__pyx_r);
17220  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17221  __Pyx_GOTREF(__pyx_t_10);
17222  __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)
17223  __Pyx_GOTREF(__pyx_t_11);
17224  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17225  __pyx_r = __pyx_t_11;
17226  __pyx_t_11 = 0;
17227  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17228  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17229  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17230  goto __pyx_L7_except_return;
17231  }
17232  __pyx_L6_except_error:;
17233 
17234  /* "PyClical.pyx":1810
17235  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17236  * else:
17237  * try: # <<<<<<<<<<<<<<
17238  * return math.atanh(obj)
17239  * except:
17240  */
17241  __Pyx_XGIVEREF(__pyx_t_6);
17242  __Pyx_XGIVEREF(__pyx_t_7);
17243  __Pyx_XGIVEREF(__pyx_t_8);
17244  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17245  goto __pyx_L1_error;
17246  __pyx_L8_try_return:;
17247  __Pyx_XGIVEREF(__pyx_t_6);
17248  __Pyx_XGIVEREF(__pyx_t_7);
17249  __Pyx_XGIVEREF(__pyx_t_8);
17250  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17251  goto __pyx_L0;
17252  __pyx_L7_except_return:;
17253  __Pyx_XGIVEREF(__pyx_t_6);
17254  __Pyx_XGIVEREF(__pyx_t_7);
17255  __Pyx_XGIVEREF(__pyx_t_8);
17256  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17257  goto __pyx_L0;
17258  }
17259  }
17260 
17261  /* "PyClical.pyx":1798
17262  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17263  *
17264  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17265  * """
17266  * Inverse hyperbolic tangent of multivector with optional complexifier.
17267  */
17268 
17269  /* function exit code */
17270  __pyx_L1_error:;
17271  __Pyx_XDECREF(__pyx_t_3);
17272  __Pyx_XDECREF(__pyx_t_5);
17273  __Pyx_XDECREF(__pyx_t_9);
17274  __Pyx_XDECREF(__pyx_t_10);
17275  __Pyx_XDECREF(__pyx_t_11);
17276  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17277  __pyx_r = 0;
17278  __pyx_L0:;
17279  __Pyx_XGIVEREF(__pyx_r);
17280  __Pyx_RefNannyFinishContext();
17281  return __pyx_r;
17282  }
17283 
17284  /* Python wrapper */
17285  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17286  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 ";
17287  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17288  PyObject *__pyx_v_obj = 0;
17289  PyObject *__pyx_v_i = 0;
17290  PyObject *__pyx_r = 0;
17291  __Pyx_RefNannyDeclarations
17292  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17293  {
17294  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17295  PyObject* values[2] = {0,0};
17296  values[1] = ((PyObject *)Py_None);
17297  if (unlikely(__pyx_kwds)) {
17298  Py_ssize_t kw_args;
17299  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17300  switch (pos_args) {
17301  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17302  CYTHON_FALLTHROUGH;
17303  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17304  CYTHON_FALLTHROUGH;
17305  case 0: break;
17306  default: goto __pyx_L5_argtuple_error;
17307  }
17308  kw_args = PyDict_Size(__pyx_kwds);
17309  switch (pos_args) {
17310  case 0:
17311  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17312  else goto __pyx_L5_argtuple_error;
17313  CYTHON_FALLTHROUGH;
17314  case 1:
17315  if (kw_args > 0) {
17316  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17317  if (value) { values[1] = value; kw_args--; }
17318  }
17319  }
17320  if (unlikely(kw_args > 0)) {
17321  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17322  }
17323  } else {
17324  switch (PyTuple_GET_SIZE(__pyx_args)) {
17325  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17326  CYTHON_FALLTHROUGH;
17327  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17328  break;
17329  default: goto __pyx_L5_argtuple_error;
17330  }
17331  }
17332  __pyx_v_obj = values[0];
17333  __pyx_v_i = values[1];
17334  }
17335  goto __pyx_L4_argument_unpacking_done;
17336  __pyx_L5_argtuple_error:;
17337  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17338  __pyx_L3_error:;
17339  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17340  __Pyx_RefNannyFinishContext();
17341  return NULL;
17342  __pyx_L4_argument_unpacking_done:;
17343  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17344 
17345  /* function exit code */
17346  __Pyx_RefNannyFinishContext();
17347  return __pyx_r;
17348  }
17349 
17350  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17351  PyObject *__pyx_r = NULL;
17352  __Pyx_RefNannyDeclarations
17353  PyObject *__pyx_t_1 = NULL;
17354  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17355  __Pyx_RefNannySetupContext("atanh", 0);
17356  __Pyx_XDECREF(__pyx_r);
17357  __pyx_t_2.__pyx_n = 1;
17358  __pyx_t_2.i = __pyx_v_i;
17359  __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)
17360  __Pyx_GOTREF(__pyx_t_1);
17361  __pyx_r = __pyx_t_1;
17362  __pyx_t_1 = 0;
17363  goto __pyx_L0;
17364 
17365  /* function exit code */
17366  __pyx_L1_error:;
17367  __Pyx_XDECREF(__pyx_t_1);
17368  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17369  __pyx_r = NULL;
17370  __pyx_L0:;
17371  __Pyx_XGIVEREF(__pyx_r);
17372  __Pyx_RefNannyFinishContext();
17373  return __pyx_r;
17374  }
17375 
17376  /* "PyClical.pyx":1815
17377  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17378  *
17379  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17380  * """
17381  * Random multivector within a frame.
17382  */
17383 
17384  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17385  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) {
17386  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17387  PyObject *__pyx_r = NULL;
17388  __Pyx_RefNannyDeclarations
17389  PyObject *__pyx_t_1 = NULL;
17390  PyObject *__pyx_t_2 = NULL;
17391  scalar_t __pyx_t_3;
17392  PyObject *__pyx_t_4 = NULL;
17393  __Pyx_RefNannySetupContext("random_clifford", 0);
17394  if (__pyx_optional_args) {
17395  if (__pyx_optional_args->__pyx_n > 0) {
17396  __pyx_v_fill = __pyx_optional_args->fill;
17397  }
17398  }
17399 
17400  /* "PyClical.pyx":1822
17401  * {-3,-1,2}
17402  * """
17403  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17404  *
17405  * cpdef inline cga3(obj):
17406  */
17407  __Pyx_XDECREF(__pyx_r);
17408  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17409  __Pyx_GOTREF(__pyx_t_1);
17410  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17411  __Pyx_GOTREF(__pyx_t_2);
17412  __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)
17413  __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)
17414  __Pyx_GOTREF(__pyx_t_4);
17415  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17416  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17417  __pyx_r = __pyx_t_4;
17418  __pyx_t_4 = 0;
17419  goto __pyx_L0;
17420 
17421  /* "PyClical.pyx":1815
17422  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17423  *
17424  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17425  * """
17426  * Random multivector within a frame.
17427  */
17428 
17429  /* function exit code */
17430  __pyx_L1_error:;
17431  __Pyx_XDECREF(__pyx_t_1);
17432  __Pyx_XDECREF(__pyx_t_2);
17433  __Pyx_XDECREF(__pyx_t_4);
17434  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17435  __pyx_r = 0;
17436  __pyx_L0:;
17437  __Pyx_XGIVEREF(__pyx_r);
17438  __Pyx_RefNannyFinishContext();
17439  return __pyx_r;
17440  }
17441 
17442  /* Python wrapper */
17443  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17444  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 ";
17445  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17446  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17447  PyObject *__pyx_v_fill = 0;
17448  PyObject *__pyx_r = 0;
17449  __Pyx_RefNannyDeclarations
17450  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17451  {
17452  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17453  PyObject* values[2] = {0,0};
17454  values[1] = ((PyObject *)__pyx_float_1_0);
17455  if (unlikely(__pyx_kwds)) {
17456  Py_ssize_t kw_args;
17457  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17458  switch (pos_args) {
17459  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17460  CYTHON_FALLTHROUGH;
17461  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17462  CYTHON_FALLTHROUGH;
17463  case 0: break;
17464  default: goto __pyx_L5_argtuple_error;
17465  }
17466  kw_args = PyDict_Size(__pyx_kwds);
17467  switch (pos_args) {
17468  case 0:
17469  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17470  else goto __pyx_L5_argtuple_error;
17471  CYTHON_FALLTHROUGH;
17472  case 1:
17473  if (kw_args > 0) {
17474  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17475  if (value) { values[1] = value; kw_args--; }
17476  }
17477  }
17478  if (unlikely(kw_args > 0)) {
17479  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17480  }
17481  } else {
17482  switch (PyTuple_GET_SIZE(__pyx_args)) {
17483  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17484  CYTHON_FALLTHROUGH;
17485  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17486  break;
17487  default: goto __pyx_L5_argtuple_error;
17488  }
17489  }
17490  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17491  __pyx_v_fill = values[1];
17492  }
17493  goto __pyx_L4_argument_unpacking_done;
17494  __pyx_L5_argtuple_error:;
17495  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17496  __pyx_L3_error:;
17497  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17498  __Pyx_RefNannyFinishContext();
17499  return NULL;
17500  __pyx_L4_argument_unpacking_done:;
17501  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17502  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17503 
17504  /* function exit code */
17505  goto __pyx_L0;
17506  __pyx_L1_error:;
17507  __pyx_r = NULL;
17508  __pyx_L0:;
17509  __Pyx_RefNannyFinishContext();
17510  return __pyx_r;
17511  }
17512 
17513  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) {
17514  PyObject *__pyx_r = NULL;
17515  __Pyx_RefNannyDeclarations
17516  PyObject *__pyx_t_1 = NULL;
17517  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17518  __Pyx_RefNannySetupContext("random_clifford", 0);
17519  __Pyx_XDECREF(__pyx_r);
17520  __pyx_t_2.__pyx_n = 1;
17521  __pyx_t_2.fill = __pyx_v_fill;
17522  __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)
17523  __Pyx_GOTREF(__pyx_t_1);
17524  __pyx_r = __pyx_t_1;
17525  __pyx_t_1 = 0;
17526  goto __pyx_L0;
17527 
17528  /* function exit code */
17529  __pyx_L1_error:;
17530  __Pyx_XDECREF(__pyx_t_1);
17531  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17532  __pyx_r = NULL;
17533  __pyx_L0:;
17534  __Pyx_XGIVEREF(__pyx_r);
17535  __Pyx_RefNannyFinishContext();
17536  return __pyx_r;
17537  }
17538 
17539  /* "PyClical.pyx":1824
17540  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17541  *
17542  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17543  * """
17544  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17545  */
17546 
17547  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17548  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17549  PyObject *__pyx_r = NULL;
17550  __Pyx_RefNannyDeclarations
17551  PyObject *__pyx_t_1 = NULL;
17552  PyObject *__pyx_t_2 = NULL;
17553  __Pyx_RefNannySetupContext("cga3", 0);
17554 
17555  /* "PyClical.pyx":1831
17556  * 87{-1}+4{1}+18{2}+2{3}+85{4}
17557  * """
17558  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17559  *
17560  * cpdef inline cga3std(obj):
17561  */
17562  __Pyx_XDECREF(__pyx_r);
17563  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
17564  __Pyx_GOTREF(__pyx_t_1);
17565  __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)
17566  __Pyx_GOTREF(__pyx_t_2);
17567  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17568  __pyx_r = __pyx_t_2;
17569  __pyx_t_2 = 0;
17570  goto __pyx_L0;
17571 
17572  /* "PyClical.pyx":1824
17573  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17574  *
17575  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17576  * """
17577  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17578  */
17579 
17580  /* function exit code */
17581  __pyx_L1_error:;
17582  __Pyx_XDECREF(__pyx_t_1);
17583  __Pyx_XDECREF(__pyx_t_2);
17584  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17585  __pyx_r = 0;
17586  __pyx_L0:;
17587  __Pyx_XGIVEREF(__pyx_r);
17588  __Pyx_RefNannyFinishContext();
17589  return __pyx_r;
17590  }
17591 
17592  /* Python wrapper */
17593  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17594  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 ";
17595  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17596  PyObject *__pyx_r = 0;
17597  __Pyx_RefNannyDeclarations
17598  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
17599  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17600 
17601  /* function exit code */
17602  __Pyx_RefNannyFinishContext();
17603  return __pyx_r;
17604  }
17605 
17606  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17607  PyObject *__pyx_r = NULL;
17608  __Pyx_RefNannyDeclarations
17609  PyObject *__pyx_t_1 = NULL;
17610  __Pyx_RefNannySetupContext("cga3", 0);
17611  __Pyx_XDECREF(__pyx_r);
17612  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
17613  __Pyx_GOTREF(__pyx_t_1);
17614  __pyx_r = __pyx_t_1;
17615  __pyx_t_1 = 0;
17616  goto __pyx_L0;
17617 
17618  /* function exit code */
17619  __pyx_L1_error:;
17620  __Pyx_XDECREF(__pyx_t_1);
17621  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17622  __pyx_r = NULL;
17623  __pyx_L0:;
17624  __Pyx_XGIVEREF(__pyx_r);
17625  __Pyx_RefNannyFinishContext();
17626  return __pyx_r;
17627  }
17628 
17629  /* "PyClical.pyx":1833
17630  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17631  *
17632  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17633  * """
17634  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17635  */
17636 
17637  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17638  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17639  PyObject *__pyx_r = NULL;
17640  __Pyx_RefNannyDeclarations
17641  PyObject *__pyx_t_1 = NULL;
17642  PyObject *__pyx_t_2 = NULL;
17643  __Pyx_RefNannySetupContext("cga3std", 0);
17644 
17645  /* "PyClical.pyx":1842
17646  * 0
17647  * """
17648  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
17649  *
17650  * cpdef inline agc3(obj):
17651  */
17652  __Pyx_XDECREF(__pyx_r);
17653  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
17654  __Pyx_GOTREF(__pyx_t_1);
17655  __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)
17656  __Pyx_GOTREF(__pyx_t_2);
17657  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17658  __pyx_r = __pyx_t_2;
17659  __pyx_t_2 = 0;
17660  goto __pyx_L0;
17661 
17662  /* "PyClical.pyx":1833
17663  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17664  *
17665  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17666  * """
17667  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17668  */
17669 
17670  /* function exit code */
17671  __pyx_L1_error:;
17672  __Pyx_XDECREF(__pyx_t_1);
17673  __Pyx_XDECREF(__pyx_t_2);
17674  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17675  __pyx_r = 0;
17676  __pyx_L0:;
17677  __Pyx_XGIVEREF(__pyx_r);
17678  __Pyx_RefNannyFinishContext();
17679  return __pyx_r;
17680  }
17681 
17682  /* Python wrapper */
17683  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17684  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 ";
17685  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17686  PyObject *__pyx_r = 0;
17687  __Pyx_RefNannyDeclarations
17688  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
17689  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17690 
17691  /* function exit code */
17692  __Pyx_RefNannyFinishContext();
17693  return __pyx_r;
17694  }
17695 
17696  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17697  PyObject *__pyx_r = NULL;
17698  __Pyx_RefNannyDeclarations
17699  PyObject *__pyx_t_1 = NULL;
17700  __Pyx_RefNannySetupContext("cga3std", 0);
17701  __Pyx_XDECREF(__pyx_r);
17702  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
17703  __Pyx_GOTREF(__pyx_t_1);
17704  __pyx_r = __pyx_t_1;
17705  __pyx_t_1 = 0;
17706  goto __pyx_L0;
17707 
17708  /* function exit code */
17709  __pyx_L1_error:;
17710  __Pyx_XDECREF(__pyx_t_1);
17711  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17712  __pyx_r = NULL;
17713  __pyx_L0:;
17714  __Pyx_XGIVEREF(__pyx_r);
17715  __Pyx_RefNannyFinishContext();
17716  return __pyx_r;
17717  }
17718 
17719  /* "PyClical.pyx":1844
17720  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17721  *
17722  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17723  * """
17724  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17725  */
17726 
17727  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17728  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17729  PyObject *__pyx_r = NULL;
17730  __Pyx_RefNannyDeclarations
17731  PyObject *__pyx_t_1 = NULL;
17732  PyObject *__pyx_t_2 = NULL;
17733  __Pyx_RefNannySetupContext("agc3", 0);
17734 
17735  /* "PyClical.pyx":1853
17736  * 0
17737  * """
17738  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17739  *
17740  * # Some abbreviations.
17741  */
17742  __Pyx_XDECREF(__pyx_r);
17743  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
17744  __Pyx_GOTREF(__pyx_t_1);
17745  __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)
17746  __Pyx_GOTREF(__pyx_t_2);
17747  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17748  __pyx_r = __pyx_t_2;
17749  __pyx_t_2 = 0;
17750  goto __pyx_L0;
17751 
17752  /* "PyClical.pyx":1844
17753  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17754  *
17755  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17756  * """
17757  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17758  */
17759 
17760  /* function exit code */
17761  __pyx_L1_error:;
17762  __Pyx_XDECREF(__pyx_t_1);
17763  __Pyx_XDECREF(__pyx_t_2);
17764  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17765  __pyx_r = 0;
17766  __pyx_L0:;
17767  __Pyx_XGIVEREF(__pyx_r);
17768  __Pyx_RefNannyFinishContext();
17769  return __pyx_r;
17770  }
17771 
17772  /* Python wrapper */
17773  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17774  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 ";
17775  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17776  PyObject *__pyx_r = 0;
17777  __Pyx_RefNannyDeclarations
17778  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
17779  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17780 
17781  /* function exit code */
17782  __Pyx_RefNannyFinishContext();
17783  return __pyx_r;
17784  }
17785 
17786  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17787  PyObject *__pyx_r = NULL;
17788  __Pyx_RefNannyDeclarations
17789  PyObject *__pyx_t_1 = NULL;
17790  __Pyx_RefNannySetupContext("agc3", 0);
17791  __Pyx_XDECREF(__pyx_r);
17792  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
17793  __Pyx_GOTREF(__pyx_t_1);
17794  __pyx_r = __pyx_t_1;
17795  __pyx_t_1 = 0;
17796  goto __pyx_L0;
17797 
17798  /* function exit code */
17799  __pyx_L1_error:;
17800  __Pyx_XDECREF(__pyx_t_1);
17801  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17802  __pyx_r = NULL;
17803  __pyx_L0:;
17804  __Pyx_XGIVEREF(__pyx_r);
17805  __Pyx_RefNannyFinishContext();
17806  return __pyx_r;
17807  }
17808 
17809  /* "PyClical.pyx":1887
17810  * """
17811  *
17812  * def e(obj): # <<<<<<<<<<<<<<
17813  * """
17814  * Abbreviation for clifford(index_set(obj)).
17815  */
17816 
17817  /* Python wrapper */
17818  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17819  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 ";
17820  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17821  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17822  PyObject *__pyx_r = 0;
17823  __Pyx_RefNannyDeclarations
17824  __Pyx_RefNannySetupContext("e (wrapper)", 0);
17825  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17826 
17827  /* function exit code */
17828  __Pyx_RefNannyFinishContext();
17829  return __pyx_r;
17830  }
17831 
17832  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17833  PyObject *__pyx_r = NULL;
17834  __Pyx_RefNannyDeclarations
17835  PyObject *__pyx_t_1 = NULL;
17836  PyObject *__pyx_t_2 = NULL;
17837  __Pyx_RefNannySetupContext("e", 0);
17838 
17839  /* "PyClical.pyx":1898
17840  * 1
17841  * """
17842  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
17843  *
17844  * def istpq(p, q):
17845  */
17846  __Pyx_XDECREF(__pyx_r);
17847  __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)
17848  __Pyx_GOTREF(__pyx_t_1);
17849  __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)
17850  __Pyx_GOTREF(__pyx_t_2);
17851  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17852  __pyx_r = __pyx_t_2;
17853  __pyx_t_2 = 0;
17854  goto __pyx_L0;
17855 
17856  /* "PyClical.pyx":1887
17857  * """
17858  *
17859  * def e(obj): # <<<<<<<<<<<<<<
17860  * """
17861  * Abbreviation for clifford(index_set(obj)).
17862  */
17863 
17864  /* function exit code */
17865  __pyx_L1_error:;
17866  __Pyx_XDECREF(__pyx_t_1);
17867  __Pyx_XDECREF(__pyx_t_2);
17868  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17869  __pyx_r = NULL;
17870  __pyx_L0:;
17871  __Pyx_XGIVEREF(__pyx_r);
17872  __Pyx_RefNannyFinishContext();
17873  return __pyx_r;
17874  }
17875 
17876  /* "PyClical.pyx":1900
17877  * return clifford(index_set(obj))
17878  *
17879  * def istpq(p, q): # <<<<<<<<<<<<<<
17880  * """
17881  * Abbreviation for index_set({-q,...p}).
17882  */
17883 
17884  /* Python wrapper */
17885  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17886  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 ";
17887  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17888  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17889  PyObject *__pyx_v_p = 0;
17890  PyObject *__pyx_v_q = 0;
17891  PyObject *__pyx_r = 0;
17892  __Pyx_RefNannyDeclarations
17893  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
17894  {
17895  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17896  PyObject* values[2] = {0,0};
17897  if (unlikely(__pyx_kwds)) {
17898  Py_ssize_t kw_args;
17899  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17900  switch (pos_args) {
17901  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17902  CYTHON_FALLTHROUGH;
17903  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17904  CYTHON_FALLTHROUGH;
17905  case 0: break;
17906  default: goto __pyx_L5_argtuple_error;
17907  }
17908  kw_args = PyDict_Size(__pyx_kwds);
17909  switch (pos_args) {
17910  case 0:
17911  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17912  else goto __pyx_L5_argtuple_error;
17913  CYTHON_FALLTHROUGH;
17914  case 1:
17915  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17916  else {
17917  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
17918  }
17919  }
17920  if (unlikely(kw_args > 0)) {
17921  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
17922  }
17923  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17924  goto __pyx_L5_argtuple_error;
17925  } else {
17926  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17927  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17928  }
17929  __pyx_v_p = values[0];
17930  __pyx_v_q = values[1];
17931  }
17932  goto __pyx_L4_argument_unpacking_done;
17933  __pyx_L5_argtuple_error:;
17934  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
17935  __pyx_L3_error:;
17936  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17937  __Pyx_RefNannyFinishContext();
17938  return NULL;
17939  __pyx_L4_argument_unpacking_done:;
17940  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17941 
17942  /* function exit code */
17943  __Pyx_RefNannyFinishContext();
17944  return __pyx_r;
17945  }
17946 
17947  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17948  PyObject *__pyx_r = NULL;
17949  __Pyx_RefNannyDeclarations
17950  PyObject *__pyx_t_1 = NULL;
17951  PyObject *__pyx_t_2 = NULL;
17952  PyObject *__pyx_t_3 = NULL;
17953  __Pyx_RefNannySetupContext("istpq", 0);
17954 
17955  /* "PyClical.pyx":1907
17956  * {-3,-2,-1,1,2}
17957  * """
17958  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
17959  *
17960  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17961  */
17962  __Pyx_XDECREF(__pyx_r);
17963  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
17964  __Pyx_GOTREF(__pyx_t_1);
17965  __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)
17966  __Pyx_GOTREF(__pyx_t_2);
17967  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17968  __Pyx_GOTREF(__pyx_t_3);
17969  __Pyx_GIVEREF(__pyx_t_1);
17970  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17971  __Pyx_GIVEREF(__pyx_t_2);
17972  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17973  __pyx_t_1 = 0;
17974  __pyx_t_2 = 0;
17975  __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)
17976  __Pyx_GOTREF(__pyx_t_2);
17977  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17978  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17979  __Pyx_GOTREF(__pyx_t_3);
17980  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17981  __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)
17982  __Pyx_GOTREF(__pyx_t_2);
17983  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17984  __pyx_r = __pyx_t_2;
17985  __pyx_t_2 = 0;
17986  goto __pyx_L0;
17987 
17988  /* "PyClical.pyx":1900
17989  * return clifford(index_set(obj))
17990  *
17991  * def istpq(p, q): # <<<<<<<<<<<<<<
17992  * """
17993  * Abbreviation for index_set({-q,...p}).
17994  */
17995 
17996  /* function exit code */
17997  __pyx_L1_error:;
17998  __Pyx_XDECREF(__pyx_t_1);
17999  __Pyx_XDECREF(__pyx_t_2);
18000  __Pyx_XDECREF(__pyx_t_3);
18001  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18002  __pyx_r = NULL;
18003  __pyx_L0:;
18004  __Pyx_XGIVEREF(__pyx_r);
18005  __Pyx_RefNannyFinishContext();
18006  return __pyx_r;
18007  }
18008 
18009  /* "PyClical.pyx":1913
18010  *
18011  * # Doctest interface.
18012  * def _test(): # <<<<<<<<<<<<<<
18013  * import PyClical, doctest
18014  * return doctest.testmod(PyClical)
18015  */
18016 
18017  /* Python wrapper */
18018  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18019  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18020  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18021  PyObject *__pyx_r = 0;
18022  __Pyx_RefNannyDeclarations
18023  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18024  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18025 
18026  /* function exit code */
18027  __Pyx_RefNannyFinishContext();
18028  return __pyx_r;
18029  }
18030 
18031  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18032  PyObject *__pyx_v_PyClical = NULL;
18033  PyObject *__pyx_v_doctest = NULL;
18034  PyObject *__pyx_r = NULL;
18035  __Pyx_RefNannyDeclarations
18036  PyObject *__pyx_t_1 = NULL;
18037  PyObject *__pyx_t_2 = NULL;
18038  PyObject *__pyx_t_3 = NULL;
18039  __Pyx_RefNannySetupContext("_test", 0);
18040 
18041  /* "PyClical.pyx":1914
18042  * # Doctest interface.
18043  * def _test():
18044  * import PyClical, doctest # <<<<<<<<<<<<<<
18045  * return doctest.testmod(PyClical)
18046  *
18047  */
18048  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18049  __Pyx_GOTREF(__pyx_t_1);
18050  __pyx_v_PyClical = __pyx_t_1;
18051  __pyx_t_1 = 0;
18052  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18053  __Pyx_GOTREF(__pyx_t_1);
18054  __pyx_v_doctest = __pyx_t_1;
18055  __pyx_t_1 = 0;
18056 
18057  /* "PyClical.pyx":1915
18058  * def _test():
18059  * import PyClical, doctest
18060  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18061  *
18062  * if __name__ == "__main__":
18063  */
18064  __Pyx_XDECREF(__pyx_r);
18065  __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)
18066  __Pyx_GOTREF(__pyx_t_2);
18067  __pyx_t_3 = NULL;
18068  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18069  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18070  if (likely(__pyx_t_3)) {
18071  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18072  __Pyx_INCREF(__pyx_t_3);
18073  __Pyx_INCREF(function);
18074  __Pyx_DECREF_SET(__pyx_t_2, function);
18075  }
18076  }
18077  __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);
18078  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18079  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18080  __Pyx_GOTREF(__pyx_t_1);
18081  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18082  __pyx_r = __pyx_t_1;
18083  __pyx_t_1 = 0;
18084  goto __pyx_L0;
18085 
18086  /* "PyClical.pyx":1913
18087  *
18088  * # Doctest interface.
18089  * def _test(): # <<<<<<<<<<<<<<
18090  * import PyClical, doctest
18091  * return doctest.testmod(PyClical)
18092  */
18093 
18094  /* function exit code */
18095  __pyx_L1_error:;
18096  __Pyx_XDECREF(__pyx_t_1);
18097  __Pyx_XDECREF(__pyx_t_2);
18098  __Pyx_XDECREF(__pyx_t_3);
18099  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18100  __pyx_r = NULL;
18101  __pyx_L0:;
18102  __Pyx_XDECREF(__pyx_v_PyClical);
18103  __Pyx_XDECREF(__pyx_v_doctest);
18104  __Pyx_XGIVEREF(__pyx_r);
18105  __Pyx_RefNannyFinishContext();
18106  return __pyx_r;
18107  }
18108  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18109 
18110  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18111  struct __pyx_obj_8PyClical_index_set *p;
18112  PyObject *o;
18113  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18114  o = (*t->tp_alloc)(t, 0);
18115  } else {
18116  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18117  }
18118  if (unlikely(!o)) return 0;
18119  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18120  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18121  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18122  return o;
18123  bad:
18124  Py_DECREF(o); o = 0;
18125  return NULL;
18126  }
18127 
18128  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18129  #if CYTHON_USE_TP_FINALIZE
18130  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))) {
18131  if (PyObject_CallFinalizerFromDealloc(o)) return;
18132  }
18133  #endif
18134  {
18135  PyObject *etype, *eval, *etb;
18136  PyErr_Fetch(&etype, &eval, &etb);
18137  ++Py_REFCNT(o);
18138  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18139  --Py_REFCNT(o);
18140  PyErr_Restore(etype, eval, etb);
18141  }
18142  (*Py_TYPE(o)->tp_free)(o);
18143  }
18144  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18145  PyObject *r;
18146  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18147  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18148  Py_DECREF(x);
18149  return r;
18150  }
18151 
18152  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18153  if (v) {
18154  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18155  }
18156  else {
18157  PyErr_Format(PyExc_NotImplementedError,
18158  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18159  return -1;
18160  }
18161  }
18162 
18163  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18164  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18165  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18166  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18167  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18168  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18169  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18170  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18171  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18172  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18173  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18174  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18175  {0, 0, 0, 0}
18176  };
18177 
18178  static PyNumberMethods __pyx_tp_as_number_index_set = {
18179  0, /*nb_add*/
18180  0, /*nb_subtract*/
18181  0, /*nb_multiply*/
18182  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18183  0, /*nb_divide*/
18184  #endif
18185  0, /*nb_remainder*/
18186  0, /*nb_divmod*/
18187  0, /*nb_power*/
18188  0, /*nb_negative*/
18189  0, /*nb_positive*/
18190  0, /*nb_absolute*/
18191  0, /*nb_nonzero*/
18192  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18193  0, /*nb_lshift*/
18194  0, /*nb_rshift*/
18195  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18196  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18197  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18198  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18199  0, /*nb_coerce*/
18200  #endif
18201  0, /*nb_int*/
18202  #if PY_MAJOR_VERSION < 3
18203  0, /*nb_long*/
18204  #else
18205  0, /*reserved*/
18206  #endif
18207  0, /*nb_float*/
18208  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18209  0, /*nb_oct*/
18210  #endif
18211  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18212  0, /*nb_hex*/
18213  #endif
18214  0, /*nb_inplace_add*/
18215  0, /*nb_inplace_subtract*/
18216  0, /*nb_inplace_multiply*/
18217  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18218  0, /*nb_inplace_divide*/
18219  #endif
18220  0, /*nb_inplace_remainder*/
18221  0, /*nb_inplace_power*/
18222  0, /*nb_inplace_lshift*/
18223  0, /*nb_inplace_rshift*/
18224  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18225  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18226  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18227  0, /*nb_floor_divide*/
18228  0, /*nb_true_divide*/
18229  0, /*nb_inplace_floor_divide*/
18230  0, /*nb_inplace_true_divide*/
18231  0, /*nb_index*/
18232  #if PY_VERSION_HEX >= 0x03050000
18233  0, /*nb_matrix_multiply*/
18234  #endif
18235  #if PY_VERSION_HEX >= 0x03050000
18236  0, /*nb_inplace_matrix_multiply*/
18237  #endif
18238  };
18239 
18240  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18241  0, /*sq_length*/
18242  0, /*sq_concat*/
18243  0, /*sq_repeat*/
18244  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18245  0, /*sq_slice*/
18246  0, /*sq_ass_item*/
18247  0, /*sq_ass_slice*/
18248  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18249  0, /*sq_inplace_concat*/
18250  0, /*sq_inplace_repeat*/
18251  };
18252 
18253  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18254  0, /*mp_length*/
18255  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18256  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18257  };
18258 
18259  static PyTypeObject __pyx_type_8PyClical_index_set = {
18260  PyVarObject_HEAD_INIT(0, 0)
18261  "PyClical.index_set", /*tp_name*/
18262  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18263  0, /*tp_itemsize*/
18264  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18265  0, /*tp_print*/
18266  0, /*tp_getattr*/
18267  0, /*tp_setattr*/
18268  #if PY_MAJOR_VERSION < 3
18269  0, /*tp_compare*/
18270  #endif
18271  #if PY_MAJOR_VERSION >= 3
18272  0, /*tp_as_async*/
18273  #endif
18274  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18275  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18276  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18277  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18278  0, /*tp_hash*/
18279  0, /*tp_call*/
18280  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18281  0, /*tp_getattro*/
18282  0, /*tp_setattro*/
18283  0, /*tp_as_buffer*/
18284  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18285  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18286  0, /*tp_traverse*/
18287  0, /*tp_clear*/
18288  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18289  0, /*tp_weaklistoffset*/
18290  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18291  0, /*tp_iternext*/
18292  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18293  0, /*tp_members*/
18294  0, /*tp_getset*/
18295  0, /*tp_base*/
18296  0, /*tp_dict*/
18297  0, /*tp_descr_get*/
18298  0, /*tp_descr_set*/
18299  0, /*tp_dictoffset*/
18300  0, /*tp_init*/
18301  0, /*tp_alloc*/
18302  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18303  0, /*tp_free*/
18304  0, /*tp_is_gc*/
18305  0, /*tp_bases*/
18306  0, /*tp_mro*/
18307  0, /*tp_cache*/
18308  0, /*tp_subclasses*/
18309  0, /*tp_weaklist*/
18310  0, /*tp_del*/
18311  0, /*tp_version_tag*/
18312  #if PY_VERSION_HEX >= 0x030400a1
18313  0, /*tp_finalize*/
18314  #endif
18315  };
18316  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18317 
18318  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18319  struct __pyx_obj_8PyClical_clifford *p;
18320  PyObject *o;
18321  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18322  o = (*t->tp_alloc)(t, 0);
18323  } else {
18324  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18325  }
18326  if (unlikely(!o)) return 0;
18327  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18328  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18329  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18330  return o;
18331  bad:
18332  Py_DECREF(o); o = 0;
18333  return NULL;
18334  }
18335 
18336  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18337  #if CYTHON_USE_TP_FINALIZE
18338  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))) {
18339  if (PyObject_CallFinalizerFromDealloc(o)) return;
18340  }
18341  #endif
18342  {
18343  PyObject *etype, *eval, *etb;
18344  PyErr_Fetch(&etype, &eval, &etb);
18345  ++Py_REFCNT(o);
18346  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18347  --Py_REFCNT(o);
18348  PyErr_Restore(etype, eval, etb);
18349  }
18350  (*Py_TYPE(o)->tp_free)(o);
18351  }
18352  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18353  PyObject *r;
18354  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18355  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18356  Py_DECREF(x);
18357  return r;
18358  }
18359 
18360  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18361  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18362  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18363  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18364  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18365  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18366  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18367  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18368  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18369  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18370  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18371  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18372  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18373  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18374  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18375  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18376  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18377  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18378  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18379  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18380  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18381  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18382  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18383  {0, 0, 0, 0}
18384  };
18385 
18386  static PyNumberMethods __pyx_tp_as_number_clifford = {
18387  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18388  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18389  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18390  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18391  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18392  #endif
18393  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18394  0, /*nb_divmod*/
18395  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18396  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18397  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18398  0, /*nb_absolute*/
18399  0, /*nb_nonzero*/
18400  0, /*nb_invert*/
18401  0, /*nb_lshift*/
18402  0, /*nb_rshift*/
18403  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18404  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18405  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18406  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18407  0, /*nb_coerce*/
18408  #endif
18409  0, /*nb_int*/
18410  #if PY_MAJOR_VERSION < 3
18411  0, /*nb_long*/
18412  #else
18413  0, /*reserved*/
18414  #endif
18415  0, /*nb_float*/
18416  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18417  0, /*nb_oct*/
18418  #endif
18419  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18420  0, /*nb_hex*/
18421  #endif
18422  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18423  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18424  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18425  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18426  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18427  #endif
18428  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18429  0, /*nb_inplace_power*/
18430  0, /*nb_inplace_lshift*/
18431  0, /*nb_inplace_rshift*/
18432  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18433  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18434  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18435  0, /*nb_floor_divide*/
18436  0, /*nb_true_divide*/
18437  0, /*nb_inplace_floor_divide*/
18438  0, /*nb_inplace_true_divide*/
18439  0, /*nb_index*/
18440  #if PY_VERSION_HEX >= 0x03050000
18441  0, /*nb_matrix_multiply*/
18442  #endif
18443  #if PY_VERSION_HEX >= 0x03050000
18444  0, /*nb_inplace_matrix_multiply*/
18445  #endif
18446  };
18447 
18448  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18449  0, /*sq_length*/
18450  0, /*sq_concat*/
18451  0, /*sq_repeat*/
18452  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18453  0, /*sq_slice*/
18454  0, /*sq_ass_item*/
18455  0, /*sq_ass_slice*/
18456  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18457  0, /*sq_inplace_concat*/
18458  0, /*sq_inplace_repeat*/
18459  };
18460 
18461  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18462  0, /*mp_length*/
18463  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18464  0, /*mp_ass_subscript*/
18465  };
18466 
18467  static PyTypeObject __pyx_type_8PyClical_clifford = {
18468  PyVarObject_HEAD_INIT(0, 0)
18469  "PyClical.clifford", /*tp_name*/
18470  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18471  0, /*tp_itemsize*/
18472  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18473  0, /*tp_print*/
18474  0, /*tp_getattr*/
18475  0, /*tp_setattr*/
18476  #if PY_MAJOR_VERSION < 3
18477  0, /*tp_compare*/
18478  #endif
18479  #if PY_MAJOR_VERSION >= 3
18480  0, /*tp_as_async*/
18481  #endif
18482  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18483  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18484  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18485  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18486  0, /*tp_hash*/
18487  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18488  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18489  0, /*tp_getattro*/
18490  0, /*tp_setattro*/
18491  0, /*tp_as_buffer*/
18492  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18493  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18494  0, /*tp_traverse*/
18495  0, /*tp_clear*/
18496  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18497  0, /*tp_weaklistoffset*/
18498  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18499  0, /*tp_iternext*/
18500  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18501  0, /*tp_members*/
18502  0, /*tp_getset*/
18503  0, /*tp_base*/
18504  0, /*tp_dict*/
18505  0, /*tp_descr_get*/
18506  0, /*tp_descr_set*/
18507  0, /*tp_dictoffset*/
18508  0, /*tp_init*/
18509  0, /*tp_alloc*/
18510  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
18511  0, /*tp_free*/
18512  0, /*tp_is_gc*/
18513  0, /*tp_bases*/
18514  0, /*tp_mro*/
18515  0, /*tp_cache*/
18516  0, /*tp_subclasses*/
18517  0, /*tp_weaklist*/
18518  0, /*tp_del*/
18519  0, /*tp_version_tag*/
18520  #if PY_VERSION_HEX >= 0x030400a1
18521  0, /*tp_finalize*/
18522  #endif
18523  };
18524 
18525  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18526  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18527 
18528  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18529  PyObject *o;
18530  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__)))) {
18531  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18532  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18533  (void) PyObject_INIT(o, t);
18534  PyObject_GC_Track(o);
18535  } else {
18536  o = (*t->tp_alloc)(t, 0);
18537  if (unlikely(!o)) return 0;
18538  }
18539  return o;
18540  }
18541 
18542  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18543  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18544  PyObject_GC_UnTrack(o);
18545  Py_CLEAR(p->__pyx_v_idx);
18546  Py_CLEAR(p->__pyx_v_self);
18547  Py_CLEAR(p->__pyx_t_0);
18548  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__)))) {
18549  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18550  } else {
18551  (*Py_TYPE(o)->tp_free)(o);
18552  }
18553  }
18554 
18555  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
18556  int e;
18557  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18558  if (p->__pyx_v_idx) {
18559  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
18560  }
18561  if (p->__pyx_v_self) {
18562  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
18563  }
18564  if (p->__pyx_t_0) {
18565  e = (*v)(p->__pyx_t_0, a); if (e) return e;
18566  }
18567  return 0;
18568  }
18569 
18570  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18571  PyVarObject_HEAD_INIT(0, 0)
18572  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
18573  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
18574  0, /*tp_itemsize*/
18575  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
18576  0, /*tp_print*/
18577  0, /*tp_getattr*/
18578  0, /*tp_setattr*/
18579  #if PY_MAJOR_VERSION < 3
18580  0, /*tp_compare*/
18581  #endif
18582  #if PY_MAJOR_VERSION >= 3
18583  0, /*tp_as_async*/
18584  #endif
18585  0, /*tp_repr*/
18586  0, /*tp_as_number*/
18587  0, /*tp_as_sequence*/
18588  0, /*tp_as_mapping*/
18589  0, /*tp_hash*/
18590  0, /*tp_call*/
18591  0, /*tp_str*/
18592  0, /*tp_getattro*/
18593  0, /*tp_setattro*/
18594  0, /*tp_as_buffer*/
18595  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
18596  0, /*tp_doc*/
18597  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
18598  0, /*tp_clear*/
18599  0, /*tp_richcompare*/
18600  0, /*tp_weaklistoffset*/
18601  0, /*tp_iter*/
18602  0, /*tp_iternext*/
18603  0, /*tp_methods*/
18604  0, /*tp_members*/
18605  0, /*tp_getset*/
18606  0, /*tp_base*/
18607  0, /*tp_dict*/
18608  0, /*tp_descr_get*/
18609  0, /*tp_descr_set*/
18610  0, /*tp_dictoffset*/
18611  0, /*tp_init*/
18612  0, /*tp_alloc*/
18613  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
18614  0, /*tp_free*/
18615  0, /*tp_is_gc*/
18616  0, /*tp_bases*/
18617  0, /*tp_mro*/
18618  0, /*tp_cache*/
18619  0, /*tp_subclasses*/
18620  0, /*tp_weaklist*/
18621  0, /*tp_del*/
18622  0, /*tp_version_tag*/
18623  #if PY_VERSION_HEX >= 0x030400a1
18624  0, /*tp_finalize*/
18625  #endif
18626  };
18627 
18628  static PyMethodDef __pyx_methods[] = {
18629  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18630  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18631  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18632  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18633  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18634  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18635  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18636  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18637  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18638  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18639  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18640  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18641  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18642  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18643  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18644  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18645  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18646  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18647  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18648  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18649  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18650  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18651  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18652  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18653  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18654  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18655  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18656  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18657  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18658  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18659  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18660  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18661  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18662  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18663  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18664  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18665  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18666  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18667  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18668  {0, 0, 0, 0}
18669  };
18670 
18671  #if PY_MAJOR_VERSION >= 3
18672  #if CYTHON_PEP489_MULTI_PHASE_INIT
18673  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
18674  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
18675  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
18676  {Py_mod_create, (void*)__pyx_pymod_create},
18677  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
18678  {0, NULL}
18679  };
18680  #endif
18681 
18682  static struct PyModuleDef __pyx_moduledef = {
18683  PyModuleDef_HEAD_INIT,
18684  "PyClical",
18685  0, /* m_doc */
18686  #if CYTHON_PEP489_MULTI_PHASE_INIT
18687  0, /* m_size */
18688  #else
18689  -1, /* m_size */
18690  #endif
18691  __pyx_methods /* m_methods */,
18692  #if CYTHON_PEP489_MULTI_PHASE_INIT
18693  __pyx_moduledef_slots, /* m_slots */
18694  #else
18695  NULL, /* m_reload */
18696  #endif
18697  NULL, /* m_traverse */
18698  NULL, /* m_clear */
18699  NULL /* m_free */
18700  };
18701  #endif
18702  #ifndef CYTHON_SMALL_CODE
18703 #if defined(__clang__)
18704  #define CYTHON_SMALL_CODE
18705 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
18706  #define CYTHON_SMALL_CODE __attribute__((cold))
18707 #else
18708  #define CYTHON_SMALL_CODE
18709 #endif
18710 #endif
18711 
18712 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18713  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
18714  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18715  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18716  {&__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},
18717  {&__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},
18718  {&__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},
18719  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18720  {&__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},
18721  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18722  {&__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},
18723  {&__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},
18724  {&__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},
18725  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18726  {&__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},
18727  {&__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},
18728  {&__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},
18729  {&__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},
18730  {&__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},
18731  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18732  {&__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},
18733  {&__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},
18734  {&__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},
18735  {&__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},
18736  {&__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},
18737  {&__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},
18738  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18739  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18740  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18741  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18742  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18743  {&__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},
18744  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18745  {&__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},
18746  {&__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},
18747  {&__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},
18748  {&__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},
18749  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18750  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18751  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18752  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18753  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18754  {&__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},
18755  {&__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},
18756  {&__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},
18757  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18758  {&__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},
18759  {&__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},
18760  {&__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},
18761  {&__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},
18762  {&__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},
18763  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18764  {&__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},
18765  {&__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},
18766  {&__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},
18767  {&__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},
18768  {&__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},
18769  {&__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},
18770  {&__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},
18771  {&__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},
18772  {&__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},
18773  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18774  {&__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},
18775  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18776  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18777  {&__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},
18778  {&__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},
18779  {&__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},
18780  {&__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},
18781  {&__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},
18782  {&__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},
18783  {&__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},
18784  {&__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},
18785  {&__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},
18786  {&__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},
18787  {&__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},
18788  {&__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},
18789  {&__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},
18790  {&__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},
18791  {&__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},
18792  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18793  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
18794  {&__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},
18795  {&__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},
18796  {&__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},
18797  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
18798  {&__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},
18799  {&__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},
18800  {&__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},
18801  {&__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},
18802  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18803  {&__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},
18804  {&__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},
18805  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18806  {&__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},
18807  {&__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},
18808  {&__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},
18809  {&__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},
18810  {&__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},
18811  {&__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},
18812  {&__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},
18813  {&__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},
18814  {&__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},
18815  {&__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},
18816  {&__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},
18817  {&__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},
18818  {&__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},
18819  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18820  {&__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},
18821  {&__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},
18822  {&__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},
18823  {&__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},
18824  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18825  {&__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},
18826  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18827  {&__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},
18828  {&__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},
18829  {&__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},
18830  {&__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},
18831  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18832  {&__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},
18833  {&__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},
18834  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18835  {&__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},
18836  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
18837  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
18838  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
18839  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18840  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
18841  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
18842  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18843  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
18844  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18845  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18846  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18847  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18848  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18849  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18850  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
18851  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18852  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18853  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18854  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
18855  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18856  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18857  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18858  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18859  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18860  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
18861  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
18862  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18863  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18864  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18865  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18866  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18867  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18868  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18869  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18870  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18871  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18872  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18873  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18874  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18875  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18876  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18877  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18878  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18879  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18880  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18881  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18882  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18883  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18884  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18885  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18886  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18887  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18888  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18889  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18890  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18891  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18892  {&__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},
18893  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18894  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18895  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18896  {&__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},
18897  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18898  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18899  {&__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},
18900  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18901  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18902  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18903  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18904  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18905  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18906  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18907  {&__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},
18908  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
18909  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18910  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18911  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18912  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18913  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
18914  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18915  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
18916  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
18917  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18918  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18919  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18920  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18921  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
18922  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18923  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
18924  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18925  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
18926  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18927  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
18928  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
18929  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
18930  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
18931  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
18932  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
18933  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18934  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18935  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
18936  {&__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},
18937  {&__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},
18938  {&__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},
18939  {&__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},
18940  {&__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},
18941  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18942  {&__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},
18943  {&__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},
18944  {&__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},
18945  {&__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},
18946  {&__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},
18947  {&__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},
18948  {&__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},
18949  {&__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},
18950  {&__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},
18951  {&__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},
18952  {&__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},
18953  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18954  {&__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},
18955  {&__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},
18956  {&__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},
18957  {&__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},
18958  {&__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},
18959  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
18960  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
18961  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
18962  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
18963  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
18964  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
18965  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
18966  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
18967  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
18968  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
18969  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
18970  {&__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},
18971  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
18972  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
18973  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
18974  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
18975  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
18976  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
18977  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
18978  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
18979  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
18980  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
18981  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
18982  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
18983  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
18984  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
18985  {&__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},
18986  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
18987  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
18988  {&__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},
18989  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
18990  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
18991  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
18992  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
18993  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
18994  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
18995  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
18996  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
18997  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
18998  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
18999  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19000  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19001  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19002  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19003  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19004  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19005  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19006  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19007  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19008  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19009  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19010  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19011  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19012  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19013  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19014  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19015  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19016  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19017  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19018  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19019  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19020  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19021  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19022  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19023  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19024  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19025  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19026  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19027  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19028  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19029  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19030  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19031  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19032  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19033  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19034  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19035  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19036  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19037  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19038  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19039  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19040  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19041  {0, 0, 0, 0, 0, 0, 0}
19042 };
19043 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
19044  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19045  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19046  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19047  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19048  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19049  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19050  #if PY_MAJOR_VERSION >= 3
19051  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19052  #else
19053  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19054  #endif
19055  return 0;
19056  __pyx_L1_error:;
19057  return -1;
19058 }
19059 
19060 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
19061  __Pyx_RefNannyDeclarations
19062  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19063 
19064  /* "(tree fragment)":2
19065  * def __reduce_cython__(self):
19066  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19067  * def __setstate_cython__(self, __pyx_state):
19068  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19069  */
19070  __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)
19071  __Pyx_GOTREF(__pyx_tuple__3);
19072  __Pyx_GIVEREF(__pyx_tuple__3);
19073 
19074  /* "(tree fragment)":4
19075  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19076  * def __setstate_cython__(self, __pyx_state):
19077  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19078  */
19079  __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)
19080  __Pyx_GOTREF(__pyx_tuple__4);
19081  __Pyx_GIVEREF(__pyx_tuple__4);
19082 
19083  /* "PyClical.pyx":635
19084  * TypeError: Not applicable.
19085  * """
19086  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19087  *
19088  * def __iter__(self):
19089  */
19090  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19091  __Pyx_GOTREF(__pyx_tuple__10);
19092  __Pyx_GIVEREF(__pyx_tuple__10);
19093 
19094  /* "(tree fragment)":2
19095  * def __reduce_cython__(self):
19096  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19097  * def __setstate_cython__(self, __pyx_state):
19098  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19099  */
19100  __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)
19101  __Pyx_GOTREF(__pyx_tuple__11);
19102  __Pyx_GIVEREF(__pyx_tuple__11);
19103 
19104  /* "(tree fragment)":4
19105  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19106  * def __setstate_cython__(self, __pyx_state):
19107  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19108  */
19109  __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)
19110  __Pyx_GOTREF(__pyx_tuple__12);
19111  __Pyx_GIVEREF(__pyx_tuple__12);
19112 
19113  /* "PyClical.pyx":404
19114  * return index_set_to_str( self.unwrap() ).c_str()
19115  *
19116  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19117  * """
19118  * Tests for functions that Doctest cannot see.
19119  */
19120  __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)
19121 
19122  /* "PyClical.pyx":1243
19123  * return clifford_to_str( self.unwrap() ).c_str()
19124  *
19125  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19126  * """
19127  * Tests for functions that Doctest cannot see.
19128  */
19129  __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)
19130 
19131  /* "PyClical.pyx":1856
19132  *
19133  * # Some abbreviations.
19134  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19135  * pi = tau / 2.0
19136  *
19137  */
19138  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1856, __pyx_L1_error)
19139  __Pyx_GOTREF(__pyx_tuple__15);
19140  __Pyx_GIVEREF(__pyx_tuple__15);
19141 
19142  /* "PyClical.pyx":1887
19143  * """
19144  *
19145  * def e(obj): # <<<<<<<<<<<<<<
19146  * """
19147  * Abbreviation for clifford(index_set(obj)).
19148  */
19149  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1887, __pyx_L1_error)
19150  __Pyx_GOTREF(__pyx_tuple__16);
19151  __Pyx_GIVEREF(__pyx_tuple__16);
19152  __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)
19153 
19154  /* "PyClical.pyx":1900
19155  * return clifford(index_set(obj))
19156  *
19157  * def istpq(p, q): # <<<<<<<<<<<<<<
19158  * """
19159  * Abbreviation for index_set({-q,...p}).
19160  */
19161  __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)
19162  __Pyx_GOTREF(__pyx_tuple__18);
19163  __Pyx_GIVEREF(__pyx_tuple__18);
19164  __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)
19165 
19166  /* "PyClical.pyx":1909
19167  * return index_set(set(range(-q,p+1)))
19168  *
19169  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19170  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19171  *
19172  */
19173  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1909, __pyx_L1_error)
19174  __Pyx_GOTREF(__pyx_tuple__20);
19175  __Pyx_GIVEREF(__pyx_tuple__20);
19176  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19177  __Pyx_GOTREF(__pyx_tuple__21);
19178  __Pyx_GIVEREF(__pyx_tuple__21);
19179 
19180  /* "PyClical.pyx":1913
19181  *
19182  * # Doctest interface.
19183  * def _test(): # <<<<<<<<<<<<<<
19184  * import PyClical, doctest
19185  * return doctest.testmod(PyClical)
19186  */
19187  __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)
19188  __Pyx_GOTREF(__pyx_tuple__22);
19189  __Pyx_GIVEREF(__pyx_tuple__22);
19190  __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)
19191  __Pyx_RefNannyFinishContext();
19192  return 0;
19193  __pyx_L1_error:;
19194  __Pyx_RefNannyFinishContext();
19195  return -1;
19196 }
19197 
19198 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
19199  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19200  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19201  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19202  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19203  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19204  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19205  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19206  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19207  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19208  return 0;
19209  __pyx_L1_error:;
19210  return -1;
19211 }
19212 
19213 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
19214 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
19215 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
19216 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
19217 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
19218 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
19219 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
19220 
19221 static int __Pyx_modinit_global_init_code(void) {
19222  __Pyx_RefNannyDeclarations
19223  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19224  /*--- Global init code ---*/
19225  __Pyx_RefNannyFinishContext();
19226  return 0;
19227 }
19228 
19229 static int __Pyx_modinit_variable_export_code(void) {
19230  __Pyx_RefNannyDeclarations
19231  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19232  /*--- Variable export code ---*/
19233  __Pyx_RefNannyFinishContext();
19234  return 0;
19235 }
19236 
19237 static int __Pyx_modinit_function_export_code(void) {
19238  __Pyx_RefNannyDeclarations
19239  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19240  /*--- Function export code ---*/
19241  __Pyx_RefNannyFinishContext();
19242  return 0;
19243 }
19244 
19245 static int __Pyx_modinit_type_init_code(void) {
19246  __Pyx_RefNannyDeclarations
19247  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19248  /*--- Type init code ---*/
19249  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19250  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19251  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19252  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19253  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19254  __pyx_type_8PyClical_index_set.tp_print = 0;
19255  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)) {
19256  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19257  }
19258  #if CYTHON_COMPILING_IN_CPYTHON
19259  {
19260  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19261  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19262  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19263  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19264  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19265  }
19266  }
19267  #endif
19268  #if CYTHON_COMPILING_IN_CPYTHON
19269  {
19270  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19271  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19272  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19273  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19274  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19275  }
19276  }
19277  #endif
19278  #if CYTHON_COMPILING_IN_CPYTHON
19279  {
19280  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19281  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19282  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19283  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19284  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19285  }
19286  }
19287  #endif
19288  #if CYTHON_COMPILING_IN_CPYTHON
19289  {
19290  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19291  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19292  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19293  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19294  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19295  }
19296  }
19297  #endif
19298  #if CYTHON_COMPILING_IN_CPYTHON
19299  {
19300  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19301  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19302  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19303  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19304  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19305  }
19306  }
19307  #endif
19308  #if CYTHON_COMPILING_IN_CPYTHON
19309  {
19310  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19311  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19312  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19313  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19314  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19315  }
19316  }
19317  #endif
19318  #if CYTHON_COMPILING_IN_CPYTHON
19319  {
19320  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19321  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19322  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19323  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19324  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19325  }
19326  }
19327  #endif
19328  #if CYTHON_COMPILING_IN_CPYTHON
19329  {
19330  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19331  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19332  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19333  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19334  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19335  }
19336  }
19337  #endif
19338  #if CYTHON_COMPILING_IN_CPYTHON
19339  {
19340  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19341  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19342  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19343  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19344  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19345  }
19346  }
19347  #endif
19348  #if CYTHON_COMPILING_IN_CPYTHON
19349  {
19350  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19351  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19352  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19353  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19354  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19355  }
19356  }
19357  #endif
19358  #if CYTHON_COMPILING_IN_CPYTHON
19359  {
19360  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19361  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19362  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19363  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19364  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19365  }
19366  }
19367  #endif
19368  #if CYTHON_COMPILING_IN_CPYTHON
19369  {
19370  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19371  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19372  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19373  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19374  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19375  }
19376  }
19377  #endif
19378  #if CYTHON_COMPILING_IN_CPYTHON
19379  {
19380  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19381  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19382  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19383  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19384  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19385  }
19386  }
19387  #endif
19388  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19389  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19390  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19391  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19392  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19393  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19394  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19395  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19396  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19397  __pyx_type_8PyClical_clifford.tp_print = 0;
19398  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19399  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19400  }
19401  #if CYTHON_COMPILING_IN_CPYTHON
19402  {
19403  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19404  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19405  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19406  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19407  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19408  }
19409  }
19410  #endif
19411  #if CYTHON_COMPILING_IN_CPYTHON
19412  {
19413  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19414  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19415  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19416  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19417  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19418  }
19419  }
19420  #endif
19421  #if CYTHON_COMPILING_IN_CPYTHON
19422  {
19423  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19424  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19425  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19426  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19427  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19428  }
19429  }
19430  #endif
19431  #if CYTHON_COMPILING_IN_CPYTHON
19432  {
19433  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19434  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19435  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19436  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19437  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19438  }
19439  }
19440  #endif
19441  #if CYTHON_COMPILING_IN_CPYTHON
19442  {
19443  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19444  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19445  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19446  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19447  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19448  }
19449  }
19450  #endif
19451  #if CYTHON_COMPILING_IN_CPYTHON
19452  {
19453  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19454  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19455  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19456  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19457  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19458  }
19459  }
19460  #endif
19461  #if CYTHON_COMPILING_IN_CPYTHON
19462  {
19463  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19464  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19465  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19466  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19467  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19468  }
19469  }
19470  #endif
19471  #if CYTHON_COMPILING_IN_CPYTHON
19472  {
19473  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19474  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19475  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19476  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19477  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19478  }
19479  }
19480  #endif
19481  #if CYTHON_COMPILING_IN_CPYTHON
19482  {
19483  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19484  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19485  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19486  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19487  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19488  }
19489  }
19490  #endif
19491  #if CYTHON_COMPILING_IN_CPYTHON
19492  {
19493  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19494  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19495  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19496  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19497  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19498  }
19499  }
19500  #endif
19501  #if CYTHON_COMPILING_IN_CPYTHON
19502  {
19503  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19504  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19505  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19506  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19507  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19508  }
19509  }
19510  #endif
19511  #if CYTHON_COMPILING_IN_CPYTHON
19512  {
19513  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19514  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19515  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19516  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19517  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19518  }
19519  }
19520  #endif
19521  #if CYTHON_COMPILING_IN_CPYTHON
19522  {
19523  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19524  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19525  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19526  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19527  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19528  }
19529  }
19530  #endif
19531  #if CYTHON_COMPILING_IN_CPYTHON
19532  {
19533  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19534  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19535  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19536  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19537  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19538  }
19539  }
19540  #endif
19541  #if CYTHON_COMPILING_IN_CPYTHON
19542  {
19543  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19544  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19545  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19546  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19547  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19548  }
19549  }
19550  #endif
19551  #if CYTHON_COMPILING_IN_CPYTHON
19552  {
19553  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19554  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19555  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19556  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19557  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19558  }
19559  }
19560  #endif
19561  #if CYTHON_COMPILING_IN_CPYTHON
19562  {
19563  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19564  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19565  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19566  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19567  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19568  }
19569  }
19570  #endif
19571  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19572  #if CYTHON_COMPILING_IN_CPYTHON
19573  {
19574  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19575  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19576  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19577  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19578  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19579  }
19580  }
19581  #endif
19582  #endif
19583  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19584  #if CYTHON_COMPILING_IN_CPYTHON
19585  {
19586  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19587  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19588  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19589  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19590  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19591  }
19592  }
19593  #endif
19594  #endif
19595  #if CYTHON_COMPILING_IN_CPYTHON
19596  {
19597  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19598  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19599  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19600  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19601  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19602  }
19603  }
19604  #endif
19605  #if CYTHON_COMPILING_IN_CPYTHON
19606  {
19607  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19608  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19609  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19610  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19611  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19612  }
19613  }
19614  #endif
19615  #if CYTHON_COMPILING_IN_CPYTHON
19616  {
19617  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19618  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19619  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19620  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19621  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19622  }
19623  }
19624  #endif
19625  #if CYTHON_COMPILING_IN_CPYTHON
19626  {
19627  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19628  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19629  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19630  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19631  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19632  }
19633  }
19634  #endif
19635  #if CYTHON_COMPILING_IN_CPYTHON
19636  {
19637  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19638  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19639  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19640  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19641  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19642  }
19643  }
19644  #endif
19645  #if CYTHON_COMPILING_IN_CPYTHON
19646  {
19647  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19648  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19649  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19650  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19651  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19652  }
19653  }
19654  #endif
19655  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19656  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19657  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19658  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19659  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
19660  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19661  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)) {
19662  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
19663  }
19664  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19665  __Pyx_RefNannyFinishContext();
19666  return 0;
19667  __pyx_L1_error:;
19668  __Pyx_RefNannyFinishContext();
19669  return -1;
19670 }
19671 
19672 static int __Pyx_modinit_type_import_code(void) {
19673  __Pyx_RefNannyDeclarations
19674  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
19675  /*--- Type import code ---*/
19676  __Pyx_RefNannyFinishContext();
19677  return 0;
19678 }
19679 
19680 static int __Pyx_modinit_variable_import_code(void) {
19681  __Pyx_RefNannyDeclarations
19682  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
19683  /*--- Variable import code ---*/
19684  __Pyx_RefNannyFinishContext();
19685  return 0;
19686 }
19687 
19688 static int __Pyx_modinit_function_import_code(void) {
19689  __Pyx_RefNannyDeclarations
19690  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
19691  /*--- Function import code ---*/
19692  __Pyx_RefNannyFinishContext();
19693  return 0;
19694 }
19695 
19696 
19697 #if PY_MAJOR_VERSION < 3
19698 #ifdef CYTHON_NO_PYINIT_EXPORT
19699 #define __Pyx_PyMODINIT_FUNC void
19700 #else
19701 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19702 #endif
19703 #else
19704 #ifdef CYTHON_NO_PYINIT_EXPORT
19705 #define __Pyx_PyMODINIT_FUNC PyObject *
19706 #else
19707 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19708 #endif
19709 #endif
19710 
19711 
19712 #if PY_MAJOR_VERSION < 3
19713 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
19714 __Pyx_PyMODINIT_FUNC initPyClical(void)
19715 #else
19716 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
19717 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
19718 #if CYTHON_PEP489_MULTI_PHASE_INIT
19719 {
19720  return PyModuleDef_Init(&__pyx_moduledef);
19721 }
19722 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
19723  #if PY_VERSION_HEX >= 0x030700A1
19724  static PY_INT64_T main_interpreter_id = -1;
19725  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
19726  if (main_interpreter_id == -1) {
19727  main_interpreter_id = current_id;
19728  return (unlikely(current_id == -1)) ? -1 : 0;
19729  } else if (unlikely(main_interpreter_id != current_id))
19730  #else
19731  static PyInterpreterState *main_interpreter = NULL;
19732  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
19733  if (!main_interpreter) {
19734  main_interpreter = current_interpreter;
19735  } else if (unlikely(main_interpreter != current_interpreter))
19736  #endif
19737  {
19738  PyErr_SetString(
19739  PyExc_ImportError,
19740  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
19741  return -1;
19742  }
19743  return 0;
19744 }
19745 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) {
19746  PyObject *value = PyObject_GetAttrString(spec, from_name);
19747  int result = 0;
19748  if (likely(value)) {
19749  if (allow_none || value != Py_None) {
19750  result = PyDict_SetItemString(moddict, to_name, value);
19751  }
19752  Py_DECREF(value);
19753  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19754  PyErr_Clear();
19755  } else {
19756  result = -1;
19757  }
19758  return result;
19759 }
19760 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19761  PyObject *module = NULL, *moddict, *modname;
19762  if (__Pyx_check_single_interpreter())
19763  return NULL;
19764  if (__pyx_m)
19765  return __Pyx_NewRef(__pyx_m);
19766  modname = PyObject_GetAttrString(spec, "name");
19767  if (unlikely(!modname)) goto bad;
19768  module = PyModule_NewObject(modname);
19769  Py_DECREF(modname);
19770  if (unlikely(!module)) goto bad;
19771  moddict = PyModule_GetDict(module);
19772  if (unlikely(!moddict)) goto bad;
19773  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
19774  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
19775  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
19776  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
19777  return module;
19778 bad:
19779  Py_XDECREF(module);
19780  return NULL;
19781 }
19782 
19783 
19784 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
19785 #endif
19786 #endif
19787 {
19788  PyObject *__pyx_t_1 = NULL;
19789  PyObject *__pyx_t_2 = NULL;
19790  PyObject *__pyx_t_3 = NULL;
19791  int __pyx_t_4;
19792  __Pyx_RefNannyDeclarations
19793  #if CYTHON_PEP489_MULTI_PHASE_INIT
19794  if (__pyx_m) {
19795  if (__pyx_m == __pyx_pyinit_module) return 0;
19796  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
19797  return -1;
19798  }
19799  #elif PY_MAJOR_VERSION >= 3
19800  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
19801  #endif
19802  #if CYTHON_REFNANNY
19803 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
19804 if (!__Pyx_RefNanny) {
19805  PyErr_Clear();
19806  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
19807  if (!__Pyx_RefNanny)
19808  Py_FatalError("failed to import 'refnanny' module");
19809 }
19810 #endif
19811  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19812  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19813  #ifdef __Pxy_PyFrame_Initialize_Offsets
19814  __Pxy_PyFrame_Initialize_Offsets();
19815  #endif
19816  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
19817  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
19818  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
19819  #ifdef __Pyx_CyFunction_USED
19820  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19821  #endif
19822  #ifdef __Pyx_FusedFunction_USED
19823  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19824  #endif
19825  #ifdef __Pyx_Coroutine_USED
19826  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19827  #endif
19828  #ifdef __Pyx_Generator_USED
19829  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19830  #endif
19831  #ifdef __Pyx_AsyncGen_USED
19832  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19833  #endif
19834  #ifdef __Pyx_StopAsyncIteration_USED
19835  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19836  #endif
19837  /*--- Library function declarations ---*/
19838  /*--- Threads initialization code ---*/
19839  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
19840  #ifdef WITH_THREAD /* Python build with threading support? */
19841  PyEval_InitThreads();
19842  #endif
19843  #endif
19844  /*--- Module creation code ---*/
19845  #if CYTHON_PEP489_MULTI_PHASE_INIT
19846  __pyx_m = __pyx_pyinit_module;
19847  Py_INCREF(__pyx_m);
19848  #else
19849  #if PY_MAJOR_VERSION < 3
19850  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19851  #else
19852  __pyx_m = PyModule_Create(&__pyx_moduledef);
19853  #endif
19854  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
19855  #endif
19856  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
19857  Py_INCREF(__pyx_d);
19858  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
19859  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
19860  #if CYTHON_COMPILING_IN_PYPY
19861  Py_INCREF(__pyx_b);
19862  #endif
19863  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19864  /*--- Initialize various global constants etc. ---*/
19865  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19866  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
19867  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19868  #endif
19869  if (__pyx_module_is_main_PyClical) {
19870  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19871  }
19872  #if PY_MAJOR_VERSION >= 3
19873  {
19874  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
19875  if (!PyDict_GetItemString(modules, "PyClical")) {
19876  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
19877  }
19878  }
19879  #endif
19880  /*--- Builtin init code ---*/
19881  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19882  /*--- Constants init code ---*/
19883  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19884  /*--- Global type/function init code ---*/
19885  (void)__Pyx_modinit_global_init_code();
19886  (void)__Pyx_modinit_variable_export_code();
19887  (void)__Pyx_modinit_function_export_code();
19888  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
19889  (void)__Pyx_modinit_type_import_code();
19890  (void)__Pyx_modinit_variable_import_code();
19891  (void)__Pyx_modinit_function_import_code();
19892  /*--- Execution code ---*/
19893  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
19894  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19895  #endif
19896 
19897  /* "PyClical.pyx":28
19898  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
19899  *
19900  * import math # <<<<<<<<<<<<<<
19901  * import numbers
19902  * import collections
19903  */
19904  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
19905  __Pyx_GOTREF(__pyx_t_1);
19906  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
19907  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19908 
19909  /* "PyClical.pyx":29
19910  *
19911  * import math
19912  * import numbers # <<<<<<<<<<<<<<
19913  * import collections
19914  *
19915  */
19916  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
19917  __Pyx_GOTREF(__pyx_t_1);
19918  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
19919  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19920 
19921  /* "PyClical.pyx":30
19922  * import math
19923  * import numbers
19924  * import collections # <<<<<<<<<<<<<<
19925  *
19926  * __version__ = "0.8.2"
19927  */
19928  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
19929  __Pyx_GOTREF(__pyx_t_1);
19930  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
19931  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19932 
19933  /* "PyClical.pyx":32
19934  * import collections
19935  *
19936  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
19937  *
19938  * from PyClical cimport *
19939  */
19940  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
19941 
19942  /* "PyClical.pyx":404
19943  * return index_set_to_str( self.unwrap() ).c_str()
19944  *
19945  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19946  * """
19947  * Tests for functions that Doctest cannot see.
19948  */
19949  __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)
19950  __Pyx_GOTREF(__pyx_t_1);
19951  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
19952  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19953 
19954  /* "PyClical.pyx":1243
19955  * return clifford_to_str( self.unwrap() ).c_str()
19956  *
19957  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19958  * """
19959  * Tests for functions that Doctest cannot see.
19960  */
19961  __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)
19962  __Pyx_GOTREF(__pyx_t_1);
19963  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
19964  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19965 
19966  /* "PyClical.pyx":1856
19967  *
19968  * # Some abbreviations.
19969  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19970  * pi = tau / 2.0
19971  *
19972  */
19973  __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)
19974  __Pyx_GOTREF(__pyx_t_1);
19975  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
19976  __Pyx_GOTREF(__pyx_t_2);
19977  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19978  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
19979  __Pyx_GOTREF(__pyx_t_1);
19980  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19981  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
19982  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19983 
19984  /* "PyClical.pyx":1857
19985  * # Some abbreviations.
19986  * tau = atan(clifford(1.0)) * 8.0
19987  * pi = tau / 2.0 # <<<<<<<<<<<<<<
19988  *
19989  * cl = clifford
19990  */
19991  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
19992  __Pyx_GOTREF(__pyx_t_1);
19993  __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)
19994  __Pyx_GOTREF(__pyx_t_2);
19995  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19996  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
19997  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19998 
19999  /* "PyClical.pyx":1859
20000  * pi = tau / 2.0
20001  *
20002  * cl = clifford # <<<<<<<<<<<<<<
20003  * """
20004  * Abbreviation for clifford.
20005  */
20006  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20007 
20008  /* "PyClical.pyx":1879
20009  * """
20010  *
20011  * ist = index_set # <<<<<<<<<<<<<<
20012  * """
20013  * Abbreviation for index_set.
20014  */
20015  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20016 
20017  /* "PyClical.pyx":1887
20018  * """
20019  *
20020  * def e(obj): # <<<<<<<<<<<<<<
20021  * """
20022  * Abbreviation for clifford(index_set(obj)).
20023  */
20024  __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)
20025  __Pyx_GOTREF(__pyx_t_2);
20026  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20027  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20028 
20029  /* "PyClical.pyx":1900
20030  * return clifford(index_set(obj))
20031  *
20032  * def istpq(p, q): # <<<<<<<<<<<<<<
20033  * """
20034  * Abbreviation for index_set({-q,...p}).
20035  */
20036  __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)
20037  __Pyx_GOTREF(__pyx_t_2);
20038  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20039  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20040 
20041  /* "PyClical.pyx":1909
20042  * return index_set(set(range(-q,p+1)))
20043  *
20044  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20045  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20046  *
20047  */
20048  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20049  __Pyx_GOTREF(__pyx_t_2);
20050  __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)
20051  __Pyx_GOTREF(__pyx_t_1);
20052  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20053  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20054  __Pyx_GOTREF(__pyx_t_2);
20055  __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)
20056  __Pyx_GOTREF(__pyx_t_3);
20057  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20058  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20059  __Pyx_GOTREF(__pyx_t_2);
20060  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20061  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20062  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20063  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20064 
20065  /* "PyClical.pyx":1910
20066  *
20067  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20068  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20069  *
20070  * # Doctest interface.
20071  */
20072  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20073  __Pyx_GOTREF(__pyx_t_2);
20074  __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)
20075  __Pyx_GOTREF(__pyx_t_3);
20076  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20077  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20078  __Pyx_GOTREF(__pyx_t_2);
20079  __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)
20080  __Pyx_GOTREF(__pyx_t_1);
20081  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20082  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20083  __Pyx_GOTREF(__pyx_t_2);
20084  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20085  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20086  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20087  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20088 
20089  /* "PyClical.pyx":1913
20090  *
20091  * # Doctest interface.
20092  * def _test(): # <<<<<<<<<<<<<<
20093  * import PyClical, doctest
20094  * return doctest.testmod(PyClical)
20095  */
20096  __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)
20097  __Pyx_GOTREF(__pyx_t_2);
20098  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20099  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20100 
20101  /* "PyClical.pyx":1917
20102  * return doctest.testmod(PyClical)
20103  *
20104  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20105  * _test()
20106  */
20107  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20108  __Pyx_GOTREF(__pyx_t_2);
20109  __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)
20110  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20111  if (__pyx_t_4) {
20112 
20113  /* "PyClical.pyx":1918
20114  *
20115  * if __name__ == "__main__":
20116  * _test() # <<<<<<<<<<<<<<
20117  */
20118  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20119  __Pyx_GOTREF(__pyx_t_2);
20120  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20121  __Pyx_GOTREF(__pyx_t_1);
20122  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20123  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20124 
20125  /* "PyClical.pyx":1917
20126  * return doctest.testmod(PyClical)
20127  *
20128  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20129  * _test()
20130  */
20131  }
20132 
20133  /* "PyClical.pyx":1
20134  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20135  * # distutils: language = c++
20136  * #
20137  */
20138  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20139  __Pyx_GOTREF(__pyx_t_1);
20140  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)
20141  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)
20142  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)
20143  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)
20144  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)
20145  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)
20146  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)
20147  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)
20148  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)
20149  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)
20150  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)
20151  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)
20152  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)
20153  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)
20154  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)
20155  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)
20156  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)
20157  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)
20158  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)
20159  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)
20160  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)
20161  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)
20162  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)
20163  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)
20164  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)
20165  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)
20166  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)
20167  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)
20168  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)
20169  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)
20170  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)
20171  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)
20172  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)
20173  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)
20174  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)
20175  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)
20176  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)
20177  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)
20178  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)
20179  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)
20180  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)
20181  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)
20182  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)
20183  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)
20184  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)
20185  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)
20186  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)
20187  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)
20188  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)
20189  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)
20190  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)
20191  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)
20192  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)
20193  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)
20194  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)
20195  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)
20196  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)
20197  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)
20198  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)
20199  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)
20200  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)
20201  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)
20202  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)
20203  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)
20204  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)
20205  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)
20206  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)
20207  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)
20208  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)
20209  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)
20210  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)
20211  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)
20212  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)
20213  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)
20214  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)
20215  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)
20216  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)
20217  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)
20218  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)
20219  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)
20220  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)
20221  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)
20222  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)
20223  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)
20224  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)
20225  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)
20226  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)
20227  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)
20228  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)
20229  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)
20230  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)
20231  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)
20232  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)
20233  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)
20234  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)
20235  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)
20236  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)
20237  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)
20238  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)
20239  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)
20240  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)
20241  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)
20242  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)
20243  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)
20244  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)
20245  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)
20246  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)
20247  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20248  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20249 
20250  /*--- Wrapped vars code ---*/
20251 
20252  goto __pyx_L0;
20253  __pyx_L1_error:;
20254  __Pyx_XDECREF(__pyx_t_1);
20255  __Pyx_XDECREF(__pyx_t_2);
20256  __Pyx_XDECREF(__pyx_t_3);
20257  if (__pyx_m) {
20258  if (__pyx_d) {
20259  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20260  }
20261  Py_CLEAR(__pyx_m);
20262  } else if (!PyErr_Occurred()) {
20263  PyErr_SetString(PyExc_ImportError, "init PyClical");
20264  }
20265  __pyx_L0:;
20266  __Pyx_RefNannyFinishContext();
20267  #if CYTHON_PEP489_MULTI_PHASE_INIT
20268  return (__pyx_m != NULL) ? 0 : -1;
20269  #elif PY_MAJOR_VERSION >= 3
20270  return __pyx_m;
20271  #else
20272  return;
20273  #endif
20274 }
20275 
20276 /* --- Runtime support code --- */
20277 /* Refnanny */
20278 #if CYTHON_REFNANNY
20279 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20280  PyObject *m = NULL, *p = NULL;
20281  void *r = NULL;
20282  m = PyImport_ImportModule(modname);
20283  if (!m) goto end;
20284  p = PyObject_GetAttrString(m, "RefNannyAPI");
20285  if (!p) goto end;
20286  r = PyLong_AsVoidPtr(p);
20287 end:
20288  Py_XDECREF(p);
20289  Py_XDECREF(m);
20290  return (__Pyx_RefNannyAPIStruct *)r;
20291 }
20292 #endif
20293 
20294 /* PyObjectGetAttrStr */
20295 #if CYTHON_USE_TYPE_SLOTS
20296 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20297  PyTypeObject* tp = Py_TYPE(obj);
20298  if (likely(tp->tp_getattro))
20299  return tp->tp_getattro(obj, attr_name);
20300 #if PY_MAJOR_VERSION < 3
20301  if (likely(tp->tp_getattr))
20302  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20303 #endif
20304  return PyObject_GetAttr(obj, attr_name);
20305 }
20306 #endif
20307 
20308 /* GetBuiltinName */
20309 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20310  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20311  if (unlikely(!result)) {
20312  PyErr_Format(PyExc_NameError,
20313 #if PY_MAJOR_VERSION >= 3
20314  "name '%U' is not defined", name);
20315 #else
20316  "name '%.200s' is not defined", PyString_AS_STRING(name));
20317 #endif
20318  }
20319  return result;
20320 }
20321 
20322 /* PyCFunctionFastCall */
20323 #if CYTHON_FAST_PYCCALL
20324 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20325  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20326  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20327  PyObject *self = PyCFunction_GET_SELF(func);
20328  int flags = PyCFunction_GET_FLAGS(func);
20329  assert(PyCFunction_Check(func));
20330  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
20331  assert(nargs >= 0);
20332  assert(nargs == 0 || args != NULL);
20333  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20334  because it may clear it (directly or indirectly) and so the
20335  caller loses its exception */
20336  assert(!PyErr_Occurred());
20337  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20338  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
20339  } else {
20340  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
20341  }
20342 }
20343 #endif
20344 
20345 /* PyFunctionFastCall */
20346 #if CYTHON_FAST_PYCALL
20347 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20348  PyObject *globals) {
20349  PyFrameObject *f;
20350  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20351  PyObject **fastlocals;
20352  Py_ssize_t i;
20353  PyObject *result;
20354  assert(globals != NULL);
20355  /* XXX Perhaps we should create a specialized
20356  PyFrame_New() that doesn't take locals, but does
20357  take builtins without sanity checking them.
20358  */
20359  assert(tstate != NULL);
20360  f = PyFrame_New(tstate, co, globals, NULL);
20361  if (f == NULL) {
20362  return NULL;
20363  }
20364  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
20365  for (i = 0; i < na; i++) {
20366  Py_INCREF(*args);
20367  fastlocals[i] = *args++;
20368  }
20369  result = PyEval_EvalFrameEx(f,0);
20370  ++tstate->recursion_depth;
20371  Py_DECREF(f);
20372  --tstate->recursion_depth;
20373  return result;
20374 }
20375 #if 1 || PY_VERSION_HEX < 0x030600B1
20376 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
20377  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20378  PyObject *globals = PyFunction_GET_GLOBALS(func);
20379  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20380  PyObject *closure;
20381 #if PY_MAJOR_VERSION >= 3
20382  PyObject *kwdefs;
20383 #endif
20384  PyObject *kwtuple, **k;
20385  PyObject **d;
20386  Py_ssize_t nd;
20387  Py_ssize_t nk;
20388  PyObject *result;
20389  assert(kwargs == NULL || PyDict_Check(kwargs));
20390  nk = kwargs ? PyDict_Size(kwargs) : 0;
20391  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20392  return NULL;
20393  }
20394  if (
20395 #if PY_MAJOR_VERSION >= 3
20396  co->co_kwonlyargcount == 0 &&
20397 #endif
20398  likely(kwargs == NULL || nk == 0) &&
20399  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20400  if (argdefs == NULL && co->co_argcount == nargs) {
20401  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20402  goto done;
20403  }
20404  else if (nargs == 0 && argdefs != NULL
20405  && co->co_argcount == Py_SIZE(argdefs)) {
20406  /* function called with no arguments, but all parameters have
20407  a default value: use default values as arguments .*/
20408  args = &PyTuple_GET_ITEM(argdefs, 0);
20409  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20410  goto done;
20411  }
20412  }
20413  if (kwargs != NULL) {
20414  Py_ssize_t pos, i;
20415  kwtuple = PyTuple_New(2 * nk);
20416  if (kwtuple == NULL) {
20417  result = NULL;
20418  goto done;
20419  }
20420  k = &PyTuple_GET_ITEM(kwtuple, 0);
20421  pos = i = 0;
20422  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20423  Py_INCREF(k[i]);
20424  Py_INCREF(k[i+1]);
20425  i += 2;
20426  }
20427  nk = i / 2;
20428  }
20429  else {
20430  kwtuple = NULL;
20431  k = NULL;
20432  }
20433  closure = PyFunction_GET_CLOSURE(func);
20434 #if PY_MAJOR_VERSION >= 3
20435  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20436 #endif
20437  if (argdefs != NULL) {
20438  d = &PyTuple_GET_ITEM(argdefs, 0);
20439  nd = Py_SIZE(argdefs);
20440  }
20441  else {
20442  d = NULL;
20443  nd = 0;
20444  }
20445 #if PY_MAJOR_VERSION >= 3
20446  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20447  args, nargs,
20448  k, (int)nk,
20449  d, (int)nd, kwdefs, closure);
20450 #else
20451  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20452  args, nargs,
20453  k, (int)nk,
20454  d, (int)nd, closure);
20455 #endif
20456  Py_XDECREF(kwtuple);
20457 done:
20458  Py_LeaveRecursiveCall();
20459  return result;
20460 }
20461 #endif
20462 #endif
20463 
20464 /* PyObjectCall */
20465 #if CYTHON_COMPILING_IN_CPYTHON
20466 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20467  PyObject *result;
20468  ternaryfunc call = func->ob_type->tp_call;
20469  if (unlikely(!call))
20470  return PyObject_Call(func, arg, kw);
20471  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20472  return NULL;
20473  result = (*call)(func, arg, kw);
20474  Py_LeaveRecursiveCall();
20475  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20476  PyErr_SetString(
20477  PyExc_SystemError,
20478  "NULL result without error in PyObject_Call");
20479  }
20480  return result;
20481 }
20482 #endif
20483 
20484 /* PyObjectCallMethO */
20485 #if CYTHON_COMPILING_IN_CPYTHON
20486 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20487  PyObject *self, *result;
20488  PyCFunction cfunc;
20489  cfunc = PyCFunction_GET_FUNCTION(func);
20490  self = PyCFunction_GET_SELF(func);
20491  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20492  return NULL;
20493  result = cfunc(self, arg);
20494  Py_LeaveRecursiveCall();
20495  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20496  PyErr_SetString(
20497  PyExc_SystemError,
20498  "NULL result without error in PyObject_Call");
20499  }
20500  return result;
20501 }
20502 #endif
20503 
20504 /* PyObjectCallOneArg */
20505 #if CYTHON_COMPILING_IN_CPYTHON
20506 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20507  PyObject *result;
20508  PyObject *args = PyTuple_New(1);
20509  if (unlikely(!args)) return NULL;
20510  Py_INCREF(arg);
20511  PyTuple_SET_ITEM(args, 0, arg);
20512  result = __Pyx_PyObject_Call(func, args, NULL);
20513  Py_DECREF(args);
20514  return result;
20515 }
20516 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20517 #if CYTHON_FAST_PYCALL
20518  if (PyFunction_Check(func)) {
20519  return __Pyx_PyFunction_FastCall(func, &arg, 1);
20520  }
20521 #endif
20522  if (likely(PyCFunction_Check(func))) {
20523  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20524  return __Pyx_PyObject_CallMethO(func, arg);
20525 #if CYTHON_FAST_PYCCALL
20526  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
20527  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
20528 #endif
20529  }
20530  }
20531  return __Pyx__PyObject_CallOneArg(func, arg);
20532 }
20533 #else
20534 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20535  PyObject *result;
20536  PyObject *args = PyTuple_Pack(1, arg);
20537  if (unlikely(!args)) return NULL;
20538  result = __Pyx_PyObject_Call(func, args, NULL);
20539  Py_DECREF(args);
20540  return result;
20541 }
20542 #endif
20543 
20544 /* PyErrFetchRestore */
20545 #if CYTHON_FAST_THREAD_STATE
20546 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20547  PyObject *tmp_type, *tmp_value, *tmp_tb;
20548  tmp_type = tstate->curexc_type;
20549  tmp_value = tstate->curexc_value;
20550  tmp_tb = tstate->curexc_traceback;
20551  tstate->curexc_type = type;
20552  tstate->curexc_value = value;
20553  tstate->curexc_traceback = tb;
20554  Py_XDECREF(tmp_type);
20555  Py_XDECREF(tmp_value);
20556  Py_XDECREF(tmp_tb);
20557 }
20558 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20559  *type = tstate->curexc_type;
20560  *value = tstate->curexc_value;
20561  *tb = tstate->curexc_traceback;
20562  tstate->curexc_type = 0;
20563  tstate->curexc_value = 0;
20564  tstate->curexc_traceback = 0;
20565 }
20566 #endif
20567 
20568 /* WriteUnraisableException */
20569 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20570  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20571  int full_traceback, CYTHON_UNUSED int nogil) {
20572  PyObject *old_exc, *old_val, *old_tb;
20573  PyObject *ctx;
20574  __Pyx_PyThreadState_declare
20575 #ifdef WITH_THREAD
20576  PyGILState_STATE state;
20577  if (nogil)
20578  state = PyGILState_Ensure();
20579 #ifdef _MSC_VER
20580  else state = (PyGILState_STATE)-1;
20581 #endif
20582 #endif
20583  __Pyx_PyThreadState_assign
20584  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20585  if (full_traceback) {
20586  Py_XINCREF(old_exc);
20587  Py_XINCREF(old_val);
20588  Py_XINCREF(old_tb);
20589  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20590  PyErr_PrintEx(1);
20591  }
20592  #if PY_MAJOR_VERSION < 3
20593  ctx = PyString_FromString(name);
20594  #else
20595  ctx = PyUnicode_FromString(name);
20596  #endif
20597  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20598  if (!ctx) {
20599  PyErr_WriteUnraisable(Py_None);
20600  } else {
20601  PyErr_WriteUnraisable(ctx);
20602  Py_DECREF(ctx);
20603  }
20604 #ifdef WITH_THREAD
20605  if (nogil)
20606  PyGILState_Release(state);
20607 #endif
20608 }
20609 
20610 /* PyDictVersioning */
20611 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
20612 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
20613  PyObject *dict = Py_TYPE(obj)->tp_dict;
20614  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
20615 }
20616 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
20617  PyObject **dictptr = NULL;
20618  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
20619  if (offset) {
20620 #if CYTHON_COMPILING_IN_CPYTHON
20621  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
20622 #else
20623  dictptr = _PyObject_GetDictPtr(obj);
20624 #endif
20625  }
20626  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
20627 }
20628 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
20629  PyObject *dict = Py_TYPE(obj)->tp_dict;
20630  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
20631  return 0;
20632  return obj_dict_version == __Pyx_get_object_dict_version(obj);
20633 }
20634 #endif
20635 
20636 /* PyObjectCallNoArg */
20637 #if CYTHON_COMPILING_IN_CPYTHON
20638 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20639 #if CYTHON_FAST_PYCALL
20640  if (PyFunction_Check(func)) {
20641  return __Pyx_PyFunction_FastCall(func, NULL, 0);
20642  }
20643 #endif
20644 #ifdef __Pyx_CyFunction_USED
20645  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
20646 #else
20647  if (likely(PyCFunction_Check(func)))
20648 #endif
20649  {
20650  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20651  return __Pyx_PyObject_CallMethO(func, NULL);
20652  }
20653  }
20654  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20655 }
20656 #endif
20657 
20658 /* RaiseDoubleKeywords */
20659 static void __Pyx_RaiseDoubleKeywordsError(
20660  const char* func_name,
20661  PyObject* kw_name)
20662 {
20663  PyErr_Format(PyExc_TypeError,
20664  #if PY_MAJOR_VERSION >= 3
20665  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20666  #else
20667  "%s() got multiple values for keyword argument '%s'", func_name,
20668  PyString_AsString(kw_name));
20669  #endif
20670 }
20671 
20672 /* ParseKeywords */
20673 static int __Pyx_ParseOptionalKeywords(
20674  PyObject *kwds,
20675  PyObject **argnames[],
20676  PyObject *kwds2,
20677  PyObject *values[],
20678  Py_ssize_t num_pos_args,
20679  const char* function_name)
20680 {
20681  PyObject *key = 0, *value = 0;
20682  Py_ssize_t pos = 0;
20683  PyObject*** name;
20684  PyObject*** first_kw_arg = argnames + num_pos_args;
20685  while (PyDict_Next(kwds, &pos, &key, &value)) {
20686  name = first_kw_arg;
20687  while (*name && (**name != key)) name++;
20688  if (*name) {
20689  values[name-argnames] = value;
20690  continue;
20691  }
20692  name = first_kw_arg;
20693  #if PY_MAJOR_VERSION < 3
20694  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20695  while (*name) {
20696  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20697  && _PyString_Eq(**name, key)) {
20698  values[name-argnames] = value;
20699  break;
20700  }
20701  name++;
20702  }
20703  if (*name) continue;
20704  else {
20705  PyObject*** argname = argnames;
20706  while (argname != first_kw_arg) {
20707  if ((**argname == key) || (
20708  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20709  && _PyString_Eq(**argname, key))) {
20710  goto arg_passed_twice;
20711  }
20712  argname++;
20713  }
20714  }
20715  } else
20716  #endif
20717  if (likely(PyUnicode_Check(key))) {
20718  while (*name) {
20719  int cmp = (**name == key) ? 0 :
20720  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20721  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20722  #endif
20723  PyUnicode_Compare(**name, key);
20724  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20725  if (cmp == 0) {
20726  values[name-argnames] = value;
20727  break;
20728  }
20729  name++;
20730  }
20731  if (*name) continue;
20732  else {
20733  PyObject*** argname = argnames;
20734  while (argname != first_kw_arg) {
20735  int cmp = (**argname == key) ? 0 :
20736  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20737  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20738  #endif
20739  PyUnicode_Compare(**argname, key);
20740  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20741  if (cmp == 0) goto arg_passed_twice;
20742  argname++;
20743  }
20744  }
20745  } else
20746  goto invalid_keyword_type;
20747  if (kwds2) {
20748  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
20749  } else {
20750  goto invalid_keyword;
20751  }
20752  }
20753  return 0;
20754 arg_passed_twice:
20755  __Pyx_RaiseDoubleKeywordsError(function_name, key);
20756  goto bad;
20757 invalid_keyword_type:
20758  PyErr_Format(PyExc_TypeError,
20759  "%.200s() keywords must be strings", function_name);
20760  goto bad;
20761 invalid_keyword:
20762  PyErr_Format(PyExc_TypeError,
20763  #if PY_MAJOR_VERSION < 3
20764  "%.200s() got an unexpected keyword argument '%.200s'",
20765  function_name, PyString_AsString(key));
20766  #else
20767  "%s() got an unexpected keyword argument '%U'",
20768  function_name, key);
20769  #endif
20770 bad:
20771  return -1;
20772 }
20773 
20774 /* RaiseArgTupleInvalid */
20775 static void __Pyx_RaiseArgtupleInvalid(
20776  const char* func_name,
20777  int exact,
20778  Py_ssize_t num_min,
20779  Py_ssize_t num_max,
20780  Py_ssize_t num_found)
20781 {
20782  Py_ssize_t num_expected;
20783  const char *more_or_less;
20784  if (num_found < num_min) {
20785  num_expected = num_min;
20786  more_or_less = "at least";
20787  } else {
20788  num_expected = num_max;
20789  more_or_less = "at most";
20790  }
20791  if (exact) {
20792  more_or_less = "exactly";
20793  }
20794  PyErr_Format(PyExc_TypeError,
20795  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
20796  func_name, more_or_less, num_expected,
20797  (num_expected == 1) ? "" : "s", num_found);
20798 }
20799 
20800 /* GetModuleGlobalName */
20801 #if CYTHON_USE_DICT_VERSIONS
20802 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
20803 #else
20804 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
20805 #endif
20806 {
20807  PyObject *result;
20808 #if !CYTHON_AVOID_BORROWED_REFS
20809 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
20810  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
20811  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20812  if (likely(result)) {
20813  return __Pyx_NewRef(result);
20814  } else if (unlikely(PyErr_Occurred())) {
20815  return NULL;
20816  }
20817 #else
20818  result = PyDict_GetItem(__pyx_d, name);
20819  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20820  if (likely(result)) {
20821  return __Pyx_NewRef(result);
20822  }
20823 #endif
20824 #else
20825  result = PyObject_GetItem(__pyx_d, name);
20826  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20827  if (likely(result)) {
20828  return __Pyx_NewRef(result);
20829  }
20830  PyErr_Clear();
20831 #endif
20832  return __Pyx_GetBuiltinName(name);
20833 }
20834 
20835 /* GetTopmostException */
20836 #if CYTHON_USE_EXC_INFO_STACK
20837 static _PyErr_StackItem *
20838 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
20839 {
20840  _PyErr_StackItem *exc_info = tstate->exc_info;
20841  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
20842  exc_info->previous_item != NULL)
20843  {
20844  exc_info = exc_info->previous_item;
20845  }
20846  return exc_info;
20847 }
20848 #endif
20849 
20850 /* SaveResetException */
20851 #if CYTHON_FAST_THREAD_STATE
20852 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20853  #if CYTHON_USE_EXC_INFO_STACK
20854  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
20855  *type = exc_info->exc_type;
20856  *value = exc_info->exc_value;
20857  *tb = exc_info->exc_traceback;
20858  #else
20859  *type = tstate->exc_type;
20860  *value = tstate->exc_value;
20861  *tb = tstate->exc_traceback;
20862  #endif
20863  Py_XINCREF(*type);
20864  Py_XINCREF(*value);
20865  Py_XINCREF(*tb);
20866 }
20867 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20868  PyObject *tmp_type, *tmp_value, *tmp_tb;
20869  #if CYTHON_USE_EXC_INFO_STACK
20870  _PyErr_StackItem *exc_info = tstate->exc_info;
20871  tmp_type = exc_info->exc_type;
20872  tmp_value = exc_info->exc_value;
20873  tmp_tb = exc_info->exc_traceback;
20874  exc_info->exc_type = type;
20875  exc_info->exc_value = value;
20876  exc_info->exc_traceback = tb;
20877  #else
20878  tmp_type = tstate->exc_type;
20879  tmp_value = tstate->exc_value;
20880  tmp_tb = tstate->exc_traceback;
20881  tstate->exc_type = type;
20882  tstate->exc_value = value;
20883  tstate->exc_traceback = tb;
20884  #endif
20885  Py_XDECREF(tmp_type);
20886  Py_XDECREF(tmp_value);
20887  Py_XDECREF(tmp_tb);
20888 }
20889 #endif
20890 
20891 /* PyErrExceptionMatches */
20892 #if CYTHON_FAST_THREAD_STATE
20893 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
20894  Py_ssize_t i, n;
20895  n = PyTuple_GET_SIZE(tuple);
20896 #if PY_MAJOR_VERSION >= 3
20897  for (i=0; i<n; i++) {
20898  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
20899  }
20900 #endif
20901  for (i=0; i<n; i++) {
20902  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
20903  }
20904  return 0;
20905 }
20906 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
20907  PyObject *exc_type = tstate->curexc_type;
20908  if (exc_type == err) return 1;
20909  if (unlikely(!exc_type)) return 0;
20910  if (unlikely(PyTuple_Check(err)))
20911  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
20912  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
20913 }
20914 #endif
20915 
20916 /* GetException */
20917 #if CYTHON_FAST_THREAD_STATE
20918 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
20919 #else
20920 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
20921 #endif
20922 {
20923  PyObject *local_type, *local_value, *local_tb;
20924 #if CYTHON_FAST_THREAD_STATE
20925  PyObject *tmp_type, *tmp_value, *tmp_tb;
20926  local_type = tstate->curexc_type;
20927  local_value = tstate->curexc_value;
20928  local_tb = tstate->curexc_traceback;
20929  tstate->curexc_type = 0;
20930  tstate->curexc_value = 0;
20931  tstate->curexc_traceback = 0;
20932 #else
20933  PyErr_Fetch(&local_type, &local_value, &local_tb);
20934 #endif
20935  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20936 #if CYTHON_FAST_THREAD_STATE
20937  if (unlikely(tstate->curexc_type))
20938 #else
20939  if (unlikely(PyErr_Occurred()))
20940 #endif
20941  goto bad;
20942  #if PY_MAJOR_VERSION >= 3
20943  if (local_tb) {
20944  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20945  goto bad;
20946  }
20947  #endif
20948  Py_XINCREF(local_tb);
20949  Py_XINCREF(local_type);
20950  Py_XINCREF(local_value);
20951  *type = local_type;
20952  *value = local_value;
20953  *tb = local_tb;
20954 #if CYTHON_FAST_THREAD_STATE
20955  #if CYTHON_USE_EXC_INFO_STACK
20956  {
20957  _PyErr_StackItem *exc_info = tstate->exc_info;
20958  tmp_type = exc_info->exc_type;
20959  tmp_value = exc_info->exc_value;
20960  tmp_tb = exc_info->exc_traceback;
20961  exc_info->exc_type = local_type;
20962  exc_info->exc_value = local_value;
20963  exc_info->exc_traceback = local_tb;
20964  }
20965  #else
20966  tmp_type = tstate->exc_type;
20967  tmp_value = tstate->exc_value;
20968  tmp_tb = tstate->exc_traceback;
20969  tstate->exc_type = local_type;
20970  tstate->exc_value = local_value;
20971  tstate->exc_traceback = local_tb;
20972  #endif
20973  Py_XDECREF(tmp_type);
20974  Py_XDECREF(tmp_value);
20975  Py_XDECREF(tmp_tb);
20976 #else
20977  PyErr_SetExcInfo(local_type, local_value, local_tb);
20978 #endif
20979  return 0;
20980 bad:
20981  *type = 0;
20982  *value = 0;
20983  *tb = 0;
20984  Py_XDECREF(local_type);
20985  Py_XDECREF(local_value);
20986  Py_XDECREF(local_tb);
20987  return -1;
20988 }
20989 
20990 /* RaiseException */
20991 #if PY_MAJOR_VERSION < 3
20992 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
20993  CYTHON_UNUSED PyObject *cause) {
20994  __Pyx_PyThreadState_declare
20995  Py_XINCREF(type);
20996  if (!value || value == Py_None)
20997  value = NULL;
20998  else
20999  Py_INCREF(value);
21000  if (!tb || tb == Py_None)
21001  tb = NULL;
21002  else {
21003  Py_INCREF(tb);
21004  if (!PyTraceBack_Check(tb)) {
21005  PyErr_SetString(PyExc_TypeError,
21006  "raise: arg 3 must be a traceback or None");
21007  goto raise_error;
21008  }
21009  }
21010  if (PyType_Check(type)) {
21011 #if CYTHON_COMPILING_IN_PYPY
21012  if (!value) {
21013  Py_INCREF(Py_None);
21014  value = Py_None;
21015  }
21016 #endif
21017  PyErr_NormalizeException(&type, &value, &tb);
21018  } else {
21019  if (value) {
21020  PyErr_SetString(PyExc_TypeError,
21021  "instance exception may not have a separate value");
21022  goto raise_error;
21023  }
21024  value = type;
21025  type = (PyObject*) Py_TYPE(type);
21026  Py_INCREF(type);
21027  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21028  PyErr_SetString(PyExc_TypeError,
21029  "raise: exception class must be a subclass of BaseException");
21030  goto raise_error;
21031  }
21032  }
21033  __Pyx_PyThreadState_assign
21034  __Pyx_ErrRestore(type, value, tb);
21035  return;
21036 raise_error:
21037  Py_XDECREF(value);
21038  Py_XDECREF(type);
21039  Py_XDECREF(tb);
21040  return;
21041 }
21042 #else
21043 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21044  PyObject* owned_instance = NULL;
21045  if (tb == Py_None) {
21046  tb = 0;
21047  } else if (tb && !PyTraceBack_Check(tb)) {
21048  PyErr_SetString(PyExc_TypeError,
21049  "raise: arg 3 must be a traceback or None");
21050  goto bad;
21051  }
21052  if (value == Py_None)
21053  value = 0;
21054  if (PyExceptionInstance_Check(type)) {
21055  if (value) {
21056  PyErr_SetString(PyExc_TypeError,
21057  "instance exception may not have a separate value");
21058  goto bad;
21059  }
21060  value = type;
21061  type = (PyObject*) Py_TYPE(value);
21062  } else if (PyExceptionClass_Check(type)) {
21063  PyObject *instance_class = NULL;
21064  if (value && PyExceptionInstance_Check(value)) {
21065  instance_class = (PyObject*) Py_TYPE(value);
21066  if (instance_class != type) {
21067  int is_subclass = PyObject_IsSubclass(instance_class, type);
21068  if (!is_subclass) {
21069  instance_class = NULL;
21070  } else if (unlikely(is_subclass == -1)) {
21071  goto bad;
21072  } else {
21073  type = instance_class;
21074  }
21075  }
21076  }
21077  if (!instance_class) {
21078  PyObject *args;
21079  if (!value)
21080  args = PyTuple_New(0);
21081  else if (PyTuple_Check(value)) {
21082  Py_INCREF(value);
21083  args = value;
21084  } else
21085  args = PyTuple_Pack(1, value);
21086  if (!args)
21087  goto bad;
21088  owned_instance = PyObject_Call(type, args, NULL);
21089  Py_DECREF(args);
21090  if (!owned_instance)
21091  goto bad;
21092  value = owned_instance;
21093  if (!PyExceptionInstance_Check(value)) {
21094  PyErr_Format(PyExc_TypeError,
21095  "calling %R should have returned an instance of "
21096  "BaseException, not %R",
21097  type, Py_TYPE(value));
21098  goto bad;
21099  }
21100  }
21101  } else {
21102  PyErr_SetString(PyExc_TypeError,
21103  "raise: exception class must be a subclass of BaseException");
21104  goto bad;
21105  }
21106  if (cause) {
21107  PyObject *fixed_cause;
21108  if (cause == Py_None) {
21109  fixed_cause = NULL;
21110  } else if (PyExceptionClass_Check(cause)) {
21111  fixed_cause = PyObject_CallObject(cause, NULL);
21112  if (fixed_cause == NULL)
21113  goto bad;
21114  } else if (PyExceptionInstance_Check(cause)) {
21115  fixed_cause = cause;
21116  Py_INCREF(fixed_cause);
21117  } else {
21118  PyErr_SetString(PyExc_TypeError,
21119  "exception causes must derive from "
21120  "BaseException");
21121  goto bad;
21122  }
21123  PyException_SetCause(value, fixed_cause);
21124  }
21125  PyErr_SetObject(type, value);
21126  if (tb) {
21127 #if CYTHON_COMPILING_IN_PYPY
21128  PyObject *tmp_type, *tmp_value, *tmp_tb;
21129  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21130  Py_INCREF(tb);
21131  PyErr_Restore(tmp_type, tmp_value, tb);
21132  Py_XDECREF(tmp_tb);
21133 #else
21134  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21135  PyObject* tmp_tb = tstate->curexc_traceback;
21136  if (tb != tmp_tb) {
21137  Py_INCREF(tb);
21138  tstate->curexc_traceback = tb;
21139  Py_XDECREF(tmp_tb);
21140  }
21141 #endif
21142  }
21143 bad:
21144  Py_XDECREF(owned_instance);
21145  return;
21146 }
21147 #endif
21148 
21149 /* PyIntBinop */
21150 #if !CYTHON_COMPILING_IN_PYPY
21151 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
21152  (void)inplace;
21153  (void)zerodivision_check;
21154  #if PY_MAJOR_VERSION < 3
21155  if (likely(PyInt_CheckExact(op1))) {
21156  const long b = intval;
21157  long x;
21158  long a = PyInt_AS_LONG(op1);
21159  x = (long)((unsigned long)a + b);
21160  if (likely((x^a) >= 0 || (x^b) >= 0))
21161  return PyInt_FromLong(x);
21162  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21163  }
21164  #endif
21165  #if CYTHON_USE_PYLONG_INTERNALS
21166  if (likely(PyLong_CheckExact(op1))) {
21167  const long b = intval;
21168  long a, x;
21169 #ifdef HAVE_LONG_LONG
21170  const PY_LONG_LONG llb = intval;
21171  PY_LONG_LONG lla, llx;
21172 #endif
21173  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21174  const Py_ssize_t size = Py_SIZE(op1);
21175  if (likely(__Pyx_sst_abs(size) <= 1)) {
21176  a = likely(size) ? digits[0] : 0;
21177  if (size == -1) a = -a;
21178  } else {
21179  switch (size) {
21180  case -2:
21181  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21182  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21183  break;
21184 #ifdef HAVE_LONG_LONG
21185  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21186  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21187  goto long_long;
21188 #endif
21189  }
21190  CYTHON_FALLTHROUGH;
21191  case 2:
21192  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21193  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21194  break;
21195 #ifdef HAVE_LONG_LONG
21196  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21197  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21198  goto long_long;
21199 #endif
21200  }
21201  CYTHON_FALLTHROUGH;
21202  case -3:
21203  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21204  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21205  break;
21206 #ifdef HAVE_LONG_LONG
21207  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21208  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]));
21209  goto long_long;
21210 #endif
21211  }
21212  CYTHON_FALLTHROUGH;
21213  case 3:
21214  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21215  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21216  break;
21217 #ifdef HAVE_LONG_LONG
21218  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21219  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]));
21220  goto long_long;
21221 #endif
21222  }
21223  CYTHON_FALLTHROUGH;
21224  case -4:
21225  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21226  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21227  break;
21228 #ifdef HAVE_LONG_LONG
21229  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21230  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]));
21231  goto long_long;
21232 #endif
21233  }
21234  CYTHON_FALLTHROUGH;
21235  case 4:
21236  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21237  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21238  break;
21239 #ifdef HAVE_LONG_LONG
21240  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21241  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]));
21242  goto long_long;
21243 #endif
21244  }
21245  CYTHON_FALLTHROUGH;
21246  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21247  }
21248  }
21249  x = a + b;
21250  return PyLong_FromLong(x);
21251 #ifdef HAVE_LONG_LONG
21252  long_long:
21253  llx = lla + llb;
21254  return PyLong_FromLongLong(llx);
21255 #endif
21256 
21257 
21258  }
21259  #endif
21260  if (PyFloat_CheckExact(op1)) {
21261  const long b = intval;
21262  double a = PyFloat_AS_DOUBLE(op1);
21263  double result;
21264  PyFPE_START_PROTECT("add", return NULL)
21265  result = ((double)a) + (double)b;
21266  PyFPE_END_PROTECT(result)
21267  return PyFloat_FromDouble(result);
21268  }
21269  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21270 }
21271 #endif
21272 
21273 /* SetItemInt */
21274 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21275  int r;
21276  if (!j) return -1;
21277  r = PyObject_SetItem(o, j, v);
21278  Py_DECREF(j);
21279  return r;
21280 }
21281 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21282  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21283 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21284  if (is_list || PyList_CheckExact(o)) {
21285  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21286  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
21287  PyObject* old = PyList_GET_ITEM(o, n);
21288  Py_INCREF(v);
21289  PyList_SET_ITEM(o, n, v);
21290  Py_DECREF(old);
21291  return 1;
21292  }
21293  } else {
21294  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21295  if (likely(m && m->sq_ass_item)) {
21296  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21297  Py_ssize_t l = m->sq_length(o);
21298  if (likely(l >= 0)) {
21299  i += l;
21300  } else {
21301  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21302  return -1;
21303  PyErr_Clear();
21304  }
21305  }
21306  return m->sq_ass_item(o, i, v);
21307  }
21308  }
21309 #else
21310 #if CYTHON_COMPILING_IN_PYPY
21311  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
21312 #else
21313  if (is_list || PySequence_Check(o))
21314 #endif
21315  {
21316  return PySequence_SetItem(o, i, v);
21317  }
21318 #endif
21319  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21320 }
21321 
21322 /* PyObjectCall2Args */
21323 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21324  PyObject *args, *result = NULL;
21325  #if CYTHON_FAST_PYCALL
21326  if (PyFunction_Check(function)) {
21327  PyObject *args[2] = {arg1, arg2};
21328  return __Pyx_PyFunction_FastCall(function, args, 2);
21329  }
21330  #endif
21331  #if CYTHON_FAST_PYCCALL
21332  if (__Pyx_PyFastCFunction_Check(function)) {
21333  PyObject *args[2] = {arg1, arg2};
21334  return __Pyx_PyCFunction_FastCall(function, args, 2);
21335  }
21336  #endif
21337  args = PyTuple_New(2);
21338  if (unlikely(!args)) goto done;
21339  Py_INCREF(arg1);
21340  PyTuple_SET_ITEM(args, 0, arg1);
21341  Py_INCREF(arg2);
21342  PyTuple_SET_ITEM(args, 1, arg2);
21343  Py_INCREF(function);
21344  result = __Pyx_PyObject_Call(function, args, NULL);
21345  Py_DECREF(args);
21346  Py_DECREF(function);
21347 done:
21348  return result;
21349 }
21350 
21351 /* ArgTypeTest */
21352 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21353 {
21354  if (unlikely(!type)) {
21355  PyErr_SetString(PyExc_SystemError, "Missing type object");
21356  return 0;
21357  }
21358  else if (exact) {
21359  #if PY_MAJOR_VERSION == 2
21360  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21361  #endif
21362  }
21363  else {
21364  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21365  }
21366  PyErr_Format(PyExc_TypeError,
21367  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21368  name, type->tp_name, Py_TYPE(obj)->tp_name);
21369  return 0;
21370 }
21371 
21372 /* Import */
21373 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21374  PyObject *empty_list = 0;
21375  PyObject *module = 0;
21376  PyObject *global_dict = 0;
21377  PyObject *empty_dict = 0;
21378  PyObject *list;
21379  #if PY_MAJOR_VERSION < 3
21380  PyObject *py_import;
21381  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21382  if (!py_import)
21383  goto bad;
21384  #endif
21385  if (from_list)
21386  list = from_list;
21387  else {
21388  empty_list = PyList_New(0);
21389  if (!empty_list)
21390  goto bad;
21391  list = empty_list;
21392  }
21393  global_dict = PyModule_GetDict(__pyx_m);
21394  if (!global_dict)
21395  goto bad;
21396  empty_dict = PyDict_New();
21397  if (!empty_dict)
21398  goto bad;
21399  {
21400  #if PY_MAJOR_VERSION >= 3
21401  if (level == -1) {
21402  if (strchr(__Pyx_MODULE_NAME, '.')) {
21403  module = PyImport_ImportModuleLevelObject(
21404  name, global_dict, empty_dict, list, 1);
21405  if (!module) {
21406  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21407  goto bad;
21408  PyErr_Clear();
21409  }
21410  }
21411  level = 0;
21412  }
21413  #endif
21414  if (!module) {
21415  #if PY_MAJOR_VERSION < 3
21416  PyObject *py_level = PyInt_FromLong(level);
21417  if (!py_level)
21418  goto bad;
21419  module = PyObject_CallFunctionObjArgs(py_import,
21420  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
21421  Py_DECREF(py_level);
21422  #else
21423  module = PyImport_ImportModuleLevelObject(
21424  name, global_dict, empty_dict, list, level);
21425  #endif
21426  }
21427  }
21428 bad:
21429  #if PY_MAJOR_VERSION < 3
21430  Py_XDECREF(py_import);
21431  #endif
21432  Py_XDECREF(empty_list);
21433  Py_XDECREF(empty_dict);
21434  return module;
21435 }
21436 
21437 /* PyObject_GenericGetAttrNoDict */
21438 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21439 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21440  PyErr_Format(PyExc_AttributeError,
21441 #if PY_MAJOR_VERSION >= 3
21442  "'%.50s' object has no attribute '%U'",
21443  tp->tp_name, attr_name);
21444 #else
21445  "'%.50s' object has no attribute '%.400s'",
21446  tp->tp_name, PyString_AS_STRING(attr_name));
21447 #endif
21448  return NULL;
21449 }
21450 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21451  PyObject *descr;
21452  PyTypeObject *tp = Py_TYPE(obj);
21453  if (unlikely(!PyString_Check(attr_name))) {
21454  return PyObject_GenericGetAttr(obj, attr_name);
21455  }
21456  assert(!tp->tp_dictoffset);
21457  descr = _PyType_Lookup(tp, attr_name);
21458  if (unlikely(!descr)) {
21459  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21460  }
21461  Py_INCREF(descr);
21462  #if PY_MAJOR_VERSION < 3
21463  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21464  #endif
21465  {
21466  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21467  if (unlikely(f)) {
21468  PyObject *res = f(descr, obj, (PyObject *)tp);
21469  Py_DECREF(descr);
21470  return res;
21471  }
21472  }
21473  return descr;
21474 }
21475 #endif
21476 
21477 /* PyObject_GenericGetAttr */
21478 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21479 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21480  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21481  return PyObject_GenericGetAttr(obj, attr_name);
21482  }
21483  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21484 }
21485 #endif
21486 
21487 /* SetVTable */
21488 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21489 #if PY_VERSION_HEX >= 0x02070000
21490  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21491 #else
21492  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21493 #endif
21494  if (!ob)
21495  goto bad;
21496  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21497  goto bad;
21498  Py_DECREF(ob);
21499  return 0;
21500 bad:
21501  Py_XDECREF(ob);
21502  return -1;
21503 }
21504 
21505 /* SetupReduce */
21506 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21507  int ret;
21508  PyObject *name_attr;
21509  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21510  if (likely(name_attr)) {
21511  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21512  } else {
21513  ret = -1;
21514  }
21515  if (unlikely(ret < 0)) {
21516  PyErr_Clear();
21517  ret = 0;
21518  }
21519  Py_XDECREF(name_attr);
21520  return ret;
21521 }
21522 static int __Pyx_setup_reduce(PyObject* type_obj) {
21523  int ret = 0;
21524  PyObject *object_reduce = NULL;
21525  PyObject *object_reduce_ex = NULL;
21526  PyObject *reduce = NULL;
21527  PyObject *reduce_ex = NULL;
21528  PyObject *reduce_cython = NULL;
21529  PyObject *setstate = NULL;
21530  PyObject *setstate_cython = NULL;
21531 #if CYTHON_USE_PYTYPE_LOOKUP
21532  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21533 #else
21534  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21535 #endif
21536 #if CYTHON_USE_PYTYPE_LOOKUP
21537  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21538 #else
21539  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21540 #endif
21541  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21542  if (reduce_ex == object_reduce_ex) {
21543 #if CYTHON_USE_PYTYPE_LOOKUP
21544  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21545 #else
21546  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21547 #endif
21548  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21549  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21550  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21551  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21552  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21553  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21554  if (!setstate) PyErr_Clear();
21555  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21556  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21557  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21558  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21559  }
21560  PyType_Modified((PyTypeObject*)type_obj);
21561  }
21562  }
21563  goto GOOD;
21564 BAD:
21565  if (!PyErr_Occurred())
21566  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21567  ret = -1;
21568 GOOD:
21569 #if !CYTHON_USE_PYTYPE_LOOKUP
21570  Py_XDECREF(object_reduce);
21571  Py_XDECREF(object_reduce_ex);
21572 #endif
21573  Py_XDECREF(reduce);
21574  Py_XDECREF(reduce_ex);
21575  Py_XDECREF(reduce_cython);
21576  Py_XDECREF(setstate);
21577  Py_XDECREF(setstate_cython);
21578  return ret;
21579 }
21580 
21581 /* PyFloatBinop */
21582 #if !CYTHON_COMPILING_IN_PYPY
21583 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
21584  const double b = floatval;
21585  double a, result;
21586  (void)inplace;
21587  (void)zerodivision_check;
21588  if (likely(PyFloat_CheckExact(op1))) {
21589  a = PyFloat_AS_DOUBLE(op1);
21590 
21591  } else
21592  #if PY_MAJOR_VERSION < 3
21593  if (likely(PyInt_CheckExact(op1))) {
21594  a = (double) PyInt_AS_LONG(op1);
21595 
21596  } else
21597  #endif
21598  if (likely(PyLong_CheckExact(op1))) {
21599  #if CYTHON_USE_PYLONG_INTERNALS
21600  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21601  const Py_ssize_t size = Py_SIZE(op1);
21602  switch (size) {
21603  case 0: a = 0.0; break;
21604  case -1: a = -(double) digits[0]; break;
21605  case 1: a = (double) digits[0]; break;
21606  case -2:
21607  case 2:
21608  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21609  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21610  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21611  if (size == -2)
21612  a = -a;
21613  break;
21614  }
21615  }
21616  CYTHON_FALLTHROUGH;
21617  case -3:
21618  case 3:
21619  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21620  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21621  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21622  if (size == -3)
21623  a = -a;
21624  break;
21625  }
21626  }
21627  CYTHON_FALLTHROUGH;
21628  case -4:
21629  case 4:
21630  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21631  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21632  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21633  if (size == -4)
21634  a = -a;
21635  break;
21636  }
21637  }
21638  CYTHON_FALLTHROUGH;
21639  default:
21640  #else
21641  {
21642  #endif
21643  a = PyLong_AsDouble(op1);
21644  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
21645 
21646  }
21647  } else {
21648  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21649  }
21650 
21651  PyFPE_START_PROTECT("divide", return NULL)
21652  result = a / b;
21653  PyFPE_END_PROTECT(result)
21654  return PyFloat_FromDouble(result);
21655 }
21656 #endif
21657 
21658 /* BytesEquals */
21659  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21660 #if CYTHON_COMPILING_IN_PYPY
21661  return PyObject_RichCompareBool(s1, s2, equals);
21662 #else
21663  if (s1 == s2) {
21664  return (equals == Py_EQ);
21665  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21666  const char *ps1, *ps2;
21667  Py_ssize_t length = PyBytes_GET_SIZE(s1);
21668  if (length != PyBytes_GET_SIZE(s2))
21669  return (equals == Py_NE);
21670  ps1 = PyBytes_AS_STRING(s1);
21671  ps2 = PyBytes_AS_STRING(s2);
21672  if (ps1[0] != ps2[0]) {
21673  return (equals == Py_NE);
21674  } else if (length == 1) {
21675  return (equals == Py_EQ);
21676  } else {
21677  int result;
21678 #if CYTHON_USE_UNICODE_INTERNALS
21679  Py_hash_t hash1, hash2;
21680  hash1 = ((PyBytesObject*)s1)->ob_shash;
21681  hash2 = ((PyBytesObject*)s2)->ob_shash;
21682  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21683  return (equals == Py_NE);
21684  }
21685 #endif
21686  result = memcmp(ps1, ps2, (size_t)length);
21687  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21688  }
21689  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21690  return (equals == Py_NE);
21691  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21692  return (equals == Py_NE);
21693  } else {
21694  int result;
21695  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21696  if (!py_result)
21697  return -1;
21698  result = __Pyx_PyObject_IsTrue(py_result);
21699  Py_DECREF(py_result);
21700  return result;
21701  }
21702 #endif
21703 }
21704 
21705 /* UnicodeEquals */
21706  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
21707 #if CYTHON_COMPILING_IN_PYPY
21708  return PyObject_RichCompareBool(s1, s2, equals);
21709 #else
21710 #if PY_MAJOR_VERSION < 3
21711  PyObject* owned_ref = NULL;
21712 #endif
21713  int s1_is_unicode, s2_is_unicode;
21714  if (s1 == s2) {
21715  goto return_eq;
21716  }
21717  s1_is_unicode = PyUnicode_CheckExact(s1);
21718  s2_is_unicode = PyUnicode_CheckExact(s2);
21719 #if PY_MAJOR_VERSION < 3
21720  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21721  owned_ref = PyUnicode_FromObject(s2);
21722  if (unlikely(!owned_ref))
21723  return -1;
21724  s2 = owned_ref;
21725  s2_is_unicode = 1;
21726  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21727  owned_ref = PyUnicode_FromObject(s1);
21728  if (unlikely(!owned_ref))
21729  return -1;
21730  s1 = owned_ref;
21731  s1_is_unicode = 1;
21732  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21733  return __Pyx_PyBytes_Equals(s1, s2, equals);
21734  }
21735 #endif
21736  if (s1_is_unicode & s2_is_unicode) {
21737  Py_ssize_t length;
21738  int kind;
21739  void *data1, *data2;
21740  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21741  return -1;
21742  length = __Pyx_PyUnicode_GET_LENGTH(s1);
21743  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21744  goto return_ne;
21745  }
21746 #if CYTHON_USE_UNICODE_INTERNALS
21747  {
21748  Py_hash_t hash1, hash2;
21749  #if CYTHON_PEP393_ENABLED
21750  hash1 = ((PyASCIIObject*)s1)->hash;
21751  hash2 = ((PyASCIIObject*)s2)->hash;
21752  #else
21753  hash1 = ((PyUnicodeObject*)s1)->hash;
21754  hash2 = ((PyUnicodeObject*)s2)->hash;
21755  #endif
21756  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21757  goto return_ne;
21758  }
21759  }
21760 #endif
21761  kind = __Pyx_PyUnicode_KIND(s1);
21762  if (kind != __Pyx_PyUnicode_KIND(s2)) {
21763  goto return_ne;
21764  }
21765  data1 = __Pyx_PyUnicode_DATA(s1);
21766  data2 = __Pyx_PyUnicode_DATA(s2);
21767  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21768  goto return_ne;
21769  } else if (length == 1) {
21770  goto return_eq;
21771  } else {
21772  int result = memcmp(data1, data2, (size_t)(length * kind));
21773  #if PY_MAJOR_VERSION < 3
21774  Py_XDECREF(owned_ref);
21775  #endif
21776  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21777  }
21778  } else if ((s1 == Py_None) & s2_is_unicode) {
21779  goto return_ne;
21780  } else if ((s2 == Py_None) & s1_is_unicode) {
21781  goto return_ne;
21782  } else {
21783  int result;
21784  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21785  #if PY_MAJOR_VERSION < 3
21786  Py_XDECREF(owned_ref);
21787  #endif
21788  if (!py_result)
21789  return -1;
21790  result = __Pyx_PyObject_IsTrue(py_result);
21791  Py_DECREF(py_result);
21792  return result;
21793  }
21794 return_eq:
21795  #if PY_MAJOR_VERSION < 3
21796  Py_XDECREF(owned_ref);
21797  #endif
21798  return (equals == Py_EQ);
21799 return_ne:
21800  #if PY_MAJOR_VERSION < 3
21801  Py_XDECREF(owned_ref);
21802  #endif
21803  return (equals == Py_NE);
21804 #endif
21805 }
21806 
21807 /* CLineInTraceback */
21808  #ifndef CYTHON_CLINE_IN_TRACEBACK
21809 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
21810  PyObject *use_cline;
21811  PyObject *ptype, *pvalue, *ptraceback;
21812 #if CYTHON_COMPILING_IN_CPYTHON
21813  PyObject **cython_runtime_dict;
21814 #endif
21815  if (unlikely(!__pyx_cython_runtime)) {
21816  return c_line;
21817  }
21818  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
21819 #if CYTHON_COMPILING_IN_CPYTHON
21820  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
21821  if (likely(cython_runtime_dict)) {
21822  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
21823  use_cline, *cython_runtime_dict,
21824  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
21825  } else
21826 #endif
21827  {
21828  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
21829  if (use_cline_obj) {
21830  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
21831  Py_DECREF(use_cline_obj);
21832  } else {
21833  PyErr_Clear();
21834  use_cline = NULL;
21835  }
21836  }
21837  if (!use_cline) {
21838  c_line = 0;
21839  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
21840  }
21841  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
21842  c_line = 0;
21843  }
21844  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
21845  return c_line;
21846 }
21847 #endif
21848 
21849 /* CodeObjectCache */
21850  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
21851  int start = 0, mid = 0, end = count - 1;
21852  if (end >= 0 && code_line > entries[end].code_line) {
21853  return count;
21854  }
21855  while (start < end) {
21856  mid = start + (end - start) / 2;
21857  if (code_line < entries[mid].code_line) {
21858  end = mid;
21859  } else if (code_line > entries[mid].code_line) {
21860  start = mid + 1;
21861  } else {
21862  return mid;
21863  }
21864  }
21865  if (code_line <= entries[mid].code_line) {
21866  return mid;
21867  } else {
21868  return mid + 1;
21869  }
21870 }
21871 static PyCodeObject *__pyx_find_code_object(int code_line) {
21872  PyCodeObject* code_object;
21873  int pos;
21874  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21875  return NULL;
21876  }
21877  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21878  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21879  return NULL;
21880  }
21881  code_object = __pyx_code_cache.entries[pos].code_object;
21882  Py_INCREF(code_object);
21883  return code_object;
21884 }
21885 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
21886  int pos, i;
21887  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21888  if (unlikely(!code_line)) {
21889  return;
21890  }
21891  if (unlikely(!entries)) {
21892  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
21893  if (likely(entries)) {
21894  __pyx_code_cache.entries = entries;
21895  __pyx_code_cache.max_count = 64;
21896  __pyx_code_cache.count = 1;
21897  entries[0].code_line = code_line;
21898  entries[0].code_object = code_object;
21899  Py_INCREF(code_object);
21900  }
21901  return;
21902  }
21903  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21904  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21905  PyCodeObject* tmp = entries[pos].code_object;
21906  entries[pos].code_object = code_object;
21907  Py_DECREF(tmp);
21908  return;
21909  }
21910  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21911  int new_max = __pyx_code_cache.max_count + 64;
21912  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21913  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
21914  if (unlikely(!entries)) {
21915  return;
21916  }
21917  __pyx_code_cache.entries = entries;
21918  __pyx_code_cache.max_count = new_max;
21919  }
21920  for (i=__pyx_code_cache.count; i>pos; i--) {
21921  entries[i] = entries[i-1];
21922  }
21923  entries[pos].code_line = code_line;
21924  entries[pos].code_object = code_object;
21925  __pyx_code_cache.count++;
21926  Py_INCREF(code_object);
21927 }
21928 
21929 /* AddTraceback */
21930  #include "compile.h"
21931 #include "frameobject.h"
21932 #include "traceback.h"
21933 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21934  const char *funcname, int c_line,
21935  int py_line, const char *filename) {
21936  PyCodeObject *py_code = 0;
21937  PyObject *py_srcfile = 0;
21938  PyObject *py_funcname = 0;
21939  #if PY_MAJOR_VERSION < 3
21940  py_srcfile = PyString_FromString(filename);
21941  #else
21942  py_srcfile = PyUnicode_FromString(filename);
21943  #endif
21944  if (!py_srcfile) goto bad;
21945  if (c_line) {
21946  #if PY_MAJOR_VERSION < 3
21947  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21948  #else
21949  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21950  #endif
21951  }
21952  else {
21953  #if PY_MAJOR_VERSION < 3
21954  py_funcname = PyString_FromString(funcname);
21955  #else
21956  py_funcname = PyUnicode_FromString(funcname);
21957  #endif
21958  }
21959  if (!py_funcname) goto bad;
21960  py_code = __Pyx_PyCode_New(
21961  0,
21962  0,
21963  0,
21964  0,
21965  0,
21966  __pyx_empty_bytes, /*PyObject *code,*/
21967  __pyx_empty_tuple, /*PyObject *consts,*/
21968  __pyx_empty_tuple, /*PyObject *names,*/
21969  __pyx_empty_tuple, /*PyObject *varnames,*/
21970  __pyx_empty_tuple, /*PyObject *freevars,*/
21971  __pyx_empty_tuple, /*PyObject *cellvars,*/
21972  py_srcfile, /*PyObject *filename,*/
21973  py_funcname, /*PyObject *name,*/
21974  py_line,
21975  __pyx_empty_bytes /*PyObject *lnotab*/
21976  );
21977  Py_DECREF(py_srcfile);
21978  Py_DECREF(py_funcname);
21979  return py_code;
21980 bad:
21981  Py_XDECREF(py_srcfile);
21982  Py_XDECREF(py_funcname);
21983  return NULL;
21984 }
21985 static void __Pyx_AddTraceback(const char *funcname, int c_line,
21986  int py_line, const char *filename) {
21987  PyCodeObject *py_code = 0;
21988  PyFrameObject *py_frame = 0;
21989  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21990  if (c_line) {
21991  c_line = __Pyx_CLineForTraceback(tstate, c_line);
21992  }
21993  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
21994  if (!py_code) {
21995  py_code = __Pyx_CreateCodeObjectForTraceback(
21996  funcname, c_line, py_line, filename);
21997  if (!py_code) goto bad;
21998  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
21999  }
22000  py_frame = PyFrame_New(
22001  tstate, /*PyThreadState *tstate,*/
22002  py_code, /*PyCodeObject *code,*/
22003  __pyx_d, /*PyObject *globals,*/
22004  0 /*PyObject *locals*/
22005  );
22006  if (!py_frame) goto bad;
22007  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22008  PyTraceBack_Here(py_frame);
22009 bad:
22010  Py_XDECREF(py_code);
22011  Py_XDECREF(py_frame);
22012 }
22013 
22014 /* CIntFromPyVerify */
22015  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22016  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22017 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22018  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22019 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22020  {\
22021  func_type value = func_value;\
22022  if (sizeof(target_type) < sizeof(func_type)) {\
22023  if (unlikely(value != (func_type) (target_type) value)) {\
22024  func_type zero = 0;\
22025  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22026  return (target_type) -1;\
22027  if (is_unsigned && unlikely(value < zero))\
22028  goto raise_neg_overflow;\
22029  else\
22030  goto raise_overflow;\
22031  }\
22032  }\
22033  return (target_type) value;\
22034  }
22035 
22036 /* CIntToPy */
22037  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22038  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22039  const int is_unsigned = neg_one > const_zero;
22040  if (is_unsigned) {
22041  if (sizeof(int) < sizeof(long)) {
22042  return PyInt_FromLong((long) value);
22043  } else if (sizeof(int) <= sizeof(unsigned long)) {
22044  return PyLong_FromUnsignedLong((unsigned long) value);
22045 #ifdef HAVE_LONG_LONG
22046  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22047  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22048 #endif
22049  }
22050  } else {
22051  if (sizeof(int) <= sizeof(long)) {
22052  return PyInt_FromLong((long) value);
22053 #ifdef HAVE_LONG_LONG
22054  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22055  return PyLong_FromLongLong((PY_LONG_LONG) value);
22056 #endif
22057  }
22058  }
22059  {
22060  int one = 1; int little = (int)*(unsigned char *)&one;
22061  unsigned char *bytes = (unsigned char *)&value;
22062  return _PyLong_FromByteArray(bytes, sizeof(int),
22063  little, !is_unsigned);
22064  }
22065 }
22066 
22067 /* CIntFromPy */
22068  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22069  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22070  const int is_unsigned = neg_one > const_zero;
22071 #if PY_MAJOR_VERSION < 3
22072  if (likely(PyInt_Check(x))) {
22073  if (sizeof(int) < sizeof(long)) {
22074  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22075  } else {
22076  long val = PyInt_AS_LONG(x);
22077  if (is_unsigned && unlikely(val < 0)) {
22078  goto raise_neg_overflow;
22079  }
22080  return (int) val;
22081  }
22082  } else
22083 #endif
22084  if (likely(PyLong_Check(x))) {
22085  if (is_unsigned) {
22086 #if CYTHON_USE_PYLONG_INTERNALS
22087  const digit* digits = ((PyLongObject*)x)->ob_digit;
22088  switch (Py_SIZE(x)) {
22089  case 0: return (int) 0;
22090  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22091  case 2:
22092  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22093  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22094  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22095  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22096  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22097  }
22098  }
22099  break;
22100  case 3:
22101  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22102  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22103  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22104  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22105  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22106  }
22107  }
22108  break;
22109  case 4:
22110  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22111  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22112  __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])))
22113  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22114  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22115  }
22116  }
22117  break;
22118  }
22119 #endif
22120 #if CYTHON_COMPILING_IN_CPYTHON
22121  if (unlikely(Py_SIZE(x) < 0)) {
22122  goto raise_neg_overflow;
22123  }
22124 #else
22125  {
22126  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22127  if (unlikely(result < 0))
22128  return (int) -1;
22129  if (unlikely(result == 1))
22130  goto raise_neg_overflow;
22131  }
22132 #endif
22133  if (sizeof(int) <= sizeof(unsigned long)) {
22134  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22135 #ifdef HAVE_LONG_LONG
22136  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22137  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22138 #endif
22139  }
22140  } else {
22141 #if CYTHON_USE_PYLONG_INTERNALS
22142  const digit* digits = ((PyLongObject*)x)->ob_digit;
22143  switch (Py_SIZE(x)) {
22144  case 0: return (int) 0;
22145  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22146  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22147  case -2:
22148  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22149  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22150  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22151  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22152  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22153  }
22154  }
22155  break;
22156  case 2:
22157  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22158  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22159  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22160  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22161  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22162  }
22163  }
22164  break;
22165  case -3:
22166  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22167  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22168  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22169  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22170  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22171  }
22172  }
22173  break;
22174  case 3:
22175  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22176  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22177  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22178  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22179  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22180  }
22181  }
22182  break;
22183  case -4:
22184  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22185  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22186  __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])))
22187  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22188  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22189  }
22190  }
22191  break;
22192  case 4:
22193  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22194  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22195  __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])))
22196  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22197  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22198  }
22199  }
22200  break;
22201  }
22202 #endif
22203  if (sizeof(int) <= sizeof(long)) {
22204  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22205 #ifdef HAVE_LONG_LONG
22206  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22207  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22208 #endif
22209  }
22210  }
22211  {
22212 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22213  PyErr_SetString(PyExc_RuntimeError,
22214  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22215 #else
22216  int val;
22217  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22218  #if PY_MAJOR_VERSION < 3
22219  if (likely(v) && !PyLong_Check(v)) {
22220  PyObject *tmp = v;
22221  v = PyNumber_Long(tmp);
22222  Py_DECREF(tmp);
22223  }
22224  #endif
22225  if (likely(v)) {
22226  int one = 1; int is_little = (int)*(unsigned char *)&one;
22227  unsigned char *bytes = (unsigned char *)&val;
22228  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22229  bytes, sizeof(val),
22230  is_little, !is_unsigned);
22231  Py_DECREF(v);
22232  if (likely(!ret))
22233  return val;
22234  }
22235 #endif
22236  return (int) -1;
22237  }
22238  } else {
22239  int val;
22240  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22241  if (!tmp) return (int) -1;
22242  val = __Pyx_PyInt_As_int(tmp);
22243  Py_DECREF(tmp);
22244  return val;
22245  }
22246 raise_overflow:
22247  PyErr_SetString(PyExc_OverflowError,
22248  "value too large to convert to int");
22249  return (int) -1;
22250 raise_neg_overflow:
22251  PyErr_SetString(PyExc_OverflowError,
22252  "can't convert negative value to int");
22253  return (int) -1;
22254 }
22255 
22256 /* CIntToPy */
22257  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22258  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22259  const int is_unsigned = neg_one > const_zero;
22260  if (is_unsigned) {
22261  if (sizeof(long) < sizeof(long)) {
22262  return PyInt_FromLong((long) value);
22263  } else if (sizeof(long) <= sizeof(unsigned long)) {
22264  return PyLong_FromUnsignedLong((unsigned long) value);
22265 #ifdef HAVE_LONG_LONG
22266  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22267  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22268 #endif
22269  }
22270  } else {
22271  if (sizeof(long) <= sizeof(long)) {
22272  return PyInt_FromLong((long) value);
22273 #ifdef HAVE_LONG_LONG
22274  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22275  return PyLong_FromLongLong((PY_LONG_LONG) value);
22276 #endif
22277  }
22278  }
22279  {
22280  int one = 1; int little = (int)*(unsigned char *)&one;
22281  unsigned char *bytes = (unsigned char *)&value;
22282  return _PyLong_FromByteArray(bytes, sizeof(long),
22283  little, !is_unsigned);
22284  }
22285 }
22286 
22287 /* CIntFromPy */
22288  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22289  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22290  const int is_unsigned = neg_one > const_zero;
22291 #if PY_MAJOR_VERSION < 3
22292  if (likely(PyInt_Check(x))) {
22293  if (sizeof(long) < sizeof(long)) {
22294  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22295  } else {
22296  long val = PyInt_AS_LONG(x);
22297  if (is_unsigned && unlikely(val < 0)) {
22298  goto raise_neg_overflow;
22299  }
22300  return (long) val;
22301  }
22302  } else
22303 #endif
22304  if (likely(PyLong_Check(x))) {
22305  if (is_unsigned) {
22306 #if CYTHON_USE_PYLONG_INTERNALS
22307  const digit* digits = ((PyLongObject*)x)->ob_digit;
22308  switch (Py_SIZE(x)) {
22309  case 0: return (long) 0;
22310  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22311  case 2:
22312  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22313  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22314  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22315  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22316  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22317  }
22318  }
22319  break;
22320  case 3:
22321  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22322  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22323  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22324  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22325  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22326  }
22327  }
22328  break;
22329  case 4:
22330  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22331  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22332  __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])))
22333  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22334  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22335  }
22336  }
22337  break;
22338  }
22339 #endif
22340 #if CYTHON_COMPILING_IN_CPYTHON
22341  if (unlikely(Py_SIZE(x) < 0)) {
22342  goto raise_neg_overflow;
22343  }
22344 #else
22345  {
22346  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22347  if (unlikely(result < 0))
22348  return (long) -1;
22349  if (unlikely(result == 1))
22350  goto raise_neg_overflow;
22351  }
22352 #endif
22353  if (sizeof(long) <= sizeof(unsigned long)) {
22354  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22355 #ifdef HAVE_LONG_LONG
22356  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22357  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22358 #endif
22359  }
22360  } else {
22361 #if CYTHON_USE_PYLONG_INTERNALS
22362  const digit* digits = ((PyLongObject*)x)->ob_digit;
22363  switch (Py_SIZE(x)) {
22364  case 0: return (long) 0;
22365  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22366  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22367  case -2:
22368  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22369  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22370  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22371  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22372  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22373  }
22374  }
22375  break;
22376  case 2:
22377  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22378  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22379  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22380  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22381  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22382  }
22383  }
22384  break;
22385  case -3:
22386  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22387  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22388  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22389  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22390  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22391  }
22392  }
22393  break;
22394  case 3:
22395  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22396  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22397  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22398  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22399  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22400  }
22401  }
22402  break;
22403  case -4:
22404  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22405  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22406  __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])))
22407  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22408  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22409  }
22410  }
22411  break;
22412  case 4:
22413  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22414  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22415  __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])))
22416  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22417  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22418  }
22419  }
22420  break;
22421  }
22422 #endif
22423  if (sizeof(long) <= sizeof(long)) {
22424  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22425 #ifdef HAVE_LONG_LONG
22426  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22427  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22428 #endif
22429  }
22430  }
22431  {
22432 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22433  PyErr_SetString(PyExc_RuntimeError,
22434  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22435 #else
22436  long val;
22437  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22438  #if PY_MAJOR_VERSION < 3
22439  if (likely(v) && !PyLong_Check(v)) {
22440  PyObject *tmp = v;
22441  v = PyNumber_Long(tmp);
22442  Py_DECREF(tmp);
22443  }
22444  #endif
22445  if (likely(v)) {
22446  int one = 1; int is_little = (int)*(unsigned char *)&one;
22447  unsigned char *bytes = (unsigned char *)&val;
22448  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22449  bytes, sizeof(val),
22450  is_little, !is_unsigned);
22451  Py_DECREF(v);
22452  if (likely(!ret))
22453  return val;
22454  }
22455 #endif
22456  return (long) -1;
22457  }
22458  } else {
22459  long val;
22460  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22461  if (!tmp) return (long) -1;
22462  val = __Pyx_PyInt_As_long(tmp);
22463  Py_DECREF(tmp);
22464  return val;
22465  }
22466 raise_overflow:
22467  PyErr_SetString(PyExc_OverflowError,
22468  "value too large to convert to long");
22469  return (long) -1;
22470 raise_neg_overflow:
22471  PyErr_SetString(PyExc_OverflowError,
22472  "can't convert negative value to long");
22473  return (long) -1;
22474 }
22475 
22476 /* FastTypeChecks */
22477  #if CYTHON_COMPILING_IN_CPYTHON
22478 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22479  while (a) {
22480  a = a->tp_base;
22481  if (a == b)
22482  return 1;
22483  }
22484  return b == &PyBaseObject_Type;
22485 }
22486 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22487  PyObject *mro;
22488  if (a == b) return 1;
22489  mro = a->tp_mro;
22490  if (likely(mro)) {
22491  Py_ssize_t i, n;
22492  n = PyTuple_GET_SIZE(mro);
22493  for (i = 0; i < n; i++) {
22494  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22495  return 1;
22496  }
22497  return 0;
22498  }
22499  return __Pyx_InBases(a, b);
22500 }
22501 #if PY_MAJOR_VERSION == 2
22502 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22503  PyObject *exception, *value, *tb;
22504  int res;
22505  __Pyx_PyThreadState_declare
22506  __Pyx_PyThreadState_assign
22507  __Pyx_ErrFetch(&exception, &value, &tb);
22508  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22509  if (unlikely(res == -1)) {
22510  PyErr_WriteUnraisable(err);
22511  res = 0;
22512  }
22513  if (!res) {
22514  res = PyObject_IsSubclass(err, exc_type2);
22515  if (unlikely(res == -1)) {
22516  PyErr_WriteUnraisable(err);
22517  res = 0;
22518  }
22519  }
22520  __Pyx_ErrRestore(exception, value, tb);
22521  return res;
22522 }
22523 #else
22524 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22525  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22526  if (!res) {
22527  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22528  }
22529  return res;
22530 }
22531 #endif
22532 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22533  Py_ssize_t i, n;
22534  assert(PyExceptionClass_Check(exc_type));
22535  n = PyTuple_GET_SIZE(tuple);
22536 #if PY_MAJOR_VERSION >= 3
22537  for (i=0; i<n; i++) {
22538  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22539  }
22540 #endif
22541  for (i=0; i<n; i++) {
22542  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22543  #if PY_MAJOR_VERSION < 3
22544  if (likely(exc_type == t)) return 1;
22545  #endif
22546  if (likely(PyExceptionClass_Check(t))) {
22547  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22548  } else {
22549  }
22550  }
22551  return 0;
22552 }
22553 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22554  if (likely(err == exc_type)) return 1;
22555  if (likely(PyExceptionClass_Check(err))) {
22556  if (likely(PyExceptionClass_Check(exc_type))) {
22557  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22558  } else if (likely(PyTuple_Check(exc_type))) {
22559  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22560  } else {
22561  }
22562  }
22563  return PyErr_GivenExceptionMatches(err, exc_type);
22564 }
22565 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22566  assert(PyExceptionClass_Check(exc_type1));
22567  assert(PyExceptionClass_Check(exc_type2));
22568  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22569  if (likely(PyExceptionClass_Check(err))) {
22570  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22571  }
22572  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22573 }
22574 #endif
22575 
22576 /* FetchCommonType */
22577  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22578  PyObject* fake_module;
22579  PyTypeObject* cached_type = NULL;
22580  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22581  if (!fake_module) return NULL;
22582  Py_INCREF(fake_module);
22583  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22584  if (cached_type) {
22585  if (!PyType_Check((PyObject*)cached_type)) {
22586  PyErr_Format(PyExc_TypeError,
22587  "Shared Cython type %.200s is not a type object",
22588  type->tp_name);
22589  goto bad;
22590  }
22591  if (cached_type->tp_basicsize != type->tp_basicsize) {
22592  PyErr_Format(PyExc_TypeError,
22593  "Shared Cython type %.200s has the wrong size, try recompiling",
22594  type->tp_name);
22595  goto bad;
22596  }
22597  } else {
22598  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22599  PyErr_Clear();
22600  if (PyType_Ready(type) < 0) goto bad;
22601  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22602  goto bad;
22603  Py_INCREF(type);
22604  cached_type = type;
22605  }
22606 done:
22607  Py_DECREF(fake_module);
22608  return cached_type;
22609 bad:
22610  Py_XDECREF(cached_type);
22611  cached_type = NULL;
22612  goto done;
22613 }
22614 
22615 /* SwapException */
22616  #if CYTHON_FAST_THREAD_STATE
22617 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22618  PyObject *tmp_type, *tmp_value, *tmp_tb;
22619  #if CYTHON_USE_EXC_INFO_STACK
22620  _PyErr_StackItem *exc_info = tstate->exc_info;
22621  tmp_type = exc_info->exc_type;
22622  tmp_value = exc_info->exc_value;
22623  tmp_tb = exc_info->exc_traceback;
22624  exc_info->exc_type = *type;
22625  exc_info->exc_value = *value;
22626  exc_info->exc_traceback = *tb;
22627  #else
22628  tmp_type = tstate->exc_type;
22629  tmp_value = tstate->exc_value;
22630  tmp_tb = tstate->exc_traceback;
22631  tstate->exc_type = *type;
22632  tstate->exc_value = *value;
22633  tstate->exc_traceback = *tb;
22634  #endif
22635  *type = tmp_type;
22636  *value = tmp_value;
22637  *tb = tmp_tb;
22638 }
22639 #else
22640 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22641  PyObject *tmp_type, *tmp_value, *tmp_tb;
22642  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22643  PyErr_SetExcInfo(*type, *value, *tb);
22644  *type = tmp_type;
22645  *value = tmp_value;
22646  *tb = tmp_tb;
22647 }
22648 #endif
22649 
22650 /* PyObjectGetMethod */
22651  static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
22652  PyObject *attr;
22653 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
22654  PyTypeObject *tp = Py_TYPE(obj);
22655  PyObject *descr;
22656  descrgetfunc f = NULL;
22657  PyObject **dictptr, *dict;
22658  int meth_found = 0;
22659  assert (*method == NULL);
22660  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
22661  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22662  goto try_unpack;
22663  }
22664  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
22665  return 0;
22666  }
22667  descr = _PyType_Lookup(tp, name);
22668  if (likely(descr != NULL)) {
22669  Py_INCREF(descr);
22670 #if PY_MAJOR_VERSION >= 3
22671  #ifdef __Pyx_CyFunction_USED
22672  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
22673  #else
22674  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
22675  #endif
22676 #else
22677  #ifdef __Pyx_CyFunction_USED
22678  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
22679  #else
22680  if (likely(PyFunction_Check(descr)))
22681  #endif
22682 #endif
22683  {
22684  meth_found = 1;
22685  } else {
22686  f = Py_TYPE(descr)->tp_descr_get;
22687  if (f != NULL && PyDescr_IsData(descr)) {
22688  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22689  Py_DECREF(descr);
22690  goto try_unpack;
22691  }
22692  }
22693  }
22694  dictptr = _PyObject_GetDictPtr(obj);
22695  if (dictptr != NULL && (dict = *dictptr) != NULL) {
22696  Py_INCREF(dict);
22697  attr = __Pyx_PyDict_GetItemStr(dict, name);
22698  if (attr != NULL) {
22699  Py_INCREF(attr);
22700  Py_DECREF(dict);
22701  Py_XDECREF(descr);
22702  goto try_unpack;
22703  }
22704  Py_DECREF(dict);
22705  }
22706  if (meth_found) {
22707  *method = descr;
22708  return 1;
22709  }
22710  if (f != NULL) {
22711  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22712  Py_DECREF(descr);
22713  goto try_unpack;
22714  }
22715  if (descr != NULL) {
22716  *method = descr;
22717  return 0;
22718  }
22719  PyErr_Format(PyExc_AttributeError,
22720 #if PY_MAJOR_VERSION >= 3
22721  "'%.50s' object has no attribute '%U'",
22722  tp->tp_name, name);
22723 #else
22724  "'%.50s' object has no attribute '%.400s'",
22725  tp->tp_name, PyString_AS_STRING(name));
22726 #endif
22727  return 0;
22728 #else
22729  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22730  goto try_unpack;
22731 #endif
22732 try_unpack:
22733 #if CYTHON_UNPACK_METHODS
22734  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
22735  PyObject *function = PyMethod_GET_FUNCTION(attr);
22736  Py_INCREF(function);
22737  Py_DECREF(attr);
22738  *method = function;
22739  return 1;
22740  }
22741 #endif
22742  *method = attr;
22743  return 0;
22744 }
22745 
22746 /* PyObjectCallMethod1 */
22747  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
22748  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
22749  Py_DECREF(method);
22750  return result;
22751 }
22752 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
22753  PyObject *method = NULL, *result;
22754  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
22755  if (likely(is_method)) {
22756  result = __Pyx_PyObject_Call2Args(method, obj, arg);
22757  Py_DECREF(method);
22758  return result;
22759  }
22760  if (unlikely(!method)) return NULL;
22761  return __Pyx__PyObject_CallMethod1(method, arg);
22762 }
22763 
22764 /* CoroutineBase */
22765  #include <structmember.h>
22766 #include <frameobject.h>
22767 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
22768 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
22769  PyObject *et, *ev, *tb;
22770  PyObject *value = NULL;
22771  __Pyx_ErrFetch(&et, &ev, &tb);
22772  if (!et) {
22773  Py_XDECREF(tb);
22774  Py_XDECREF(ev);
22775  Py_INCREF(Py_None);
22776  *pvalue = Py_None;
22777  return 0;
22778  }
22779  if (likely(et == PyExc_StopIteration)) {
22780  if (!ev) {
22781  Py_INCREF(Py_None);
22782  value = Py_None;
22783  }
22784 #if PY_VERSION_HEX >= 0x030300A0
22785  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
22786  value = ((PyStopIterationObject *)ev)->value;
22787  Py_INCREF(value);
22788  Py_DECREF(ev);
22789  }
22790 #endif
22791  else if (unlikely(PyTuple_Check(ev))) {
22792  if (PyTuple_GET_SIZE(ev) >= 1) {
22793 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22794  value = PyTuple_GET_ITEM(ev, 0);
22795  Py_INCREF(value);
22796 #else
22797  value = PySequence_ITEM(ev, 0);
22798 #endif
22799  } else {
22800  Py_INCREF(Py_None);
22801  value = Py_None;
22802  }
22803  Py_DECREF(ev);
22804  }
22805  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
22806  value = ev;
22807  }
22808  if (likely(value)) {
22809  Py_XDECREF(tb);
22810  Py_DECREF(et);
22811  *pvalue = value;
22812  return 0;
22813  }
22814  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
22815  __Pyx_ErrRestore(et, ev, tb);
22816  return -1;
22817  }
22818  PyErr_NormalizeException(&et, &ev, &tb);
22819  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
22820  __Pyx_ErrRestore(et, ev, tb);
22821  return -1;
22822  }
22823  Py_XDECREF(tb);
22824  Py_DECREF(et);
22825 #if PY_VERSION_HEX >= 0x030300A0
22826  value = ((PyStopIterationObject *)ev)->value;
22827  Py_INCREF(value);
22828  Py_DECREF(ev);
22829 #else
22830  {
22831  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
22832  Py_DECREF(ev);
22833  if (likely(args)) {
22834  value = PySequence_GetItem(args, 0);
22835  Py_DECREF(args);
22836  }
22837  if (unlikely(!value)) {
22838  __Pyx_ErrRestore(NULL, NULL, NULL);
22839  Py_INCREF(Py_None);
22840  value = Py_None;
22841  }
22842  }
22843 #endif
22844  *pvalue = value;
22845  return 0;
22846 }
22847 static CYTHON_INLINE
22848 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
22849  PyObject *t, *v, *tb;
22850  t = exc_state->exc_type;
22851  v = exc_state->exc_value;
22852  tb = exc_state->exc_traceback;
22853  exc_state->exc_type = NULL;
22854  exc_state->exc_value = NULL;
22855  exc_state->exc_traceback = NULL;
22856  Py_XDECREF(t);
22857  Py_XDECREF(v);
22858  Py_XDECREF(tb);
22859 }
22860 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
22861 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
22862  const char *msg;
22863  if ((0)) {
22864  #ifdef __Pyx_Coroutine_USED
22865  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
22866  msg = "coroutine already executing";
22867  #endif
22868  #ifdef __Pyx_AsyncGen_USED
22869  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
22870  msg = "async generator already executing";
22871  #endif
22872  } else {
22873  msg = "generator already executing";
22874  }
22875  PyErr_SetString(PyExc_ValueError, msg);
22876 }
22877 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
22878 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
22879  const char *msg;
22880  if ((0)) {
22881  #ifdef __Pyx_Coroutine_USED
22882  } else if (__Pyx_Coroutine_Check(gen)) {
22883  msg = "can't send non-None value to a just-started coroutine";
22884  #endif
22885  #ifdef __Pyx_AsyncGen_USED
22886  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
22887  msg = "can't send non-None value to a just-started async generator";
22888  #endif
22889  } else {
22890  msg = "can't send non-None value to a just-started generator";
22891  }
22892  PyErr_SetString(PyExc_TypeError, msg);
22893 }
22894 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
22895 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
22896  #ifdef __Pyx_Coroutine_USED
22897  if (!closing && __Pyx_Coroutine_Check(gen)) {
22898  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
22899  } else
22900  #endif
22901  if (value) {
22902  #ifdef __Pyx_AsyncGen_USED
22903  if (__Pyx_AsyncGen_CheckExact(gen))
22904  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
22905  else
22906  #endif
22907  PyErr_SetNone(PyExc_StopIteration);
22908  }
22909 }
22910 static
22911 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
22912  __Pyx_PyThreadState_declare
22913  PyThreadState *tstate;
22914  __Pyx_ExcInfoStruct *exc_state;
22915  PyObject *retval;
22916  assert(!self->is_running);
22917  if (unlikely(self->resume_label == 0)) {
22918  if (unlikely(value && value != Py_None)) {
22919  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
22920  }
22921  }
22922  if (unlikely(self->resume_label == -1)) {
22923  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
22924  }
22925 #if CYTHON_FAST_THREAD_STATE
22926  __Pyx_PyThreadState_assign
22927  tstate = __pyx_tstate;
22928 #else
22929  tstate = __Pyx_PyThreadState_Current;
22930 #endif
22931  exc_state = &self->gi_exc_state;
22932  if (exc_state->exc_type) {
22933  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22934  #else
22935  if (exc_state->exc_traceback) {
22936  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
22937  PyFrameObject *f = tb->tb_frame;
22938  Py_XINCREF(tstate->frame);
22939  assert(f->f_back == NULL);
22940  f->f_back = tstate->frame;
22941  }
22942  #endif
22943  }
22944 #if CYTHON_USE_EXC_INFO_STACK
22945  exc_state->previous_item = tstate->exc_info;
22946  tstate->exc_info = exc_state;
22947 #else
22948  if (exc_state->exc_type) {
22949  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22950  } else {
22951  __Pyx_Coroutine_ExceptionClear(exc_state);
22952  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22953  }
22954 #endif
22955  self->is_running = 1;
22956  retval = self->body((PyObject *) self, tstate, value);
22957  self->is_running = 0;
22958 #if CYTHON_USE_EXC_INFO_STACK
22959  exc_state = &self->gi_exc_state;
22960  tstate->exc_info = exc_state->previous_item;
22961  exc_state->previous_item = NULL;
22962  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
22963 #endif
22964  return retval;
22965 }
22966 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
22967  PyObject *exc_tb = exc_state->exc_traceback;
22968  if (likely(exc_tb)) {
22969 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22970 #else
22971  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
22972  PyFrameObject *f = tb->tb_frame;
22973  Py_CLEAR(f->f_back);
22974 #endif
22975  }
22976 }
22977 static CYTHON_INLINE
22978 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
22979  if (unlikely(!retval)) {
22980  __Pyx_PyThreadState_declare
22981  __Pyx_PyThreadState_assign
22982  if (!__Pyx_PyErr_Occurred()) {
22983  PyObject *exc = PyExc_StopIteration;
22984  #ifdef __Pyx_AsyncGen_USED
22985  if (__Pyx_AsyncGen_CheckExact(gen))
22986  exc = __Pyx_PyExc_StopAsyncIteration;
22987  #endif
22988  __Pyx_PyErr_SetNone(exc);
22989  }
22990  }
22991  return retval;
22992 }
22993 static CYTHON_INLINE
22994 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
22995  PyObject *ret;
22996  PyObject *val = NULL;
22997  __Pyx_Coroutine_Undelegate(gen);
22998  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
22999  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23000  Py_XDECREF(val);
23001  return ret;
23002 }
23003 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23004  PyObject *retval;
23005  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23006  PyObject *yf = gen->yieldfrom;
23007  if (unlikely(gen->is_running))
23008  return __Pyx_Coroutine_AlreadyRunningError(gen);
23009  if (yf) {
23010  PyObject *ret;
23011  gen->is_running = 1;
23012  #ifdef __Pyx_Generator_USED
23013  if (__Pyx_Generator_CheckExact(yf)) {
23014  ret = __Pyx_Coroutine_Send(yf, value);
23015  } else
23016  #endif
23017  #ifdef __Pyx_Coroutine_USED
23018  if (__Pyx_Coroutine_Check(yf)) {
23019  ret = __Pyx_Coroutine_Send(yf, value);
23020  } else
23021  #endif
23022  #ifdef __Pyx_AsyncGen_USED
23023  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23024  ret = __Pyx_async_gen_asend_send(yf, value);
23025  } else
23026  #endif
23027  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23028  if (PyGen_CheckExact(yf)) {
23029  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23030  } else
23031  #endif
23032  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23033  if (PyCoro_CheckExact(yf)) {
23034  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23035  } else
23036  #endif
23037  {
23038  if (value == Py_None)
23039  ret = Py_TYPE(yf)->tp_iternext(yf);
23040  else
23041  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23042  }
23043  gen->is_running = 0;
23044  if (likely(ret)) {
23045  return ret;
23046  }
23047  retval = __Pyx_Coroutine_FinishDelegation(gen);
23048  } else {
23049  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23050  }
23051  return __Pyx_Coroutine_MethodReturn(self, retval);
23052 }
23053 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23054  PyObject *retval = NULL;
23055  int err = 0;
23056  #ifdef __Pyx_Generator_USED
23057  if (__Pyx_Generator_CheckExact(yf)) {
23058  retval = __Pyx_Coroutine_Close(yf);
23059  if (!retval)
23060  return -1;
23061  } else
23062  #endif
23063  #ifdef __Pyx_Coroutine_USED
23064  if (__Pyx_Coroutine_Check(yf)) {
23065  retval = __Pyx_Coroutine_Close(yf);
23066  if (!retval)
23067  return -1;
23068  } else
23069  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23070  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
23071  if (!retval)
23072  return -1;
23073  } else
23074  #endif
23075  #ifdef __Pyx_AsyncGen_USED
23076  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23077  retval = __Pyx_async_gen_asend_close(yf, NULL);
23078  } else
23079  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23080  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23081  } else
23082  #endif
23083  {
23084  PyObject *meth;
23085  gen->is_running = 1;
23086  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23087  if (unlikely(!meth)) {
23088  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23089  PyErr_WriteUnraisable(yf);
23090  }
23091  PyErr_Clear();
23092  } else {
23093  retval = PyObject_CallFunction(meth, NULL);
23094  Py_DECREF(meth);
23095  if (!retval)
23096  err = -1;
23097  }
23098  gen->is_running = 0;
23099  }
23100  Py_XDECREF(retval);
23101  return err;
23102 }
23103 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23104  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23105  PyObject *yf = gen->yieldfrom;
23106  if (unlikely(gen->is_running))
23107  return __Pyx_Coroutine_AlreadyRunningError(gen);
23108  if (yf) {
23109  PyObject *ret;
23110  gen->is_running = 1;
23111  #ifdef __Pyx_Generator_USED
23112  if (__Pyx_Generator_CheckExact(yf)) {
23113  ret = __Pyx_Generator_Next(yf);
23114  } else
23115  #endif
23116  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23117  if (PyGen_CheckExact(yf)) {
23118  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23119  } else
23120  #endif
23121  #ifdef __Pyx_Coroutine_USED
23122  if (__Pyx_Coroutine_Check(yf)) {
23123  ret = __Pyx_Coroutine_Send(yf, Py_None);
23124  } else
23125  #endif
23126  ret = Py_TYPE(yf)->tp_iternext(yf);
23127  gen->is_running = 0;
23128  if (likely(ret)) {
23129  return ret;
23130  }
23131  return __Pyx_Coroutine_FinishDelegation(gen);
23132  }
23133  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23134 }
23135 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
23136  return __Pyx_Coroutine_Close(self);
23137 }
23138 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23139  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23140  PyObject *retval, *raised_exception;
23141  PyObject *yf = gen->yieldfrom;
23142  int err = 0;
23143  if (unlikely(gen->is_running))
23144  return __Pyx_Coroutine_AlreadyRunningError(gen);
23145  if (yf) {
23146  Py_INCREF(yf);
23147  err = __Pyx_Coroutine_CloseIter(gen, yf);
23148  __Pyx_Coroutine_Undelegate(gen);
23149  Py_DECREF(yf);
23150  }
23151  if (err == 0)
23152  PyErr_SetNone(PyExc_GeneratorExit);
23153  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23154  if (unlikely(retval)) {
23155  const char *msg;
23156  Py_DECREF(retval);
23157  if ((0)) {
23158  #ifdef __Pyx_Coroutine_USED
23159  } else if (__Pyx_Coroutine_Check(self)) {
23160  msg = "coroutine ignored GeneratorExit";
23161  #endif
23162  #ifdef __Pyx_AsyncGen_USED
23163  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23164 #if PY_VERSION_HEX < 0x03060000
23165  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23166 #else
23167  msg = "async generator ignored GeneratorExit";
23168 #endif
23169  #endif
23170  } else {
23171  msg = "generator ignored GeneratorExit";
23172  }
23173  PyErr_SetString(PyExc_RuntimeError, msg);
23174  return NULL;
23175  }
23176  raised_exception = PyErr_Occurred();
23177  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23178  if (raised_exception) PyErr_Clear();
23179  Py_INCREF(Py_None);
23180  return Py_None;
23181  }
23182  return NULL;
23183 }
23184 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23185  PyObject *args, int close_on_genexit) {
23186  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23187  PyObject *yf = gen->yieldfrom;
23188  if (unlikely(gen->is_running))
23189  return __Pyx_Coroutine_AlreadyRunningError(gen);
23190  if (yf) {
23191  PyObject *ret;
23192  Py_INCREF(yf);
23193  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23194  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23195  Py_DECREF(yf);
23196  __Pyx_Coroutine_Undelegate(gen);
23197  if (err < 0)
23198  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23199  goto throw_here;
23200  }
23201  gen->is_running = 1;
23202  if (0
23203  #ifdef __Pyx_Generator_USED
23204  || __Pyx_Generator_CheckExact(yf)
23205  #endif
23206  #ifdef __Pyx_Coroutine_USED
23207  || __Pyx_Coroutine_Check(yf)
23208  #endif
23209  ) {
23210  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23211  #ifdef __Pyx_Coroutine_USED
23212  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23213  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23214  #endif
23215  } else {
23216  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23217  if (unlikely(!meth)) {
23218  Py_DECREF(yf);
23219  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23220  gen->is_running = 0;
23221  return NULL;
23222  }
23223  PyErr_Clear();
23224  __Pyx_Coroutine_Undelegate(gen);
23225  gen->is_running = 0;
23226  goto throw_here;
23227  }
23228  if (likely(args)) {
23229  ret = PyObject_CallObject(meth, args);
23230  } else {
23231  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23232  }
23233  Py_DECREF(meth);
23234  }
23235  gen->is_running = 0;
23236  Py_DECREF(yf);
23237  if (!ret) {
23238  ret = __Pyx_Coroutine_FinishDelegation(gen);
23239  }
23240  return __Pyx_Coroutine_MethodReturn(self, ret);
23241  }
23242 throw_here:
23243  __Pyx_Raise(typ, val, tb, NULL);
23244  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23245 }
23246 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23247  PyObject *typ;
23248  PyObject *val = NULL;
23249  PyObject *tb = NULL;
23250  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23251  return NULL;
23252  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23253 }
23254 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
23255  Py_VISIT(exc_state->exc_type);
23256  Py_VISIT(exc_state->exc_value);
23257  Py_VISIT(exc_state->exc_traceback);
23258  return 0;
23259 }
23260 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23261  Py_VISIT(gen->closure);
23262  Py_VISIT(gen->classobj);
23263  Py_VISIT(gen->yieldfrom);
23264  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
23265 }
23266 static int __Pyx_Coroutine_clear(PyObject *self) {
23267  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23268  Py_CLEAR(gen->closure);
23269  Py_CLEAR(gen->classobj);
23270  Py_CLEAR(gen->yieldfrom);
23271  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
23272 #ifdef __Pyx_AsyncGen_USED
23273  if (__Pyx_AsyncGen_CheckExact(self)) {
23274  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23275  }
23276 #endif
23277  Py_CLEAR(gen->gi_code);
23278  Py_CLEAR(gen->gi_name);
23279  Py_CLEAR(gen->gi_qualname);
23280  Py_CLEAR(gen->gi_modulename);
23281  return 0;
23282 }
23283 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23284  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23285  PyObject_GC_UnTrack(gen);
23286  if (gen->gi_weakreflist != NULL)
23287  PyObject_ClearWeakRefs(self);
23288  if (gen->resume_label >= 0) {
23289  PyObject_GC_Track(self);
23290 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23291  if (PyObject_CallFinalizerFromDealloc(self))
23292 #else
23293  Py_TYPE(gen)->tp_del(self);
23294  if (self->ob_refcnt > 0)
23295 #endif
23296  {
23297  return;
23298  }
23299  PyObject_GC_UnTrack(self);
23300  }
23301 #ifdef __Pyx_AsyncGen_USED
23302  if (__Pyx_AsyncGen_CheckExact(self)) {
23303  /* We have to handle this case for asynchronous generators
23304  right here, because this code has to be between UNTRACK
23305  and GC_Del. */
23306  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23307  }
23308 #endif
23309  __Pyx_Coroutine_clear(self);
23310  PyObject_GC_Del(gen);
23311 }
23312 static void __Pyx_Coroutine_del(PyObject *self) {
23313  PyObject *error_type, *error_value, *error_traceback;
23314  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23315  __Pyx_PyThreadState_declare
23316  if (gen->resume_label < 0) {
23317  return;
23318  }
23319 #if !CYTHON_USE_TP_FINALIZE
23320  assert(self->ob_refcnt == 0);
23321  self->ob_refcnt = 1;
23322 #endif
23323  __Pyx_PyThreadState_assign
23324  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23325 #ifdef __Pyx_AsyncGen_USED
23326  if (__Pyx_AsyncGen_CheckExact(self)) {
23327  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23328  PyObject *finalizer = agen->ag_finalizer;
23329  if (finalizer && !agen->ag_closed) {
23330  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23331  if (unlikely(!res)) {
23332  PyErr_WriteUnraisable(self);
23333  } else {
23334  Py_DECREF(res);
23335  }
23336  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23337  return;
23338  }
23339  }
23340 #endif
23341  if (unlikely(gen->resume_label == 0 && !error_value)) {
23342 #ifdef __Pyx_Coroutine_USED
23343 #ifdef __Pyx_Generator_USED
23344  if (!__Pyx_Generator_CheckExact(self))
23345 #endif
23346  {
23347  PyObject_GC_UnTrack(self);
23348 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23349  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23350  PyErr_WriteUnraisable(self);
23351 #else
23352  {PyObject *msg;
23353  char *cmsg;
23354  #if CYTHON_COMPILING_IN_PYPY
23355  msg = NULL;
23356  cmsg = (char*) "coroutine was never awaited";
23357  #else
23358  char *cname;
23359  PyObject *qualname;
23360  qualname = gen->gi_qualname;
23361  cname = PyString_AS_STRING(qualname);
23362  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23363  if (unlikely(!msg)) {
23364  PyErr_Clear();
23365  cmsg = (char*) "coroutine was never awaited";
23366  } else {
23367  cmsg = PyString_AS_STRING(msg);
23368  }
23369  #endif
23370  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23371  PyErr_WriteUnraisable(self);
23372  Py_XDECREF(msg);}
23373 #endif
23374  PyObject_GC_Track(self);
23375  }
23376 #endif
23377  } else {
23378  PyObject *res = __Pyx_Coroutine_Close(self);
23379  if (unlikely(!res)) {
23380  if (PyErr_Occurred())
23381  PyErr_WriteUnraisable(self);
23382  } else {
23383  Py_DECREF(res);
23384  }
23385  }
23386  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23387 #if !CYTHON_USE_TP_FINALIZE
23388  assert(self->ob_refcnt > 0);
23389  if (--self->ob_refcnt == 0) {
23390  return;
23391  }
23392  {
23393  Py_ssize_t refcnt = self->ob_refcnt;
23394  _Py_NewReference(self);
23395  self->ob_refcnt = refcnt;
23396  }
23397 #if CYTHON_COMPILING_IN_CPYTHON
23398  assert(PyType_IS_GC(self->ob_type) &&
23399  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23400  _Py_DEC_REFTOTAL;
23401 #endif
23402 #ifdef COUNT_ALLOCS
23403  --Py_TYPE(self)->tp_frees;
23404  --Py_TYPE(self)->tp_allocs;
23405 #endif
23406 #endif
23407 }
23408 static PyObject *
23409 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23410 {
23411  PyObject *name = self->gi_name;
23412  if (unlikely(!name)) name = Py_None;
23413  Py_INCREF(name);
23414  return name;
23415 }
23416 static int
23417 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23418 {
23419  PyObject *tmp;
23420 #if PY_MAJOR_VERSION >= 3
23421  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23422 #else
23423  if (unlikely(value == NULL || !PyString_Check(value)))
23424 #endif
23425  {
23426  PyErr_SetString(PyExc_TypeError,
23427  "__name__ must be set to a string object");
23428  return -1;
23429  }
23430  tmp = self->gi_name;
23431  Py_INCREF(value);
23432  self->gi_name = value;
23433  Py_XDECREF(tmp);
23434  return 0;
23435 }
23436 static PyObject *
23437 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23438 {
23439  PyObject *name = self->gi_qualname;
23440  if (unlikely(!name)) name = Py_None;
23441  Py_INCREF(name);
23442  return name;
23443 }
23444 static int
23445 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23446 {
23447  PyObject *tmp;
23448 #if PY_MAJOR_VERSION >= 3
23449  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23450 #else
23451  if (unlikely(value == NULL || !PyString_Check(value)))
23452 #endif
23453  {
23454  PyErr_SetString(PyExc_TypeError,
23455  "__qualname__ must be set to a string object");
23456  return -1;
23457  }
23458  tmp = self->gi_qualname;
23459  Py_INCREF(value);
23460  self->gi_qualname = value;
23461  Py_XDECREF(tmp);
23462  return 0;
23463 }
23464 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23465  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23466  PyObject *name, PyObject *qualname, PyObject *module_name) {
23467  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23468  if (unlikely(!gen))
23469  return NULL;
23470  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23471 }
23472 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23473  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23474  PyObject *name, PyObject *qualname, PyObject *module_name) {
23475  gen->body = body;
23476  gen->closure = closure;
23477  Py_XINCREF(closure);
23478  gen->is_running = 0;
23479  gen->resume_label = 0;
23480  gen->classobj = NULL;
23481  gen->yieldfrom = NULL;
23482  gen->gi_exc_state.exc_type = NULL;
23483  gen->gi_exc_state.exc_value = NULL;
23484  gen->gi_exc_state.exc_traceback = NULL;
23485 #if CYTHON_USE_EXC_INFO_STACK
23486  gen->gi_exc_state.previous_item = NULL;
23487 #endif
23488  gen->gi_weakreflist = NULL;
23489  Py_XINCREF(qualname);
23490  gen->gi_qualname = qualname;
23491  Py_XINCREF(name);
23492  gen->gi_name = name;
23493  Py_XINCREF(module_name);
23494  gen->gi_modulename = module_name;
23495  Py_XINCREF(code);
23496  gen->gi_code = code;
23497  PyObject_GC_Track(gen);
23498  return gen;
23499 }
23500 
23501 /* PatchModuleWithCoroutine */
23502  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23503 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23504  int result;
23505  PyObject *globals, *result_obj;
23506  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23507  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23508  #ifdef __Pyx_Coroutine_USED
23509  (PyObject*)__pyx_CoroutineType);
23510  #else
23511  Py_None);
23512  #endif
23513  if (unlikely(result < 0)) goto ignore;
23514  result = PyDict_SetItemString(globals, "_cython_generator_type",
23515  #ifdef __Pyx_Generator_USED
23516  (PyObject*)__pyx_GeneratorType);
23517  #else
23518  Py_None);
23519  #endif
23520  if (unlikely(result < 0)) goto ignore;
23521  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23522  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23523  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23524  if (unlikely(!result_obj)) goto ignore;
23525  Py_DECREF(result_obj);
23526  Py_DECREF(globals);
23527  return module;
23528 ignore:
23529  Py_XDECREF(globals);
23530  PyErr_WriteUnraisable(module);
23531  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23532  Py_DECREF(module);
23533  module = NULL;
23534  }
23535 #else
23536  py_code++;
23537 #endif
23538  return module;
23539 }
23540 
23541 /* PatchGeneratorABC */
23542  #ifndef CYTHON_REGISTER_ABCS
23543 #define CYTHON_REGISTER_ABCS 1
23544 #endif
23545 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23546 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23547 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23548  module = __Pyx_Coroutine_patch_module(
23549  module, ""
23550 "if _cython_generator_type is not None:\n"
23551 " try: Generator = _module.Generator\n"
23552 " except AttributeError: pass\n"
23553 " else: Generator.register(_cython_generator_type)\n"
23554 "if _cython_coroutine_type is not None:\n"
23555 " try: Coroutine = _module.Coroutine\n"
23556 " except AttributeError: pass\n"
23557 " else: Coroutine.register(_cython_coroutine_type)\n"
23558  );
23559  return module;
23560 }
23561 #endif
23562 static int __Pyx_patch_abc(void) {
23563 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23564  static int abc_patched = 0;
23565  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23566  PyObject *module;
23567  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23568  if (!module) {
23569  PyErr_WriteUnraisable(NULL);
23570  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23571  ((PY_MAJOR_VERSION >= 3) ?
23572  "Cython module failed to register with collections.abc module" :
23573  "Cython module failed to register with collections module"), 1) < 0)) {
23574  return -1;
23575  }
23576  } else {
23577  module = __Pyx_patch_abc_module(module);
23578  abc_patched = 1;
23579  if (unlikely(!module))
23580  return -1;
23581  Py_DECREF(module);
23582  }
23583  module = PyImport_ImportModule("backports_abc");
23584  if (module) {
23585  module = __Pyx_patch_abc_module(module);
23586  Py_XDECREF(module);
23587  }
23588  if (!module) {
23589  PyErr_Clear();
23590  }
23591  }
23592 #else
23593  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23594 #endif
23595  return 0;
23596 }
23597 
23598 /* Generator */
23599  static PyMethodDef __pyx_Generator_methods[] = {
23600  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23601  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23602  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23603  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23604  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
23605  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23606  {0, 0, 0, 0}
23607 };
23608 static PyMemberDef __pyx_Generator_memberlist[] = {
23609  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23610  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23611  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23612  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23613  {0, 0, 0, 0, 0}
23614 };
23615 static PyGetSetDef __pyx_Generator_getsets[] = {
23616  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23617  (char*) PyDoc_STR("name of the generator"), 0},
23618  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23619  (char*) PyDoc_STR("qualified name of the generator"), 0},
23620  {0, 0, 0, 0, 0}
23621 };
23622 static PyTypeObject __pyx_GeneratorType_type = {
23623  PyVarObject_HEAD_INIT(0, 0)
23624  "generator",
23625  sizeof(__pyx_CoroutineObject),
23626  0,
23627  (destructor) __Pyx_Coroutine_dealloc,
23628  0,
23629  0,
23630  0,
23631  0,
23632  0,
23633  0,
23634  0,
23635  0,
23636  0,
23637  0,
23638  0,
23639  0,
23640  0,
23641  0,
23642  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23643  0,
23644  (traverseproc) __Pyx_Coroutine_traverse,
23645  0,
23646  0,
23647  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23648  0,
23649  (iternextfunc) __Pyx_Generator_Next,
23650  __pyx_Generator_methods,
23651  __pyx_Generator_memberlist,
23652  __pyx_Generator_getsets,
23653  0,
23654  0,
23655  0,
23656  0,
23657  0,
23658  0,
23659  0,
23660  0,
23661  0,
23662  0,
23663  0,
23664  0,
23665  0,
23666  0,
23667  0,
23668 #if CYTHON_USE_TP_FINALIZE
23669  0,
23670 #else
23671  __Pyx_Coroutine_del,
23672 #endif
23673  0,
23674 #if CYTHON_USE_TP_FINALIZE
23675  __Pyx_Coroutine_del,
23676 #elif PY_VERSION_HEX >= 0x030400a1
23677  0,
23678 #endif
23679 };
23680 static int __pyx_Generator_init(void) {
23681  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23682  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23683  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23684  if (unlikely(!__pyx_GeneratorType)) {
23685  return -1;
23686  }
23687  return 0;
23688 }
23689 
23690 /* CheckBinaryVersion */
23691  static int __Pyx_check_binary_version(void) {
23692  char ctversion[4], rtversion[4];
23693  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23694  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23695  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23696  char message[200];
23697  PyOS_snprintf(message, sizeof(message),
23698  "compiletime version %s of module '%.100s' "
23699  "does not match runtime version %s",
23700  ctversion, __Pyx_MODULE_NAME, rtversion);
23701  return PyErr_WarnEx(NULL, message, 1);
23702  }
23703  return 0;
23704 }
23705 
23706 /* InitStrings */
23707  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23708  while (t->p) {
23709  #if PY_MAJOR_VERSION < 3
23710  if (t->is_unicode) {
23711  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
23712  } else if (t->intern) {
23713  *t->p = PyString_InternFromString(t->s);
23714  } else {
23715  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23716  }
23717  #else
23718  if (t->is_unicode | t->is_str) {
23719  if (t->intern) {
23720  *t->p = PyUnicode_InternFromString(t->s);
23721  } else if (t->encoding) {
23722  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
23723  } else {
23724  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
23725  }
23726  } else {
23727  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
23728  }
23729  #endif
23730  if (!*t->p)
23731  return -1;
23732  if (PyObject_Hash(*t->p) == -1)
23733  return -1;
23734  ++t;
23735  }
23736  return 0;
23737 }
23738 
23739 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
23740  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
23741 }
23742 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
23743  Py_ssize_t ignore;
23744  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
23745 }
23746 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23747 #if !CYTHON_PEP393_ENABLED
23748 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23749  char* defenc_c;
23750  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
23751  if (!defenc) return NULL;
23752  defenc_c = PyBytes_AS_STRING(defenc);
23753 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23754  {
23755  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
23756  char* c;
23757  for (c = defenc_c; c < end; c++) {
23758  if ((unsigned char) (*c) >= 128) {
23759  PyUnicode_AsASCIIString(o);
23760  return NULL;
23761  }
23762  }
23763  }
23764 #endif
23765  *length = PyBytes_GET_SIZE(defenc);
23766  return defenc_c;
23767 }
23768 #else
23769 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23770  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
23771 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23772  if (likely(PyUnicode_IS_ASCII(o))) {
23773  *length = PyUnicode_GET_LENGTH(o);
23774  return PyUnicode_AsUTF8(o);
23775  } else {
23776  PyUnicode_AsASCIIString(o);
23777  return NULL;
23778  }
23779 #else
23780  return PyUnicode_AsUTF8AndSize(o, length);
23781 #endif
23782 }
23783 #endif
23784 #endif
23785 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23786 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23787  if (
23788 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23789  __Pyx_sys_getdefaultencoding_not_ascii &&
23790 #endif
23791  PyUnicode_Check(o)) {
23792  return __Pyx_PyUnicode_AsStringAndSize(o, length);
23793  } else
23794 #endif
23795 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
23796  if (PyByteArray_Check(o)) {
23797  *length = PyByteArray_GET_SIZE(o);
23798  return PyByteArray_AS_STRING(o);
23799  } else
23800 #endif
23801  {
23802  char* result;
23803  int r = PyBytes_AsStringAndSize(o, &result, length);
23804  if (unlikely(r < 0)) {
23805  return NULL;
23806  } else {
23807  return result;
23808  }
23809  }
23810 }
23811 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
23812  int is_true = x == Py_True;
23813  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
23814  else return PyObject_IsTrue(x);
23815 }
23816 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
23817  int retval;
23818  if (unlikely(!x)) return -1;
23819  retval = __Pyx_PyObject_IsTrue(x);
23820  Py_DECREF(x);
23821  return retval;
23822 }
23823 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
23824 #if PY_MAJOR_VERSION >= 3
23825  if (PyLong_Check(result)) {
23826  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
23827  "__int__ returned non-int (type %.200s). "
23828  "The ability to return an instance of a strict subclass of int "
23829  "is deprecated, and may be removed in a future version of Python.",
23830  Py_TYPE(result)->tp_name)) {
23831  Py_DECREF(result);
23832  return NULL;
23833  }
23834  return result;
23835  }
23836 #endif
23837  PyErr_Format(PyExc_TypeError,
23838  "__%.4s__ returned non-%.4s (type %.200s)",
23839  type_name, type_name, Py_TYPE(result)->tp_name);
23840  Py_DECREF(result);
23841  return NULL;
23842 }
23843 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
23844 #if CYTHON_USE_TYPE_SLOTS
23845  PyNumberMethods *m;
23846 #endif
23847  const char *name = NULL;
23848  PyObject *res = NULL;
23849 #if PY_MAJOR_VERSION < 3
23850  if (likely(PyInt_Check(x) || PyLong_Check(x)))
23851 #else
23852  if (likely(PyLong_Check(x)))
23853 #endif
23854  return __Pyx_NewRef(x);
23855 #if CYTHON_USE_TYPE_SLOTS
23856  m = Py_TYPE(x)->tp_as_number;
23857  #if PY_MAJOR_VERSION < 3
23858  if (m && m->nb_int) {
23859  name = "int";
23860  res = m->nb_int(x);
23861  }
23862  else if (m && m->nb_long) {
23863  name = "long";
23864  res = m->nb_long(x);
23865  }
23866  #else
23867  if (likely(m && m->nb_int)) {
23868  name = "int";
23869  res = m->nb_int(x);
23870  }
23871  #endif
23872 #else
23873  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
23874  res = PyNumber_Int(x);
23875  }
23876 #endif
23877  if (likely(res)) {
23878 #if PY_MAJOR_VERSION < 3
23879  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
23880 #else
23881  if (unlikely(!PyLong_CheckExact(res))) {
23882 #endif
23883  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
23884  }
23885  }
23886  else if (!PyErr_Occurred()) {
23887  PyErr_SetString(PyExc_TypeError,
23888  "an integer is required");
23889  }
23890  return res;
23891 }
23892 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
23893  Py_ssize_t ival;
23894  PyObject *x;
23895 #if PY_MAJOR_VERSION < 3
23896  if (likely(PyInt_CheckExact(b))) {
23897  if (sizeof(Py_ssize_t) >= sizeof(long))
23898  return PyInt_AS_LONG(b);
23899  else
23900  return PyInt_AsSsize_t(b);
23901  }
23902 #endif
23903  if (likely(PyLong_CheckExact(b))) {
23904  #if CYTHON_USE_PYLONG_INTERNALS
23905  const digit* digits = ((PyLongObject*)b)->ob_digit;
23906  const Py_ssize_t size = Py_SIZE(b);
23907  if (likely(__Pyx_sst_abs(size) <= 1)) {
23908  ival = likely(size) ? digits[0] : 0;
23909  if (size == -1) ival = -ival;
23910  return ival;
23911  } else {
23912  switch (size) {
23913  case 2:
23914  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23915  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23916  }
23917  break;
23918  case -2:
23919  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23920  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23921  }
23922  break;
23923  case 3:
23924  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23925  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23926  }
23927  break;
23928  case -3:
23929  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23930  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23931  }
23932  break;
23933  case 4:
23934  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23935  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]));
23936  }
23937  break;
23938  case -4:
23939  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23940  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]));
23941  }
23942  break;
23943  }
23944  }
23945  #endif
23946  return PyLong_AsSsize_t(b);
23947  }
23948  x = PyNumber_Index(b);
23949  if (!x) return -1;
23950  ival = PyInt_AsSsize_t(x);
23951  Py_DECREF(x);
23952  return ival;
23953 }
23954 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
23955  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
23956 }
23957 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
23958  return PyInt_FromSize_t(ival);
23959 }
23960 
23961 
23962 #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