glucat  0.12.0
PyClical_nocython.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.28 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "depends": [
7  "PyClical.h"
8  ],
9  "include_dirs": [
10  "."
11  ],
12  "language": "c++",
13  "name": "PyClical",
14  "sources": [
15  "PyClical.pyx"
16  ]
17  },
18  "module_name": "PyClical"
19 }
20 END: Cython Metadata */
21 
22 #ifndef PY_SSIZE_T_CLEAN
23 #define PY_SSIZE_T_CLEAN
24 #endif /* PY_SSIZE_T_CLEAN */
25 #include "Python.h"
26 #ifndef Py_PYTHON_H
27  #error Python headers needed to compile C extensions, please install development version of Python.
28 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
29  #error Cython requires Python 2.6+ or Python 3.3+.
30 #else
31 #define CYTHON_ABI "0_29_28"
32 #define CYTHON_HEX_VERSION 0x001D1CF0
33 #define CYTHON_FUTURE_DIVISION 1
34 #include <stddef.h>
35 #ifndef offsetof
36  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
37 #endif
38 #if !defined(WIN32) && !defined(MS_WINDOWS)
39  #ifndef __stdcall
40  #define __stdcall
41  #endif
42  #ifndef __cdecl
43  #define __cdecl
44  #endif
45  #ifndef __fastcall
46  #define __fastcall
47  #endif
48 #endif
49 #ifndef DL_IMPORT
50  #define DL_IMPORT(t) t
51 #endif
52 #ifndef DL_EXPORT
53  #define DL_EXPORT(t) t
54 #endif
55 #define __PYX_COMMA ,
56 #ifndef HAVE_LONG_LONG
57  #if PY_VERSION_HEX >= 0x02070000
58  #define HAVE_LONG_LONG
59  #endif
60 #endif
61 #ifndef PY_LONG_LONG
62  #define PY_LONG_LONG LONG_LONG
63 #endif
64 #ifndef Py_HUGE_VAL
65  #define Py_HUGE_VAL HUGE_VAL
66 #endif
67 #ifdef PYPY_VERSION
68  #define CYTHON_COMPILING_IN_PYPY 1
69  #define CYTHON_COMPILING_IN_PYSTON 0
70  #define CYTHON_COMPILING_IN_CPYTHON 0
71  #undef CYTHON_USE_TYPE_SLOTS
72  #define CYTHON_USE_TYPE_SLOTS 0
73  #undef CYTHON_USE_PYTYPE_LOOKUP
74  #define CYTHON_USE_PYTYPE_LOOKUP 0
75  #if PY_VERSION_HEX < 0x03050000
76  #undef CYTHON_USE_ASYNC_SLOTS
77  #define CYTHON_USE_ASYNC_SLOTS 0
78  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
79  #define CYTHON_USE_ASYNC_SLOTS 1
80  #endif
81  #undef CYTHON_USE_PYLIST_INTERNALS
82  #define CYTHON_USE_PYLIST_INTERNALS 0
83  #undef CYTHON_USE_UNICODE_INTERNALS
84  #define CYTHON_USE_UNICODE_INTERNALS 0
85  #undef CYTHON_USE_UNICODE_WRITER
86  #define CYTHON_USE_UNICODE_WRITER 0
87  #undef CYTHON_USE_PYLONG_INTERNALS
88  #define CYTHON_USE_PYLONG_INTERNALS 0
89  #undef CYTHON_AVOID_BORROWED_REFS
90  #define CYTHON_AVOID_BORROWED_REFS 1
91  #undef CYTHON_ASSUME_SAFE_MACROS
92  #define CYTHON_ASSUME_SAFE_MACROS 0
93  #undef CYTHON_UNPACK_METHODS
94  #define CYTHON_UNPACK_METHODS 0
95  #undef CYTHON_FAST_THREAD_STATE
96  #define CYTHON_FAST_THREAD_STATE 0
97  #undef CYTHON_FAST_PYCALL
98  #define CYTHON_FAST_PYCALL 0
99  #undef CYTHON_PEP489_MULTI_PHASE_INIT
100  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
101  #undef CYTHON_USE_TP_FINALIZE
102  #define CYTHON_USE_TP_FINALIZE 0
103  #undef CYTHON_USE_DICT_VERSIONS
104  #define CYTHON_USE_DICT_VERSIONS 0
105  #undef CYTHON_USE_EXC_INFO_STACK
106  #define CYTHON_USE_EXC_INFO_STACK 0
107 #elif defined(PYSTON_VERSION)
108  #define CYTHON_COMPILING_IN_PYPY 0
109  #define CYTHON_COMPILING_IN_PYSTON 1
110  #define CYTHON_COMPILING_IN_CPYTHON 0
111  #ifndef CYTHON_USE_TYPE_SLOTS
112  #define CYTHON_USE_TYPE_SLOTS 1
113  #endif
114  #undef CYTHON_USE_PYTYPE_LOOKUP
115  #define CYTHON_USE_PYTYPE_LOOKUP 0
116  #undef CYTHON_USE_ASYNC_SLOTS
117  #define CYTHON_USE_ASYNC_SLOTS 0
118  #undef CYTHON_USE_PYLIST_INTERNALS
119  #define CYTHON_USE_PYLIST_INTERNALS 0
120  #ifndef CYTHON_USE_UNICODE_INTERNALS
121  #define CYTHON_USE_UNICODE_INTERNALS 1
122  #endif
123  #undef CYTHON_USE_UNICODE_WRITER
124  #define CYTHON_USE_UNICODE_WRITER 0
125  #undef CYTHON_USE_PYLONG_INTERNALS
126  #define CYTHON_USE_PYLONG_INTERNALS 0
127  #ifndef CYTHON_AVOID_BORROWED_REFS
128  #define CYTHON_AVOID_BORROWED_REFS 0
129  #endif
130  #ifndef CYTHON_ASSUME_SAFE_MACROS
131  #define CYTHON_ASSUME_SAFE_MACROS 1
132  #endif
133  #ifndef CYTHON_UNPACK_METHODS
134  #define CYTHON_UNPACK_METHODS 1
135  #endif
136  #undef CYTHON_FAST_THREAD_STATE
137  #define CYTHON_FAST_THREAD_STATE 0
138  #undef CYTHON_FAST_PYCALL
139  #define CYTHON_FAST_PYCALL 0
140  #undef CYTHON_PEP489_MULTI_PHASE_INIT
141  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
142  #undef CYTHON_USE_TP_FINALIZE
143  #define CYTHON_USE_TP_FINALIZE 0
144  #undef CYTHON_USE_DICT_VERSIONS
145  #define CYTHON_USE_DICT_VERSIONS 0
146  #undef CYTHON_USE_EXC_INFO_STACK
147  #define CYTHON_USE_EXC_INFO_STACK 0
148 #else
149  #define CYTHON_COMPILING_IN_PYPY 0
150  #define CYTHON_COMPILING_IN_PYSTON 0
151  #define CYTHON_COMPILING_IN_CPYTHON 1
152  #ifndef CYTHON_USE_TYPE_SLOTS
153  #define CYTHON_USE_TYPE_SLOTS 1
154  #endif
155  #if PY_VERSION_HEX < 0x02070000
156  #undef CYTHON_USE_PYTYPE_LOOKUP
157  #define CYTHON_USE_PYTYPE_LOOKUP 0
158  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
159  #define CYTHON_USE_PYTYPE_LOOKUP 1
160  #endif
161  #if PY_MAJOR_VERSION < 3
162  #undef CYTHON_USE_ASYNC_SLOTS
163  #define CYTHON_USE_ASYNC_SLOTS 0
164  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
165  #define CYTHON_USE_ASYNC_SLOTS 1
166  #endif
167  #if PY_VERSION_HEX < 0x02070000
168  #undef CYTHON_USE_PYLONG_INTERNALS
169  #define CYTHON_USE_PYLONG_INTERNALS 0
170  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
171  #define CYTHON_USE_PYLONG_INTERNALS 1
172  #endif
173  #ifndef CYTHON_USE_PYLIST_INTERNALS
174  #define CYTHON_USE_PYLIST_INTERNALS 1
175  #endif
176  #ifndef CYTHON_USE_UNICODE_INTERNALS
177  #define CYTHON_USE_UNICODE_INTERNALS 1
178  #endif
179  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
180  #undef CYTHON_USE_UNICODE_WRITER
181  #define CYTHON_USE_UNICODE_WRITER 0
182  #elif !defined(CYTHON_USE_UNICODE_WRITER)
183  #define CYTHON_USE_UNICODE_WRITER 1
184  #endif
185  #ifndef CYTHON_AVOID_BORROWED_REFS
186  #define CYTHON_AVOID_BORROWED_REFS 0
187  #endif
188  #ifndef CYTHON_ASSUME_SAFE_MACROS
189  #define CYTHON_ASSUME_SAFE_MACROS 1
190  #endif
191  #ifndef CYTHON_UNPACK_METHODS
192  #define CYTHON_UNPACK_METHODS 1
193  #endif
194  #if PY_VERSION_HEX >= 0x030B00A4
195  #undef CYTHON_FAST_THREAD_STATE
196  #define CYTHON_FAST_THREAD_STATE 0
197  #elif !defined(CYTHON_FAST_THREAD_STATE)
198  #define CYTHON_FAST_THREAD_STATE 1
199  #endif
200  #ifndef CYTHON_FAST_PYCALL
201  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1)
202  #endif
203  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
204  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
205  #endif
206  #ifndef CYTHON_USE_TP_FINALIZE
207  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
208  #endif
209  #ifndef CYTHON_USE_DICT_VERSIONS
210  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
211  #endif
212  #if PY_VERSION_HEX >= 0x030B00A4
213  #undef CYTHON_USE_EXC_INFO_STACK
214  #define CYTHON_USE_EXC_INFO_STACK 0
215  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
216  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
217  #endif
218 #endif
219 #if !defined(CYTHON_FAST_PYCCALL)
220 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
221 #endif
222 #if CYTHON_USE_PYLONG_INTERNALS
223  #if PY_MAJOR_VERSION < 3
224  #include "longintrepr.h"
225  #endif
226  #undef SHIFT
227  #undef BASE
228  #undef MASK
229  #ifdef SIZEOF_VOID_P
230  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
231  #endif
232 #endif
233 #ifndef __has_attribute
234  #define __has_attribute(x) 0
235 #endif
236 #ifndef __has_cpp_attribute
237  #define __has_cpp_attribute(x) 0
238 #endif
239 #ifndef CYTHON_RESTRICT
240  #if defined(__GNUC__)
241  #define CYTHON_RESTRICT __restrict__
242  #elif defined(_MSC_VER) && _MSC_VER >= 1400
243  #define CYTHON_RESTRICT __restrict
244  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
245  #define CYTHON_RESTRICT restrict
246  #else
247  #define CYTHON_RESTRICT
248  #endif
249 #endif
250 #ifndef CYTHON_UNUSED
251 # if defined(__GNUC__)
252 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
253 # define CYTHON_UNUSED __attribute__ ((__unused__))
254 # else
255 # define CYTHON_UNUSED
256 # endif
257 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
258 # define CYTHON_UNUSED __attribute__ ((__unused__))
259 # else
260 # define CYTHON_UNUSED
261 # endif
262 #endif
263 #ifndef CYTHON_MAYBE_UNUSED_VAR
264 # if defined(__cplusplus)
265  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
266 # else
267 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
268 # endif
269 #endif
270 #ifndef CYTHON_NCP_UNUSED
271 # if CYTHON_COMPILING_IN_CPYTHON
272 # define CYTHON_NCP_UNUSED
273 # else
274 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
275 # endif
276 #endif
277 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
278 #ifdef _MSC_VER
279  #ifndef _MSC_STDINT_H_
280  #if _MSC_VER < 1300
281  typedef unsigned char uint8_t;
282  typedef unsigned int uint32_t;
283  #else
284  typedef unsigned __int8 uint8_t;
285  typedef unsigned __int32 uint32_t;
286  #endif
287  #endif
288 #else
289  #include <stdint.h>
290 #endif
291 #ifndef CYTHON_FALLTHROUGH
292  #if defined(__cplusplus) && __cplusplus >= 201103L
293  #if __has_cpp_attribute(fallthrough)
294  #define CYTHON_FALLTHROUGH [[fallthrough]]
295  #elif __has_cpp_attribute(clang::fallthrough)
296  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
297  #elif __has_cpp_attribute(gnu::fallthrough)
298  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
299  #endif
300  #endif
301  #ifndef CYTHON_FALLTHROUGH
302  #if __has_attribute(fallthrough)
303  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
304  #else
305  #define CYTHON_FALLTHROUGH
306  #endif
307  #endif
308  #if defined(__clang__ ) && defined(__apple_build_version__)
309  #if __apple_build_version__ < 7000000
310  #undef CYTHON_FALLTHROUGH
311  #define CYTHON_FALLTHROUGH
312  #endif
313  #endif
314 #endif
315 
316 #ifndef __cplusplus
317  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
318 #endif
319 #ifndef CYTHON_INLINE
320  #if defined(__clang__)
321  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
322  #else
323  #define CYTHON_INLINE inline
324  #endif
325 #endif
326 template<typename T>
327 void __Pyx_call_destructor(T& x) {
328  x.~T();
329 }
330 template<typename T>
331 class __Pyx_FakeReference {
332  public:
333  __Pyx_FakeReference() : ptr(NULL) { }
334  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
335  T *operator->() { return ptr; }
336  T *operator&() { return ptr; }
337  operator T&() { return *ptr; }
338  template<typename U> bool operator ==(U other) { return *ptr == other; }
339  template<typename U> bool operator !=(U other) { return *ptr != other; }
340  private:
341  T *ptr;
342 };
343 
344 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
345  #define Py_OptimizeFlag 0
346 #endif
347 #define __PYX_BUILD_PY_SSIZE_T "n"
348 #define CYTHON_FORMAT_SSIZE_T "z"
349 #if PY_MAJOR_VERSION < 3
350  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
351  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
352  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
353  #define __Pyx_DefaultClassType PyClass_Type
354 #else
355  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
356  #define __Pyx_DefaultClassType PyType_Type
357 #if PY_VERSION_HEX >= 0x030B00A1
358  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
359  PyObject *code, PyObject *c, PyObject* n, PyObject *v,
360  PyObject *fv, PyObject *cell, PyObject* fn,
361  PyObject *name, int fline, PyObject *lnos) {
362  PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
363  PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
364  const char *fn_cstr=NULL;
365  const char *name_cstr=NULL;
366  PyCodeObject* co=NULL;
367  PyObject *type, *value, *traceback;
368  PyErr_Fetch(&type, &value, &traceback);
369  if (!(kwds=PyDict_New())) goto end;
370  if (!(argcount=PyLong_FromLong(a))) goto end;
371  if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
372  if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
373  if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
374  if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
375  if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
376  if (!(nlocals=PyLong_FromLong(l))) goto end;
377  if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
378  if (!(stacksize=PyLong_FromLong(s))) goto end;
379  if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
380  if (!(flags=PyLong_FromLong(f))) goto end;
381  if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
382  if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
383  if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
384  if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
385  if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
386  if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
387  if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
388  if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
389  if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
390  if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
391  if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
392  if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
393  if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
394  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
395  Py_XDECREF((PyObject*)co);
396  co = (PyCodeObject*)call_result;
397  call_result = NULL;
398  if (0) {
399  cleanup_code_too:
400  Py_XDECREF((PyObject*)co);
401  co = NULL;
402  }
403  end:
404  Py_XDECREF(kwds);
405  Py_XDECREF(argcount);
406  Py_XDECREF(posonlyargcount);
407  Py_XDECREF(kwonlyargcount);
408  Py_XDECREF(nlocals);
409  Py_XDECREF(stacksize);
410  Py_XDECREF(replace);
411  Py_XDECREF(call_result);
412  Py_XDECREF(empty);
413  if (type) {
414  PyErr_Restore(type, value, traceback);
415  }
416  return co;
417  }
418 #else
419  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
420  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
421 #endif
422  #define __Pyx_DefaultClassType PyType_Type
423 #endif
424 #ifndef Py_TPFLAGS_CHECKTYPES
425  #define Py_TPFLAGS_CHECKTYPES 0
426 #endif
427 #ifndef Py_TPFLAGS_HAVE_INDEX
428  #define Py_TPFLAGS_HAVE_INDEX 0
429 #endif
430 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
431  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
432 #endif
433 #ifndef Py_TPFLAGS_HAVE_FINALIZE
434  #define Py_TPFLAGS_HAVE_FINALIZE 0
435 #endif
436 #ifndef METH_STACKLESS
437  #define METH_STACKLESS 0
438 #endif
439 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
440  #ifndef METH_FASTCALL
441  #define METH_FASTCALL 0x80
442  #endif
443  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
444  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
445  Py_ssize_t nargs, PyObject *kwnames);
446 #else
447  #define __Pyx_PyCFunctionFast _PyCFunctionFast
448  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
449 #endif
450 #if CYTHON_FAST_PYCCALL
451 #define __Pyx_PyFastCFunction_Check(func)\
452  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
453 #else
454 #define __Pyx_PyFastCFunction_Check(func) 0
455 #endif
456 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
457  #define PyObject_Malloc(s) PyMem_Malloc(s)
458  #define PyObject_Free(p) PyMem_Free(p)
459  #define PyObject_Realloc(p) PyMem_Realloc(p)
460 #endif
461 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
462  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
463  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
464  #define PyMem_RawFree(p) PyMem_Free(p)
465 #endif
466 #if CYTHON_COMPILING_IN_PYSTON
467  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
468  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
469 #else
470  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
471  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
472 #endif
473 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
474  #define __Pyx_PyThreadState_Current PyThreadState_GET()
475 #elif PY_VERSION_HEX >= 0x03060000
476  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
477 #elif PY_VERSION_HEX >= 0x03000000
478  #define __Pyx_PyThreadState_Current PyThreadState_GET()
479 #else
480  #define __Pyx_PyThreadState_Current _PyThreadState_Current
481 #endif
482 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
483 #include "pythread.h"
484 #define Py_tss_NEEDS_INIT 0
485 typedef int Py_tss_t;
486 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
487  *key = PyThread_create_key();
488  return 0;
489 }
490 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
491  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
492  *key = Py_tss_NEEDS_INIT;
493  return key;
494 }
495 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
496  PyObject_Free(key);
497 }
498 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
499  return *key != Py_tss_NEEDS_INIT;
500 }
501 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
502  PyThread_delete_key(*key);
503  *key = Py_tss_NEEDS_INIT;
504 }
505 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
506  return PyThread_set_key_value(*key, value);
507 }
508 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
509  return PyThread_get_key_value(*key);
510 }
511 #endif
512 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
513 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
514 #else
515 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
516 #endif
517 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
518  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
519  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
520 #else
521  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
522  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
523 #endif
524 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
525 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
526 #else
527 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
528 #endif
529 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
530  #define CYTHON_PEP393_ENABLED 1
531  #if defined(PyUnicode_IS_READY)
532  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
533  0 : _PyUnicode_Ready((PyObject *)(op)))
534  #else
535  #define __Pyx_PyUnicode_READY(op) (0)
536  #endif
537  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
538  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
539  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
540  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
541  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
542  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
543  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
544  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
545  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
546  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
547  #else
548  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
549  #endif
550  #else
551  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
552  #endif
553 #else
554  #define CYTHON_PEP393_ENABLED 0
555  #define PyUnicode_1BYTE_KIND 1
556  #define PyUnicode_2BYTE_KIND 2
557  #define PyUnicode_4BYTE_KIND 4
558  #define __Pyx_PyUnicode_READY(op) (0)
559  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
560  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
561  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
562  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
563  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
564  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
565  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
566  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
567 #endif
568 #if CYTHON_COMPILING_IN_PYPY
569  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
570  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
571 #else
572  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
573  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
574  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
575 #endif
576 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
577  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
578 #endif
579 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
580  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
581 #endif
582 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
583  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
584 #endif
585 #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))
586 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
587 #if PY_MAJOR_VERSION >= 3
588  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
589 #else
590  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
591 #endif
592 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
593  #define PyObject_ASCII(o) PyObject_Repr(o)
594 #endif
595 #if PY_MAJOR_VERSION >= 3
596  #define PyBaseString_Type PyUnicode_Type
597  #define PyStringObject PyUnicodeObject
598  #define PyString_Type PyUnicode_Type
599  #define PyString_Check PyUnicode_Check
600  #define PyString_CheckExact PyUnicode_CheckExact
601 #ifndef PyObject_Unicode
602  #define PyObject_Unicode PyObject_Str
603 #endif
604 #endif
605 #if PY_MAJOR_VERSION >= 3
606  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
607  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
608 #else
609  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
610  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
611 #endif
612 #ifndef PySet_CheckExact
613  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
614 #endif
615 #if PY_VERSION_HEX >= 0x030900A4
616  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
617  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
618 #else
619  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
620  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
621 #endif
622 #if CYTHON_ASSUME_SAFE_MACROS
623  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
624 #else
625  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
626 #endif
627 #if PY_MAJOR_VERSION >= 3
628  #define PyIntObject PyLongObject
629  #define PyInt_Type PyLong_Type
630  #define PyInt_Check(op) PyLong_Check(op)
631  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
632  #define PyInt_FromString PyLong_FromString
633  #define PyInt_FromUnicode PyLong_FromUnicode
634  #define PyInt_FromLong PyLong_FromLong
635  #define PyInt_FromSize_t PyLong_FromSize_t
636  #define PyInt_FromSsize_t PyLong_FromSsize_t
637  #define PyInt_AsLong PyLong_AsLong
638  #define PyInt_AS_LONG PyLong_AS_LONG
639  #define PyInt_AsSsize_t PyLong_AsSsize_t
640  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
641  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
642  #define PyNumber_Int PyNumber_Long
643 #endif
644 #if PY_MAJOR_VERSION >= 3
645  #define PyBoolObject PyLongObject
646 #endif
647 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
648  #ifndef PyUnicode_InternFromString
649  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
650  #endif
651 #endif
652 #if PY_VERSION_HEX < 0x030200A4
653  typedef long Py_hash_t;
654  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
655  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
656 #else
657  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
658  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
659 #endif
660 #if PY_MAJOR_VERSION >= 3
661  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
662 #else
663  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
664 #endif
665 #if CYTHON_USE_ASYNC_SLOTS
666  #if PY_VERSION_HEX >= 0x030500B1
667  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
668  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
669  #else
670  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
671  #endif
672 #else
673  #define __Pyx_PyType_AsAsync(obj) NULL
674 #endif
675 #ifndef __Pyx_PyAsyncMethodsStruct
676  typedef struct {
677  unaryfunc am_await;
678  unaryfunc am_aiter;
679  unaryfunc am_anext;
680  } __Pyx_PyAsyncMethodsStruct;
681 #endif
682 
683 #if defined(WIN32) || defined(MS_WINDOWS)
684  #define _USE_MATH_DEFINES
685 #endif
686 #include <math.h>
687 #ifdef NAN
688 #define __PYX_NAN() ((float) NAN)
689 #else
690 static CYTHON_INLINE float __PYX_NAN() {
691  float value;
692  memset(&value, 0xFF, sizeof(value));
693  return value;
694 }
695 #endif
696 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
697 #define __Pyx_truncl trunc
698 #else
699 #define __Pyx_truncl truncl
700 #endif
701 
702 #define __PYX_MARK_ERR_POS(f_index, lineno) \
703  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
704 #define __PYX_ERR(f_index, lineno, Ln_error) \
705  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
706 
707 #ifndef __PYX_EXTERN_C
708  #ifdef __cplusplus
709  #define __PYX_EXTERN_C extern "C"
710  #else
711  #define __PYX_EXTERN_C extern
712  #endif
713 #endif
714 
715 #define __PYX_HAVE__PyClical
716 #define __PYX_HAVE_API__PyClical
717 /* Early includes */
718 #include "ios"
719 #include "new"
720 #include "stdexcept"
721 #include "typeinfo"
722 #include <vector>
723 #include "PyClical.h"
724 #include <string.h>
725 #include <string>
726 #ifdef _OPENMP
727 #include <omp.h>
728 #endif /* _OPENMP */
729 
730 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
731 #define CYTHON_WITHOUT_ASSERTIONS
732 #endif
733 
734 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
735  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
736 
737 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
738 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
739 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
740 #define __PYX_DEFAULT_STRING_ENCODING ""
741 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
742 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
743 #define __Pyx_uchar_cast(c) ((unsigned char)c)
744 #define __Pyx_long_cast(x) ((long)x)
745 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
746  (sizeof(type) < sizeof(Py_ssize_t)) ||\
747  (sizeof(type) > sizeof(Py_ssize_t) &&\
748  likely(v < (type)PY_SSIZE_T_MAX ||\
749  v == (type)PY_SSIZE_T_MAX) &&\
750  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
751  v == (type)PY_SSIZE_T_MIN))) ||\
752  (sizeof(type) == sizeof(Py_ssize_t) &&\
753  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
754  v == (type)PY_SSIZE_T_MAX))) )
755 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
756  return (size_t) i < (size_t) limit;
757 }
758 #if defined (__cplusplus) && __cplusplus >= 201103L
759  #include <cstdlib>
760  #define __Pyx_sst_abs(value) std::abs(value)
761 #elif SIZEOF_INT >= SIZEOF_SIZE_T
762  #define __Pyx_sst_abs(value) abs(value)
763 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
764  #define __Pyx_sst_abs(value) labs(value)
765 #elif defined (_MSC_VER)
766  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
767 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
768  #define __Pyx_sst_abs(value) llabs(value)
769 #elif defined (__GNUC__)
770  #define __Pyx_sst_abs(value) __builtin_llabs(value)
771 #else
772  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
773 #endif
774 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
775 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
776 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
777 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
778 #define __Pyx_PyBytes_FromString PyBytes_FromString
779 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
780 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
781 #if PY_MAJOR_VERSION < 3
782  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
783  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
784 #else
785  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
786  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
787 #endif
788 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
789 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
790 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
791 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
792 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
793 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
794 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
795 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
796 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
797 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
798 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
799 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
800 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
801 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
802 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
803 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
804 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
805  const Py_UNICODE *u_end = u;
806  while (*u_end++) ;
807  return (size_t)(u_end - u - 1);
808 }
809 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
810 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
811 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
812 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
813 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
814 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
815 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
816 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
817 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
818 #define __Pyx_PySequence_Tuple(obj)\
819  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
820 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
821 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
822 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
823 #if CYTHON_ASSUME_SAFE_MACROS
824 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
825 #else
826 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
827 #endif
828 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
829 #if PY_MAJOR_VERSION >= 3
830 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
831 #else
832 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
833 #endif
834 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
835 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
836 static int __Pyx_sys_getdefaultencoding_not_ascii;
837 static int __Pyx_init_sys_getdefaultencoding_params(void) {
838  PyObject* sys;
839  PyObject* default_encoding = NULL;
840  PyObject* ascii_chars_u = NULL;
841  PyObject* ascii_chars_b = NULL;
842  const char* default_encoding_c;
843  sys = PyImport_ImportModule("sys");
844  if (!sys) goto bad;
845  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
846  Py_DECREF(sys);
847  if (!default_encoding) goto bad;
848  default_encoding_c = PyBytes_AsString(default_encoding);
849  if (!default_encoding_c) goto bad;
850  if (strcmp(default_encoding_c, "ascii") == 0) {
851  __Pyx_sys_getdefaultencoding_not_ascii = 0;
852  } else {
853  char ascii_chars[128];
854  int c;
855  for (c = 0; c < 128; c++) {
856  ascii_chars[c] = c;
857  }
858  __Pyx_sys_getdefaultencoding_not_ascii = 1;
859  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
860  if (!ascii_chars_u) goto bad;
861  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
862  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
863  PyErr_Format(
864  PyExc_ValueError,
865  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
866  default_encoding_c);
867  goto bad;
868  }
869  Py_DECREF(ascii_chars_u);
870  Py_DECREF(ascii_chars_b);
871  }
872  Py_DECREF(default_encoding);
873  return 0;
874 bad:
875  Py_XDECREF(default_encoding);
876  Py_XDECREF(ascii_chars_u);
877  Py_XDECREF(ascii_chars_b);
878  return -1;
879 }
880 #endif
881 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
882 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
883 #else
884 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
885 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
886 static char* __PYX_DEFAULT_STRING_ENCODING;
887 static int __Pyx_init_sys_getdefaultencoding_params(void) {
888  PyObject* sys;
889  PyObject* default_encoding = NULL;
890  char* default_encoding_c;
891  sys = PyImport_ImportModule("sys");
892  if (!sys) goto bad;
893  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
894  Py_DECREF(sys);
895  if (!default_encoding) goto bad;
896  default_encoding_c = PyBytes_AsString(default_encoding);
897  if (!default_encoding_c) goto bad;
898  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
899  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
900  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
901  Py_DECREF(default_encoding);
902  return 0;
903 bad:
904  Py_XDECREF(default_encoding);
905  return -1;
906 }
907 #endif
908 #endif
909 
910 
911 /* Test for GCC > 2.95 */
912 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
913  #define likely(x) __builtin_expect(!!(x), 1)
914  #define unlikely(x) __builtin_expect(!!(x), 0)
915 #else /* !__GNUC__ or GCC < 2.95 */
916  #define likely(x) (x)
917  #define unlikely(x) (x)
918 #endif /* __GNUC__ */
919 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
920 
921 static PyObject *__pyx_m = NULL;
922 static PyObject *__pyx_d;
923 static PyObject *__pyx_b;
924 static PyObject *__pyx_cython_runtime = NULL;
925 static PyObject *__pyx_empty_tuple;
926 static PyObject *__pyx_empty_bytes;
927 static PyObject *__pyx_empty_unicode;
928 static int __pyx_lineno;
929 static int __pyx_clineno = 0;
930 static const char * __pyx_cfilenm= __FILE__;
931 static const char *__pyx_filename;
932 
933 
934 static const char *__pyx_f[] = {
935  "PyClical.pyx",
936  "stringsource",
937 };
938 
939 /*--- Type declarations ---*/
940 struct __pyx_obj_8PyClical_index_set;
941 struct __pyx_obj_8PyClical_clifford;
942 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
943 struct __pyx_opt_args_8PyClical_approx_equal;
944 struct __pyx_opt_args_8PyClical_sqrt;
945 struct __pyx_opt_args_8PyClical_log;
946 struct __pyx_opt_args_8PyClical_cos;
947 struct __pyx_opt_args_8PyClical_acos;
948 struct __pyx_opt_args_8PyClical_acosh;
949 struct __pyx_opt_args_8PyClical_sin;
950 struct __pyx_opt_args_8PyClical_asin;
951 struct __pyx_opt_args_8PyClical_asinh;
952 struct __pyx_opt_args_8PyClical_tan;
953 struct __pyx_opt_args_8PyClical_atan;
954 struct __pyx_opt_args_8PyClical_atanh;
955 struct __pyx_opt_args_8PyClical_random_clifford;
956 
957 /* "PyClical.pyx":1359
958  * return glucat.error_squared(toClifford(lhs), toClifford(rhs), <scalar_t>threshold)
959  *
960  * cpdef inline approx_equal(lhs, rhs, threshold=None, tol=None): # <<<<<<<<<<<<<<
961  * """
962  * Test for approximate equality of multivectors.
963  */
964 struct __pyx_opt_args_8PyClical_approx_equal {
965  int __pyx_n;
966  PyObject *threshold;
967  PyObject *tol;
968 };
969 
970 /* "PyClical.pyx":1591
971  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
972  *
973  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
974  * """
975  * Square root of multivector with optional complexifier.
976  */
977 struct __pyx_opt_args_8PyClical_sqrt {
978  int __pyx_n;
979  PyObject *i;
980 };
981 
982 /* "PyClical.pyx":1628
983  * return clifford().wrap( glucat.exp(toClifford(obj)) )
984  *
985  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
986  * """
987  * Natural logarithm of multivector with optional complexifier.
988  */
989 struct __pyx_opt_args_8PyClical_log {
990  int __pyx_n;
991  PyObject *i;
992 };
993 
994 /* "PyClical.pyx":1651
995  * return clifford().wrap( glucat.log(toClifford(obj)) )
996  *
997  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
998  * """
999  * Cosine of multivector with optional complexifier.
1000  */
1001 struct __pyx_opt_args_8PyClical_cos {
1002  int __pyx_n;
1003  PyObject *i;
1004 };
1005 
1006 /* "PyClical.pyx":1668
1007  * return clifford().wrap( glucat.cos(toClifford(obj)) )
1008  *
1009  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
1010  * """
1011  * Inverse cosine of multivector with optional complexifier.
1012  */
1013 struct __pyx_opt_args_8PyClical_acos {
1014  int __pyx_n;
1015  PyObject *i;
1016 };
1017 
1018 /* "PyClical.pyx":1705
1019  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
1020  *
1021  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
1022  * """
1023  * Inverse hyperbolic cosine of multivector with optional complexifier.
1024  */
1025 struct __pyx_opt_args_8PyClical_acosh {
1026  int __pyx_n;
1027  PyObject *i;
1028 };
1029 
1030 /* "PyClical.pyx":1728
1031  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
1032  *
1033  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
1034  * """
1035  * Sine of multivector with optional complexifier.
1036  */
1037 struct __pyx_opt_args_8PyClical_sin {
1038  int __pyx_n;
1039  PyObject *i;
1040 };
1041 
1042 /* "PyClical.pyx":1747
1043  * return clifford().wrap( glucat.sin(toClifford(obj)) )
1044  *
1045  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
1046  * """
1047  * Inverse sine of multivector with optional complexifier.
1048  */
1049 struct __pyx_opt_args_8PyClical_asin {
1050  int __pyx_n;
1051  PyObject *i;
1052 };
1053 
1054 /* "PyClical.pyx":1782
1055  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
1056  *
1057  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
1058  * """
1059  * Inverse hyperbolic sine of multivector with optional complexifier.
1060  */
1061 struct __pyx_opt_args_8PyClical_asinh {
1062  int __pyx_n;
1063  PyObject *i;
1064 };
1065 
1066 /* "PyClical.pyx":1801
1067  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
1068  *
1069  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
1070  * """
1071  * Tangent of multivector with optional complexifier.
1072  */
1073 struct __pyx_opt_args_8PyClical_tan {
1074  int __pyx_n;
1075  PyObject *i;
1076 };
1077 
1078 /* "PyClical.pyx":1818
1079  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1080  *
1081  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1082  * """
1083  * Inverse tangent of multivector with optional complexifier.
1084  */
1085 struct __pyx_opt_args_8PyClical_atan {
1086  int __pyx_n;
1087  PyObject *i;
1088 };
1089 
1090 /* "PyClical.pyx":1847
1091  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1092  *
1093  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1094  * """
1095  * Inverse hyperbolic tangent of multivector with optional complexifier.
1096  */
1097 struct __pyx_opt_args_8PyClical_atanh {
1098  int __pyx_n;
1099  PyObject *i;
1100 };
1101 
1102 /* "PyClical.pyx":1864
1103  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1104  *
1105  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1106  * """
1107  * Random multivector within a frame.
1108  */
1109 struct __pyx_opt_args_8PyClical_random_clifford {
1110  int __pyx_n;
1111  PyObject *fill;
1112 };
1113 
1114 /* "PyClical.pyx":38
1115  *
1116  * # Forward reference
1117  * cdef class index_set # <<<<<<<<<<<<<<
1118  *
1119  * cdef inline IndexSet toIndexSet(obj):
1120  */
1121 struct __pyx_obj_8PyClical_index_set {
1122  PyObject_HEAD
1123  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1124  IndexSet *instance;
1125 };
1126 
1127 
1128 /* "PyClical.pyx":532
1129  *
1130  * # Forward reference.
1131  * cdef class clifford # <<<<<<<<<<<<<<
1132  *
1133  * cdef inline Clifford toClifford(obj):
1134  */
1135 struct __pyx_obj_8PyClical_clifford {
1136  PyObject_HEAD
1137  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1138  Clifford *instance;
1139 };
1140 
1141 
1142 /* "PyClical.pyx":229
1143  * return self.instance.getitem(idx)
1144  *
1145  * def __iter__(self): # <<<<<<<<<<<<<<
1146  * """
1147  * Iterate over the indices of an index_set.
1148  */
1149 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1150  PyObject_HEAD
1151  PyObject *__pyx_v_idx;
1152  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1153  PyObject *__pyx_t_0;
1154  Py_ssize_t __pyx_t_1;
1155  PyObject *(*__pyx_t_2)(PyObject *);
1156 };
1157 
1158 
1159 
1160 /* "PyClical.pyx":46
1161  * return index_set(obj).instance[0]
1162  *
1163  * cdef class index_set: # <<<<<<<<<<<<<<
1164  * """
1165  * Python class index_set wraps C++ class IndexSet.
1166  */
1167 
1168 struct __pyx_vtabstruct_8PyClical_index_set {
1169  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1170  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1171  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1172 };
1173 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1174 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1175 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1176 
1177 
1178 /* "PyClical.pyx":537
1179  * return clifford(obj).instance[0]
1180  *
1181  * cdef class clifford: # <<<<<<<<<<<<<<
1182  * """
1183  * Python class clifford wraps C++ class Clifford.
1184  */
1185 
1186 struct __pyx_vtabstruct_8PyClical_clifford {
1187  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1188  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1189  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1190 };
1191 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1192 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1193 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1194 
1195 /* --- Runtime support code (head) --- */
1196 /* Refnanny.proto */
1197 #ifndef CYTHON_REFNANNY
1198  #define CYTHON_REFNANNY 0
1199 #endif
1200 #if CYTHON_REFNANNY
1201  typedef struct {
1202  void (*INCREF)(void*, PyObject*, int);
1203  void (*DECREF)(void*, PyObject*, int);
1204  void (*GOTREF)(void*, PyObject*, int);
1205  void (*GIVEREF)(void*, PyObject*, int);
1206  void* (*SetupContext)(const char*, int, const char*);
1207  void (*FinishContext)(void**);
1208  } __Pyx_RefNannyAPIStruct;
1209  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1210  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1211  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1212 #ifdef WITH_THREAD
1213  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1214  if (acquire_gil) {\
1215  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1216  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1217  PyGILState_Release(__pyx_gilstate_save);\
1218  } else {\
1219  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1220  }
1221 #else
1222  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1223  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1224 #endif
1225  #define __Pyx_RefNannyFinishContext()\
1226  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1227  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1228  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1229  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1230  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1231  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1232  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1233  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1234  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1235 #else
1236  #define __Pyx_RefNannyDeclarations
1237  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1238  #define __Pyx_RefNannyFinishContext()
1239  #define __Pyx_INCREF(r) Py_INCREF(r)
1240  #define __Pyx_DECREF(r) Py_DECREF(r)
1241  #define __Pyx_GOTREF(r)
1242  #define __Pyx_GIVEREF(r)
1243  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1244  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1245  #define __Pyx_XGOTREF(r)
1246  #define __Pyx_XGIVEREF(r)
1247 #endif
1248 #define __Pyx_XDECREF_SET(r, v) do {\
1249  PyObject *tmp = (PyObject *) r;\
1250  r = v; __Pyx_XDECREF(tmp);\
1251  } while (0)
1252 #define __Pyx_DECREF_SET(r, v) do {\
1253  PyObject *tmp = (PyObject *) r;\
1254  r = v; __Pyx_DECREF(tmp);\
1255  } while (0)
1256 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1257 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1258 
1259 /* PyObjectGetAttrStr.proto */
1260 #if CYTHON_USE_TYPE_SLOTS
1261 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1262 #else
1263 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1264 #endif
1265 
1266 /* GetBuiltinName.proto */
1267 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1268 
1269 /* PyCFunctionFastCall.proto */
1270 #if CYTHON_FAST_PYCCALL
1271 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1272 #else
1273 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1274 #endif
1275 
1276 /* PyFunctionFastCall.proto */
1277 #if CYTHON_FAST_PYCALL
1278 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1279  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1280 #if 1 || PY_VERSION_HEX < 0x030600B1
1281 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1282 #else
1283 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1284 #endif
1285 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1286  (sizeof(char [1 - 2*!(cond)]) - 1)
1287 #ifndef Py_MEMBER_SIZE
1288 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1289 #endif
1290 #if CYTHON_FAST_PYCALL
1291  static size_t __pyx_pyframe_localsplus_offset = 0;
1292  #include "frameobject.h"
1293  #define __Pxy_PyFrame_Initialize_Offsets()\
1294  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1295  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1296  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1297  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1298 #endif // CYTHON_FAST_PYCALL
1299 #endif
1300 
1301 /* PyObjectCall.proto */
1302 #if CYTHON_COMPILING_IN_CPYTHON
1303 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1304 #else
1305 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1306 #endif
1307 
1308 /* PyObjectCallMethO.proto */
1309 #if CYTHON_COMPILING_IN_CPYTHON
1310 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1311 #endif
1312 
1313 /* PyObjectCallOneArg.proto */
1314 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1315 
1316 /* PyThreadStateGet.proto */
1317 #if CYTHON_FAST_THREAD_STATE
1318 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1319 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1320 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1321 #else
1322 #define __Pyx_PyThreadState_declare
1323 #define __Pyx_PyThreadState_assign
1324 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1325 #endif
1326 
1327 /* PyErrFetchRestore.proto */
1328 #if CYTHON_FAST_THREAD_STATE
1329 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1330 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1331 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1332 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1333 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1334 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1335 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1336 #if CYTHON_COMPILING_IN_CPYTHON
1337 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1338 #else
1339 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1340 #endif
1341 #else
1342 #define __Pyx_PyErr_Clear() PyErr_Clear()
1343 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1344 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1345 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1346 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1347 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1348 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1349 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1350 #endif
1351 
1352 /* WriteUnraisableException.proto */
1353 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1354  int lineno, const char *filename,
1355  int full_traceback, int nogil);
1356 
1357 /* PyDictVersioning.proto */
1358 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1359 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1360 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1361 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1362  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1363  (cache_var) = (value);
1364 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1365  static PY_UINT64_T __pyx_dict_version = 0;\
1366  static PyObject *__pyx_dict_cached_value = NULL;\
1367  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1368  (VAR) = __pyx_dict_cached_value;\
1369  } else {\
1370  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1371  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1372  }\
1373 }
1374 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1375 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1376 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1377 #else
1378 #define __PYX_GET_DICT_VERSION(dict) (0)
1379 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1380 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1381 #endif
1382 
1383 /* PyObjectCallNoArg.proto */
1384 #if CYTHON_COMPILING_IN_CPYTHON
1385 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1386 #else
1387 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1388 #endif
1389 
1390 /* RaiseDoubleKeywords.proto */
1391 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1392 
1393 /* ParseKeywords.proto */
1394 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1395  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1396  const char* function_name);
1397 
1398 /* RaiseArgTupleInvalid.proto */
1399 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1400  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1401 
1402 /* GetModuleGlobalName.proto */
1403 #if CYTHON_USE_DICT_VERSIONS
1404 #define __Pyx_GetModuleGlobalName(var, name) {\
1405  static PY_UINT64_T __pyx_dict_version = 0;\
1406  static PyObject *__pyx_dict_cached_value = NULL;\
1407  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1408  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1409  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1410 }
1411 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1412  PY_UINT64_T __pyx_dict_version;\
1413  PyObject *__pyx_dict_cached_value;\
1414  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1415 }
1416 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1417 #else
1418 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1419 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1420 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1421 #endif
1422 
1423 /* GetTopmostException.proto */
1424 #if CYTHON_USE_EXC_INFO_STACK
1425 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1426 #endif
1427 
1428 /* SaveResetException.proto */
1429 #if CYTHON_FAST_THREAD_STATE
1430 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1431 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1432 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1433 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1434 #else
1435 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1436 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1437 #endif
1438 
1439 /* PyErrExceptionMatches.proto */
1440 #if CYTHON_FAST_THREAD_STATE
1441 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1442 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1443 #else
1444 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1445 #endif
1446 
1447 /* GetException.proto */
1448 #if CYTHON_FAST_THREAD_STATE
1449 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1450 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1451 #else
1452 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1453 #endif
1454 
1455 /* RaiseException.proto */
1456 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1457 
1458 /* PyObjectCall2Args.proto */
1459 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1460 
1461 /* PyIntBinop.proto */
1462 #if !CYTHON_COMPILING_IN_PYPY
1463 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1464 #else
1465 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1466  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1467 #endif
1468 
1469 /* PySequenceContains.proto */
1470 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1471  int result = PySequence_Contains(seq, item);
1472  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1473 }
1474 
1475 /* IncludeCppStringH.proto */
1476 #include <string>
1477 
1478 /* decode_c_string_utf16.proto */
1479 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1480  int byteorder = 0;
1481  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1482 }
1483 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1484  int byteorder = -1;
1485  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1486 }
1487 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1488  int byteorder = 1;
1489  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1490 }
1491 
1492 /* decode_c_bytes.proto */
1493 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
1494  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
1495  const char* encoding, const char* errors,
1496  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1497 
1498 /* decode_cpp_string.proto */
1499 static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string(
1500  std::string cppstring, Py_ssize_t start, Py_ssize_t stop,
1501  const char* encoding, const char* errors,
1502  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
1503  return __Pyx_decode_c_bytes(
1504  cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func);
1505 }
1506 
1507 /* SwapException.proto */
1508 #if CYTHON_FAST_THREAD_STATE
1509 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1510 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1511 #else
1512 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1513 #endif
1514 
1515 /* SetItemInt.proto */
1516 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1517  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1518  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1519  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1520  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1521 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1522 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1523  int is_list, int wraparound, int boundscheck);
1524 
1525 /* ArgTypeTest.proto */
1526 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1527  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1528  __Pyx__ArgTypeTest(obj, type, name, exact))
1529 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1530 
1531 /* Import.proto */
1532 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1533 
1534 /* IncludeStringH.proto */
1535 #include <string.h>
1536 
1537 /* PyObject_GenericGetAttrNoDict.proto */
1538 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1539 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1540 #else
1541 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1542 #endif
1543 
1544 /* PyObject_GenericGetAttr.proto */
1545 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1546 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1547 #else
1548 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1549 #endif
1550 
1551 /* SetVTable.proto */
1552 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1553 
1554 /* PyObjectGetAttrStrNoError.proto */
1555 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
1556 
1557 /* SetupReduce.proto */
1558 static int __Pyx_setup_reduce(PyObject* type_obj);
1559 
1560 /* BytesEquals.proto */
1561 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1562 
1563 /* UnicodeEquals.proto */
1564 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1565 
1566 /* CLineInTraceback.proto */
1567 #ifdef CYTHON_CLINE_IN_TRACEBACK
1568 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1569 #else
1570 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1571 #endif
1572 
1573 /* CodeObjectCache.proto */
1574 typedef struct {
1575  PyCodeObject* code_object;
1576  int code_line;
1577 } __Pyx_CodeObjectCacheEntry;
1578 struct __Pyx_CodeObjectCache {
1579  int count;
1580  int max_count;
1581  __Pyx_CodeObjectCacheEntry* entries;
1582 };
1583 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1584 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1585 static PyCodeObject *__pyx_find_code_object(int code_line);
1586 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1587 
1588 /* AddTraceback.proto */
1589 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1590  int py_line, const char *filename);
1591 
1592 /* GCCDiagnostics.proto */
1593 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
1594 #define __Pyx_HAS_GCC_DIAGNOSTIC
1595 #endif
1596 
1597 /* CppExceptionConversion.proto */
1598 #ifndef __Pyx_CppExn2PyErr
1599 #include <new>
1600 #include <typeinfo>
1601 #include <stdexcept>
1602 #include <ios>
1603 static void __Pyx_CppExn2PyErr() {
1604  try {
1605  if (PyErr_Occurred())
1606  ; // let the latest Python exn pass through and ignore the current one
1607  else
1608  throw;
1609  } catch (const std::bad_alloc& exn) {
1610  PyErr_SetString(PyExc_MemoryError, exn.what());
1611  } catch (const std::bad_cast& exn) {
1612  PyErr_SetString(PyExc_TypeError, exn.what());
1613  } catch (const std::bad_typeid& exn) {
1614  PyErr_SetString(PyExc_TypeError, exn.what());
1615  } catch (const std::domain_error& exn) {
1616  PyErr_SetString(PyExc_ValueError, exn.what());
1617  } catch (const std::invalid_argument& exn) {
1618  PyErr_SetString(PyExc_ValueError, exn.what());
1619  } catch (const std::ios_base::failure& exn) {
1620  PyErr_SetString(PyExc_IOError, exn.what());
1621  } catch (const std::out_of_range& exn) {
1622  PyErr_SetString(PyExc_IndexError, exn.what());
1623  } catch (const std::overflow_error& exn) {
1624  PyErr_SetString(PyExc_OverflowError, exn.what());
1625  } catch (const std::range_error& exn) {
1626  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1627  } catch (const std::underflow_error& exn) {
1628  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1629  } catch (const std::exception& exn) {
1630  PyErr_SetString(PyExc_RuntimeError, exn.what());
1631  }
1632  catch (...)
1633  {
1634  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1635  }
1636 }
1637 #endif
1638 
1639 /* CIntFromPy.proto */
1640 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1641 
1642 /* CIntToPy.proto */
1643 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1644 
1645 /* CIntToPy.proto */
1646 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1647 
1648 /* CIntFromPy.proto */
1649 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1650 
1651 /* FastTypeChecks.proto */
1652 #if CYTHON_COMPILING_IN_CPYTHON
1653 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1654 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1655 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1656 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1657 #else
1658 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1659 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1660 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1661 #endif
1662 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1663 
1664 /* FetchCommonType.proto */
1665 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1666 
1667 /* PyObjectGetMethod.proto */
1668 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1669 
1670 /* PyObjectCallMethod1.proto */
1671 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1672 
1673 /* CoroutineBase.proto */
1674 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1675 #if CYTHON_USE_EXC_INFO_STACK
1676 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1677 #else
1678 typedef struct {
1679  PyObject *exc_type;
1680  PyObject *exc_value;
1681  PyObject *exc_traceback;
1682 } __Pyx_ExcInfoStruct;
1683 #endif
1684 typedef struct {
1685  PyObject_HEAD
1686  __pyx_coroutine_body_t body;
1687  PyObject *closure;
1688  __Pyx_ExcInfoStruct gi_exc_state;
1689  PyObject *gi_weakreflist;
1690  PyObject *classobj;
1691  PyObject *yieldfrom;
1692  PyObject *gi_name;
1693  PyObject *gi_qualname;
1694  PyObject *gi_modulename;
1695  PyObject *gi_code;
1696  PyObject *gi_frame;
1697  int resume_label;
1698  char is_running;
1699 } __pyx_CoroutineObject;
1700 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1701  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1702  PyObject *name, PyObject *qualname, PyObject *module_name);
1703 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1704  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1705  PyObject *name, PyObject *qualname, PyObject *module_name);
1706 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1707 static int __Pyx_Coroutine_clear(PyObject *self);
1708 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1709 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1710 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1711 #if CYTHON_USE_EXC_INFO_STACK
1712 #define __Pyx_Coroutine_SwapException(self)
1713 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1714 #else
1715 #define __Pyx_Coroutine_SwapException(self) {\
1716  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1717  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1718  }
1719 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1720  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1721  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1722  }
1723 #endif
1724 #if CYTHON_FAST_THREAD_STATE
1725 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1726  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1727 #else
1728 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1729  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1730 #endif
1731 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1732 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1733 
1734 /* PatchModuleWithCoroutine.proto */
1735 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1736 
1737 /* PatchGeneratorABC.proto */
1738 static int __Pyx_patch_abc(void);
1739 
1740 /* Generator.proto */
1741 #define __Pyx_Generator_USED
1742 static PyTypeObject *__pyx_GeneratorType = 0;
1743 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1744 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1745  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1746 static PyObject *__Pyx_Generator_Next(PyObject *self);
1747 static int __pyx_Generator_init(void);
1748 
1749 /* CheckBinaryVersion.proto */
1750 static int __Pyx_check_binary_version(void);
1751 
1752 /* InitStrings.proto */
1753 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1754 
1755 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1756 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1757 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1758 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1759 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1760 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1761 
1762 /* Module declarations from 'libcpp.vector' */
1763 
1764 /* Module declarations from 'glucat' */
1765 
1766 /* Module declarations from 'libc.string' */
1767 
1768 /* Module declarations from 'libcpp.string' */
1769 
1770 /* Module declarations from 'PyClical' */
1771 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1772 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1773 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1774 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1775 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1776 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1777 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1778 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1779 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1780 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared_tol(PyObject *, int __pyx_skip_dispatch); /*proto*/
1781 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared(PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1782 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_approx_equal(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_approx_equal *__pyx_optional_args); /*proto*/
1783 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1784 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1785 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1786 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1787 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1788 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1789 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1790 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1791 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1792 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1793 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1794 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1795 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1796 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1797 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1798 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1799 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1800 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1801 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1802 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1803 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1804 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1805 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1806 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1807 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1808 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1809 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1810 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1811 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1812 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1813 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1814 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1815 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*/
1816 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1817 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1818 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1819 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
1820 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
1821 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
1822 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
1823 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
1824 #define __Pyx_MODULE_NAME "PyClical"
1825 extern int __pyx_module_is_main_PyClical;
1826 int __pyx_module_is_main_PyClical = 0;
1827 
1828 /* Implementation of 'PyClical' */
1829 static PyObject *__pyx_builtin_IndexError;
1830 static PyObject *__pyx_builtin_RuntimeError;
1831 static PyObject *__pyx_builtin_TypeError;
1832 static PyObject *__pyx_builtin_ValueError;
1833 static PyObject *__pyx_builtin_NotImplemented;
1834 static PyObject *__pyx_builtin_range;
1835 static PyObject *__pyx_builtin_xrange;
1836 static const char __pyx_k_[] = ".";
1837 static const char __pyx_k_e[] = "e";
1838 static const char __pyx_k_i[] = "i";
1839 static const char __pyx_k_m[] = "m";
1840 static const char __pyx_k_p[] = "p";
1841 static const char __pyx_k_q[] = "q";
1842 static const char __pyx_k__2[] = " ";
1843 static const char __pyx_k__5[] = ":";
1844 static const char __pyx_k__6[] = "\n\t";
1845 static const char __pyx_k__7[] = " (";
1846 static const char __pyx_k__8[] = ", ";
1847 static const char __pyx_k__9[] = ").";
1848 static const char __pyx_k_cl[] = "cl";
1849 static const char __pyx_k_pi[] = "pi";
1850 static const char __pyx_k_abc[] = "abc";
1851 static const char __pyx_k_cos[] = "cos";
1852 static const char __pyx_k_exp[] = "exp";
1853 static const char __pyx_k_frm[] = "frm";
1854 static const char __pyx_k_inv[] = "inv";
1855 static const char __pyx_k_ist[] = "ist";
1856 static const char __pyx_k_ixt[] = "ixt";
1857 static const char __pyx_k_lhs[] = "lhs";
1858 static const char __pyx_k_log[] = "log";
1859 static const char __pyx_k_max[] = "max";
1860 static const char __pyx_k_min[] = "min";
1861 static const char __pyx_k_obj[] = "obj";
1862 static const char __pyx_k_odd[] = "odd";
1863 static const char __pyx_k_pow[] = "pow";
1864 static const char __pyx_k_rhs[] = "rhs";
1865 static const char __pyx_k_sin[] = "sin";
1866 static const char __pyx_k_tan[] = "tan";
1867 static const char __pyx_k_tau[] = "tau";
1868 static const char __pyx_k_tol[] = "tol";
1869 static const char __pyx_k_Real[] = "Real";
1870 static const char __pyx_k_acos[] = "acos";
1871 static const char __pyx_k_args[] = "args";
1872 static const char __pyx_k_asin[] = "asin";
1873 static const char __pyx_k_atan[] = "atan";
1874 static const char __pyx_k_conj[] = "conj";
1875 static const char __pyx_k_copy[] = "copy";
1876 static const char __pyx_k_cosh[] = "cosh";
1877 static const char __pyx_k_even[] = "even";
1878 static const char __pyx_k_fill[] = "fill";
1879 static const char __pyx_k_from[] = " from ";
1880 static const char __pyx_k_iter[] = "__iter__";
1881 static const char __pyx_k_main[] = "__main__";
1882 static const char __pyx_k_math[] = "math";
1883 static const char __pyx_k_name[] = "__name__";
1884 static const char __pyx_k_norm[] = "norm";
1885 static const char __pyx_k_pure[] = "pure";
1886 static const char __pyx_k_quad[] = "quad";
1887 static const char __pyx_k_send[] = "send";
1888 static const char __pyx_k_sinh[] = "sinh";
1889 static const char __pyx_k_sqrt[] = "sqrt";
1890 static const char __pyx_k_tanh[] = "tanh";
1891 static const char __pyx_k_test[] = "_test";
1892 static const char __pyx_k_UTF_8[] = "UTF-8";
1893 static const char __pyx_k_acosh[] = "acosh";
1894 static const char __pyx_k_asinh[] = "asinh";
1895 static const char __pyx_k_atanh[] = "atanh";
1896 static const char __pyx_k_close[] = "close";
1897 static const char __pyx_k_grade[] = "grade";
1898 static const char __pyx_k_istpq[] = "istpq";
1899 static const char __pyx_k_nbar3[] = "nbar3";
1900 static const char __pyx_k_ninf3[] = "ninf3";
1901 static const char __pyx_k_other[] = "other";
1902 static const char __pyx_k_range[] = "range";
1903 static const char __pyx_k_throw[] = "throw";
1904 static const char __pyx_k_using[] = " using (";
1905 static const char __pyx_k_utf_8[] = "utf-8";
1906 static const char __pyx_k_value[] = " value ";
1907 static const char __pyx_k_encode[] = "encode";
1908 static const char __pyx_k_import[] = "__import__";
1909 static const char __pyx_k_reduce[] = "__reduce__";
1910 static const char __pyx_k_scalar[] = "scalar";
1911 static const char __pyx_k_test_2[] = "__test__";
1912 static const char __pyx_k_xrange[] = "xrange";
1913 static const char __pyx_k_doctest[] = "doctest";
1914 static const char __pyx_k_invalid[] = " invalid ";
1915 static const char __pyx_k_numbers[] = "numbers";
1916 static const char __pyx_k_reverse[] = "reverse";
1917 static const char __pyx_k_testmod[] = "testmod";
1918 static const char __pyx_k_version[] = "__version__";
1919 static const char __pyx_k_Integral[] = "Integral";
1920 static const char __pyx_k_PyClical[] = "PyClical";
1921 static const char __pyx_k_Sequence[] = "Sequence";
1922 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1923 static const char __pyx_k_clifford[] = "clifford";
1924 static const char __pyx_k_getstate[] = "__getstate__";
1925 static const char __pyx_k_involute[] = "involute";
1926 static const char __pyx_k_setstate[] = "__setstate__";
1927 static const char __pyx_k_to_frame[] = " to frame ";
1928 static const char __pyx_k_TypeError[] = "TypeError";
1929 static const char __pyx_k_index_set[] = "index_set";
1930 static const char __pyx_k_outer_pow[] = "outer_pow";
1931 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1932 static const char __pyx_k_threshold[] = "threshold";
1933 static const char __pyx_k_IndexError[] = "IndexError";
1934 static const char __pyx_k_ValueError[] = "ValueError";
1935 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1936 static const char __pyx_k_collections[] = "collections";
1937 static const char __pyx_k_e_line_1936[] = "e (line 1936)";
1938 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1939 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1940 static const char __pyx_k_abs_line_1522[] = "abs (line 1522)";
1941 static const char __pyx_k_cos_line_1651[] = "cos (line 1651)";
1942 static const char __pyx_k_exp_line_1614[] = "exp (line 1614)";
1943 static const char __pyx_k_inv_line_1378[] = "inv (line 1378)";
1944 static const char __pyx_k_log_line_1628[] = "log (line 1628)";
1945 static const char __pyx_k_odd_line_1446[] = "odd (line 1446)";
1946 static const char __pyx_k_pow_line_1543[] = "pow (line 1543)";
1947 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1948 static const char __pyx_k_sin_line_1728[] = "sin (line 1728)";
1949 static const char __pyx_k_tan_line_1801[] = "tan (line 1801)";
1950 static const char __pyx_k_using_invalid[] = " using invalid ";
1951 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1952 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1953 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1954 static const char __pyx_k_acos_line_1668[] = "acos (line 1668)";
1955 static const char __pyx_k_agc3_line_1893[] = "agc3 (line 1893)";
1956 static const char __pyx_k_asin_line_1747[] = "asin (line 1747)";
1957 static const char __pyx_k_atan_line_1818[] = "atan (line 1818)";
1958 static const char __pyx_k_cga3_line_1873[] = "cga3 (line 1873)";
1959 static const char __pyx_k_conj_line_1485[] = "conj (line 1485)";
1960 static const char __pyx_k_cosh_line_1689[] = "cosh (line 1689)";
1961 static const char __pyx_k_even_line_1437[] = "even (line 1437)";
1962 static const char __pyx_k_imag_line_1415[] = "imag (line 1415)";
1963 static const char __pyx_k_invalid_string[] = " invalid string ";
1964 static const char __pyx_k_norm_line_1511[] = "norm (line 1511)";
1965 static const char __pyx_k_pure_line_1426[] = "pure (line 1426)";
1966 static const char __pyx_k_quad_line_1500[] = "quad (line 1500)";
1967 static const char __pyx_k_real_line_1404[] = "real (line 1404)";
1968 static const char __pyx_k_scalar_epsilon[] = "scalar_epsilon";
1969 static const char __pyx_k_sinh_line_1768[] = "sinh (line 1768)";
1970 static const char __pyx_k_sqrt_line_1591[] = "sqrt (line 1591)";
1971 static const char __pyx_k_tanh_line_1835[] = "tanh (line 1835)";
1972 static const char __pyx_k_acosh_line_1705[] = "acosh (line 1705)";
1973 static const char __pyx_k_asinh_line_1782[] = "asinh (line 1782)";
1974 static const char __pyx_k_atanh_line_1847[] = "atanh (line 1847)";
1975 static const char __pyx_k_istpq_line_1949[] = "istpq (line 1949)";
1976 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1977 static const char __pyx_k_compare_line_492[] = "compare (line 492)";
1978 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1979 static const char __pyx_k_max_pos_line_513[] = "max_pos (line 513)";
1980 static const char __pyx_k_min_neg_line_504[] = "min_neg (line 504)";
1981 static const char __pyx_k_scalar_line_1393[] = "scalar (line 1393)";
1982 static const char __pyx_k_cga3std_line_1882[] = "cga3std (line 1882)";
1983 static const char __pyx_k_max_abs_line_1531[] = "max_abs (line 1531)";
1984 static const char __pyx_k_reverse_line_1470[] = "reverse (line 1470)";
1985 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1986 static const char __pyx_k_involute_line_1455[] = "involute (line 1455)";
1987 static const char __pyx_k_outer_pow_line_1567[] = "outer_pow (line 1567)";
1988 static const char __pyx_k_clifford_inv_line_926[] = "clifford.inv (line 926)";
1989 static const char __pyx_k_clifford_pow_line_980[] = "clifford.pow (line 980)";
1990 static const char __pyx_k_approx_equal_line_1359[] = "approx_equal (line 1359)";
1991 static const char __pyx_k_clifford_abs_line_1175[] = "clifford.abs (line 1175)";
1992 static const char __pyx_k_clifford_copy_line_556[] = "clifford.copy (line 556)";
1993 static const char __pyx_k_clifford_odd_line_1070[] = "clifford.odd (line 1070)";
1994 static const char __pyx_k_complexifier_line_1576[] = "complexifier (line 1576)";
1995 static const char __pyx_k_index_set_copy_line_65[] = "index_set.copy (line 65)";
1996 static const char __pyx_k_index_set_max_line_351[] = "index_set.max (line 351)";
1997 static const char __pyx_k_index_set_min_line_342[] = "index_set.min (line 342)";
1998 static const char __pyx_k_clifford_conj_line_1138[] = "clifford.conj (line 1138)";
1999 static const char __pyx_k_clifford_even_line_1061[] = "clifford.even (line 1061)";
2000 static const char __pyx_k_clifford_norm_line_1164[] = "clifford.norm (line 1164)";
2001 static const char __pyx_k_clifford_pure_line_1050[] = "clifford.pure (line 1050)";
2002 static const char __pyx_k_clifford_quad_line_1153[] = "clifford.quad (line 1153)";
2003 static const char __pyx_k_error_squared_line_1346[] = "error_squared (line 1346)";
2004 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
2005 static const char __pyx_k_clifford___or___line_939[] = "clifford.__or__ (line 939)";
2006 static const char __pyx_k_clifford_frame_line_1224[] = "clifford.frame (line 1224)";
2007 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
2008 static const char __pyx_k_clifford_isinf_line_1206[] = "clifford.isinf (line 1206)";
2009 static const char __pyx_k_clifford_isnan_line_1215[] = "clifford.isnan (line 1215)";
2010 static const char __pyx_k_index_set_count_line_315[] = "index_set.count (line 315)";
2011 static const char __pyx_k_clifford___add___line_740[] = "clifford.__add__ (line 740)";
2012 static const char __pyx_k_clifford___and___line_836[] = "clifford.__and__ (line 836)";
2013 static const char __pyx_k_clifford___ior___line_950[] = "clifford.__ior__ (line 950)";
2014 static const char __pyx_k_clifford___mod___line_806[] = "clifford.__mod__ (line 806)";
2015 static const char __pyx_k_clifford___mul___line_780[] = "clifford.__mul__ (line 780)";
2016 static const char __pyx_k_clifford___neg___line_722[] = "clifford.__neg__ (line 722)";
2017 static const char __pyx_k_clifford___pos___line_731[] = "clifford.__pos__ (line 731)";
2018 static const char __pyx_k_clifford___pow___line_961[] = "clifford.__pow__ (line 961)";
2019 static const char __pyx_k_clifford___sub___line_760[] = "clifford.__sub__ (line 760)";
2020 static const char __pyx_k_clifford___xor___line_866[] = "clifford.__xor__ (line 866)";
2021 static const char __pyx_k_clifford_reframe_line_649[] = "clifford.reframe (line 649)";
2022 static const char __pyx_k_clifford_scalar_line_1039[] = "clifford.scalar (line 1039)";
2023 static const char __pyx_k_index_set___or___line_293[] = "index_set.__or__ (line 293)";
2024 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
2025 static const char __pyx_k_random_clifford_line_1864[] = "random_clifford (line 1864)";
2026 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
2027 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
2028 static const char __pyx_k_clifford___iadd___line_751[] = "clifford.__iadd__ (line 751)";
2029 static const char __pyx_k_clifford___iand___line_851[] = "clifford.__iand__ (line 851)";
2030 static const char __pyx_k_clifford___idiv___line_911[] = "clifford.__idiv__ (line 911)";
2031 static const char __pyx_k_clifford___imod___line_821[] = "clifford.__imod__ (line 821)";
2032 static const char __pyx_k_clifford___imul___line_793[] = "clifford.__imul__ (line 793)";
2033 static const char __pyx_k_clifford___isub___line_771[] = "clifford.__isub__ (line 771)";
2034 static const char __pyx_k_clifford___iter___line_638[] = "clifford.__iter__ (line 638)";
2035 static const char __pyx_k_clifford___ixor___line_881[] = "clifford.__ixor__ (line 881)";
2036 static const char __pyx_k_clifford___str___line_1244[] = "clifford.__str__ (line 1244)";
2037 static const char __pyx_k_clifford_max_abs_line_1184[] = "clifford.max_abs (line 1184)";
2038 static const char __pyx_k_clifford_reverse_line_1123[] = "clifford.reverse (line 1123)";
2039 static const char __pyx_k_index_set___and___line_271[] = "index_set.__and__ (line 271)";
2040 static const char __pyx_k_index_set___ior___line_304[] = "index_set.__ior__ (line 304)";
2041 static const char __pyx_k_index_set___str___line_395[] = "index_set.__str__ (line 395)";
2042 static const char __pyx_k_index_set___xor___line_249[] = "index_set.__xor__ (line 249)";
2043 static const char __pyx_k_clifford___call___line_1020[] = "clifford.__call__ (line 1020)";
2044 static const char __pyx_k_clifford___repr___line_1235[] = "clifford.__repr__ (line 1235)";
2045 static const char __pyx_k_clifford_involute_line_1107[] = "clifford.involute (line 1107)";
2046 static const char __pyx_k_error_squared_tol_line_1337[] = "error_squared_tol (line 1337)";
2047 static const char __pyx_k_index_set___iand___line_282[] = "index_set.__iand__ (line 282)";
2048 static const char __pyx_k_index_set___iter___line_229[] = "index_set.__iter__ (line 229)";
2049 static const char __pyx_k_index_set___ixor___line_260[] = "index_set.__ixor__ (line 260)";
2050 static const char __pyx_k_index_set___repr___line_384[] = "index_set.__repr__ (line 384)";
2051 static const char __pyx_k_clifford_outer_pow_line_1004[] = "clifford.outer_pow (line 1004)";
2052 static const char __pyx_k_clifford_truncated_line_1195[] = "clifford.truncated (line 1195)";
2053 static const char __pyx_k_index_set_count_neg_line_324[] = "index_set.count_neg (line 324)";
2054 static const char __pyx_k_index_set_count_pos_line_333[] = "index_set.count_pos (line 333)";
2055 static const char __pyx_k_clifford___getitem___line_707[] = "clifford.__getitem__ (line 707)";
2056 static const char __pyx_k_clifford___truediv___line_896[] = "clifford.__truediv__ (line 896)";
2057 static const char __pyx_k_index_set___invert___line_240[] = "index_set.__invert__ (line 240)";
2058 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 ";
2059 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 ";
2060 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 ";
2061 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 ";
2062 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 ";
2063 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 ";
2064 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 ";
2065 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, end=\",\")\n -3,4,7,\n ";
2066 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 ";
2067 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 ";
2068 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 ";
2069 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 ";
2070 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 ";
2071 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 ";
2072 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 ";
2073 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 ";
2074 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 ";
2075 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 ";
2076 static const char __pyx_k_Quadratic_norm_error_tolerance[] = "\n Quadratic norm error tolerance relative to a specific multivector.\n\n >>> print(error_squared_tol(clifford(\"{1}\")) * 3.0 - error_squared_tol(clifford(\"1{1}-2{2}+3{3}\")))\n 0.0\n ";
2077 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 ";
2078 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 ";
2079 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 ";
2080 static const char __pyx_k_clifford_vector_part_line_1079[] = "clifford.vector_part (line 1079)";
2081 static const char __pyx_k_index_set___getitem___line_191[] = "index_set.__getitem__ (line 191)";
2082 static const char __pyx_k_index_set___setitem___line_179[] = "index_set.__setitem__ (line 179)";
2083 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 ";
2084 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 ";
2085 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 ";
2086 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 ";
2087 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 ";
2088 static const char __pyx_k_Check_if_a_multivector_contains[] = "\n Check if a multivector contains any infinite values.\n\n >>> clifford().isinf()\n False\n ";
2089 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 ";
2090 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 ";
2091 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 ";
2092 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 ";
2093 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 ";
2094 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 ";
2095 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 ";
2096 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 ";
2097 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 ";
2098 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 ";
2099 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 ";
2100 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 ";
2101 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 ";
2102 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 ";
2103 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 ";
2104 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 ";
2105 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 ";
2106 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 ";
2107 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 ";
2108 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 ";
2109 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 ";
2110 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 ";
2111 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 ";
2112 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 ";
2113 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 ";
2114 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 ";
2115 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 ";
2116 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 ";
2117 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 ";
2118 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 ";
2119 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 ";
2120 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 ";
2121 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 ";
2122 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, end=\",\")\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
2123 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 ";
2124 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 ";
2125 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 ";
2126 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 ";
2127 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 ";
2128 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 ";
2129 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 ";
2130 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 ";
2131 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 ";
2132 static const char __pyx_k_Relative_or_absolute_error_usin[] = "\n Relative or absolute error using the quadratic norm.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(error_squared(clifford(\"{1}\"), clifford(\"1{1}\"), err2))\n 0.0\n >>> print(error_squared(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\"), err2))\n 25.0\n ";
2133 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 ";
2134 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 ";
2135 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 ";
2136 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 ";
2137 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 ";
2138 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 ";
2139 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 ";
2140 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 ";
2141 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 ";
2142 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 ";
2143 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 ";
2144 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 ";
2145 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 ";
2146 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 ";
2147 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 <class 'PyClical.index_set'>\n ";
2148 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 ";
2149 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 ";
2150 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 ";
2151 static const char __pyx_k_Test_for_approximate_equality_o[] = "\n Test for approximate equality of multivectors.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(approx_equal(clifford(\"{1}\"), clifford(\"1{1}\")))\n True\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\")))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+0.001\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+1.0e-30\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n True\n ";
2152 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 {1, 2, 100}.\n >>> print(index_set([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <class '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_set({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 ";
2153  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 ";
2154  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 ";
2155  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2156  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 ";
2157  static const char __pyx_k_index_set_sign_of_mult_line_366[] = "index_set.sign_of_mult (line 366)";
2158  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 ";
2159  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2160  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2161  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 ";
2162  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 ";
2163  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 ";
2164  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 ";
2165  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 ";
2166  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1253)";
2167  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 406)";
2168  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 375)";
2169  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2170  static const char __pyx_k_Check_if_a_multivector_contains_2[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
2171  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 ";
2172  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 ";
2173  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 ";
2174  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 ";
2175  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(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 <class 'list'>.\n >>> print(clifford(None))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'NoneType'>.\n >>> print(clifford(None,[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'NoneType'>, <class 'list'>).\n >>> print(clifford([1,2],[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'list'>, <class '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 fro""m 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 ";
2176  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 ";
2177  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 ";
2178  static PyObject *__pyx_kp_u_;
2179  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2180  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2181  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2182  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2183  static PyObject *__pyx_kp_u_Cannot_initialize_clifford_objec;
2184  static PyObject *__pyx_kp_u_Cannot_initialize_index_set_obje;
2185  static PyObject *__pyx_kp_u_Cannot_reframe;
2186  static PyObject *__pyx_kp_u_Cannot_take_vector_part_of;
2187  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2188  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2189  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains_2;
2190  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2191  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2192  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2193  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2194  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2195  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2196  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2197  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2198  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2199  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2200  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2201  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2202  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2203  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2204  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2205  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2206  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2207  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2208  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2209  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2210  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2211  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2212  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2213  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2214  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2215  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2216  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2217  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2218  static PyObject *__pyx_n_s_IndexError;
2219  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2220  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2221  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2222  static PyObject *__pyx_n_s_Integral;
2223  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2224  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2225  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2226  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2227  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2228  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2229  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2230  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2231  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2232  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2233  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2234  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2235  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2236  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2237  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2238  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2239  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2240  static PyObject *__pyx_n_s_NotImplemented;
2241  static PyObject *__pyx_kp_u_Not_applicable;
2242  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2243  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2244  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2245  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2246  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2247  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2248  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2249  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2250  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2251  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2252  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2253  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2254  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2255  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2256  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2257  static PyObject *__pyx_n_s_PyClical;
2258  static PyObject *__pyx_kp_s_PyClical_pyx;
2259  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2260  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2261  static PyObject *__pyx_kp_u_Quadratic_norm_error_tolerance;
2262  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2263  static PyObject *__pyx_n_s_Real;
2264  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2265  static PyObject *__pyx_kp_u_Relative_or_absolute_error_usin;
2266  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2267  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2268  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2269  static PyObject *__pyx_n_s_RuntimeError;
2270  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2271  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2272  static PyObject *__pyx_n_s_Sequence;
2273  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2274  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2275  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2276  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2277  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2278  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2279  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2280  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2281  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2282  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2283  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2284  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2285  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2286  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2287  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2288  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2289  static PyObject *__pyx_kp_u_Test_for_approximate_equality_o;
2290  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2291  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2292  static PyObject *__pyx_kp_u_The_informal_string_representat;
2293  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2294  static PyObject *__pyx_kp_u_The_official_string_representat;
2295  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2296  static PyObject *__pyx_kp_u_This_comparison_operator_is_not;
2297  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2298  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2299  static PyObject *__pyx_n_s_TypeError;
2300  static PyObject *__pyx_kp_u_UTF_8;
2301  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2302  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2303  static PyObject *__pyx_n_s_ValueError;
2304  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2305  static PyObject *__pyx_kp_u__2;
2306  static PyObject *__pyx_kp_u__5;
2307  static PyObject *__pyx_kp_u__6;
2308  static PyObject *__pyx_kp_u__7;
2309  static PyObject *__pyx_kp_u__8;
2310  static PyObject *__pyx_kp_u__9;
2311  static PyObject *__pyx_n_s_abc;
2312  static PyObject *__pyx_kp_u_abs_line_1522;
2313  static PyObject *__pyx_n_s_acos;
2314  static PyObject *__pyx_kp_u_acos_line_1668;
2315  static PyObject *__pyx_n_s_acosh;
2316  static PyObject *__pyx_kp_u_acosh_line_1705;
2317  static PyObject *__pyx_kp_u_agc3_line_1893;
2318  static PyObject *__pyx_kp_u_approx_equal_line_1359;
2319  static PyObject *__pyx_n_s_args;
2320  static PyObject *__pyx_kp_u_as_frame;
2321  static PyObject *__pyx_n_s_asin;
2322  static PyObject *__pyx_kp_u_asin_line_1747;
2323  static PyObject *__pyx_n_s_asinh;
2324  static PyObject *__pyx_kp_u_asinh_line_1782;
2325  static PyObject *__pyx_n_s_atan;
2326  static PyObject *__pyx_kp_u_atan_line_1818;
2327  static PyObject *__pyx_n_s_atanh;
2328  static PyObject *__pyx_kp_u_atanh_line_1847;
2329  static PyObject *__pyx_kp_u_cga3_line_1873;
2330  static PyObject *__pyx_kp_u_cga3std_line_1882;
2331  static PyObject *__pyx_n_s_cl;
2332  static PyObject *__pyx_n_s_clifford;
2333  static PyObject *__pyx_kp_u_clifford___add___line_740;
2334  static PyObject *__pyx_kp_u_clifford___and___line_836;
2335  static PyObject *__pyx_kp_u_clifford___call___line_1020;
2336  static PyObject *__pyx_kp_u_clifford___getitem___line_707;
2337  static PyObject *__pyx_kp_u_clifford___iadd___line_751;
2338  static PyObject *__pyx_kp_u_clifford___iand___line_851;
2339  static PyObject *__pyx_kp_u_clifford___idiv___line_911;
2340  static PyObject *__pyx_kp_u_clifford___imod___line_821;
2341  static PyObject *__pyx_kp_u_clifford___imul___line_793;
2342  static PyObject *__pyx_kp_u_clifford___ior___line_950;
2343  static PyObject *__pyx_kp_u_clifford___isub___line_771;
2344  static PyObject *__pyx_kp_u_clifford___iter___line_638;
2345  static PyObject *__pyx_kp_u_clifford___ixor___line_881;
2346  static PyObject *__pyx_kp_u_clifford___mod___line_806;
2347  static PyObject *__pyx_kp_u_clifford___mul___line_780;
2348  static PyObject *__pyx_kp_u_clifford___neg___line_722;
2349  static PyObject *__pyx_kp_u_clifford___or___line_939;
2350  static PyObject *__pyx_kp_u_clifford___pos___line_731;
2351  static PyObject *__pyx_kp_u_clifford___pow___line_961;
2352  static PyObject *__pyx_kp_u_clifford___repr___line_1235;
2353  static PyObject *__pyx_kp_u_clifford___str___line_1244;
2354  static PyObject *__pyx_kp_u_clifford___sub___line_760;
2355  static PyObject *__pyx_kp_u_clifford___truediv___line_896;
2356  static PyObject *__pyx_kp_u_clifford___xor___line_866;
2357  static PyObject *__pyx_kp_u_clifford_abs_line_1175;
2358  static PyObject *__pyx_kp_u_clifford_conj_line_1138;
2359  static PyObject *__pyx_kp_u_clifford_copy_line_556;
2360  static PyObject *__pyx_kp_u_clifford_even_line_1061;
2361  static PyObject *__pyx_kp_u_clifford_frame_line_1224;
2362  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2363  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2364  static PyObject *__pyx_kp_u_clifford_inv_line_926;
2365  static PyObject *__pyx_kp_u_clifford_involute_line_1107;
2366  static PyObject *__pyx_kp_u_clifford_isinf_line_1206;
2367  static PyObject *__pyx_kp_u_clifford_isnan_line_1215;
2368  static PyObject *__pyx_kp_u_clifford_max_abs_line_1184;
2369  static PyObject *__pyx_kp_u_clifford_norm_line_1164;
2370  static PyObject *__pyx_kp_u_clifford_odd_line_1070;
2371  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1004;
2372  static PyObject *__pyx_kp_u_clifford_pow_line_980;
2373  static PyObject *__pyx_kp_u_clifford_pure_line_1050;
2374  static PyObject *__pyx_kp_u_clifford_quad_line_1153;
2375  static PyObject *__pyx_kp_u_clifford_reframe_line_649;
2376  static PyObject *__pyx_kp_u_clifford_reverse_line_1123;
2377  static PyObject *__pyx_kp_u_clifford_scalar_line_1039;
2378  static PyObject *__pyx_kp_u_clifford_truncated_line_1195;
2379  static PyObject *__pyx_kp_u_clifford_vector_part_line_1079;
2380  static PyObject *__pyx_n_s_cline_in_traceback;
2381  static PyObject *__pyx_n_s_close;
2382  static PyObject *__pyx_n_s_collections;
2383  static PyObject *__pyx_kp_u_compare_line_492;
2384  static PyObject *__pyx_kp_u_complexifier_line_1576;
2385  static PyObject *__pyx_n_s_conj;
2386  static PyObject *__pyx_kp_u_conj_line_1485;
2387  static PyObject *__pyx_n_s_copy;
2388  static PyObject *__pyx_n_s_cos;
2389  static PyObject *__pyx_kp_u_cos_line_1651;
2390  static PyObject *__pyx_n_s_cosh;
2391  static PyObject *__pyx_kp_u_cosh_line_1689;
2392  static PyObject *__pyx_n_s_doctest;
2393  static PyObject *__pyx_n_s_e;
2394  static PyObject *__pyx_kp_u_e_line_1936;
2395  static PyObject *__pyx_n_s_encode;
2396  static PyObject *__pyx_kp_u_error_squared_line_1346;
2397  static PyObject *__pyx_kp_u_error_squared_tol_line_1337;
2398  static PyObject *__pyx_n_s_even;
2399  static PyObject *__pyx_kp_u_even_line_1437;
2400  static PyObject *__pyx_n_s_exp;
2401  static PyObject *__pyx_kp_u_exp_line_1614;
2402  static PyObject *__pyx_n_s_fill;
2403  static PyObject *__pyx_n_s_frm;
2404  static PyObject *__pyx_kp_u_from;
2405  static PyObject *__pyx_n_s_getstate;
2406  static PyObject *__pyx_n_s_grade;
2407  static PyObject *__pyx_n_s_i;
2408  static PyObject *__pyx_kp_u_imag_line_1415;
2409  static PyObject *__pyx_n_s_import;
2410  static PyObject *__pyx_n_s_index_set;
2411  static PyObject *__pyx_kp_u_index_set___and___line_271;
2412  static PyObject *__pyx_kp_u_index_set___getitem___line_191;
2413  static PyObject *__pyx_kp_u_index_set___iand___line_282;
2414  static PyObject *__pyx_kp_u_index_set___invert___line_240;
2415  static PyObject *__pyx_kp_u_index_set___ior___line_304;
2416  static PyObject *__pyx_n_s_index_set___iter;
2417  static PyObject *__pyx_kp_u_index_set___iter___line_229;
2418  static PyObject *__pyx_kp_u_index_set___ixor___line_260;
2419  static PyObject *__pyx_kp_u_index_set___or___line_293;
2420  static PyObject *__pyx_kp_u_index_set___repr___line_384;
2421  static PyObject *__pyx_kp_u_index_set___setitem___line_179;
2422  static PyObject *__pyx_kp_u_index_set___str___line_395;
2423  static PyObject *__pyx_kp_u_index_set___xor___line_249;
2424  static PyObject *__pyx_kp_u_index_set_copy_line_65;
2425  static PyObject *__pyx_kp_u_index_set_count_line_315;
2426  static PyObject *__pyx_kp_u_index_set_count_neg_line_324;
2427  static PyObject *__pyx_kp_u_index_set_count_pos_line_333;
2428  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2429  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2430  static PyObject *__pyx_kp_u_index_set_max_line_351;
2431  static PyObject *__pyx_kp_u_index_set_min_line_342;
2432  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_366;
2433  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2434  static PyObject *__pyx_n_s_inv;
2435  static PyObject *__pyx_kp_u_inv_line_1378;
2436  static PyObject *__pyx_kp_u_invalid;
2437  static PyObject *__pyx_kp_u_invalid_string;
2438  static PyObject *__pyx_n_s_involute;
2439  static PyObject *__pyx_kp_u_involute_line_1455;
2440  static PyObject *__pyx_n_s_ist;
2441  static PyObject *__pyx_n_s_istpq;
2442  static PyObject *__pyx_kp_u_istpq_line_1949;
2443  static PyObject *__pyx_n_s_iter;
2444  static PyObject *__pyx_n_s_ixt;
2445  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2446  static PyObject *__pyx_n_s_lhs;
2447  static PyObject *__pyx_n_s_log;
2448  static PyObject *__pyx_kp_u_log_line_1628;
2449  static PyObject *__pyx_n_s_m;
2450  static PyObject *__pyx_n_s_main;
2451  static PyObject *__pyx_n_u_main;
2452  static PyObject *__pyx_n_s_math;
2453  static PyObject *__pyx_n_s_max;
2454  static PyObject *__pyx_kp_u_max_abs_line_1531;
2455  static PyObject *__pyx_kp_u_max_pos_line_513;
2456  static PyObject *__pyx_n_s_min;
2457  static PyObject *__pyx_kp_u_min_neg_line_504;
2458  static PyObject *__pyx_n_s_name;
2459  static PyObject *__pyx_n_s_nbar3;
2460  static PyObject *__pyx_n_s_ninf3;
2461  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2462  static PyObject *__pyx_n_s_norm;
2463  static PyObject *__pyx_kp_u_norm_line_1511;
2464  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2465  static PyObject *__pyx_n_s_numbers;
2466  static PyObject *__pyx_n_s_obj;
2467  static PyObject *__pyx_n_s_odd;
2468  static PyObject *__pyx_kp_u_odd_line_1446;
2469  static PyObject *__pyx_n_s_other;
2470  static PyObject *__pyx_n_s_outer_pow;
2471  static PyObject *__pyx_kp_u_outer_pow_line_1567;
2472  static PyObject *__pyx_n_s_p;
2473  static PyObject *__pyx_n_s_pi;
2474  static PyObject *__pyx_n_s_pow;
2475  static PyObject *__pyx_kp_u_pow_line_1543;
2476  static PyObject *__pyx_n_s_pure;
2477  static PyObject *__pyx_kp_u_pure_line_1426;
2478  static PyObject *__pyx_n_s_pyx_vtable;
2479  static PyObject *__pyx_n_s_q;
2480  static PyObject *__pyx_n_s_quad;
2481  static PyObject *__pyx_kp_u_quad_line_1500;
2482  static PyObject *__pyx_kp_u_random_clifford_line_1864;
2483  static PyObject *__pyx_n_s_range;
2484  static PyObject *__pyx_kp_u_real_line_1404;
2485  static PyObject *__pyx_n_s_reduce;
2486  static PyObject *__pyx_n_s_reduce_cython;
2487  static PyObject *__pyx_n_s_reduce_ex;
2488  static PyObject *__pyx_n_s_reverse;
2489  static PyObject *__pyx_kp_u_reverse_line_1470;
2490  static PyObject *__pyx_n_s_rhs;
2491  static PyObject *__pyx_n_s_scalar;
2492  static PyObject *__pyx_n_s_scalar_epsilon;
2493  static PyObject *__pyx_kp_u_scalar_line_1393;
2494  static PyObject *__pyx_n_s_send;
2495  static PyObject *__pyx_n_s_setstate;
2496  static PyObject *__pyx_n_s_setstate_cython;
2497  static PyObject *__pyx_n_s_sin;
2498  static PyObject *__pyx_kp_u_sin_line_1728;
2499  static PyObject *__pyx_n_s_sinh;
2500  static PyObject *__pyx_kp_u_sinh_line_1768;
2501  static PyObject *__pyx_n_s_sqrt;
2502  static PyObject *__pyx_kp_u_sqrt_line_1591;
2503  static PyObject *__pyx_n_s_tan;
2504  static PyObject *__pyx_kp_u_tan_line_1801;
2505  static PyObject *__pyx_n_s_tanh;
2506  static PyObject *__pyx_kp_u_tanh_line_1835;
2507  static PyObject *__pyx_n_s_tau;
2508  static PyObject *__pyx_n_s_test;
2509  static PyObject *__pyx_n_s_test_2;
2510  static PyObject *__pyx_n_s_testmod;
2511  static PyObject *__pyx_n_s_threshold;
2512  static PyObject *__pyx_n_s_throw;
2513  static PyObject *__pyx_kp_u_to_frame;
2514  static PyObject *__pyx_n_s_tol;
2515  static PyObject *__pyx_kp_u_using;
2516  static PyObject *__pyx_kp_u_using_invalid;
2517  static PyObject *__pyx_kp_u_utf_8;
2518  static PyObject *__pyx_kp_u_value;
2519  static PyObject *__pyx_n_s_version;
2520  static PyObject *__pyx_n_s_xrange;
2521 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2522 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2523 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2524 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 */
2525 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 */
2526 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2527 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2528 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2529 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2530 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2531 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2532 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2533 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2534 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2535 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2536 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2537 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2538 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2539 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2540 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2541 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2542 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2543 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2544 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2545 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2546 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2547 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 */
2548 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2549 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2550 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2551 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2552 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2553 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 */
2554 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2555 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 */
2556 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2557 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2558 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 */
2559 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2560 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2561 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2562 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2563 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2564 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2565 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2566 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2567 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2568 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2569 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2570 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2571 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2572 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2573 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2574 static PyObject *__pyx_pf_8PyClical_8clifford_44__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2575 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2576 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2577 #endif
2578 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2579 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2580 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2581 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2582 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2583 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2584 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2585 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2586 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2587 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2588 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2589 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2590 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2591 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2592 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2593 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2594 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2595 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2596 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2597 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2598 static PyObject *__pyx_pf_8PyClical_8clifford_88isinf(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2599 static PyObject *__pyx_pf_8PyClical_8clifford_90isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2600 static PyObject *__pyx_pf_8PyClical_8clifford_92frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2601 static PyObject *__pyx_pf_8PyClical_8clifford_94__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2602 static PyObject *__pyx_pf_8PyClical_8clifford_96__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2603 static PyObject *__pyx_pf_8PyClical_8clifford_98__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2604 static PyObject *__pyx_pf_8PyClical_8clifford_100__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2605 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2606 static PyObject *__pyx_pf_8PyClical_10error_squared_tol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2607 static PyObject *__pyx_pf_8PyClical_12error_squared(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold); /* proto */
2608 static PyObject *__pyx_pf_8PyClical_14approx_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold, PyObject *__pyx_v_tol); /* proto */
2609 static PyObject *__pyx_pf_8PyClical_16inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2610 static PyObject *__pyx_pf_8PyClical_18scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2611 static PyObject *__pyx_pf_8PyClical_20real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2612 static PyObject *__pyx_pf_8PyClical_22imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2613 static PyObject *__pyx_pf_8PyClical_24pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2614 static PyObject *__pyx_pf_8PyClical_26even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2615 static PyObject *__pyx_pf_8PyClical_28odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2616 static PyObject *__pyx_pf_8PyClical_30involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2617 static PyObject *__pyx_pf_8PyClical_32reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2618 static PyObject *__pyx_pf_8PyClical_34conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2619 static PyObject *__pyx_pf_8PyClical_36quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2620 static PyObject *__pyx_pf_8PyClical_38norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2621 static PyObject *__pyx_pf_8PyClical_40abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2622 static PyObject *__pyx_pf_8PyClical_42max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2623 static PyObject *__pyx_pf_8PyClical_44pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2624 static PyObject *__pyx_pf_8PyClical_46outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2625 static PyObject *__pyx_pf_8PyClical_48complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2626 static PyObject *__pyx_pf_8PyClical_50sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2627 static PyObject *__pyx_pf_8PyClical_52exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2628 static PyObject *__pyx_pf_8PyClical_54log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2629 static PyObject *__pyx_pf_8PyClical_56cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2630 static PyObject *__pyx_pf_8PyClical_58acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2631 static PyObject *__pyx_pf_8PyClical_60cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2632 static PyObject *__pyx_pf_8PyClical_62acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2633 static PyObject *__pyx_pf_8PyClical_64sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2634 static PyObject *__pyx_pf_8PyClical_66asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2635 static PyObject *__pyx_pf_8PyClical_68sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2636 static PyObject *__pyx_pf_8PyClical_70asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2637 static PyObject *__pyx_pf_8PyClical_72tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2638 static PyObject *__pyx_pf_8PyClical_74atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2639 static PyObject *__pyx_pf_8PyClical_76tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2640 static PyObject *__pyx_pf_8PyClical_78atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2641 static PyObject *__pyx_pf_8PyClical_80random_clifford(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill); /* proto */
2642 static PyObject *__pyx_pf_8PyClical_82cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2643 static PyObject *__pyx_pf_8PyClical_84cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2644 static PyObject *__pyx_pf_8PyClical_86agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2645 static PyObject *__pyx_pf_8PyClical_88e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2646 static PyObject *__pyx_pf_8PyClical_90istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2647 static PyObject *__pyx_pf_8PyClical_92_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2648 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2649 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2650 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2651 static PyObject *__pyx_float_0_0;
2652 static PyObject *__pyx_float_1_0;
2653 static PyObject *__pyx_float_4_0;
2654 static PyObject *__pyx_float_8_0;
2655 static PyObject *__pyx_int_0;
2656 static PyObject *__pyx_int_1;
2657 static PyObject *__pyx_int_4;
2658 static PyObject *__pyx_int_neg_1;
2659 static PyObject *__pyx_tuple__3;
2660 static PyObject *__pyx_tuple__4;
2661 static PyObject *__pyx_tuple__10;
2662 static PyObject *__pyx_tuple__11;
2663 static PyObject *__pyx_tuple__12;
2664 static PyObject *__pyx_tuple__15;
2665 static PyObject *__pyx_tuple__16;
2666 static PyObject *__pyx_tuple__18;
2667 static PyObject *__pyx_tuple__20;
2668 static PyObject *__pyx_tuple__21;
2669 static PyObject *__pyx_tuple__22;
2670 static PyObject *__pyx_codeobj__13;
2671 static PyObject *__pyx_codeobj__14;
2672 static PyObject *__pyx_codeobj__17;
2673 static PyObject *__pyx_codeobj__19;
2674 static PyObject *__pyx_codeobj__23;
2675 /* Late includes */
2676 
2677 /* "PyClical.pyx":40
2678  * cdef class index_set
2679  *
2680  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2681  * """
2682  * Return the C++ IndexSet instance wrapped by index_set(obj).
2683  */
2684 
2685 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2686  IndexSet __pyx_r;
2687  __Pyx_RefNannyDeclarations
2688  PyObject *__pyx_t_1 = NULL;
2689  int __pyx_lineno = 0;
2690  const char *__pyx_filename = NULL;
2691  int __pyx_clineno = 0;
2692  __Pyx_RefNannySetupContext("toIndexSet", 0);
2693 
2694  /* "PyClical.pyx":44
2695  * Return the C++ IndexSet instance wrapped by index_set(obj).
2696  * """
2697  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2698  *
2699  * cdef class index_set:
2700  */
2701  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
2702  __Pyx_GOTREF(__pyx_t_1);
2703  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2704  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2705  goto __pyx_L0;
2706 
2707  /* "PyClical.pyx":40
2708  * cdef class index_set
2709  *
2710  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2711  * """
2712  * Return the C++ IndexSet instance wrapped by index_set(obj).
2713  */
2714 
2715  /* function exit code */
2716  __pyx_L1_error:;
2717  __Pyx_XDECREF(__pyx_t_1);
2718  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2719  __Pyx_pretend_to_initialize(&__pyx_r);
2720  __pyx_L0:;
2721  __Pyx_RefNannyFinishContext();
2722  return __pyx_r;
2723 }
2724 
2725 /* "PyClical.pyx":52
2726  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2727  *
2728  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2729  * """
2730  * Wrap an instance of the C++ class IndexSet.
2731  */
2732 
2733 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2734  PyObject *__pyx_r = NULL;
2735  __Pyx_RefNannyDeclarations
2736  __Pyx_RefNannySetupContext("wrap", 0);
2737 
2738  /* "PyClical.pyx":56
2739  * Wrap an instance of the C++ class IndexSet.
2740  * """
2741  * self.instance[0] = other # <<<<<<<<<<<<<<
2742  * return self
2743  *
2744  */
2745  (__pyx_v_self->instance[0]) = __pyx_v_other;
2746 
2747  /* "PyClical.pyx":57
2748  * """
2749  * self.instance[0] = other
2750  * return self # <<<<<<<<<<<<<<
2751  *
2752  * cdef inline IndexSet unwrap(index_set self):
2753  */
2754  __Pyx_XDECREF(__pyx_r);
2755  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2756  __pyx_r = ((PyObject *)__pyx_v_self);
2757  goto __pyx_L0;
2758 
2759  /* "PyClical.pyx":52
2760  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2761  *
2762  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2763  * """
2764  * Wrap an instance of the C++ class IndexSet.
2765  */
2766 
2767  /* function exit code */
2768  __pyx_L0:;
2769  __Pyx_XGIVEREF(__pyx_r);
2770  __Pyx_RefNannyFinishContext();
2771  return __pyx_r;
2772 }
2773 
2774 /* "PyClical.pyx":59
2775  * return self
2776  *
2777  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2778  * """
2779  * Return the wrapped C++ IndexSet instance.
2780  */
2781 
2782 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2783  IndexSet __pyx_r;
2784  __Pyx_RefNannyDeclarations
2785  __Pyx_RefNannySetupContext("unwrap", 0);
2786 
2787  /* "PyClical.pyx":63
2788  * Return the wrapped C++ IndexSet instance.
2789  * """
2790  * return self.instance[0] # <<<<<<<<<<<<<<
2791  *
2792  * cpdef copy(index_set self):
2793  */
2794  __pyx_r = (__pyx_v_self->instance[0]);
2795  goto __pyx_L0;
2796 
2797  /* "PyClical.pyx":59
2798  * return self
2799  *
2800  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2801  * """
2802  * Return the wrapped C++ IndexSet instance.
2803  */
2804 
2805  /* function exit code */
2806  __pyx_L0:;
2807  __Pyx_RefNannyFinishContext();
2808  return __pyx_r;
2809 }
2810 
2811 /* "PyClical.pyx":65
2812  * return self.instance[0]
2813  *
2814  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2815  * """
2816  * Copy this index_set object.
2817  */
2818 
2819 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2820 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2821  PyObject *__pyx_r = NULL;
2822  __Pyx_RefNannyDeclarations
2823  PyObject *__pyx_t_1 = NULL;
2824  PyObject *__pyx_t_2 = NULL;
2825  PyObject *__pyx_t_3 = NULL;
2826  PyObject *__pyx_t_4 = NULL;
2827  int __pyx_lineno = 0;
2828  const char *__pyx_filename = NULL;
2829  int __pyx_clineno = 0;
2830  __Pyx_RefNannySetupContext("copy", 0);
2831  /* Check if called by wrapper */
2832  if (unlikely(__pyx_skip_dispatch)) ;
2833  /* Check if overridden in Python */
2834  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)))) {
2835  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2836  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2837  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2838  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2839  #endif
2840  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
2841  __Pyx_GOTREF(__pyx_t_1);
2842  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2843  __Pyx_XDECREF(__pyx_r);
2844  __Pyx_INCREF(__pyx_t_1);
2845  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2846  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2847  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2848  if (likely(__pyx_t_4)) {
2849  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2850  __Pyx_INCREF(__pyx_t_4);
2851  __Pyx_INCREF(function);
2852  __Pyx_DECREF_SET(__pyx_t_3, function);
2853  }
2854  }
2855  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2856  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2857  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
2858  __Pyx_GOTREF(__pyx_t_2);
2859  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2860  __pyx_r = __pyx_t_2;
2861  __pyx_t_2 = 0;
2862  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2863  goto __pyx_L0;
2864  }
2865  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2866  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2867  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2868  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2869  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2870  }
2871  #endif
2872  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2873  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2874  }
2875  #endif
2876  }
2877 
2878  /* "PyClical.pyx":72
2879  * {1}
2880  * """
2881  * return index_set(self) # <<<<<<<<<<<<<<
2882  *
2883  * def __cinit__(self, other = 0):
2884  */
2885  __Pyx_XDECREF(__pyx_r);
2886  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
2887  __Pyx_GOTREF(__pyx_t_1);
2888  __pyx_r = __pyx_t_1;
2889  __pyx_t_1 = 0;
2890  goto __pyx_L0;
2891 
2892  /* "PyClical.pyx":65
2893  * return self.instance[0]
2894  *
2895  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2896  * """
2897  * Copy this index_set object.
2898  */
2899 
2900  /* function exit code */
2901  __pyx_L1_error:;
2902  __Pyx_XDECREF(__pyx_t_1);
2903  __Pyx_XDECREF(__pyx_t_2);
2904  __Pyx_XDECREF(__pyx_t_3);
2905  __Pyx_XDECREF(__pyx_t_4);
2906  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2907  __pyx_r = 0;
2908  __pyx_L0:;
2909  __Pyx_XGIVEREF(__pyx_r);
2910  __Pyx_RefNannyFinishContext();
2911  return __pyx_r;
2912 }
2913 
2914 /* Python wrapper */
2915 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2916 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 ";
2917 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2918  PyObject *__pyx_r = 0;
2919  __Pyx_RefNannyDeclarations
2920  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2921  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2922 
2923  /* function exit code */
2924  __Pyx_RefNannyFinishContext();
2925  return __pyx_r;
2926 }
2927 
2928 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2929  PyObject *__pyx_r = NULL;
2930  __Pyx_RefNannyDeclarations
2931  PyObject *__pyx_t_1 = NULL;
2932  int __pyx_lineno = 0;
2933  const char *__pyx_filename = NULL;
2934  int __pyx_clineno = 0;
2935  __Pyx_RefNannySetupContext("copy", 0);
2936  __Pyx_XDECREF(__pyx_r);
2937  __pyx_t_1 = __pyx_f_8PyClical_9index_set_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
2938  __Pyx_GOTREF(__pyx_t_1);
2939  __pyx_r = __pyx_t_1;
2940  __pyx_t_1 = 0;
2941  goto __pyx_L0;
2942 
2943  /* function exit code */
2944  __pyx_L1_error:;
2945  __Pyx_XDECREF(__pyx_t_1);
2946  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2947  __pyx_r = NULL;
2948  __pyx_L0:;
2949  __Pyx_XGIVEREF(__pyx_r);
2950  __Pyx_RefNannyFinishContext();
2951  return __pyx_r;
2952 }
2953 
2954 /* "PyClical.pyx":74
2955  * return index_set(self)
2956  *
2957  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2958  * """
2959  * Construct an object of type index_set.
2960  */
2961 
2962 /* Python wrapper */
2963 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2964 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2965  PyObject *__pyx_v_other = 0;
2966  int __pyx_lineno = 0;
2967  const char *__pyx_filename = NULL;
2968  int __pyx_clineno = 0;
2969  int __pyx_r;
2970  __Pyx_RefNannyDeclarations
2971  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2972  {
2973  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2974  PyObject* values[1] = {0};
2975  values[0] = ((PyObject *)__pyx_int_0);
2976  if (unlikely(__pyx_kwds)) {
2977  Py_ssize_t kw_args;
2978  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2979  switch (pos_args) {
2980  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2981  CYTHON_FALLTHROUGH;
2982  case 0: break;
2983  default: goto __pyx_L5_argtuple_error;
2984  }
2985  kw_args = PyDict_Size(__pyx_kwds);
2986  switch (pos_args) {
2987  case 0:
2988  if (kw_args > 0) {
2989  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2990  if (value) { values[0] = value; kw_args--; }
2991  }
2992  }
2993  if (unlikely(kw_args > 0)) {
2994  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 74, __pyx_L3_error)
2995  }
2996  } else {
2997  switch (PyTuple_GET_SIZE(__pyx_args)) {
2998  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2999  CYTHON_FALLTHROUGH;
3000  case 0: break;
3001  default: goto __pyx_L5_argtuple_error;
3002  }
3003  }
3004  __pyx_v_other = values[0];
3005  }
3006  goto __pyx_L4_argument_unpacking_done;
3007  __pyx_L5_argtuple_error:;
3008  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 74, __pyx_L3_error)
3009  __pyx_L3_error:;
3010  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3011  __Pyx_RefNannyFinishContext();
3012  return -1;
3013  __pyx_L4_argument_unpacking_done:;
3014  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
3015 
3016  /* function exit code */
3017  __Pyx_RefNannyFinishContext();
3018  return __pyx_r;
3019 }
3020 
3021 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
3022  PyObject *__pyx_v_error_msg_prefix = NULL;
3023  PyObject *__pyx_v_idx = NULL;
3024  PyObject *__pyx_v_bother = NULL;
3025  int __pyx_r;
3026  __Pyx_RefNannyDeclarations
3027  int __pyx_t_1;
3028  int __pyx_t_2;
3029  IndexSet *__pyx_t_3;
3030  PyObject *__pyx_t_4 = NULL;
3031  PyObject *__pyx_t_5 = NULL;
3032  int __pyx_t_6;
3033  int __pyx_t_7;
3034  PyObject *__pyx_t_8 = NULL;
3035  PyObject *__pyx_t_9 = NULL;
3036  PyObject *__pyx_t_10 = NULL;
3037  Py_ssize_t __pyx_t_11;
3038  PyObject *(*__pyx_t_12)(PyObject *);
3039  PyObject *__pyx_t_13 = NULL;
3040  PyObject *__pyx_t_14 = NULL;
3041  PyObject *__pyx_t_15 = NULL;
3042  PyObject *__pyx_t_16 = NULL;
3043  char *__pyx_t_17;
3044  int __pyx_lineno = 0;
3045  const char *__pyx_filename = NULL;
3046  int __pyx_clineno = 0;
3047  __Pyx_RefNannySetupContext("__cinit__", 0);
3048 
3049  /* "PyClical.pyx":93
3050  * {}
3051  * """
3052  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
3053  * if isinstance(other, index_set):
3054  * self.instance = new IndexSet((<index_set>other).unwrap())
3055  */
3056  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_index_set_obje);
3057  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_index_set_obje;
3058 
3059  /* "PyClical.pyx":94
3060  * """
3061  * error_msg_prefix = "Cannot initialize index_set object from"
3062  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
3063  * self.instance = new IndexSet((<index_set>other).unwrap())
3064  * elif isinstance(other, numbers.Integral):
3065  */
3066  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
3067  __pyx_t_2 = (__pyx_t_1 != 0);
3068  if (__pyx_t_2) {
3069 
3070  /* "PyClical.pyx":95
3071  * error_msg_prefix = "Cannot initialize index_set object from"
3072  * if isinstance(other, index_set):
3073  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
3074  * elif isinstance(other, numbers.Integral):
3075  * self.instance = new IndexSet(<int>other)
3076  */
3077  try {
3078  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
3079  } catch(...) {
3080  __Pyx_CppExn2PyErr();
3081  __PYX_ERR(0, 95, __pyx_L1_error)
3082  }
3083  __pyx_v_self->instance = __pyx_t_3;
3084 
3085  /* "PyClical.pyx":94
3086  * """
3087  * error_msg_prefix = "Cannot initialize index_set object from"
3088  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
3089  * self.instance = new IndexSet((<index_set>other).unwrap())
3090  * elif isinstance(other, numbers.Integral):
3091  */
3092  goto __pyx_L3;
3093  }
3094 
3095  /* "PyClical.pyx":96
3096  * if isinstance(other, index_set):
3097  * self.instance = new IndexSet((<index_set>other).unwrap())
3098  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
3099  * self.instance = new IndexSet(<int>other)
3100  * elif isinstance(other, (set, frozenset)):
3101  */
3102  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
3103  __Pyx_GOTREF(__pyx_t_4);
3104  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integral); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
3105  __Pyx_GOTREF(__pyx_t_5);
3106  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3107  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 96, __pyx_L1_error)
3108  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3109  __pyx_t_1 = (__pyx_t_2 != 0);
3110  if (__pyx_t_1) {
3111 
3112  /* "PyClical.pyx":97
3113  * self.instance = new IndexSet((<index_set>other).unwrap())
3114  * elif isinstance(other, numbers.Integral):
3115  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
3116  * elif isinstance(other, (set, frozenset)):
3117  * try:
3118  */
3119  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_other); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error)
3120  try {
3121  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
3122  } catch(...) {
3123  __Pyx_CppExn2PyErr();
3124  __PYX_ERR(0, 97, __pyx_L1_error)
3125  }
3126  __pyx_v_self->instance = __pyx_t_3;
3127 
3128  /* "PyClical.pyx":96
3129  * if isinstance(other, index_set):
3130  * self.instance = new IndexSet((<index_set>other).unwrap())
3131  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
3132  * self.instance = new IndexSet(<int>other)
3133  * elif isinstance(other, (set, frozenset)):
3134  */
3135  goto __pyx_L3;
3136  }
3137 
3138  /* "PyClical.pyx":98
3139  * elif isinstance(other, numbers.Integral):
3140  * self.instance = new IndexSet(<int>other)
3141  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3142  * try:
3143  * self.instance = new IndexSet()
3144  */
3145  __pyx_t_2 = PySet_Check(__pyx_v_other);
3146  __pyx_t_7 = (__pyx_t_2 != 0);
3147  if (!__pyx_t_7) {
3148  } else {
3149  __pyx_t_1 = __pyx_t_7;
3150  goto __pyx_L4_bool_binop_done;
3151  }
3152  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
3153  __pyx_t_2 = (__pyx_t_7 != 0);
3154  __pyx_t_1 = __pyx_t_2;
3155  __pyx_L4_bool_binop_done:;
3156  __pyx_t_2 = (__pyx_t_1 != 0);
3157  if (__pyx_t_2) {
3158 
3159  /* "PyClical.pyx":99
3160  * self.instance = new IndexSet(<int>other)
3161  * elif isinstance(other, (set, frozenset)):
3162  * try: # <<<<<<<<<<<<<<
3163  * self.instance = new IndexSet()
3164  * for idx in other:
3165  */
3166  {
3167  __Pyx_PyThreadState_declare
3168  __Pyx_PyThreadState_assign
3169  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3170  __Pyx_XGOTREF(__pyx_t_8);
3171  __Pyx_XGOTREF(__pyx_t_9);
3172  __Pyx_XGOTREF(__pyx_t_10);
3173  /*try:*/ {
3174 
3175  /* "PyClical.pyx":100
3176  * elif isinstance(other, (set, frozenset)):
3177  * try:
3178  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3179  * for idx in other:
3180  * self[idx] = True
3181  */
3182  __pyx_t_3 = new IndexSet();
3183  __pyx_v_self->instance = __pyx_t_3;
3184 
3185  /* "PyClical.pyx":101
3186  * try:
3187  * self.instance = new IndexSet()
3188  * for idx in other: # <<<<<<<<<<<<<<
3189  * self[idx] = True
3190  * except IndexError:
3191  */
3192  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3193  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3194  __pyx_t_12 = NULL;
3195  } else {
3196  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L6_error)
3197  __Pyx_GOTREF(__pyx_t_5);
3198  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 101, __pyx_L6_error)
3199  }
3200  for (;;) {
3201  if (likely(!__pyx_t_12)) {
3202  if (likely(PyList_CheckExact(__pyx_t_5))) {
3203  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3204  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3205  __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, 101, __pyx_L6_error)
3206  #else
3207  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L6_error)
3208  __Pyx_GOTREF(__pyx_t_4);
3209  #endif
3210  } else {
3211  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3212  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3213  __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, 101, __pyx_L6_error)
3214  #else
3215  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L6_error)
3216  __Pyx_GOTREF(__pyx_t_4);
3217  #endif
3218  }
3219  } else {
3220  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3221  if (unlikely(!__pyx_t_4)) {
3222  PyObject* exc_type = PyErr_Occurred();
3223  if (exc_type) {
3224  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3225  else __PYX_ERR(0, 101, __pyx_L6_error)
3226  }
3227  break;
3228  }
3229  __Pyx_GOTREF(__pyx_t_4);
3230  }
3231  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3232  __pyx_t_4 = 0;
3233 
3234  /* "PyClical.pyx":102
3235  * self.instance = new IndexSet()
3236  * for idx in other:
3237  * self[idx] = True # <<<<<<<<<<<<<<
3238  * except IndexError:
3239  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3240  */
3241  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 102, __pyx_L6_error)
3242 
3243  /* "PyClical.pyx":101
3244  * try:
3245  * self.instance = new IndexSet()
3246  * for idx in other: # <<<<<<<<<<<<<<
3247  * self[idx] = True
3248  * except IndexError:
3249  */
3250  }
3251  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3252 
3253  /* "PyClical.pyx":99
3254  * self.instance = new IndexSet(<int>other)
3255  * elif isinstance(other, (set, frozenset)):
3256  * try: # <<<<<<<<<<<<<<
3257  * self.instance = new IndexSet()
3258  * for idx in other:
3259  */
3260  }
3261  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3262  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3263  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3264  goto __pyx_L11_try_end;
3265  __pyx_L6_error:;
3266  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3267  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3268 
3269  /* "PyClical.pyx":103
3270  * for idx in other:
3271  * self[idx] = True
3272  * except IndexError: # <<<<<<<<<<<<<<
3273  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3274  * except (RuntimeError, TypeError):
3275  */
3276  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3277  if (__pyx_t_6) {
3278  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3279  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 103, __pyx_L8_except_error)
3280  __Pyx_GOTREF(__pyx_t_5);
3281  __Pyx_GOTREF(__pyx_t_4);
3282  __Pyx_GOTREF(__pyx_t_13);
3283 
3284  /* "PyClical.pyx":104
3285  * self[idx] = True
3286  * except IndexError:
3287  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3288  * except (RuntimeError, TypeError):
3289  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3290  */
3291  __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3292  __Pyx_GOTREF(__pyx_t_14);
3293  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3294  __Pyx_GOTREF(__pyx_t_15);
3295  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3296  __Pyx_GOTREF(__pyx_t_16);
3297  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3298  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3299  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_u_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3300  __Pyx_GOTREF(__pyx_t_15);
3301  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3302  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 104, __pyx_L8_except_error)
3303  __Pyx_GOTREF(__pyx_t_16);
3304  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3305  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3306  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3307  __PYX_ERR(0, 104, __pyx_L8_except_error)
3308  }
3309 
3310  /* "PyClical.pyx":105
3311  * except IndexError:
3312  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3313  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3314  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3315  * elif isinstance(other, str):
3316  */
3317  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3318  if (__pyx_t_6) {
3319  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3320  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 105, __pyx_L8_except_error)
3321  __Pyx_GOTREF(__pyx_t_13);
3322  __Pyx_GOTREF(__pyx_t_4);
3323  __Pyx_GOTREF(__pyx_t_5);
3324 
3325  /* "PyClical.pyx":106
3326  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3327  * except (RuntimeError, TypeError):
3328  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3329  * elif isinstance(other, str):
3330  * try:
3331  */
3332  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3333  __Pyx_GOTREF(__pyx_t_16);
3334  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3335  __Pyx_GOTREF(__pyx_t_15);
3336  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3337  __Pyx_GOTREF(__pyx_t_14);
3338  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3339  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3340  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_u_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3341  __Pyx_GOTREF(__pyx_t_15);
3342  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3343  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 106, __pyx_L8_except_error)
3344  __Pyx_GOTREF(__pyx_t_14);
3345  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3346  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3347  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3348  __PYX_ERR(0, 106, __pyx_L8_except_error)
3349  }
3350  goto __pyx_L8_except_error;
3351  __pyx_L8_except_error:;
3352 
3353  /* "PyClical.pyx":99
3354  * self.instance = new IndexSet(<int>other)
3355  * elif isinstance(other, (set, frozenset)):
3356  * try: # <<<<<<<<<<<<<<
3357  * self.instance = new IndexSet()
3358  * for idx in other:
3359  */
3360  __Pyx_XGIVEREF(__pyx_t_8);
3361  __Pyx_XGIVEREF(__pyx_t_9);
3362  __Pyx_XGIVEREF(__pyx_t_10);
3363  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3364  goto __pyx_L1_error;
3365  __pyx_L11_try_end:;
3366  }
3367 
3368  /* "PyClical.pyx":98
3369  * elif isinstance(other, numbers.Integral):
3370  * self.instance = new IndexSet(<int>other)
3371  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3372  * try:
3373  * self.instance = new IndexSet()
3374  */
3375  goto __pyx_L3;
3376  }
3377 
3378  /* "PyClical.pyx":107
3379  * except (RuntimeError, TypeError):
3380  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3381  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3382  * try:
3383  * bother = other.encode("UTF-8")
3384  */
3385  __pyx_t_2 = PyUnicode_Check(__pyx_v_other);
3386  __pyx_t_1 = (__pyx_t_2 != 0);
3387  if (likely(__pyx_t_1)) {
3388 
3389  /* "PyClical.pyx":108
3390  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3391  * elif isinstance(other, str):
3392  * try: # <<<<<<<<<<<<<<
3393  * bother = other.encode("UTF-8")
3394  * self.instance = new IndexSet(<char *>bother)
3395  */
3396  {
3397  __Pyx_PyThreadState_declare
3398  __Pyx_PyThreadState_assign
3399  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3400  __Pyx_XGOTREF(__pyx_t_10);
3401  __Pyx_XGOTREF(__pyx_t_9);
3402  __Pyx_XGOTREF(__pyx_t_8);
3403  /*try:*/ {
3404 
3405  /* "PyClical.pyx":109
3406  * elif isinstance(other, str):
3407  * try:
3408  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
3409  * self.instance = new IndexSet(<char *>bother)
3410  * except RuntimeError:
3411  */
3412  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L18_error)
3413  __Pyx_GOTREF(__pyx_t_4);
3414  __pyx_t_13 = NULL;
3415  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
3416  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
3417  if (likely(__pyx_t_13)) {
3418  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3419  __Pyx_INCREF(__pyx_t_13);
3420  __Pyx_INCREF(function);
3421  __Pyx_DECREF_SET(__pyx_t_4, function);
3422  }
3423  }
3424  __pyx_t_5 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_13, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_UTF_8);
3425  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3426  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L18_error)
3427  __Pyx_GOTREF(__pyx_t_5);
3428  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3429  __pyx_v_bother = __pyx_t_5;
3430  __pyx_t_5 = 0;
3431 
3432  /* "PyClical.pyx":110
3433  * try:
3434  * bother = other.encode("UTF-8")
3435  * self.instance = new IndexSet(<char *>bother) # <<<<<<<<<<<<<<
3436  * except RuntimeError:
3437  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3438  */
3439  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L18_error)
3440  try {
3441  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3442  } catch(...) {
3443  __Pyx_CppExn2PyErr();
3444  __PYX_ERR(0, 110, __pyx_L18_error)
3445  }
3446  __pyx_v_self->instance = __pyx_t_3;
3447 
3448  /* "PyClical.pyx":108
3449  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3450  * elif isinstance(other, str):
3451  * try: # <<<<<<<<<<<<<<
3452  * bother = other.encode("UTF-8")
3453  * self.instance = new IndexSet(<char *>bother)
3454  */
3455  }
3456  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3457  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3458  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3459  goto __pyx_L23_try_end;
3460  __pyx_L18_error:;
3461  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3462  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3463  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3464  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3465  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3466  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3467 
3468  /* "PyClical.pyx":111
3469  * bother = other.encode("UTF-8")
3470  * self.instance = new IndexSet(<char *>bother)
3471  * except RuntimeError: # <<<<<<<<<<<<<<
3472  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3473  * else:
3474  */
3475  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3476  if (__pyx_t_6) {
3477  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3478  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 111, __pyx_L20_except_error)
3479  __Pyx_GOTREF(__pyx_t_5);
3480  __Pyx_GOTREF(__pyx_t_4);
3481  __Pyx_GOTREF(__pyx_t_13);
3482 
3483  /* "PyClical.pyx":112
3484  * self.instance = new IndexSet(<char *>bother)
3485  * except RuntimeError:
3486  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3487  * else:
3488  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3489  */
3490  __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid_string); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3491  __Pyx_GOTREF(__pyx_t_14);
3492  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3493  __Pyx_GOTREF(__pyx_t_15);
3494  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3495  __Pyx_GOTREF(__pyx_t_16);
3496  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3497  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3498  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_u_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3499  __Pyx_GOTREF(__pyx_t_15);
3500  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3501  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 112, __pyx_L20_except_error)
3502  __Pyx_GOTREF(__pyx_t_16);
3503  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3504  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3505  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3506  __PYX_ERR(0, 112, __pyx_L20_except_error)
3507  }
3508  goto __pyx_L20_except_error;
3509  __pyx_L20_except_error:;
3510 
3511  /* "PyClical.pyx":108
3512  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3513  * elif isinstance(other, str):
3514  * try: # <<<<<<<<<<<<<<
3515  * bother = other.encode("UTF-8")
3516  * self.instance = new IndexSet(<char *>bother)
3517  */
3518  __Pyx_XGIVEREF(__pyx_t_10);
3519  __Pyx_XGIVEREF(__pyx_t_9);
3520  __Pyx_XGIVEREF(__pyx_t_8);
3521  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3522  goto __pyx_L1_error;
3523  __pyx_L23_try_end:;
3524  }
3525 
3526  /* "PyClical.pyx":107
3527  * except (RuntimeError, TypeError):
3528  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3529  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3530  * try:
3531  * bother = other.encode("UTF-8")
3532  */
3533  goto __pyx_L3;
3534  }
3535 
3536  /* "PyClical.pyx":114
3537  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3538  * else:
3539  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3540  *
3541  * def __dealloc__(self):
3542  */
3543  /*else*/ {
3544  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 114, __pyx_L1_error)
3545  __Pyx_GOTREF(__pyx_t_13);
3546  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
3547  __Pyx_GOTREF(__pyx_t_4);
3548  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3549  __Pyx_GOTREF(__pyx_t_5);
3550  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3551  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3552  __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 114, __pyx_L1_error)
3553  __Pyx_GOTREF(__pyx_t_4);
3554  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3555  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
3556  __Pyx_GOTREF(__pyx_t_5);
3557  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3558  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3559  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3560  __PYX_ERR(0, 114, __pyx_L1_error)
3561  }
3562  __pyx_L3:;
3563 
3564  /* "PyClical.pyx":74
3565  * return index_set(self)
3566  *
3567  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3568  * """
3569  * Construct an object of type index_set.
3570  */
3571 
3572  /* function exit code */
3573  __pyx_r = 0;
3574  goto __pyx_L0;
3575  __pyx_L1_error:;
3576  __Pyx_XDECREF(__pyx_t_4);
3577  __Pyx_XDECREF(__pyx_t_5);
3578  __Pyx_XDECREF(__pyx_t_13);
3579  __Pyx_XDECREF(__pyx_t_14);
3580  __Pyx_XDECREF(__pyx_t_15);
3581  __Pyx_XDECREF(__pyx_t_16);
3582  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3583  __pyx_r = -1;
3584  __pyx_L0:;
3585  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3586  __Pyx_XDECREF(__pyx_v_idx);
3587  __Pyx_XDECREF(__pyx_v_bother);
3588  __Pyx_RefNannyFinishContext();
3589  return __pyx_r;
3590 }
3591 
3592 /* "PyClical.pyx":116
3593  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3594  *
3595  * def __dealloc__(self): # <<<<<<<<<<<<<<
3596  * """
3597  * Clean up by deallocating the instance of C++ class IndexSet.
3598  */
3599 
3600 /* Python wrapper */
3601 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3602 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3603  __Pyx_RefNannyDeclarations
3604  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3605  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3606 
3607  /* function exit code */
3608  __Pyx_RefNannyFinishContext();
3609 }
3610 
3611 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3612  __Pyx_RefNannyDeclarations
3613  __Pyx_RefNannySetupContext("__dealloc__", 0);
3614 
3615  /* "PyClical.pyx":120
3616  * Clean up by deallocating the instance of C++ class IndexSet.
3617  * """
3618  * del self.instance # <<<<<<<<<<<<<<
3619  *
3620  * def __richcmp__(lhs, rhs, int op):
3621  */
3622  delete __pyx_v_self->instance;
3623 
3624  /* "PyClical.pyx":116
3625  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3626  *
3627  * def __dealloc__(self): # <<<<<<<<<<<<<<
3628  * """
3629  * Clean up by deallocating the instance of C++ class IndexSet.
3630  */
3631 
3632  /* function exit code */
3633  __Pyx_RefNannyFinishContext();
3634 }
3635 
3636 /* "PyClical.pyx":122
3637  * del self.instance
3638  *
3639  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3640  * """
3641  * Compare two objects of class index_set.
3642  */
3643 
3644 /* Python wrapper */
3645 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3646 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3647  PyObject *__pyx_r = 0;
3648  __Pyx_RefNannyDeclarations
3649  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3650  __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));
3651 
3652  /* function exit code */
3653  __Pyx_RefNannyFinishContext();
3654  return __pyx_r;
3655 }
3656 
3657 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) {
3658  PyObject *__pyx_v_eq = NULL;
3659  PyObject *__pyx_v_lt = NULL;
3660  PyObject *__pyx_r = NULL;
3661  __Pyx_RefNannyDeclarations
3662  int __pyx_t_1;
3663  int __pyx_t_2;
3664  int __pyx_t_3;
3665  PyObject *__pyx_t_4 = NULL;
3666  int __pyx_lineno = 0;
3667  const char *__pyx_filename = NULL;
3668  int __pyx_clineno = 0;
3669  __Pyx_RefNannySetupContext("__richcmp__", 0);
3670 
3671  /* "PyClical.pyx":143
3672  * False
3673  * """
3674  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3675  * eq = bool(lhs is rhs)
3676  * if op == 2: # ==
3677  */
3678  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3679  __pyx_t_3 = (__pyx_t_2 != 0);
3680  if (!__pyx_t_3) {
3681  } else {
3682  __pyx_t_1 = __pyx_t_3;
3683  goto __pyx_L4_bool_binop_done;
3684  }
3685  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3686  __pyx_t_2 = (__pyx_t_3 != 0);
3687  __pyx_t_1 = __pyx_t_2;
3688  __pyx_L4_bool_binop_done:;
3689  if (__pyx_t_1) {
3690 
3691  /* "PyClical.pyx":144
3692  * """
3693  * if (lhs is None) or (rhs is None):
3694  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3695  * if op == 2: # ==
3696  * return eq
3697  */
3698  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3699  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
3700  __Pyx_GOTREF(__pyx_t_4);
3701  __pyx_v_eq = __pyx_t_4;
3702  __pyx_t_4 = 0;
3703 
3704  /* "PyClical.pyx":145
3705  * if (lhs is None) or (rhs is None):
3706  * eq = bool(lhs is rhs)
3707  * if op == 2: # == # <<<<<<<<<<<<<<
3708  * return eq
3709  * elif op == 3: # !=
3710  */
3711  switch (__pyx_v_op) {
3712  case 2:
3713 
3714  /* "PyClical.pyx":146
3715  * eq = bool(lhs is rhs)
3716  * if op == 2: # ==
3717  * return eq # <<<<<<<<<<<<<<
3718  * elif op == 3: # !=
3719  * return not eq
3720  */
3721  __Pyx_XDECREF(__pyx_r);
3722  __Pyx_INCREF(__pyx_v_eq);
3723  __pyx_r = __pyx_v_eq;
3724  goto __pyx_L0;
3725 
3726  /* "PyClical.pyx":145
3727  * if (lhs is None) or (rhs is None):
3728  * eq = bool(lhs is rhs)
3729  * if op == 2: # == # <<<<<<<<<<<<<<
3730  * return eq
3731  * elif op == 3: # !=
3732  */
3733  break;
3734  case 3:
3735 
3736  /* "PyClical.pyx":148
3737  * return eq
3738  * elif op == 3: # !=
3739  * return not eq # <<<<<<<<<<<<<<
3740  * else:
3741  * if op == 0: # <
3742  */
3743  __Pyx_XDECREF(__pyx_r);
3744  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 148, __pyx_L1_error)
3745  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
3746  __Pyx_GOTREF(__pyx_t_4);
3747  __pyx_r = __pyx_t_4;
3748  __pyx_t_4 = 0;
3749  goto __pyx_L0;
3750 
3751  /* "PyClical.pyx":147
3752  * if op == 2: # ==
3753  * return eq
3754  * elif op == 3: # != # <<<<<<<<<<<<<<
3755  * return not eq
3756  * else:
3757  */
3758  break;
3759  default:
3760 
3761  /* "PyClical.pyx":150
3762  * return not eq
3763  * else:
3764  * if op == 0: # < # <<<<<<<<<<<<<<
3765  * return False
3766  * elif op == 1: # <=
3767  */
3768  switch (__pyx_v_op) {
3769  case 0:
3770 
3771  /* "PyClical.pyx":151
3772  * else:
3773  * if op == 0: # <
3774  * return False # <<<<<<<<<<<<<<
3775  * elif op == 1: # <=
3776  * return eq
3777  */
3778  __Pyx_XDECREF(__pyx_r);
3779  __Pyx_INCREF(Py_False);
3780  __pyx_r = Py_False;
3781  goto __pyx_L0;
3782 
3783  /* "PyClical.pyx":150
3784  * return not eq
3785  * else:
3786  * if op == 0: # < # <<<<<<<<<<<<<<
3787  * return False
3788  * elif op == 1: # <=
3789  */
3790  break;
3791  case 1:
3792 
3793  /* "PyClical.pyx":153
3794  * return False
3795  * elif op == 1: # <=
3796  * return eq # <<<<<<<<<<<<<<
3797  * elif op == 4: # >
3798  * return False
3799  */
3800  __Pyx_XDECREF(__pyx_r);
3801  __Pyx_INCREF(__pyx_v_eq);
3802  __pyx_r = __pyx_v_eq;
3803  goto __pyx_L0;
3804 
3805  /* "PyClical.pyx":152
3806  * if op == 0: # <
3807  * return False
3808  * elif op == 1: # <= # <<<<<<<<<<<<<<
3809  * return eq
3810  * elif op == 4: # >
3811  */
3812  break;
3813  case 4:
3814 
3815  /* "PyClical.pyx":155
3816  * return eq
3817  * elif op == 4: # >
3818  * return False # <<<<<<<<<<<<<<
3819  * elif op == 5: # >=
3820  * return eq
3821  */
3822  __Pyx_XDECREF(__pyx_r);
3823  __Pyx_INCREF(Py_False);
3824  __pyx_r = Py_False;
3825  goto __pyx_L0;
3826 
3827  /* "PyClical.pyx":154
3828  * elif op == 1: # <=
3829  * return eq
3830  * elif op == 4: # > # <<<<<<<<<<<<<<
3831  * return False
3832  * elif op == 5: # >=
3833  */
3834  break;
3835  case 5:
3836 
3837  /* "PyClical.pyx":157
3838  * return False
3839  * elif op == 5: # >=
3840  * return eq # <<<<<<<<<<<<<<
3841  * else:
3842  * return NotImplemented
3843  */
3844  __Pyx_XDECREF(__pyx_r);
3845  __Pyx_INCREF(__pyx_v_eq);
3846  __pyx_r = __pyx_v_eq;
3847  goto __pyx_L0;
3848 
3849  /* "PyClical.pyx":156
3850  * elif op == 4: # >
3851  * return False
3852  * elif op == 5: # >= # <<<<<<<<<<<<<<
3853  * return eq
3854  * else:
3855  */
3856  break;
3857  default:
3858 
3859  /* "PyClical.pyx":159
3860  * return eq
3861  * else:
3862  * return NotImplemented # <<<<<<<<<<<<<<
3863  * else:
3864  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3865  */
3866  __Pyx_XDECREF(__pyx_r);
3867  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3868  __pyx_r = __pyx_builtin_NotImplemented;
3869  goto __pyx_L0;
3870  break;
3871  }
3872  break;
3873  }
3874 
3875  /* "PyClical.pyx":143
3876  * False
3877  * """
3878  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3879  * eq = bool(lhs is rhs)
3880  * if op == 2: # ==
3881  */
3882  }
3883 
3884  /* "PyClical.pyx":161
3885  * return NotImplemented
3886  * else:
3887  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3888  * if op == 2: # ==
3889  * return eq
3890  */
3891  /*else*/ {
3892  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3893  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
3894  __Pyx_GOTREF(__pyx_t_4);
3895  __pyx_v_eq = __pyx_t_4;
3896  __pyx_t_4 = 0;
3897 
3898  /* "PyClical.pyx":162
3899  * else:
3900  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3901  * if op == 2: # == # <<<<<<<<<<<<<<
3902  * return eq
3903  * elif op == 3: # !=
3904  */
3905  switch (__pyx_v_op) {
3906  case 2:
3907 
3908  /* "PyClical.pyx":163
3909  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3910  * if op == 2: # ==
3911  * return eq # <<<<<<<<<<<<<<
3912  * elif op == 3: # !=
3913  * return not eq
3914  */
3915  __Pyx_XDECREF(__pyx_r);
3916  __Pyx_INCREF(__pyx_v_eq);
3917  __pyx_r = __pyx_v_eq;
3918  goto __pyx_L0;
3919 
3920  /* "PyClical.pyx":162
3921  * else:
3922  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3923  * if op == 2: # == # <<<<<<<<<<<<<<
3924  * return eq
3925  * elif op == 3: # !=
3926  */
3927  break;
3928  case 3:
3929 
3930  /* "PyClical.pyx":165
3931  * return eq
3932  * elif op == 3: # !=
3933  * return not eq # <<<<<<<<<<<<<<
3934  * else:
3935  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3936  */
3937  __Pyx_XDECREF(__pyx_r);
3938  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 165, __pyx_L1_error)
3939  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3940  __Pyx_GOTREF(__pyx_t_4);
3941  __pyx_r = __pyx_t_4;
3942  __pyx_t_4 = 0;
3943  goto __pyx_L0;
3944 
3945  /* "PyClical.pyx":164
3946  * if op == 2: # ==
3947  * return eq
3948  * elif op == 3: # != # <<<<<<<<<<<<<<
3949  * return not eq
3950  * else:
3951  */
3952  break;
3953  default:
3954 
3955  /* "PyClical.pyx":167
3956  * return not eq
3957  * else:
3958  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3959  * if op == 0: # <
3960  * return lt
3961  */
3962  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3963  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
3964  __Pyx_GOTREF(__pyx_t_4);
3965  __pyx_v_lt = __pyx_t_4;
3966  __pyx_t_4 = 0;
3967 
3968  /* "PyClical.pyx":168
3969  * else:
3970  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3971  * if op == 0: # < # <<<<<<<<<<<<<<
3972  * return lt
3973  * elif op == 1: # <=
3974  */
3975  switch (__pyx_v_op) {
3976  case 0:
3977 
3978  /* "PyClical.pyx":169
3979  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3980  * if op == 0: # <
3981  * return lt # <<<<<<<<<<<<<<
3982  * elif op == 1: # <=
3983  * return lt or eq
3984  */
3985  __Pyx_XDECREF(__pyx_r);
3986  __Pyx_INCREF(__pyx_v_lt);
3987  __pyx_r = __pyx_v_lt;
3988  goto __pyx_L0;
3989 
3990  /* "PyClical.pyx":168
3991  * else:
3992  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3993  * if op == 0: # < # <<<<<<<<<<<<<<
3994  * return lt
3995  * elif op == 1: # <=
3996  */
3997  break;
3998  case 1:
3999 
4000  /* "PyClical.pyx":171
4001  * return lt
4002  * elif op == 1: # <=
4003  * return lt or eq # <<<<<<<<<<<<<<
4004  * elif op == 4: # >
4005  * return not (lt or eq)
4006  */
4007  __Pyx_XDECREF(__pyx_r);
4008  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
4009  if (!__pyx_t_1) {
4010  } else {
4011  __Pyx_INCREF(__pyx_v_lt);
4012  __pyx_t_4 = __pyx_v_lt;
4013  goto __pyx_L6_bool_binop_done;
4014  }
4015  __Pyx_INCREF(__pyx_v_eq);
4016  __pyx_t_4 = __pyx_v_eq;
4017  __pyx_L6_bool_binop_done:;
4018  __pyx_r = __pyx_t_4;
4019  __pyx_t_4 = 0;
4020  goto __pyx_L0;
4021 
4022  /* "PyClical.pyx":170
4023  * if op == 0: # <
4024  * return lt
4025  * elif op == 1: # <= # <<<<<<<<<<<<<<
4026  * return lt or eq
4027  * elif op == 4: # >
4028  */
4029  break;
4030  case 4:
4031 
4032  /* "PyClical.pyx":173
4033  * return lt or eq
4034  * elif op == 4: # >
4035  * return not (lt or eq) # <<<<<<<<<<<<<<
4036  * elif op == 5: # >=
4037  * return not lt
4038  */
4039  __Pyx_XDECREF(__pyx_r);
4040  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
4041  if (!__pyx_t_2) {
4042  } else {
4043  __pyx_t_1 = __pyx_t_2;
4044  goto __pyx_L8_bool_binop_done;
4045  }
4046  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
4047  __pyx_t_1 = __pyx_t_2;
4048  __pyx_L8_bool_binop_done:;
4049  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
4050  __Pyx_GOTREF(__pyx_t_4);
4051  __pyx_r = __pyx_t_4;
4052  __pyx_t_4 = 0;
4053  goto __pyx_L0;
4054 
4055  /* "PyClical.pyx":172
4056  * elif op == 1: # <=
4057  * return lt or eq
4058  * elif op == 4: # > # <<<<<<<<<<<<<<
4059  * return not (lt or eq)
4060  * elif op == 5: # >=
4061  */
4062  break;
4063  case 5:
4064 
4065  /* "PyClical.pyx":175
4066  * return not (lt or eq)
4067  * elif op == 5: # >=
4068  * return not lt # <<<<<<<<<<<<<<
4069  * else:
4070  * return NotImplemented
4071  */
4072  __Pyx_XDECREF(__pyx_r);
4073  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 175, __pyx_L1_error)
4074  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error)
4075  __Pyx_GOTREF(__pyx_t_4);
4076  __pyx_r = __pyx_t_4;
4077  __pyx_t_4 = 0;
4078  goto __pyx_L0;
4079 
4080  /* "PyClical.pyx":174
4081  * elif op == 4: # >
4082  * return not (lt or eq)
4083  * elif op == 5: # >= # <<<<<<<<<<<<<<
4084  * return not lt
4085  * else:
4086  */
4087  break;
4088  default:
4089 
4090  /* "PyClical.pyx":177
4091  * return not lt
4092  * else:
4093  * return NotImplemented # <<<<<<<<<<<<<<
4094  *
4095  * def __setitem__(self, idx, val):
4096  */
4097  __Pyx_XDECREF(__pyx_r);
4098  __Pyx_INCREF(__pyx_builtin_NotImplemented);
4099  __pyx_r = __pyx_builtin_NotImplemented;
4100  goto __pyx_L0;
4101  break;
4102  }
4103  break;
4104  }
4105  }
4106 
4107  /* "PyClical.pyx":122
4108  * del self.instance
4109  *
4110  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
4111  * """
4112  * Compare two objects of class index_set.
4113  */
4114 
4115  /* function exit code */
4116  __pyx_L1_error:;
4117  __Pyx_XDECREF(__pyx_t_4);
4118  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4119  __pyx_r = NULL;
4120  __pyx_L0:;
4121  __Pyx_XDECREF(__pyx_v_eq);
4122  __Pyx_XDECREF(__pyx_v_lt);
4123  __Pyx_XGIVEREF(__pyx_r);
4124  __Pyx_RefNannyFinishContext();
4125  return __pyx_r;
4126 }
4127 
4128 /* "PyClical.pyx":179
4129  * return NotImplemented
4130  *
4131  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4132  * """
4133  * Set the value of an index_set object at index idx to value val.
4134  */
4135 
4136 /* Python wrapper */
4137 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
4138 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 ";
4139 #if CYTHON_COMPILING_IN_CPYTHON
4140 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
4141 #endif
4142 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
4143  int __pyx_r;
4144  __Pyx_RefNannyDeclarations
4145  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
4146  __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));
4147 
4148  /* function exit code */
4149  __Pyx_RefNannyFinishContext();
4150  return __pyx_r;
4151 }
4152 
4153 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) {
4154  int __pyx_r;
4155  __Pyx_RefNannyDeclarations
4156  int __pyx_t_1;
4157  int __pyx_t_2;
4158  int __pyx_lineno = 0;
4159  const char *__pyx_filename = NULL;
4160  int __pyx_clineno = 0;
4161  __Pyx_RefNannySetupContext("__setitem__", 0);
4162 
4163  /* "PyClical.pyx":188
4164  * {2}
4165  * """
4166  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
4167  * return
4168  *
4169  */
4170  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
4171  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L1_error)
4172  try {
4173  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
4174  } catch(...) {
4175  __Pyx_CppExn2PyErr();
4176  __PYX_ERR(0, 188, __pyx_L1_error)
4177  }
4178 
4179  /* "PyClical.pyx":189
4180  * """
4181  * self.instance.set(idx, val)
4182  * return # <<<<<<<<<<<<<<
4183  *
4184  * def __getitem__(self, idx):
4185  */
4186  __pyx_r = 0;
4187  goto __pyx_L0;
4188 
4189  /* "PyClical.pyx":179
4190  * return NotImplemented
4191  *
4192  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4193  * """
4194  * Set the value of an index_set object at index idx to value val.
4195  */
4196 
4197  /* function exit code */
4198  __pyx_L1_error:;
4199  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4200  __pyx_r = -1;
4201  __pyx_L0:;
4202  __Pyx_RefNannyFinishContext();
4203  return __pyx_r;
4204 }
4205 
4206 /* "PyClical.pyx":191
4207  * return
4208  *
4209  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4210  * """
4211  * Get the value of an index_set object at an index.
4212  */
4213 
4214 /* Python wrapper */
4215 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4216 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 ";
4217 #if CYTHON_COMPILING_IN_CPYTHON
4218 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4219 #endif
4220 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4221  PyObject *__pyx_r = 0;
4222  __Pyx_RefNannyDeclarations
4223  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4224  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4225 
4226  /* function exit code */
4227  __Pyx_RefNannyFinishContext();
4228  return __pyx_r;
4229 }
4230 
4231 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4232  PyObject *__pyx_r = NULL;
4233  __Pyx_RefNannyDeclarations
4234  int __pyx_t_1;
4235  PyObject *__pyx_t_2 = NULL;
4236  int __pyx_lineno = 0;
4237  const char *__pyx_filename = NULL;
4238  int __pyx_clineno = 0;
4239  __Pyx_RefNannySetupContext("__getitem__", 0);
4240 
4241  /* "PyClical.pyx":208
4242  * False
4243  * """
4244  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4245  *
4246  * def __contains__(self, idx):
4247  */
4248  __Pyx_XDECREF(__pyx_r);
4249  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error)
4250  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->operator[](__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
4251  __Pyx_GOTREF(__pyx_t_2);
4252  __pyx_r = __pyx_t_2;
4253  __pyx_t_2 = 0;
4254  goto __pyx_L0;
4255 
4256  /* "PyClical.pyx":191
4257  * return
4258  *
4259  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4260  * """
4261  * Get the value of an index_set object at an index.
4262  */
4263 
4264  /* function exit code */
4265  __pyx_L1_error:;
4266  __Pyx_XDECREF(__pyx_t_2);
4267  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4268  __pyx_r = NULL;
4269  __pyx_L0:;
4270  __Pyx_XGIVEREF(__pyx_r);
4271  __Pyx_RefNannyFinishContext();
4272  return __pyx_r;
4273 }
4274 
4275 /* "PyClical.pyx":210
4276  * return self.instance.getitem(idx)
4277  *
4278  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4279  * """
4280  * Check that an index_set object contains the index idx: idx in self.
4281  */
4282 
4283 /* Python wrapper */
4284 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4285 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 ";
4286 #if CYTHON_COMPILING_IN_CPYTHON
4287 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4288 #endif
4289 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4290  int __pyx_r;
4291  __Pyx_RefNannyDeclarations
4292  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4293  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4294 
4295  /* function exit code */
4296  __Pyx_RefNannyFinishContext();
4297  return __pyx_r;
4298 }
4299 
4300 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4301  int __pyx_r;
4302  __Pyx_RefNannyDeclarations
4303  int __pyx_t_1;
4304  int __pyx_lineno = 0;
4305  const char *__pyx_filename = NULL;
4306  int __pyx_clineno = 0;
4307  __Pyx_RefNannySetupContext("__contains__", 0);
4308 
4309  /* "PyClical.pyx":227
4310  * False
4311  * """
4312  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4313  *
4314  * def __iter__(self):
4315  */
4316  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L1_error)
4317  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4318  goto __pyx_L0;
4319 
4320  /* "PyClical.pyx":210
4321  * return self.instance.getitem(idx)
4322  *
4323  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4324  * """
4325  * Check that an index_set object contains the index idx: idx in self.
4326  */
4327 
4328  /* function exit code */
4329  __pyx_L1_error:;
4330  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4331  __pyx_r = -1;
4332  __pyx_L0:;
4333  __Pyx_RefNannyFinishContext();
4334  return __pyx_r;
4335 }
4336 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4337 
4338 /* "PyClical.pyx":229
4339  * return self.instance.getitem(idx)
4340  *
4341  * def __iter__(self): # <<<<<<<<<<<<<<
4342  * """
4343  * Iterate over the indices of an index_set.
4344  */
4345 
4346 /* Python wrapper */
4347 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4348 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, end=\",\")\n -3,4,7,\n ";
4349 #if CYTHON_COMPILING_IN_CPYTHON
4350 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4351 #endif
4352 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4353  PyObject *__pyx_r = 0;
4354  __Pyx_RefNannyDeclarations
4355  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4356  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4357 
4358  /* function exit code */
4359  __Pyx_RefNannyFinishContext();
4360  return __pyx_r;
4361 }
4362 
4363 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4364  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4365  PyObject *__pyx_r = NULL;
4366  __Pyx_RefNannyDeclarations
4367  int __pyx_lineno = 0;
4368  const char *__pyx_filename = NULL;
4369  int __pyx_clineno = 0;
4370  __Pyx_RefNannySetupContext("__iter__", 0);
4371  __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);
4372  if (unlikely(!__pyx_cur_scope)) {
4373  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4374  __Pyx_INCREF(Py_None);
4375  __PYX_ERR(0, 229, __pyx_L1_error)
4376  } else {
4377  __Pyx_GOTREF(__pyx_cur_scope);
4378  }
4379  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4380  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4381  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4382  {
4383  __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, 229, __pyx_L1_error)
4384  __Pyx_DECREF(__pyx_cur_scope);
4385  __Pyx_RefNannyFinishContext();
4386  return (PyObject *) gen;
4387  }
4388 
4389  /* function exit code */
4390  __pyx_L1_error:;
4391  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4392  __pyx_r = NULL;
4393  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4394  __Pyx_XGIVEREF(__pyx_r);
4395  __Pyx_RefNannyFinishContext();
4396  return __pyx_r;
4397 }
4398 
4399 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4400 {
4401  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4402  PyObject *__pyx_r = NULL;
4403  PyObject *__pyx_t_1 = NULL;
4404  PyObject *__pyx_t_2 = NULL;
4405  PyObject *__pyx_t_3 = NULL;
4406  PyObject *__pyx_t_4 = NULL;
4407  Py_ssize_t __pyx_t_5;
4408  PyObject *(*__pyx_t_6)(PyObject *);
4409  int __pyx_t_7;
4410  int __pyx_t_8;
4411  int __pyx_lineno = 0;
4412  const char *__pyx_filename = NULL;
4413  int __pyx_clineno = 0;
4414  __Pyx_RefNannyDeclarations
4415  __Pyx_RefNannySetupContext("__iter__", 0);
4416  switch (__pyx_generator->resume_label) {
4417  case 0: goto __pyx_L3_first_run;
4418  case 1: goto __pyx_L7_resume_from_yield;
4419  default: /* CPython raises the right error here */
4420  __Pyx_RefNannyFinishContext();
4421  return NULL;
4422  }
4423  __pyx_L3_first_run:;
4424  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 229, __pyx_L1_error)
4425 
4426  /* "PyClical.pyx":236
4427  * -3,4,7,
4428  * """
4429  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4430  * if idx in self:
4431  * yield idx
4432  */
4433  __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, 236, __pyx_L1_error)
4434  __Pyx_GOTREF(__pyx_t_2);
4435  __pyx_t_3 = NULL;
4436  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4437  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4438  if (likely(__pyx_t_3)) {
4439  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4440  __Pyx_INCREF(__pyx_t_3);
4441  __Pyx_INCREF(function);
4442  __Pyx_DECREF_SET(__pyx_t_2, function);
4443  }
4444  }
4445  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4446  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4447  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
4448  __Pyx_GOTREF(__pyx_t_1);
4449  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4450  __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, 236, __pyx_L1_error)
4451  __Pyx_GOTREF(__pyx_t_3);
4452  __pyx_t_4 = NULL;
4453  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4454  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4455  if (likely(__pyx_t_4)) {
4456  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4457  __Pyx_INCREF(__pyx_t_4);
4458  __Pyx_INCREF(function);
4459  __Pyx_DECREF_SET(__pyx_t_3, function);
4460  }
4461  }
4462  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4463  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4464  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4465  __Pyx_GOTREF(__pyx_t_2);
4466  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4467  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4468  __Pyx_GOTREF(__pyx_t_3);
4469  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4470  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4471  __Pyx_GOTREF(__pyx_t_2);
4472  __Pyx_GIVEREF(__pyx_t_1);
4473  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4474  __Pyx_GIVEREF(__pyx_t_3);
4475  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4476  __pyx_t_1 = 0;
4477  __pyx_t_3 = 0;
4478  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4479  __Pyx_GOTREF(__pyx_t_3);
4480  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4481  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4482  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4483  __pyx_t_6 = NULL;
4484  } else {
4485  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
4486  __Pyx_GOTREF(__pyx_t_2);
4487  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error)
4488  }
4489  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4490  for (;;) {
4491  if (likely(!__pyx_t_6)) {
4492  if (likely(PyList_CheckExact(__pyx_t_2))) {
4493  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4494  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4495  __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, 236, __pyx_L1_error)
4496  #else
4497  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4498  __Pyx_GOTREF(__pyx_t_3);
4499  #endif
4500  } else {
4501  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4502  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4503  __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, 236, __pyx_L1_error)
4504  #else
4505  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
4506  __Pyx_GOTREF(__pyx_t_3);
4507  #endif
4508  }
4509  } else {
4510  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4511  if (unlikely(!__pyx_t_3)) {
4512  PyObject* exc_type = PyErr_Occurred();
4513  if (exc_type) {
4514  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4515  else __PYX_ERR(0, 236, __pyx_L1_error)
4516  }
4517  break;
4518  }
4519  __Pyx_GOTREF(__pyx_t_3);
4520  }
4521  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4522  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4523  __Pyx_GIVEREF(__pyx_t_3);
4524  __pyx_t_3 = 0;
4525 
4526  /* "PyClical.pyx":237
4527  * """
4528  * for idx in range(self.min(), self.max()+1):
4529  * if idx in self: # <<<<<<<<<<<<<<
4530  * yield idx
4531  *
4532  */
4533  __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, 237, __pyx_L1_error)
4534  __pyx_t_8 = (__pyx_t_7 != 0);
4535  if (__pyx_t_8) {
4536 
4537  /* "PyClical.pyx":238
4538  * for idx in range(self.min(), self.max()+1):
4539  * if idx in self:
4540  * yield idx # <<<<<<<<<<<<<<
4541  *
4542  * def __invert__(self):
4543  */
4544  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4545  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4546  __Pyx_XGIVEREF(__pyx_t_2);
4547  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4548  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4549  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4550  __Pyx_XGIVEREF(__pyx_r);
4551  __Pyx_RefNannyFinishContext();
4552  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4553  /* return from generator, yielding value */
4554  __pyx_generator->resume_label = 1;
4555  return __pyx_r;
4556  __pyx_L7_resume_from_yield:;
4557  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4558  __pyx_cur_scope->__pyx_t_0 = 0;
4559  __Pyx_XGOTREF(__pyx_t_2);
4560  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4561  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4562  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
4563 
4564  /* "PyClical.pyx":237
4565  * """
4566  * for idx in range(self.min(), self.max()+1):
4567  * if idx in self: # <<<<<<<<<<<<<<
4568  * yield idx
4569  *
4570  */
4571  }
4572 
4573  /* "PyClical.pyx":236
4574  * -3,4,7,
4575  * """
4576  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4577  * if idx in self:
4578  * yield idx
4579  */
4580  }
4581  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4582  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4583 
4584  /* "PyClical.pyx":229
4585  * return self.instance.getitem(idx)
4586  *
4587  * def __iter__(self): # <<<<<<<<<<<<<<
4588  * """
4589  * Iterate over the indices of an index_set.
4590  */
4591 
4592  /* function exit code */
4593  PyErr_SetNone(PyExc_StopIteration);
4594  goto __pyx_L0;
4595  __pyx_L1_error:;
4596  __Pyx_XDECREF(__pyx_t_1);
4597  __Pyx_XDECREF(__pyx_t_2);
4598  __Pyx_XDECREF(__pyx_t_3);
4599  __Pyx_XDECREF(__pyx_t_4);
4600  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4601  __pyx_L0:;
4602  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4603  #if !CYTHON_USE_EXC_INFO_STACK
4604  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4605  #endif
4606  __pyx_generator->resume_label = -1;
4607  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4608  __Pyx_RefNannyFinishContext();
4609  return __pyx_r;
4610 }
4611 
4612 /* "PyClical.pyx":240
4613  * yield idx
4614  *
4615  * def __invert__(self): # <<<<<<<<<<<<<<
4616  * """
4617  * Set complement: not.
4618  */
4619 
4620 /* Python wrapper */
4621 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4622 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 ";
4623 #if CYTHON_COMPILING_IN_CPYTHON
4624 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4625 #endif
4626 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4627  PyObject *__pyx_r = 0;
4628  __Pyx_RefNannyDeclarations
4629  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4630  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4631 
4632  /* function exit code */
4633  __Pyx_RefNannyFinishContext();
4634  return __pyx_r;
4635 }
4636 
4637 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4638  PyObject *__pyx_r = NULL;
4639  __Pyx_RefNannyDeclarations
4640  PyObject *__pyx_t_1 = NULL;
4641  PyObject *__pyx_t_2 = NULL;
4642  int __pyx_lineno = 0;
4643  const char *__pyx_filename = NULL;
4644  int __pyx_clineno = 0;
4645  __Pyx_RefNannySetupContext("__invert__", 0);
4646 
4647  /* "PyClical.pyx":247
4648  * {-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}
4649  * """
4650  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4651  *
4652  * def __xor__(lhs, rhs):
4653  */
4654  __Pyx_XDECREF(__pyx_r);
4655  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
4656  __Pyx_GOTREF(__pyx_t_1);
4657  __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, 247, __pyx_L1_error)
4658  __Pyx_GOTREF(__pyx_t_2);
4659  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4660  __pyx_r = __pyx_t_2;
4661  __pyx_t_2 = 0;
4662  goto __pyx_L0;
4663 
4664  /* "PyClical.pyx":240
4665  * yield idx
4666  *
4667  * def __invert__(self): # <<<<<<<<<<<<<<
4668  * """
4669  * Set complement: not.
4670  */
4671 
4672  /* function exit code */
4673  __pyx_L1_error:;
4674  __Pyx_XDECREF(__pyx_t_1);
4675  __Pyx_XDECREF(__pyx_t_2);
4676  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4677  __pyx_r = NULL;
4678  __pyx_L0:;
4679  __Pyx_XGIVEREF(__pyx_r);
4680  __Pyx_RefNannyFinishContext();
4681  return __pyx_r;
4682 }
4683 
4684 /* "PyClical.pyx":249
4685  * return index_set().wrap( self.instance.invert() )
4686  *
4687  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4688  * """
4689  * Symmetric set difference: exclusive or.
4690  */
4691 
4692 /* Python wrapper */
4693 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4694 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 ";
4695 #if CYTHON_COMPILING_IN_CPYTHON
4696 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4697 #endif
4698 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4699  PyObject *__pyx_r = 0;
4700  __Pyx_RefNannyDeclarations
4701  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4702  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4703 
4704  /* function exit code */
4705  __Pyx_RefNannyFinishContext();
4706  return __pyx_r;
4707 }
4708 
4709 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4710  PyObject *__pyx_r = NULL;
4711  __Pyx_RefNannyDeclarations
4712  PyObject *__pyx_t_1 = NULL;
4713  PyObject *__pyx_t_2 = NULL;
4714  int __pyx_lineno = 0;
4715  const char *__pyx_filename = NULL;
4716  int __pyx_clineno = 0;
4717  __Pyx_RefNannySetupContext("__xor__", 0);
4718 
4719  /* "PyClical.pyx":258
4720  * {1}
4721  * """
4722  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4723  *
4724  * def __ixor__(self, rhs):
4725  */
4726  __Pyx_XDECREF(__pyx_r);
4727  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
4728  __Pyx_GOTREF(__pyx_t_1);
4729  __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, 258, __pyx_L1_error)
4730  __Pyx_GOTREF(__pyx_t_2);
4731  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4732  __pyx_r = __pyx_t_2;
4733  __pyx_t_2 = 0;
4734  goto __pyx_L0;
4735 
4736  /* "PyClical.pyx":249
4737  * return index_set().wrap( self.instance.invert() )
4738  *
4739  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4740  * """
4741  * Symmetric set difference: exclusive or.
4742  */
4743 
4744  /* function exit code */
4745  __pyx_L1_error:;
4746  __Pyx_XDECREF(__pyx_t_1);
4747  __Pyx_XDECREF(__pyx_t_2);
4748  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4749  __pyx_r = NULL;
4750  __pyx_L0:;
4751  __Pyx_XGIVEREF(__pyx_r);
4752  __Pyx_RefNannyFinishContext();
4753  return __pyx_r;
4754 }
4755 
4756 /* "PyClical.pyx":260
4757  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4758  *
4759  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4760  * """
4761  * Symmetric set difference: exclusive or.
4762  */
4763 
4764 /* Python wrapper */
4765 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4766 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 ";
4767 #if CYTHON_COMPILING_IN_CPYTHON
4768 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4769 #endif
4770 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4771  PyObject *__pyx_r = 0;
4772  __Pyx_RefNannyDeclarations
4773  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4774  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4775 
4776  /* function exit code */
4777  __Pyx_RefNannyFinishContext();
4778  return __pyx_r;
4779 }
4780 
4781 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4782  PyObject *__pyx_r = NULL;
4783  __Pyx_RefNannyDeclarations
4784  PyObject *__pyx_t_1 = NULL;
4785  int __pyx_lineno = 0;
4786  const char *__pyx_filename = NULL;
4787  int __pyx_clineno = 0;
4788  __Pyx_RefNannySetupContext("__ixor__", 0);
4789 
4790  /* "PyClical.pyx":269
4791  * {1}
4792  * """
4793  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4794  *
4795  * def __and__(lhs, rhs):
4796  */
4797  __Pyx_XDECREF(__pyx_r);
4798  __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, 269, __pyx_L1_error)
4799  __Pyx_GOTREF(__pyx_t_1);
4800  __pyx_r = __pyx_t_1;
4801  __pyx_t_1 = 0;
4802  goto __pyx_L0;
4803 
4804  /* "PyClical.pyx":260
4805  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4806  *
4807  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4808  * """
4809  * Symmetric set difference: exclusive or.
4810  */
4811 
4812  /* function exit code */
4813  __pyx_L1_error:;
4814  __Pyx_XDECREF(__pyx_t_1);
4815  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4816  __pyx_r = NULL;
4817  __pyx_L0:;
4818  __Pyx_XGIVEREF(__pyx_r);
4819  __Pyx_RefNannyFinishContext();
4820  return __pyx_r;
4821 }
4822 
4823 /* "PyClical.pyx":271
4824  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4825  *
4826  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4827  * """
4828  * Set intersection: and.
4829  */
4830 
4831 /* Python wrapper */
4832 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4833 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 ";
4834 #if CYTHON_COMPILING_IN_CPYTHON
4835 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4836 #endif
4837 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4838  PyObject *__pyx_r = 0;
4839  __Pyx_RefNannyDeclarations
4840  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4841  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4842 
4843  /* function exit code */
4844  __Pyx_RefNannyFinishContext();
4845  return __pyx_r;
4846 }
4847 
4848 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4849  PyObject *__pyx_r = NULL;
4850  __Pyx_RefNannyDeclarations
4851  PyObject *__pyx_t_1 = NULL;
4852  PyObject *__pyx_t_2 = NULL;
4853  int __pyx_lineno = 0;
4854  const char *__pyx_filename = NULL;
4855  int __pyx_clineno = 0;
4856  __Pyx_RefNannySetupContext("__and__", 0);
4857 
4858  /* "PyClical.pyx":280
4859  * {2}
4860  * """
4861  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4862  *
4863  * def __iand__(self, rhs):
4864  */
4865  __Pyx_XDECREF(__pyx_r);
4866  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
4867  __Pyx_GOTREF(__pyx_t_1);
4868  __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, 280, __pyx_L1_error)
4869  __Pyx_GOTREF(__pyx_t_2);
4870  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4871  __pyx_r = __pyx_t_2;
4872  __pyx_t_2 = 0;
4873  goto __pyx_L0;
4874 
4875  /* "PyClical.pyx":271
4876  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4877  *
4878  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4879  * """
4880  * Set intersection: and.
4881  */
4882 
4883  /* function exit code */
4884  __pyx_L1_error:;
4885  __Pyx_XDECREF(__pyx_t_1);
4886  __Pyx_XDECREF(__pyx_t_2);
4887  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4888  __pyx_r = NULL;
4889  __pyx_L0:;
4890  __Pyx_XGIVEREF(__pyx_r);
4891  __Pyx_RefNannyFinishContext();
4892  return __pyx_r;
4893 }
4894 
4895 /* "PyClical.pyx":282
4896  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4897  *
4898  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4899  * """
4900  * Set intersection: and.
4901  */
4902 
4903 /* Python wrapper */
4904 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4905 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 ";
4906 #if CYTHON_COMPILING_IN_CPYTHON
4907 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4908 #endif
4909 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4910  PyObject *__pyx_r = 0;
4911  __Pyx_RefNannyDeclarations
4912  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4913  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4914 
4915  /* function exit code */
4916  __Pyx_RefNannyFinishContext();
4917  return __pyx_r;
4918 }
4919 
4920 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4921  PyObject *__pyx_r = NULL;
4922  __Pyx_RefNannyDeclarations
4923  PyObject *__pyx_t_1 = NULL;
4924  int __pyx_lineno = 0;
4925  const char *__pyx_filename = NULL;
4926  int __pyx_clineno = 0;
4927  __Pyx_RefNannySetupContext("__iand__", 0);
4928 
4929  /* "PyClical.pyx":291
4930  * {2}
4931  * """
4932  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4933  *
4934  * def __or__(lhs, rhs):
4935  */
4936  __Pyx_XDECREF(__pyx_r);
4937  __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, 291, __pyx_L1_error)
4938  __Pyx_GOTREF(__pyx_t_1);
4939  __pyx_r = __pyx_t_1;
4940  __pyx_t_1 = 0;
4941  goto __pyx_L0;
4942 
4943  /* "PyClical.pyx":282
4944  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4945  *
4946  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4947  * """
4948  * Set intersection: and.
4949  */
4950 
4951  /* function exit code */
4952  __pyx_L1_error:;
4953  __Pyx_XDECREF(__pyx_t_1);
4954  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4955  __pyx_r = NULL;
4956  __pyx_L0:;
4957  __Pyx_XGIVEREF(__pyx_r);
4958  __Pyx_RefNannyFinishContext();
4959  return __pyx_r;
4960 }
4961 
4962 /* "PyClical.pyx":293
4963  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4964  *
4965  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4966  * """
4967  * Set union: or.
4968  */
4969 
4970 /* Python wrapper */
4971 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4972 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 ";
4973 #if CYTHON_COMPILING_IN_CPYTHON
4974 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4975 #endif
4976 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4977  PyObject *__pyx_r = 0;
4978  __Pyx_RefNannyDeclarations
4979  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4980  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4981 
4982  /* function exit code */
4983  __Pyx_RefNannyFinishContext();
4984  return __pyx_r;
4985 }
4986 
4987 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4988  PyObject *__pyx_r = NULL;
4989  __Pyx_RefNannyDeclarations
4990  PyObject *__pyx_t_1 = NULL;
4991  PyObject *__pyx_t_2 = NULL;
4992  int __pyx_lineno = 0;
4993  const char *__pyx_filename = NULL;
4994  int __pyx_clineno = 0;
4995  __Pyx_RefNannySetupContext("__or__", 0);
4996 
4997  /* "PyClical.pyx":302
4998  * {1,2}
4999  * """
5000  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5001  *
5002  * def __ior__(self, rhs):
5003  */
5004  __Pyx_XDECREF(__pyx_r);
5005  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
5006  __Pyx_GOTREF(__pyx_t_1);
5007  __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, 302, __pyx_L1_error)
5008  __Pyx_GOTREF(__pyx_t_2);
5009  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5010  __pyx_r = __pyx_t_2;
5011  __pyx_t_2 = 0;
5012  goto __pyx_L0;
5013 
5014  /* "PyClical.pyx":293
5015  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
5016  *
5017  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
5018  * """
5019  * Set union: or.
5020  */
5021 
5022  /* function exit code */
5023  __pyx_L1_error:;
5024  __Pyx_XDECREF(__pyx_t_1);
5025  __Pyx_XDECREF(__pyx_t_2);
5026  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5027  __pyx_r = NULL;
5028  __pyx_L0:;
5029  __Pyx_XGIVEREF(__pyx_r);
5030  __Pyx_RefNannyFinishContext();
5031  return __pyx_r;
5032 }
5033 
5034 /* "PyClical.pyx":304
5035  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
5036  *
5037  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
5038  * """
5039  * Set union: or.
5040  */
5041 
5042 /* Python wrapper */
5043 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5044 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 ";
5045 #if CYTHON_COMPILING_IN_CPYTHON
5046 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
5047 #endif
5048 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5049  PyObject *__pyx_r = 0;
5050  __Pyx_RefNannyDeclarations
5051  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
5052  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5053 
5054  /* function exit code */
5055  __Pyx_RefNannyFinishContext();
5056  return __pyx_r;
5057 }
5058 
5059 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5060  PyObject *__pyx_r = NULL;
5061  __Pyx_RefNannyDeclarations
5062  PyObject *__pyx_t_1 = NULL;
5063  int __pyx_lineno = 0;
5064  const char *__pyx_filename = NULL;
5065  int __pyx_clineno = 0;
5066  __Pyx_RefNannySetupContext("__ior__", 0);
5067 
5068  /* "PyClical.pyx":313
5069  * {1,2}
5070  * """
5071  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5072  *
5073  * def count(self):
5074  */
5075  __Pyx_XDECREF(__pyx_r);
5076  __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, 313, __pyx_L1_error)
5077  __Pyx_GOTREF(__pyx_t_1);
5078  __pyx_r = __pyx_t_1;
5079  __pyx_t_1 = 0;
5080  goto __pyx_L0;
5081 
5082  /* "PyClical.pyx":304
5083  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
5084  *
5085  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
5086  * """
5087  * Set union: or.
5088  */
5089 
5090  /* function exit code */
5091  __pyx_L1_error:;
5092  __Pyx_XDECREF(__pyx_t_1);
5093  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5094  __pyx_r = NULL;
5095  __pyx_L0:;
5096  __Pyx_XGIVEREF(__pyx_r);
5097  __Pyx_RefNannyFinishContext();
5098  return __pyx_r;
5099 }
5100 
5101 /* "PyClical.pyx":315
5102  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
5103  *
5104  * def count(self): # <<<<<<<<<<<<<<
5105  * """
5106  * Cardinality: Number of indices included in set.
5107  */
5108 
5109 /* Python wrapper */
5110 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5111 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 ";
5112 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5113  PyObject *__pyx_r = 0;
5114  __Pyx_RefNannyDeclarations
5115  __Pyx_RefNannySetupContext("count (wrapper)", 0);
5116  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5117 
5118  /* function exit code */
5119  __Pyx_RefNannyFinishContext();
5120  return __pyx_r;
5121 }
5122 
5123 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5124  PyObject *__pyx_r = NULL;
5125  __Pyx_RefNannyDeclarations
5126  PyObject *__pyx_t_1 = NULL;
5127  int __pyx_lineno = 0;
5128  const char *__pyx_filename = NULL;
5129  int __pyx_clineno = 0;
5130  __Pyx_RefNannySetupContext("count", 0);
5131 
5132  /* "PyClical.pyx":322
5133  * 3
5134  * """
5135  * return self.instance.count() # <<<<<<<<<<<<<<
5136  *
5137  * def count_neg(self):
5138  */
5139  __Pyx_XDECREF(__pyx_r);
5140  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
5141  __Pyx_GOTREF(__pyx_t_1);
5142  __pyx_r = __pyx_t_1;
5143  __pyx_t_1 = 0;
5144  goto __pyx_L0;
5145 
5146  /* "PyClical.pyx":315
5147  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
5148  *
5149  * def count(self): # <<<<<<<<<<<<<<
5150  * """
5151  * Cardinality: Number of indices included in set.
5152  */
5153 
5154  /* function exit code */
5155  __pyx_L1_error:;
5156  __Pyx_XDECREF(__pyx_t_1);
5157  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
5158  __pyx_r = NULL;
5159  __pyx_L0:;
5160  __Pyx_XGIVEREF(__pyx_r);
5161  __Pyx_RefNannyFinishContext();
5162  return __pyx_r;
5163 }
5164 
5165 /* "PyClical.pyx":324
5166  * return self.instance.count()
5167  *
5168  * def count_neg(self): # <<<<<<<<<<<<<<
5169  * """
5170  * Number of negative indices included in set.
5171  */
5172 
5173 /* Python wrapper */
5174 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5175 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 ";
5176 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5177  PyObject *__pyx_r = 0;
5178  __Pyx_RefNannyDeclarations
5179  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
5180  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5181 
5182  /* function exit code */
5183  __Pyx_RefNannyFinishContext();
5184  return __pyx_r;
5185 }
5186 
5187 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5188  PyObject *__pyx_r = NULL;
5189  __Pyx_RefNannyDeclarations
5190  PyObject *__pyx_t_1 = NULL;
5191  int __pyx_lineno = 0;
5192  const char *__pyx_filename = NULL;
5193  int __pyx_clineno = 0;
5194  __Pyx_RefNannySetupContext("count_neg", 0);
5195 
5196  /* "PyClical.pyx":331
5197  * 1
5198  * """
5199  * return self.instance.count_neg() # <<<<<<<<<<<<<<
5200  *
5201  * def count_pos(self):
5202  */
5203  __Pyx_XDECREF(__pyx_r);
5204  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_neg()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
5205  __Pyx_GOTREF(__pyx_t_1);
5206  __pyx_r = __pyx_t_1;
5207  __pyx_t_1 = 0;
5208  goto __pyx_L0;
5209 
5210  /* "PyClical.pyx":324
5211  * return self.instance.count()
5212  *
5213  * def count_neg(self): # <<<<<<<<<<<<<<
5214  * """
5215  * Number of negative indices included in set.
5216  */
5217 
5218  /* function exit code */
5219  __pyx_L1_error:;
5220  __Pyx_XDECREF(__pyx_t_1);
5221  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5222  __pyx_r = NULL;
5223  __pyx_L0:;
5224  __Pyx_XGIVEREF(__pyx_r);
5225  __Pyx_RefNannyFinishContext();
5226  return __pyx_r;
5227 }
5228 
5229 /* "PyClical.pyx":333
5230  * return self.instance.count_neg()
5231  *
5232  * def count_pos(self): # <<<<<<<<<<<<<<
5233  * """
5234  * Number of positive indices included in set.
5235  */
5236 
5237 /* Python wrapper */
5238 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5239 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 ";
5240 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5241  PyObject *__pyx_r = 0;
5242  __Pyx_RefNannyDeclarations
5243  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5244  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5245 
5246  /* function exit code */
5247  __Pyx_RefNannyFinishContext();
5248  return __pyx_r;
5249 }
5250 
5251 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5252  PyObject *__pyx_r = NULL;
5253  __Pyx_RefNannyDeclarations
5254  PyObject *__pyx_t_1 = NULL;
5255  int __pyx_lineno = 0;
5256  const char *__pyx_filename = NULL;
5257  int __pyx_clineno = 0;
5258  __Pyx_RefNannySetupContext("count_pos", 0);
5259 
5260  /* "PyClical.pyx":340
5261  * 2
5262  * """
5263  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5264  *
5265  * def min(self):
5266  */
5267  __Pyx_XDECREF(__pyx_r);
5268  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_pos()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
5269  __Pyx_GOTREF(__pyx_t_1);
5270  __pyx_r = __pyx_t_1;
5271  __pyx_t_1 = 0;
5272  goto __pyx_L0;
5273 
5274  /* "PyClical.pyx":333
5275  * return self.instance.count_neg()
5276  *
5277  * def count_pos(self): # <<<<<<<<<<<<<<
5278  * """
5279  * Number of positive indices included in set.
5280  */
5281 
5282  /* function exit code */
5283  __pyx_L1_error:;
5284  __Pyx_XDECREF(__pyx_t_1);
5285  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5286  __pyx_r = NULL;
5287  __pyx_L0:;
5288  __Pyx_XGIVEREF(__pyx_r);
5289  __Pyx_RefNannyFinishContext();
5290  return __pyx_r;
5291 }
5292 
5293 /* "PyClical.pyx":342
5294  * return self.instance.count_pos()
5295  *
5296  * def min(self): # <<<<<<<<<<<<<<
5297  * """
5298  * Minimum member.
5299  */
5300 
5301 /* Python wrapper */
5302 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5303 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5304 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5305  PyObject *__pyx_r = 0;
5306  __Pyx_RefNannyDeclarations
5307  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5308  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5309 
5310  /* function exit code */
5311  __Pyx_RefNannyFinishContext();
5312  return __pyx_r;
5313 }
5314 
5315 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5316  PyObject *__pyx_r = NULL;
5317  __Pyx_RefNannyDeclarations
5318  PyObject *__pyx_t_1 = NULL;
5319  int __pyx_lineno = 0;
5320  const char *__pyx_filename = NULL;
5321  int __pyx_clineno = 0;
5322  __Pyx_RefNannySetupContext("min", 0);
5323 
5324  /* "PyClical.pyx":349
5325  * -1
5326  * """
5327  * return self.instance.min() # <<<<<<<<<<<<<<
5328  *
5329  * def max(self):
5330  */
5331  __Pyx_XDECREF(__pyx_r);
5332  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __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":342
5339  * return self.instance.count_pos()
5340  *
5341  * def min(self): # <<<<<<<<<<<<<<
5342  * """
5343  * Minimum member.
5344  */
5345 
5346  /* function exit code */
5347  __pyx_L1_error:;
5348  __Pyx_XDECREF(__pyx_t_1);
5349  __Pyx_AddTraceback("PyClical.index_set.min", __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":351
5358  * return self.instance.min()
5359  *
5360  * def max(self): # <<<<<<<<<<<<<<
5361  * """
5362  * Maximum member.
5363  */
5364 
5365 /* Python wrapper */
5366 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5367 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5368 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5369  PyObject *__pyx_r = 0;
5370  __Pyx_RefNannyDeclarations
5371  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5372  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5373 
5374  /* function exit code */
5375  __Pyx_RefNannyFinishContext();
5376  return __pyx_r;
5377 }
5378 
5379 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5380  PyObject *__pyx_r = NULL;
5381  __Pyx_RefNannyDeclarations
5382  PyObject *__pyx_t_1 = NULL;
5383  int __pyx_lineno = 0;
5384  const char *__pyx_filename = NULL;
5385  int __pyx_clineno = 0;
5386  __Pyx_RefNannySetupContext("max", 0);
5387 
5388  /* "PyClical.pyx":358
5389  * 2
5390  * """
5391  * return self.instance.max() # <<<<<<<<<<<<<<
5392  *
5393  * def hash_fn(self):
5394  */
5395  __Pyx_XDECREF(__pyx_r);
5396  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __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":351
5403  * return self.instance.min()
5404  *
5405  * def max(self): # <<<<<<<<<<<<<<
5406  * """
5407  * Maximum member.
5408  */
5409 
5410  /* function exit code */
5411  __pyx_L1_error:;
5412  __Pyx_XDECREF(__pyx_t_1);
5413  __Pyx_AddTraceback("PyClical.index_set.max", __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":360
5422  * return self.instance.max()
5423  *
5424  * def hash_fn(self): # <<<<<<<<<<<<<<
5425  * """
5426  * Hash function.
5427  */
5428 
5429 /* Python wrapper */
5430 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5431 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5432 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5433  PyObject *__pyx_r = 0;
5434  __Pyx_RefNannyDeclarations
5435  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5436  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5437 
5438  /* function exit code */
5439  __Pyx_RefNannyFinishContext();
5440  return __pyx_r;
5441 }
5442 
5443 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5444  PyObject *__pyx_r = NULL;
5445  __Pyx_RefNannyDeclarations
5446  PyObject *__pyx_t_1 = NULL;
5447  int __pyx_lineno = 0;
5448  const char *__pyx_filename = NULL;
5449  int __pyx_clineno = 0;
5450  __Pyx_RefNannySetupContext("hash_fn", 0);
5451 
5452  /* "PyClical.pyx":364
5453  * Hash function.
5454  * """
5455  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5456  *
5457  * def sign_of_mult(self, rhs):
5458  */
5459  __Pyx_XDECREF(__pyx_r);
5460  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->hash_fn()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __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":360
5467  * return self.instance.max()
5468  *
5469  * def hash_fn(self): # <<<<<<<<<<<<<<
5470  * """
5471  * Hash function.
5472  */
5473 
5474  /* function exit code */
5475  __pyx_L1_error:;
5476  __Pyx_XDECREF(__pyx_t_1);
5477  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __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 /* "PyClical.pyx":366
5486  * return self.instance.hash_fn()
5487  *
5488  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5489  * """
5490  * Sign of geometric product of two Clifford basis elements.
5491  */
5492 
5493 /* Python wrapper */
5494 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5495 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 ";
5496 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5497  PyObject *__pyx_r = 0;
5498  __Pyx_RefNannyDeclarations
5499  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5500  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5501 
5502  /* function exit code */
5503  __Pyx_RefNannyFinishContext();
5504  return __pyx_r;
5505 }
5506 
5507 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5508  PyObject *__pyx_r = NULL;
5509  __Pyx_RefNannyDeclarations
5510  PyObject *__pyx_t_1 = NULL;
5511  int __pyx_lineno = 0;
5512  const char *__pyx_filename = NULL;
5513  int __pyx_clineno = 0;
5514  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5515 
5516  /* "PyClical.pyx":373
5517  * 1
5518  * """
5519  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5520  *
5521  * def sign_of_square(self):
5522  */
5523  __Pyx_XDECREF(__pyx_r);
5524  __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, 373, __pyx_L1_error)
5525  __Pyx_GOTREF(__pyx_t_1);
5526  __pyx_r = __pyx_t_1;
5527  __pyx_t_1 = 0;
5528  goto __pyx_L0;
5529 
5530  /* "PyClical.pyx":366
5531  * return self.instance.hash_fn()
5532  *
5533  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5534  * """
5535  * Sign of geometric product of two Clifford basis elements.
5536  */
5537 
5538  /* function exit code */
5539  __pyx_L1_error:;
5540  __Pyx_XDECREF(__pyx_t_1);
5541  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5542  __pyx_r = NULL;
5543  __pyx_L0:;
5544  __Pyx_XGIVEREF(__pyx_r);
5545  __Pyx_RefNannyFinishContext();
5546  return __pyx_r;
5547 }
5548 
5549 /* "PyClical.pyx":375
5550  * return self.instance.sign_of_mult(toIndexSet(rhs))
5551  *
5552  * def sign_of_square(self): # <<<<<<<<<<<<<<
5553  * """
5554  * Sign of geometric square of a Clifford basis element.
5555  */
5556 
5557 /* Python wrapper */
5558 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5559 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 ";
5560 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5561  PyObject *__pyx_r = 0;
5562  __Pyx_RefNannyDeclarations
5563  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5564  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5565 
5566  /* function exit code */
5567  __Pyx_RefNannyFinishContext();
5568  return __pyx_r;
5569 }
5570 
5571 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5572  PyObject *__pyx_r = NULL;
5573  __Pyx_RefNannyDeclarations
5574  PyObject *__pyx_t_1 = NULL;
5575  int __pyx_lineno = 0;
5576  const char *__pyx_filename = NULL;
5577  int __pyx_clineno = 0;
5578  __Pyx_RefNannySetupContext("sign_of_square", 0);
5579 
5580  /* "PyClical.pyx":382
5581  * -1
5582  * """
5583  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5584  *
5585  * def __repr__(self):
5586  */
5587  __Pyx_XDECREF(__pyx_r);
5588  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_square()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
5589  __Pyx_GOTREF(__pyx_t_1);
5590  __pyx_r = __pyx_t_1;
5591  __pyx_t_1 = 0;
5592  goto __pyx_L0;
5593 
5594  /* "PyClical.pyx":375
5595  * return self.instance.sign_of_mult(toIndexSet(rhs))
5596  *
5597  * def sign_of_square(self): # <<<<<<<<<<<<<<
5598  * """
5599  * Sign of geometric square of a Clifford basis element.
5600  */
5601 
5602  /* function exit code */
5603  __pyx_L1_error:;
5604  __Pyx_XDECREF(__pyx_t_1);
5605  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5606  __pyx_r = NULL;
5607  __pyx_L0:;
5608  __Pyx_XGIVEREF(__pyx_r);
5609  __Pyx_RefNannyFinishContext();
5610  return __pyx_r;
5611 }
5612 
5613 /* "PyClical.pyx":384
5614  * return self.instance.sign_of_square()
5615  *
5616  * def __repr__(self): # <<<<<<<<<<<<<<
5617  * """
5618  * The official string representation of self.
5619  */
5620 
5621 /* Python wrapper */
5622 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5623 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 ";
5624 #if CYTHON_COMPILING_IN_CPYTHON
5625 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5626 #endif
5627 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5628  PyObject *__pyx_r = 0;
5629  __Pyx_RefNannyDeclarations
5630  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5631  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5632 
5633  /* function exit code */
5634  __Pyx_RefNannyFinishContext();
5635  return __pyx_r;
5636 }
5637 
5638 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5639  PyObject *__pyx_r = NULL;
5640  __Pyx_RefNannyDeclarations
5641  PyObject *__pyx_t_1 = NULL;
5642  int __pyx_lineno = 0;
5643  const char *__pyx_filename = NULL;
5644  int __pyx_clineno = 0;
5645  __Pyx_RefNannySetupContext("__repr__", 0);
5646 
5647  /* "PyClical.pyx":393
5648  * 'index_set({1,2})'
5649  * """
5650  * return index_set_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5651  *
5652  * def __str__(self):
5653  */
5654  __Pyx_XDECREF(__pyx_r);
5655  __pyx_t_1 = __Pyx_decode_cpp_string(index_set_to_repr(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
5656  __Pyx_GOTREF(__pyx_t_1);
5657  __pyx_r = __pyx_t_1;
5658  __pyx_t_1 = 0;
5659  goto __pyx_L0;
5660 
5661  /* "PyClical.pyx":384
5662  * return self.instance.sign_of_square()
5663  *
5664  * def __repr__(self): # <<<<<<<<<<<<<<
5665  * """
5666  * The official string representation of self.
5667  */
5668 
5669  /* function exit code */
5670  __pyx_L1_error:;
5671  __Pyx_XDECREF(__pyx_t_1);
5672  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5673  __pyx_r = NULL;
5674  __pyx_L0:;
5675  __Pyx_XGIVEREF(__pyx_r);
5676  __Pyx_RefNannyFinishContext();
5677  return __pyx_r;
5678 }
5679 
5680 /* "PyClical.pyx":395
5681  * return index_set_to_repr( self.unwrap() ).decode()
5682  *
5683  * def __str__(self): # <<<<<<<<<<<<<<
5684  * """
5685  * The informal string representation of self.
5686  */
5687 
5688 /* Python wrapper */
5689 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5690 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 ";
5691 #if CYTHON_COMPILING_IN_CPYTHON
5692 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5693 #endif
5694 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5695  PyObject *__pyx_r = 0;
5696  __Pyx_RefNannyDeclarations
5697  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5698  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5699 
5700  /* function exit code */
5701  __Pyx_RefNannyFinishContext();
5702  return __pyx_r;
5703 }
5704 
5705 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5706  PyObject *__pyx_r = NULL;
5707  __Pyx_RefNannyDeclarations
5708  PyObject *__pyx_t_1 = NULL;
5709  int __pyx_lineno = 0;
5710  const char *__pyx_filename = NULL;
5711  int __pyx_clineno = 0;
5712  __Pyx_RefNannySetupContext("__str__", 0);
5713 
5714  /* "PyClical.pyx":404
5715  * '{1,2}'
5716  * """
5717  * return index_set_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
5718  *
5719  * def index_set_hidden_doctests():
5720  */
5721  __Pyx_XDECREF(__pyx_r);
5722  __pyx_t_1 = __Pyx_decode_cpp_string(index_set_to_str(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
5723  __Pyx_GOTREF(__pyx_t_1);
5724  __pyx_r = __pyx_t_1;
5725  __pyx_t_1 = 0;
5726  goto __pyx_L0;
5727 
5728  /* "PyClical.pyx":395
5729  * return index_set_to_repr( self.unwrap() ).decode()
5730  *
5731  * def __str__(self): # <<<<<<<<<<<<<<
5732  * """
5733  * The informal string representation of self.
5734  */
5735 
5736  /* function exit code */
5737  __pyx_L1_error:;
5738  __Pyx_XDECREF(__pyx_t_1);
5739  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5740  __pyx_r = NULL;
5741  __pyx_L0:;
5742  __Pyx_XGIVEREF(__pyx_r);
5743  __Pyx_RefNannyFinishContext();
5744  return __pyx_r;
5745 }
5746 
5747 /* "(tree fragment)":1
5748  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5749  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5750  * def __setstate_cython__(self, __pyx_state):
5751  */
5752 
5753 /* Python wrapper */
5754 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5755 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5756  PyObject *__pyx_r = 0;
5757  __Pyx_RefNannyDeclarations
5758  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5759  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5760 
5761  /* function exit code */
5762  __Pyx_RefNannyFinishContext();
5763  return __pyx_r;
5764 }
5765 
5766 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5767  PyObject *__pyx_r = NULL;
5768  __Pyx_RefNannyDeclarations
5769  PyObject *__pyx_t_1 = NULL;
5770  int __pyx_lineno = 0;
5771  const char *__pyx_filename = NULL;
5772  int __pyx_clineno = 0;
5773  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5774 
5775  /* "(tree fragment)":2
5776  * def __reduce_cython__(self):
5777  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5778  * def __setstate_cython__(self, __pyx_state):
5779  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5780  */
5781  __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)
5782  __Pyx_GOTREF(__pyx_t_1);
5783  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5784  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5785  __PYX_ERR(1, 2, __pyx_L1_error)
5786 
5787  /* "(tree fragment)":1
5788  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5789  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5790  * def __setstate_cython__(self, __pyx_state):
5791  */
5792 
5793  /* function exit code */
5794  __pyx_L1_error:;
5795  __Pyx_XDECREF(__pyx_t_1);
5796  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5797  __pyx_r = NULL;
5798  __Pyx_XGIVEREF(__pyx_r);
5799  __Pyx_RefNannyFinishContext();
5800  return __pyx_r;
5801 }
5802 
5803 /* "(tree fragment)":3
5804  * def __reduce_cython__(self):
5805  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5806  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5807  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5808  */
5809 
5810 /* Python wrapper */
5811 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5812 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5813  PyObject *__pyx_r = 0;
5814  __Pyx_RefNannyDeclarations
5815  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5816  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5817 
5818  /* function exit code */
5819  __Pyx_RefNannyFinishContext();
5820  return __pyx_r;
5821 }
5822 
5823 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) {
5824  PyObject *__pyx_r = NULL;
5825  __Pyx_RefNannyDeclarations
5826  PyObject *__pyx_t_1 = NULL;
5827  int __pyx_lineno = 0;
5828  const char *__pyx_filename = NULL;
5829  int __pyx_clineno = 0;
5830  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5831 
5832  /* "(tree fragment)":4
5833  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5834  * def __setstate_cython__(self, __pyx_state):
5835  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5836  */
5837  __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)
5838  __Pyx_GOTREF(__pyx_t_1);
5839  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5840  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5841  __PYX_ERR(1, 4, __pyx_L1_error)
5842 
5843  /* "(tree fragment)":3
5844  * def __reduce_cython__(self):
5845  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5846  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5847  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5848  */
5849 
5850  /* function exit code */
5851  __pyx_L1_error:;
5852  __Pyx_XDECREF(__pyx_t_1);
5853  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5854  __pyx_r = NULL;
5855  __Pyx_XGIVEREF(__pyx_r);
5856  __Pyx_RefNannyFinishContext();
5857  return __pyx_r;
5858 }
5859 
5860 /* "PyClical.pyx":406
5861  * return index_set_to_str( self.unwrap() ).decode()
5862  *
5863  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5864  * """
5865  * Tests for functions that Doctest cannot see.
5866  */
5867 
5868 /* Python wrapper */
5869 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5870 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 {1, 2, 100}.\n >>> print(index_set([1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <class '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_set({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 ";
5871  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};
5872  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5873  PyObject *__pyx_r = 0;
5874  __Pyx_RefNannyDeclarations
5875  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5876  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5877 
5878  /* function exit code */
5879  __Pyx_RefNannyFinishContext();
5880  return __pyx_r;
5881  }
5882 
5883  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5884  PyObject *__pyx_r = NULL;
5885  __Pyx_RefNannyDeclarations
5886  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5887 
5888  /* "PyClical.pyx":490
5889  * False
5890  * """
5891  * return # <<<<<<<<<<<<<<
5892  *
5893  * cpdef inline compare(lhs,rhs):
5894  */
5895  __Pyx_XDECREF(__pyx_r);
5896  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5897  goto __pyx_L0;
5898 
5899  /* "PyClical.pyx":406
5900  * return index_set_to_str( self.unwrap() ).decode()
5901  *
5902  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5903  * """
5904  * Tests for functions that Doctest cannot see.
5905  */
5906 
5907  /* function exit code */
5908  __pyx_L0:;
5909  __Pyx_XGIVEREF(__pyx_r);
5910  __Pyx_RefNannyFinishContext();
5911  return __pyx_r;
5912  }
5913 
5914  /* "PyClical.pyx":492
5915  * return
5916  *
5917  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5918  * """
5919  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5920  */
5921 
5922  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5923  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5924  PyObject *__pyx_r = NULL;
5925  __Pyx_RefNannyDeclarations
5926  PyObject *__pyx_t_1 = NULL;
5927  int __pyx_lineno = 0;
5928  const char *__pyx_filename = NULL;
5929  int __pyx_clineno = 0;
5930  __Pyx_RefNannySetupContext("compare", 0);
5931 
5932  /* "PyClical.pyx":502
5933  * 1
5934  * """
5935  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5936  *
5937  * cpdef inline min_neg(obj):
5938  */
5939  __Pyx_XDECREF(__pyx_r);
5940  __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, 502, __pyx_L1_error)
5941  __Pyx_GOTREF(__pyx_t_1);
5942  __pyx_r = __pyx_t_1;
5943  __pyx_t_1 = 0;
5944  goto __pyx_L0;
5945 
5946  /* "PyClical.pyx":492
5947  * return
5948  *
5949  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5950  * """
5951  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5952  */
5953 
5954  /* function exit code */
5955  __pyx_L1_error:;
5956  __Pyx_XDECREF(__pyx_t_1);
5957  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5958  __pyx_r = 0;
5959  __pyx_L0:;
5960  __Pyx_XGIVEREF(__pyx_r);
5961  __Pyx_RefNannyFinishContext();
5962  return __pyx_r;
5963  }
5964 
5965  /* Python wrapper */
5966  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5967  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 ";
5968  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5969  PyObject *__pyx_v_lhs = 0;
5970  PyObject *__pyx_v_rhs = 0;
5971  int __pyx_lineno = 0;
5972  const char *__pyx_filename = NULL;
5973  int __pyx_clineno = 0;
5974  PyObject *__pyx_r = 0;
5975  __Pyx_RefNannyDeclarations
5976  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5977  {
5978  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5979  PyObject* values[2] = {0,0};
5980  if (unlikely(__pyx_kwds)) {
5981  Py_ssize_t kw_args;
5982  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5983  switch (pos_args) {
5984  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5985  CYTHON_FALLTHROUGH;
5986  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5987  CYTHON_FALLTHROUGH;
5988  case 0: break;
5989  default: goto __pyx_L5_argtuple_error;
5990  }
5991  kw_args = PyDict_Size(__pyx_kwds);
5992  switch (pos_args) {
5993  case 0:
5994  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5995  else goto __pyx_L5_argtuple_error;
5996  CYTHON_FALLTHROUGH;
5997  case 1:
5998  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5999  else {
6000  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 492, __pyx_L3_error)
6001  }
6002  }
6003  if (unlikely(kw_args > 0)) {
6004  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 492, __pyx_L3_error)
6005  }
6006  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
6007  goto __pyx_L5_argtuple_error;
6008  } else {
6009  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6010  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6011  }
6012  __pyx_v_lhs = values[0];
6013  __pyx_v_rhs = values[1];
6014  }
6015  goto __pyx_L4_argument_unpacking_done;
6016  __pyx_L5_argtuple_error:;
6017  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 492, __pyx_L3_error)
6018  __pyx_L3_error:;
6019  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
6020  __Pyx_RefNannyFinishContext();
6021  return NULL;
6022  __pyx_L4_argument_unpacking_done:;
6023  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
6024 
6025  /* function exit code */
6026  __Pyx_RefNannyFinishContext();
6027  return __pyx_r;
6028  }
6029 
6030  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
6031  PyObject *__pyx_r = NULL;
6032  __Pyx_RefNannyDeclarations
6033  PyObject *__pyx_t_1 = NULL;
6034  int __pyx_lineno = 0;
6035  const char *__pyx_filename = NULL;
6036  int __pyx_clineno = 0;
6037  __Pyx_RefNannySetupContext("compare", 0);
6038  __Pyx_XDECREF(__pyx_r);
6039  __pyx_t_1 = __pyx_f_8PyClical_compare(__pyx_v_lhs, __pyx_v_rhs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
6040  __Pyx_GOTREF(__pyx_t_1);
6041  __pyx_r = __pyx_t_1;
6042  __pyx_t_1 = 0;
6043  goto __pyx_L0;
6044 
6045  /* function exit code */
6046  __pyx_L1_error:;
6047  __Pyx_XDECREF(__pyx_t_1);
6048  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
6049  __pyx_r = NULL;
6050  __pyx_L0:;
6051  __Pyx_XGIVEREF(__pyx_r);
6052  __Pyx_RefNannyFinishContext();
6053  return __pyx_r;
6054  }
6055 
6056  /* "PyClical.pyx":504
6057  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
6058  *
6059  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
6060  * """
6061  * Minimum negative index, or 0 if none.
6062  */
6063 
6064  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6065  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
6066  PyObject *__pyx_r = NULL;
6067  __Pyx_RefNannyDeclarations
6068  PyObject *__pyx_t_1 = NULL;
6069  int __pyx_lineno = 0;
6070  const char *__pyx_filename = NULL;
6071  int __pyx_clineno = 0;
6072  __Pyx_RefNannySetupContext("min_neg", 0);
6073 
6074  /* "PyClical.pyx":511
6075  * 0
6076  * """
6077  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
6078  *
6079  * cpdef inline max_pos(obj):
6080  */
6081  __Pyx_XDECREF(__pyx_r);
6082  __pyx_t_1 = __Pyx_PyInt_From_int(min_neg(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
6083  __Pyx_GOTREF(__pyx_t_1);
6084  __pyx_r = __pyx_t_1;
6085  __pyx_t_1 = 0;
6086  goto __pyx_L0;
6087 
6088  /* "PyClical.pyx":504
6089  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
6090  *
6091  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
6092  * """
6093  * Minimum negative index, or 0 if none.
6094  */
6095 
6096  /* function exit code */
6097  __pyx_L1_error:;
6098  __Pyx_XDECREF(__pyx_t_1);
6099  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
6100  __pyx_r = 0;
6101  __pyx_L0:;
6102  __Pyx_XGIVEREF(__pyx_r);
6103  __Pyx_RefNannyFinishContext();
6104  return __pyx_r;
6105  }
6106 
6107  /* Python wrapper */
6108  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6109  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 ";
6110  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6111  PyObject *__pyx_r = 0;
6112  __Pyx_RefNannyDeclarations
6113  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
6114  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
6115 
6116  /* function exit code */
6117  __Pyx_RefNannyFinishContext();
6118  return __pyx_r;
6119  }
6120 
6121  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6122  PyObject *__pyx_r = NULL;
6123  __Pyx_RefNannyDeclarations
6124  PyObject *__pyx_t_1 = NULL;
6125  int __pyx_lineno = 0;
6126  const char *__pyx_filename = NULL;
6127  int __pyx_clineno = 0;
6128  __Pyx_RefNannySetupContext("min_neg", 0);
6129  __Pyx_XDECREF(__pyx_r);
6130  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error)
6131  __Pyx_GOTREF(__pyx_t_1);
6132  __pyx_r = __pyx_t_1;
6133  __pyx_t_1 = 0;
6134  goto __pyx_L0;
6135 
6136  /* function exit code */
6137  __pyx_L1_error:;
6138  __Pyx_XDECREF(__pyx_t_1);
6139  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
6140  __pyx_r = NULL;
6141  __pyx_L0:;
6142  __Pyx_XGIVEREF(__pyx_r);
6143  __Pyx_RefNannyFinishContext();
6144  return __pyx_r;
6145  }
6146 
6147  /* "PyClical.pyx":513
6148  * return glucat.min_neg( toIndexSet(obj) )
6149  *
6150  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
6151  * """
6152  * Maximum positive index, or 0 if none.
6153  */
6154 
6155  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6156  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
6157  PyObject *__pyx_r = NULL;
6158  __Pyx_RefNannyDeclarations
6159  PyObject *__pyx_t_1 = NULL;
6160  int __pyx_lineno = 0;
6161  const char *__pyx_filename = NULL;
6162  int __pyx_clineno = 0;
6163  __Pyx_RefNannySetupContext("max_pos", 0);
6164 
6165  /* "PyClical.pyx":520
6166  * 2
6167  * """
6168  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
6169  *
6170  * cdef inline vector[scalar_t] list_to_vector(lst):
6171  */
6172  __Pyx_XDECREF(__pyx_r);
6173  __pyx_t_1 = __Pyx_PyInt_From_int(max_pos(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
6174  __Pyx_GOTREF(__pyx_t_1);
6175  __pyx_r = __pyx_t_1;
6176  __pyx_t_1 = 0;
6177  goto __pyx_L0;
6178 
6179  /* "PyClical.pyx":513
6180  * return glucat.min_neg( toIndexSet(obj) )
6181  *
6182  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
6183  * """
6184  * Maximum positive index, or 0 if none.
6185  */
6186 
6187  /* function exit code */
6188  __pyx_L1_error:;
6189  __Pyx_XDECREF(__pyx_t_1);
6190  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
6191  __pyx_r = 0;
6192  __pyx_L0:;
6193  __Pyx_XGIVEREF(__pyx_r);
6194  __Pyx_RefNannyFinishContext();
6195  return __pyx_r;
6196  }
6197 
6198  /* Python wrapper */
6199  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
6200  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 ";
6201  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6202  PyObject *__pyx_r = 0;
6203  __Pyx_RefNannyDeclarations
6204  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
6205  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
6206 
6207  /* function exit code */
6208  __Pyx_RefNannyFinishContext();
6209  return __pyx_r;
6210  }
6211 
6212  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
6213  PyObject *__pyx_r = NULL;
6214  __Pyx_RefNannyDeclarations
6215  PyObject *__pyx_t_1 = NULL;
6216  int __pyx_lineno = 0;
6217  const char *__pyx_filename = NULL;
6218  int __pyx_clineno = 0;
6219  __Pyx_RefNannySetupContext("max_pos", 0);
6220  __Pyx_XDECREF(__pyx_r);
6221  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
6222  __Pyx_GOTREF(__pyx_t_1);
6223  __pyx_r = __pyx_t_1;
6224  __pyx_t_1 = 0;
6225  goto __pyx_L0;
6226 
6227  /* function exit code */
6228  __pyx_L1_error:;
6229  __Pyx_XDECREF(__pyx_t_1);
6230  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
6231  __pyx_r = NULL;
6232  __pyx_L0:;
6233  __Pyx_XGIVEREF(__pyx_r);
6234  __Pyx_RefNannyFinishContext();
6235  return __pyx_r;
6236  }
6237 
6238  /* "PyClical.pyx":522
6239  * return glucat.max_pos( toIndexSet(obj) )
6240  *
6241  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6242  * """
6243  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6244  */
6245 
6246  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
6247  std::vector<scalar_t> __pyx_v_v;
6248  PyObject *__pyx_v_s = NULL;
6249  std::vector<scalar_t> __pyx_r;
6250  __Pyx_RefNannyDeclarations
6251  PyObject *__pyx_t_1 = NULL;
6252  Py_ssize_t __pyx_t_2;
6253  PyObject *(*__pyx_t_3)(PyObject *);
6254  PyObject *__pyx_t_4 = NULL;
6255  scalar_t __pyx_t_5;
6256  int __pyx_lineno = 0;
6257  const char *__pyx_filename = NULL;
6258  int __pyx_clineno = 0;
6259  __Pyx_RefNannySetupContext("list_to_vector", 0);
6260 
6261  /* "PyClical.pyx":527
6262  * """
6263  * cdef vector[scalar_t] v
6264  * for s in lst: # <<<<<<<<<<<<<<
6265  * v.push_back(<scalar_t>s)
6266  * return v
6267  */
6268  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
6269  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
6270  __pyx_t_3 = NULL;
6271  } else {
6272  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
6273  __Pyx_GOTREF(__pyx_t_1);
6274  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
6275  }
6276  for (;;) {
6277  if (likely(!__pyx_t_3)) {
6278  if (likely(PyList_CheckExact(__pyx_t_1))) {
6279  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
6280  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6281  __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, 527, __pyx_L1_error)
6282  #else
6283  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
6284  __Pyx_GOTREF(__pyx_t_4);
6285  #endif
6286  } else {
6287  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6288  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6289  __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, 527, __pyx_L1_error)
6290  #else
6291  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
6292  __Pyx_GOTREF(__pyx_t_4);
6293  #endif
6294  }
6295  } else {
6296  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6297  if (unlikely(!__pyx_t_4)) {
6298  PyObject* exc_type = PyErr_Occurred();
6299  if (exc_type) {
6300  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6301  else __PYX_ERR(0, 527, __pyx_L1_error)
6302  }
6303  break;
6304  }
6305  __Pyx_GOTREF(__pyx_t_4);
6306  }
6307  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6308  __pyx_t_4 = 0;
6309 
6310  /* "PyClical.pyx":528
6311  * cdef vector[scalar_t] v
6312  * for s in lst:
6313  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6314  * return v
6315  *
6316  */
6317  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_5 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 528, __pyx_L1_error)
6318  try {
6319  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6320  } catch(...) {
6321  __Pyx_CppExn2PyErr();
6322  __PYX_ERR(0, 528, __pyx_L1_error)
6323  }
6324 
6325  /* "PyClical.pyx":527
6326  * """
6327  * cdef vector[scalar_t] v
6328  * for s in lst: # <<<<<<<<<<<<<<
6329  * v.push_back(<scalar_t>s)
6330  * return v
6331  */
6332  }
6333  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6334 
6335  /* "PyClical.pyx":529
6336  * for s in lst:
6337  * v.push_back(<scalar_t>s)
6338  * return v # <<<<<<<<<<<<<<
6339  *
6340  * # Forward reference.
6341  */
6342  __pyx_r = __pyx_v_v;
6343  goto __pyx_L0;
6344 
6345  /* "PyClical.pyx":522
6346  * return glucat.max_pos( toIndexSet(obj) )
6347  *
6348  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6349  * """
6350  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6351  */
6352 
6353  /* function exit code */
6354  __pyx_L1_error:;
6355  __Pyx_XDECREF(__pyx_t_1);
6356  __Pyx_XDECREF(__pyx_t_4);
6357  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6358  __Pyx_pretend_to_initialize(&__pyx_r);
6359  __pyx_L0:;
6360  __Pyx_XDECREF(__pyx_v_s);
6361  __Pyx_RefNannyFinishContext();
6362  return __pyx_r;
6363  }
6364 
6365  /* "PyClical.pyx":534
6366  * cdef class clifford
6367  *
6368  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6369  * return clifford(obj).instance[0]
6370  *
6371  */
6372 
6373  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6374  Clifford __pyx_r;
6375  __Pyx_RefNannyDeclarations
6376  PyObject *__pyx_t_1 = NULL;
6377  int __pyx_lineno = 0;
6378  const char *__pyx_filename = NULL;
6379  int __pyx_clineno = 0;
6380  __Pyx_RefNannySetupContext("toClifford", 0);
6381 
6382  /* "PyClical.pyx":535
6383  *
6384  * cdef inline Clifford toClifford(obj):
6385  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6386  *
6387  * cdef class clifford:
6388  */
6389  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
6390  __Pyx_GOTREF(__pyx_t_1);
6391  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6392  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6393  goto __pyx_L0;
6394 
6395  /* "PyClical.pyx":534
6396  * cdef class clifford
6397  *
6398  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6399  * return clifford(obj).instance[0]
6400  *
6401  */
6402 
6403  /* function exit code */
6404  __pyx_L1_error:;
6405  __Pyx_XDECREF(__pyx_t_1);
6406  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6407  __Pyx_pretend_to_initialize(&__pyx_r);
6408  __pyx_L0:;
6409  __Pyx_RefNannyFinishContext();
6410  return __pyx_r;
6411  }
6412 
6413  /* "PyClical.pyx":543
6414  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6415  *
6416  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6417  * """
6418  * Wrap an instance of the C++ class Clifford.
6419  */
6420 
6421  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6422  PyObject *__pyx_r = NULL;
6423  __Pyx_RefNannyDeclarations
6424  __Pyx_RefNannySetupContext("wrap", 0);
6425 
6426  /* "PyClical.pyx":547
6427  * Wrap an instance of the C++ class Clifford.
6428  * """
6429  * self.instance[0] = other # <<<<<<<<<<<<<<
6430  * return self
6431  *
6432  */
6433  (__pyx_v_self->instance[0]) = __pyx_v_other;
6434 
6435  /* "PyClical.pyx":548
6436  * """
6437  * self.instance[0] = other
6438  * return self # <<<<<<<<<<<<<<
6439  *
6440  * cdef inline Clifford unwrap(clifford self):
6441  */
6442  __Pyx_XDECREF(__pyx_r);
6443  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6444  __pyx_r = ((PyObject *)__pyx_v_self);
6445  goto __pyx_L0;
6446 
6447  /* "PyClical.pyx":543
6448  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6449  *
6450  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6451  * """
6452  * Wrap an instance of the C++ class Clifford.
6453  */
6454 
6455  /* function exit code */
6456  __pyx_L0:;
6457  __Pyx_XGIVEREF(__pyx_r);
6458  __Pyx_RefNannyFinishContext();
6459  return __pyx_r;
6460  }
6461 
6462  /* "PyClical.pyx":550
6463  * return self
6464  *
6465  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6466  * """
6467  * Return the wrapped C++ Clifford instance.
6468  */
6469 
6470  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6471  Clifford __pyx_r;
6472  __Pyx_RefNannyDeclarations
6473  __Pyx_RefNannySetupContext("unwrap", 0);
6474 
6475  /* "PyClical.pyx":554
6476  * Return the wrapped C++ Clifford instance.
6477  * """
6478  * return self.instance[0] # <<<<<<<<<<<<<<
6479  *
6480  * cpdef copy(clifford self):
6481  */
6482  __pyx_r = (__pyx_v_self->instance[0]);
6483  goto __pyx_L0;
6484 
6485  /* "PyClical.pyx":550
6486  * return self
6487  *
6488  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6489  * """
6490  * Return the wrapped C++ Clifford instance.
6491  */
6492 
6493  /* function exit code */
6494  __pyx_L0:;
6495  __Pyx_RefNannyFinishContext();
6496  return __pyx_r;
6497  }
6498 
6499  /* "PyClical.pyx":556
6500  * return self.instance[0]
6501  *
6502  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6503  * """
6504  * Copy this clifford object.
6505  */
6506 
6507  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6508  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6509  PyObject *__pyx_r = NULL;
6510  __Pyx_RefNannyDeclarations
6511  PyObject *__pyx_t_1 = NULL;
6512  PyObject *__pyx_t_2 = NULL;
6513  PyObject *__pyx_t_3 = NULL;
6514  PyObject *__pyx_t_4 = NULL;
6515  int __pyx_lineno = 0;
6516  const char *__pyx_filename = NULL;
6517  int __pyx_clineno = 0;
6518  __Pyx_RefNannySetupContext("copy", 0);
6519  /* Check if called by wrapper */
6520  if (unlikely(__pyx_skip_dispatch)) ;
6521  /* Check if overridden in Python */
6522  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)))) {
6523  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6524  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6525  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6526  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6527  #endif
6528  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
6529  __Pyx_GOTREF(__pyx_t_1);
6530  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6531  __Pyx_XDECREF(__pyx_r);
6532  __Pyx_INCREF(__pyx_t_1);
6533  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6534  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6535  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6536  if (likely(__pyx_t_4)) {
6537  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6538  __Pyx_INCREF(__pyx_t_4);
6539  __Pyx_INCREF(function);
6540  __Pyx_DECREF_SET(__pyx_t_3, function);
6541  }
6542  }
6543  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6544  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6545  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
6546  __Pyx_GOTREF(__pyx_t_2);
6547  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6548  __pyx_r = __pyx_t_2;
6549  __pyx_t_2 = 0;
6550  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6551  goto __pyx_L0;
6552  }
6553  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6554  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6555  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6556  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6557  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6558  }
6559  #endif
6560  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6561  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6562  }
6563  #endif
6564  }
6565 
6566  /* "PyClical.pyx":563
6567  * {2}
6568  * """
6569  * return clifford(self) # <<<<<<<<<<<<<<
6570  *
6571  * def __cinit__(self, other = 0, ixt = None):
6572  */
6573  __Pyx_XDECREF(__pyx_r);
6574  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
6575  __Pyx_GOTREF(__pyx_t_1);
6576  __pyx_r = __pyx_t_1;
6577  __pyx_t_1 = 0;
6578  goto __pyx_L0;
6579 
6580  /* "PyClical.pyx":556
6581  * return self.instance[0]
6582  *
6583  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6584  * """
6585  * Copy this clifford object.
6586  */
6587 
6588  /* function exit code */
6589  __pyx_L1_error:;
6590  __Pyx_XDECREF(__pyx_t_1);
6591  __Pyx_XDECREF(__pyx_t_2);
6592  __Pyx_XDECREF(__pyx_t_3);
6593  __Pyx_XDECREF(__pyx_t_4);
6594  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6595  __pyx_r = 0;
6596  __pyx_L0:;
6597  __Pyx_XGIVEREF(__pyx_r);
6598  __Pyx_RefNannyFinishContext();
6599  return __pyx_r;
6600  }
6601 
6602  /* Python wrapper */
6603  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6604  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 ";
6605  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6606  PyObject *__pyx_r = 0;
6607  __Pyx_RefNannyDeclarations
6608  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6609  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6610 
6611  /* function exit code */
6612  __Pyx_RefNannyFinishContext();
6613  return __pyx_r;
6614  }
6615 
6616  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6617  PyObject *__pyx_r = NULL;
6618  __Pyx_RefNannyDeclarations
6619  PyObject *__pyx_t_1 = NULL;
6620  int __pyx_lineno = 0;
6621  const char *__pyx_filename = NULL;
6622  int __pyx_clineno = 0;
6623  __Pyx_RefNannySetupContext("copy", 0);
6624  __Pyx_XDECREF(__pyx_r);
6625  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
6626  __Pyx_GOTREF(__pyx_t_1);
6627  __pyx_r = __pyx_t_1;
6628  __pyx_t_1 = 0;
6629  goto __pyx_L0;
6630 
6631  /* function exit code */
6632  __pyx_L1_error:;
6633  __Pyx_XDECREF(__pyx_t_1);
6634  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6635  __pyx_r = NULL;
6636  __pyx_L0:;
6637  __Pyx_XGIVEREF(__pyx_r);
6638  __Pyx_RefNannyFinishContext();
6639  return __pyx_r;
6640  }
6641 
6642  /* "PyClical.pyx":565
6643  * return clifford(self)
6644  *
6645  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6646  * """
6647  * Construct an object of type clifford.
6648  */
6649 
6650  /* Python wrapper */
6651  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6652  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6653  PyObject *__pyx_v_other = 0;
6654  PyObject *__pyx_v_ixt = 0;
6655  int __pyx_lineno = 0;
6656  const char *__pyx_filename = NULL;
6657  int __pyx_clineno = 0;
6658  int __pyx_r;
6659  __Pyx_RefNannyDeclarations
6660  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6661  {
6662  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6663  PyObject* values[2] = {0,0};
6664  values[0] = ((PyObject *)__pyx_int_0);
6665  values[1] = ((PyObject *)Py_None);
6666  if (unlikely(__pyx_kwds)) {
6667  Py_ssize_t kw_args;
6668  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6669  switch (pos_args) {
6670  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6671  CYTHON_FALLTHROUGH;
6672  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6673  CYTHON_FALLTHROUGH;
6674  case 0: break;
6675  default: goto __pyx_L5_argtuple_error;
6676  }
6677  kw_args = PyDict_Size(__pyx_kwds);
6678  switch (pos_args) {
6679  case 0:
6680  if (kw_args > 0) {
6681  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6682  if (value) { values[0] = value; kw_args--; }
6683  }
6684  CYTHON_FALLTHROUGH;
6685  case 1:
6686  if (kw_args > 0) {
6687  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6688  if (value) { values[1] = value; kw_args--; }
6689  }
6690  }
6691  if (unlikely(kw_args > 0)) {
6692  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 565, __pyx_L3_error)
6693  }
6694  } else {
6695  switch (PyTuple_GET_SIZE(__pyx_args)) {
6696  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6697  CYTHON_FALLTHROUGH;
6698  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6699  CYTHON_FALLTHROUGH;
6700  case 0: break;
6701  default: goto __pyx_L5_argtuple_error;
6702  }
6703  }
6704  __pyx_v_other = values[0];
6705  __pyx_v_ixt = values[1];
6706  }
6707  goto __pyx_L4_argument_unpacking_done;
6708  __pyx_L5_argtuple_error:;
6709  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 565, __pyx_L3_error)
6710  __pyx_L3_error:;
6711  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6712  __Pyx_RefNannyFinishContext();
6713  return -1;
6714  __pyx_L4_argument_unpacking_done:;
6715  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6716 
6717  /* function exit code */
6718  __Pyx_RefNannyFinishContext();
6719  return __pyx_r;
6720  }
6721 
6722  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6723  PyObject *__pyx_v_error_msg_prefix = NULL;
6724  PyObject *__pyx_v_bother = NULL;
6725  PyObject *__pyx_v_err = NULL;
6726  int __pyx_r;
6727  __Pyx_RefNannyDeclarations
6728  int __pyx_t_1;
6729  int __pyx_t_2;
6730  PyObject *__pyx_t_3 = NULL;
6731  PyObject *__pyx_t_4 = NULL;
6732  PyObject *__pyx_t_5 = NULL;
6733  Clifford *__pyx_t_6;
6734  PyObject *__pyx_t_7 = NULL;
6735  PyObject *__pyx_t_8 = NULL;
6736  scalar_t __pyx_t_9;
6737  PyObject *__pyx_t_10 = NULL;
6738  PyObject *__pyx_t_11 = NULL;
6739  PyObject *__pyx_t_12 = NULL;
6740  PyObject *__pyx_t_13 = NULL;
6741  char *__pyx_t_14;
6742  int __pyx_t_15;
6743  PyObject *__pyx_t_16 = NULL;
6744  PyObject *__pyx_t_17 = NULL;
6745  PyObject *__pyx_t_18 = NULL;
6746  int __pyx_t_19;
6747  char const *__pyx_t_20;
6748  PyObject *__pyx_t_21 = NULL;
6749  PyObject *__pyx_t_22 = NULL;
6750  PyObject *__pyx_t_23 = NULL;
6751  int __pyx_lineno = 0;
6752  const char *__pyx_filename = NULL;
6753  int __pyx_clineno = 0;
6754  __Pyx_RefNannySetupContext("__cinit__", 0);
6755 
6756  /* "PyClical.pyx":588
6757  * 2{1}+3{2}
6758  * """
6759  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6760  * if ixt is None:
6761  * try:
6762  */
6763  __Pyx_INCREF(__pyx_kp_u_Cannot_initialize_clifford_objec);
6764  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_initialize_clifford_objec;
6765 
6766  /* "PyClical.pyx":589
6767  * """
6768  * error_msg_prefix = "Cannot initialize clifford object from"
6769  * if ixt is None: # <<<<<<<<<<<<<<
6770  * try:
6771  * if isinstance(other, clifford):
6772  */
6773  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6774  __pyx_t_2 = (__pyx_t_1 != 0);
6775  if (__pyx_t_2) {
6776 
6777  /* "PyClical.pyx":590
6778  * error_msg_prefix = "Cannot initialize clifford object from"
6779  * if ixt is None:
6780  * try: # <<<<<<<<<<<<<<
6781  * if isinstance(other, clifford):
6782  * self.instance = new Clifford((<clifford>other).unwrap())
6783  */
6784  {
6785  __Pyx_PyThreadState_declare
6786  __Pyx_PyThreadState_assign
6787  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6788  __Pyx_XGOTREF(__pyx_t_3);
6789  __Pyx_XGOTREF(__pyx_t_4);
6790  __Pyx_XGOTREF(__pyx_t_5);
6791  /*try:*/ {
6792 
6793  /* "PyClical.pyx":591
6794  * if ixt is None:
6795  * try:
6796  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6797  * self.instance = new Clifford((<clifford>other).unwrap())
6798  * elif isinstance(other, index_set):
6799  */
6800  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6801  __pyx_t_1 = (__pyx_t_2 != 0);
6802  if (__pyx_t_1) {
6803 
6804  /* "PyClical.pyx":592
6805  * try:
6806  * if isinstance(other, clifford):
6807  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6808  * elif isinstance(other, index_set):
6809  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6810  */
6811  try {
6812  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6813  } catch(...) {
6814  __Pyx_CppExn2PyErr();
6815  __PYX_ERR(0, 592, __pyx_L4_error)
6816  }
6817  __pyx_v_self->instance = __pyx_t_6;
6818 
6819  /* "PyClical.pyx":591
6820  * if ixt is None:
6821  * try:
6822  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6823  * self.instance = new Clifford((<clifford>other).unwrap())
6824  * elif isinstance(other, index_set):
6825  */
6826  goto __pyx_L10;
6827  }
6828 
6829  /* "PyClical.pyx":593
6830  * if isinstance(other, clifford):
6831  * self.instance = new Clifford((<clifford>other).unwrap())
6832  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6833  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6834  * elif isinstance(other, numbers.Real):
6835  */
6836  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6837  __pyx_t_2 = (__pyx_t_1 != 0);
6838  if (__pyx_t_2) {
6839 
6840  /* "PyClical.pyx":594
6841  * self.instance = new Clifford((<clifford>other).unwrap())
6842  * elif isinstance(other, index_set):
6843  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6844  * elif isinstance(other, numbers.Real):
6845  * self.instance = new Clifford(<scalar_t>other)
6846  */
6847  try {
6848  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6849  } catch(...) {
6850  __Pyx_CppExn2PyErr();
6851  __PYX_ERR(0, 594, __pyx_L4_error)
6852  }
6853  __pyx_v_self->instance = __pyx_t_6;
6854 
6855  /* "PyClical.pyx":593
6856  * if isinstance(other, clifford):
6857  * self.instance = new Clifford((<clifford>other).unwrap())
6858  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6859  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6860  * elif isinstance(other, numbers.Real):
6861  */
6862  goto __pyx_L10;
6863  }
6864 
6865  /* "PyClical.pyx":595
6866  * elif isinstance(other, index_set):
6867  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6868  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6869  * self.instance = new Clifford(<scalar_t>other)
6870  * elif isinstance(other, str):
6871  */
6872  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6873  __Pyx_GOTREF(__pyx_t_7);
6874  __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)
6875  __Pyx_GOTREF(__pyx_t_8);
6876  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6877  __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)
6878  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6879  __pyx_t_1 = (__pyx_t_2 != 0);
6880  if (__pyx_t_1) {
6881 
6882  /* "PyClical.pyx":596
6883  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6884  * elif isinstance(other, numbers.Real):
6885  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6886  * elif isinstance(other, str):
6887  * try:
6888  */
6889  __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)
6890  try {
6891  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6892  } catch(...) {
6893  __Pyx_CppExn2PyErr();
6894  __PYX_ERR(0, 596, __pyx_L4_error)
6895  }
6896  __pyx_v_self->instance = __pyx_t_6;
6897 
6898  /* "PyClical.pyx":595
6899  * elif isinstance(other, index_set):
6900  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6901  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6902  * self.instance = new Clifford(<scalar_t>other)
6903  * elif isinstance(other, str):
6904  */
6905  goto __pyx_L10;
6906  }
6907 
6908  /* "PyClical.pyx":597
6909  * elif isinstance(other, numbers.Real):
6910  * self.instance = new Clifford(<scalar_t>other)
6911  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6912  * try:
6913  * bother = other.encode("UTF-8")
6914  */
6915  __pyx_t_1 = PyUnicode_Check(__pyx_v_other);
6916  __pyx_t_2 = (__pyx_t_1 != 0);
6917  if (likely(__pyx_t_2)) {
6918 
6919  /* "PyClical.pyx":598
6920  * self.instance = new Clifford(<scalar_t>other)
6921  * elif isinstance(other, str):
6922  * try: # <<<<<<<<<<<<<<
6923  * bother = other.encode("UTF-8")
6924  * self.instance = new Clifford(<char *>bother)
6925  */
6926  {
6927  __Pyx_PyThreadState_declare
6928  __Pyx_PyThreadState_assign
6929  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6930  __Pyx_XGOTREF(__pyx_t_10);
6931  __Pyx_XGOTREF(__pyx_t_11);
6932  __Pyx_XGOTREF(__pyx_t_12);
6933  /*try:*/ {
6934 
6935  /* "PyClical.pyx":599
6936  * elif isinstance(other, str):
6937  * try:
6938  * bother = other.encode("UTF-8") # <<<<<<<<<<<<<<
6939  * self.instance = new Clifford(<char *>bother)
6940  * except RuntimeError:
6941  */
6942  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L11_error)
6943  __Pyx_GOTREF(__pyx_t_7);
6944  __pyx_t_13 = NULL;
6945  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
6946  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
6947  if (likely(__pyx_t_13)) {
6948  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
6949  __Pyx_INCREF(__pyx_t_13);
6950  __Pyx_INCREF(function);
6951  __Pyx_DECREF_SET(__pyx_t_7, function);
6952  }
6953  }
6954  __pyx_t_8 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_13, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_UTF_8);
6955  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6956  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L11_error)
6957  __Pyx_GOTREF(__pyx_t_8);
6958  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6959  __pyx_v_bother = __pyx_t_8;
6960  __pyx_t_8 = 0;
6961 
6962  /* "PyClical.pyx":600
6963  * try:
6964  * bother = other.encode("UTF-8")
6965  * self.instance = new Clifford(<char *>bother) # <<<<<<<<<<<<<<
6966  * except RuntimeError:
6967  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6968  */
6969  __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_bother); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(0, 600, __pyx_L11_error)
6970  try {
6971  __pyx_t_6 = new Clifford(((char *)__pyx_t_14));
6972  } catch(...) {
6973  __Pyx_CppExn2PyErr();
6974  __PYX_ERR(0, 600, __pyx_L11_error)
6975  }
6976  __pyx_v_self->instance = __pyx_t_6;
6977 
6978  /* "PyClical.pyx":598
6979  * self.instance = new Clifford(<scalar_t>other)
6980  * elif isinstance(other, str):
6981  * try: # <<<<<<<<<<<<<<
6982  * bother = other.encode("UTF-8")
6983  * self.instance = new Clifford(<char *>bother)
6984  */
6985  }
6986  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6987  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6988  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6989  goto __pyx_L16_try_end;
6990  __pyx_L11_error:;
6991  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
6992  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6993  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6994 
6995  /* "PyClical.pyx":601
6996  * bother = other.encode("UTF-8")
6997  * self.instance = new Clifford(<char *>bother)
6998  * except RuntimeError: # <<<<<<<<<<<<<<
6999  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
7000  * else:
7001  */
7002  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7003  if (__pyx_t_15) {
7004  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7005  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 601, __pyx_L13_except_error)
7006  __Pyx_GOTREF(__pyx_t_8);
7007  __Pyx_GOTREF(__pyx_t_7);
7008  __Pyx_GOTREF(__pyx_t_13);
7009 
7010  /* "PyClical.pyx":602
7011  * self.instance = new Clifford(<char *>bother)
7012  * except RuntimeError:
7013  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
7014  * else:
7015  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7016  */
7017  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_invalid_string); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 602, __pyx_L13_except_error)
7018  __Pyx_GOTREF(__pyx_t_16);
7019  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L13_except_error)
7020  __Pyx_GOTREF(__pyx_t_17);
7021  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 602, __pyx_L13_except_error)
7022  __Pyx_GOTREF(__pyx_t_18);
7023  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7024  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7025  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_u_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L13_except_error)
7026  __Pyx_GOTREF(__pyx_t_17);
7027  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7028  __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 602, __pyx_L13_except_error)
7029  __Pyx_GOTREF(__pyx_t_18);
7030  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7031  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
7032  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7033  __PYX_ERR(0, 602, __pyx_L13_except_error)
7034  }
7035  goto __pyx_L13_except_error;
7036  __pyx_L13_except_error:;
7037 
7038  /* "PyClical.pyx":598
7039  * self.instance = new Clifford(<scalar_t>other)
7040  * elif isinstance(other, str):
7041  * try: # <<<<<<<<<<<<<<
7042  * bother = other.encode("UTF-8")
7043  * self.instance = new Clifford(<char *>bother)
7044  */
7045  __Pyx_XGIVEREF(__pyx_t_10);
7046  __Pyx_XGIVEREF(__pyx_t_11);
7047  __Pyx_XGIVEREF(__pyx_t_12);
7048  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
7049  goto __pyx_L4_error;
7050  __pyx_L16_try_end:;
7051  }
7052 
7053  /* "PyClical.pyx":597
7054  * elif isinstance(other, numbers.Real):
7055  * self.instance = new Clifford(<scalar_t>other)
7056  * elif isinstance(other, str): # <<<<<<<<<<<<<<
7057  * try:
7058  * bother = other.encode("UTF-8")
7059  */
7060  goto __pyx_L10;
7061  }
7062 
7063  /* "PyClical.pyx":604
7064  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
7065  * else:
7066  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
7067  * except RuntimeError as err:
7068  * raise ValueError(error_msg_prefix + " " + str(type(other))
7069  */
7070  /*else*/ {
7071  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 604, __pyx_L4_error)
7072  __Pyx_GOTREF(__pyx_t_13);
7073  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L4_error)
7074  __Pyx_GOTREF(__pyx_t_7);
7075  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
7076  __Pyx_GOTREF(__pyx_t_8);
7077  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7078  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7079  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L4_error)
7080  __Pyx_GOTREF(__pyx_t_7);
7081  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7082  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 604, __pyx_L4_error)
7083  __Pyx_GOTREF(__pyx_t_8);
7084  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7085  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
7086  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7087  __PYX_ERR(0, 604, __pyx_L4_error)
7088  }
7089  __pyx_L10:;
7090 
7091  /* "PyClical.pyx":590
7092  * error_msg_prefix = "Cannot initialize clifford object from"
7093  * if ixt is None:
7094  * try: # <<<<<<<<<<<<<<
7095  * if isinstance(other, clifford):
7096  * self.instance = new Clifford((<clifford>other).unwrap())
7097  */
7098  }
7099  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7100  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7101  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7102  goto __pyx_L9_try_end;
7103  __pyx_L4_error:;
7104  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7105  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
7106  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
7107  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
7108  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7109  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
7110 
7111  /* "PyClical.pyx":605
7112  * else:
7113  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7114  * except RuntimeError as err: # <<<<<<<<<<<<<<
7115  * raise ValueError(error_msg_prefix + " " + str(type(other))
7116  * + " value " + repr(other) + ":"
7117  */
7118  __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7119  if (__pyx_t_15) {
7120  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7121  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 605, __pyx_L6_except_error)
7122  __Pyx_GOTREF(__pyx_t_8);
7123  __Pyx_GOTREF(__pyx_t_7);
7124  __Pyx_GOTREF(__pyx_t_13);
7125  __Pyx_INCREF(__pyx_t_7);
7126  __pyx_v_err = __pyx_t_7;
7127  /*try:*/ {
7128 
7129  /* "PyClical.pyx":606
7130  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7131  * except RuntimeError as err:
7132  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
7133  * + " value " + repr(other) + ":"
7134  * + "\n\t" + str(err))
7135  */
7136  __pyx_t_18 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L24_error)
7137  __Pyx_GOTREF(__pyx_t_18);
7138  __pyx_t_17 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L24_error)
7139  __Pyx_GOTREF(__pyx_t_17);
7140  __pyx_t_16 = __Pyx_PyUnicode_Concat(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
7141  __Pyx_GOTREF(__pyx_t_16);
7142  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7143  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7144 
7145  /* "PyClical.pyx":607
7146  * except RuntimeError as err:
7147  * raise ValueError(error_msg_prefix + " " + str(type(other))
7148  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
7149  * + "\n\t" + str(err))
7150  * elif isinstance(ixt, index_set):
7151  */
7152  __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_t_16, __pyx_kp_u_value); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L24_error)
7153  __Pyx_GOTREF(__pyx_t_17);
7154  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7155  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L24_error)
7156  __Pyx_GOTREF(__pyx_t_16);
7157  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L24_error)
7158  __Pyx_GOTREF(__pyx_t_18);
7159  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7160  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7161  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_kp_u__5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L24_error)
7162  __Pyx_GOTREF(__pyx_t_16);
7163  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7164 
7165  /* "PyClical.pyx":608
7166  * raise ValueError(error_msg_prefix + " " + str(type(other))
7167  * + " value " + repr(other) + ":"
7168  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7169  * elif isinstance(ixt, index_set):
7170  * if isinstance(other, numbers.Real):
7171  */
7172  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_kp_u__6); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 608, __pyx_L24_error)
7173  __Pyx_GOTREF(__pyx_t_18);
7174  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7175  __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 608, __pyx_L24_error)
7176  __Pyx_GOTREF(__pyx_t_16);
7177  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 608, __pyx_L24_error)
7178  __Pyx_GOTREF(__pyx_t_17);
7179  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
7180  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7181 
7182  /* "PyClical.pyx":606
7183  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7184  * except RuntimeError as err:
7185  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
7186  * + " value " + repr(other) + ":"
7187  * + "\n\t" + str(err))
7188  */
7189  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L24_error)
7190  __Pyx_GOTREF(__pyx_t_16);
7191  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
7192  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
7193  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
7194  __PYX_ERR(0, 606, __pyx_L24_error)
7195  }
7196 
7197  /* "PyClical.pyx":605
7198  * else:
7199  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
7200  * except RuntimeError as err: # <<<<<<<<<<<<<<
7201  * raise ValueError(error_msg_prefix + " " + str(type(other))
7202  * + " value " + repr(other) + ":"
7203  */
7204  /*finally:*/ {
7205  __pyx_L24_error:;
7206  /*exception exit:*/{
7207  __Pyx_PyThreadState_declare
7208  __Pyx_PyThreadState_assign
7209  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
7210  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
7211  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
7212  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
7213  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
7214  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
7215  __Pyx_XGOTREF(__pyx_t_12);
7216  __Pyx_XGOTREF(__pyx_t_11);
7217  __Pyx_XGOTREF(__pyx_t_10);
7218  __Pyx_XGOTREF(__pyx_t_21);
7219  __Pyx_XGOTREF(__pyx_t_22);
7220  __Pyx_XGOTREF(__pyx_t_23);
7221  __pyx_t_15 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
7222  {
7223  __Pyx_DECREF(__pyx_v_err);
7224  __pyx_v_err = NULL;
7225  }
7226  if (PY_MAJOR_VERSION >= 3) {
7227  __Pyx_XGIVEREF(__pyx_t_21);
7228  __Pyx_XGIVEREF(__pyx_t_22);
7229  __Pyx_XGIVEREF(__pyx_t_23);
7230  __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
7231  }
7232  __Pyx_XGIVEREF(__pyx_t_12);
7233  __Pyx_XGIVEREF(__pyx_t_11);
7234  __Pyx_XGIVEREF(__pyx_t_10);
7235  __Pyx_ErrRestore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
7236  __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
7237  __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20;
7238  goto __pyx_L6_except_error;
7239  }
7240  }
7241  }
7242  goto __pyx_L6_except_error;
7243  __pyx_L6_except_error:;
7244 
7245  /* "PyClical.pyx":590
7246  * error_msg_prefix = "Cannot initialize clifford object from"
7247  * if ixt is None:
7248  * try: # <<<<<<<<<<<<<<
7249  * if isinstance(other, clifford):
7250  * self.instance = new Clifford((<clifford>other).unwrap())
7251  */
7252  __Pyx_XGIVEREF(__pyx_t_3);
7253  __Pyx_XGIVEREF(__pyx_t_4);
7254  __Pyx_XGIVEREF(__pyx_t_5);
7255  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7256  goto __pyx_L1_error;
7257  __pyx_L9_try_end:;
7258  }
7259 
7260  /* "PyClical.pyx":589
7261  * """
7262  * error_msg_prefix = "Cannot initialize clifford object from"
7263  * if ixt is None: # <<<<<<<<<<<<<<
7264  * try:
7265  * if isinstance(other, clifford):
7266  */
7267  goto __pyx_L3;
7268  }
7269 
7270  /* "PyClical.pyx":609
7271  * + " value " + repr(other) + ":"
7272  * + "\n\t" + str(err))
7273  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7274  * if isinstance(other, numbers.Real):
7275  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7276  */
7277  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7278  __pyx_t_1 = (__pyx_t_2 != 0);
7279  if (likely(__pyx_t_1)) {
7280 
7281  /* "PyClical.pyx":610
7282  * + "\n\t" + str(err))
7283  * elif isinstance(ixt, index_set):
7284  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7285  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7286  * elif isinstance(other, collections.abc.Sequence):
7287  */
7288  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_numbers); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 610, __pyx_L1_error)
7289  __Pyx_GOTREF(__pyx_t_13);
7290  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_Real); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
7291  __Pyx_GOTREF(__pyx_t_7);
7292  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7293  __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 610, __pyx_L1_error)
7294  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7295  __pyx_t_2 = (__pyx_t_1 != 0);
7296  if (__pyx_t_2) {
7297 
7298  /* "PyClical.pyx":611
7299  * elif isinstance(ixt, index_set):
7300  * if isinstance(other, numbers.Real):
7301  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
7302  * elif isinstance(other, collections.abc.Sequence):
7303  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7304  */
7305  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L1_error)
7306  try {
7307  __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));
7308  } catch(...) {
7309  __Pyx_CppExn2PyErr();
7310  __PYX_ERR(0, 611, __pyx_L1_error)
7311  }
7312  __pyx_v_self->instance = __pyx_t_6;
7313 
7314  /* "PyClical.pyx":610
7315  * + "\n\t" + str(err))
7316  * elif isinstance(ixt, index_set):
7317  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
7318  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7319  * elif isinstance(other, collections.abc.Sequence):
7320  */
7321  goto __pyx_L30;
7322  }
7323 
7324  /* "PyClical.pyx":612
7325  * if isinstance(other, numbers.Real):
7326  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7327  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7328  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7329  * else:
7330  */
7331  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
7332  __Pyx_GOTREF(__pyx_t_7);
7333  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_abc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 612, __pyx_L1_error)
7334  __Pyx_GOTREF(__pyx_t_13);
7335  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7336  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
7337  __Pyx_GOTREF(__pyx_t_7);
7338  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7339  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 612, __pyx_L1_error)
7340  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7341  __pyx_t_1 = (__pyx_t_2 != 0);
7342  if (likely(__pyx_t_1)) {
7343 
7344  /* "PyClical.pyx":613
7345  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7346  * elif isinstance(other, collections.abc.Sequence):
7347  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7348  * else:
7349  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7350  */
7351  try {
7352  __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)));
7353  } catch(...) {
7354  __Pyx_CppExn2PyErr();
7355  __PYX_ERR(0, 613, __pyx_L1_error)
7356  }
7357  __pyx_v_self->instance = __pyx_t_6;
7358 
7359  /* "PyClical.pyx":612
7360  * if isinstance(other, numbers.Real):
7361  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7362  * elif isinstance(other, collections.abc.Sequence): # <<<<<<<<<<<<<<
7363  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7364  * else:
7365  */
7366  goto __pyx_L30;
7367  }
7368 
7369  /* "PyClical.pyx":615
7370  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7371  * else:
7372  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7373  * + ", " + repr(ixt) + ").")
7374  * else:
7375  */
7376  /*else*/ {
7377  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7378  __Pyx_GOTREF(__pyx_t_7);
7379  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 615, __pyx_L1_error)
7380  __Pyx_GOTREF(__pyx_t_13);
7381  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7382  __Pyx_GOTREF(__pyx_t_8);
7383  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7384  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7385 
7386  /* "PyClical.pyx":616
7387  * else:
7388  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7389  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7390  * else:
7391  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7392  */
7393  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u__8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 616, __pyx_L1_error)
7394  __Pyx_GOTREF(__pyx_t_13);
7395  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7396  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L1_error)
7397  __Pyx_GOTREF(__pyx_t_8);
7398  __pyx_t_7 = PyNumber_Add(__pyx_t_13, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error)
7399  __Pyx_GOTREF(__pyx_t_7);
7400  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7401  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7402  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_u__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 616, __pyx_L1_error)
7403  __Pyx_GOTREF(__pyx_t_8);
7404  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7405 
7406  /* "PyClical.pyx":615
7407  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7408  * else:
7409  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7410  * + ", " + repr(ixt) + ").")
7411  * else:
7412  */
7413  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7414  __Pyx_GOTREF(__pyx_t_7);
7415  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7416  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7417  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7418  __PYX_ERR(0, 615, __pyx_L1_error)
7419  }
7420  __pyx_L30:;
7421 
7422  /* "PyClical.pyx":609
7423  * + " value " + repr(other) + ":"
7424  * + "\n\t" + str(err))
7425  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7426  * if isinstance(other, numbers.Real):
7427  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7428  */
7429  goto __pyx_L3;
7430  }
7431 
7432  /* "PyClical.pyx":618
7433  * + ", " + repr(ixt) + ").")
7434  * else:
7435  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7436  * + ", " + str(type(ixt)) + ").")
7437  *
7438  */
7439  /*else*/ {
7440  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u__7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7441  __Pyx_GOTREF(__pyx_t_7);
7442  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7443  __Pyx_GOTREF(__pyx_t_8);
7444  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 618, __pyx_L1_error)
7445  __Pyx_GOTREF(__pyx_t_13);
7446  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7447  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7448 
7449  /* "PyClical.pyx":619
7450  * else:
7451  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7452  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7453  *
7454  * def __dealloc__(self):
7455  */
7456  __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_kp_u__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L1_error)
7457  __Pyx_GOTREF(__pyx_t_8);
7458  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7459  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L1_error)
7460  __Pyx_GOTREF(__pyx_t_13);
7461  __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
7462  __Pyx_GOTREF(__pyx_t_7);
7463  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7464  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7465  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_kp_u__9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 619, __pyx_L1_error)
7466  __Pyx_GOTREF(__pyx_t_13);
7467  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7468 
7469  /* "PyClical.pyx":618
7470  * + ", " + repr(ixt) + ").")
7471  * else:
7472  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7473  * + ", " + str(type(ixt)) + ").")
7474  *
7475  */
7476  __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7477  __Pyx_GOTREF(__pyx_t_7);
7478  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7479  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7480  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7481  __PYX_ERR(0, 618, __pyx_L1_error)
7482  }
7483  __pyx_L3:;
7484 
7485  /* "PyClical.pyx":565
7486  * return clifford(self)
7487  *
7488  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7489  * """
7490  * Construct an object of type clifford.
7491  */
7492 
7493  /* function exit code */
7494  __pyx_r = 0;
7495  goto __pyx_L0;
7496  __pyx_L1_error:;
7497  __Pyx_XDECREF(__pyx_t_7);
7498  __Pyx_XDECREF(__pyx_t_8);
7499  __Pyx_XDECREF(__pyx_t_13);
7500  __Pyx_XDECREF(__pyx_t_16);
7501  __Pyx_XDECREF(__pyx_t_17);
7502  __Pyx_XDECREF(__pyx_t_18);
7503  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7504  __pyx_r = -1;
7505  __pyx_L0:;
7506  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7507  __Pyx_XDECREF(__pyx_v_bother);
7508  __Pyx_XDECREF(__pyx_v_err);
7509  __Pyx_RefNannyFinishContext();
7510  return __pyx_r;
7511  }
7512 
7513  /* "PyClical.pyx":621
7514  * + ", " + str(type(ixt)) + ").")
7515  *
7516  * def __dealloc__(self): # <<<<<<<<<<<<<<
7517  * """
7518  * Clean up by deallocating the instance of C++ class Clifford.
7519  */
7520 
7521  /* Python wrapper */
7522  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7523  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7524  __Pyx_RefNannyDeclarations
7525  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7526  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7527 
7528  /* function exit code */
7529  __Pyx_RefNannyFinishContext();
7530  }
7531 
7532  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7533  __Pyx_RefNannyDeclarations
7534  __Pyx_RefNannySetupContext("__dealloc__", 0);
7535 
7536  /* "PyClical.pyx":625
7537  * Clean up by deallocating the instance of C++ class Clifford.
7538  * """
7539  * del self.instance # <<<<<<<<<<<<<<
7540  *
7541  * def __contains__(self, x):
7542  */
7543  delete __pyx_v_self->instance;
7544 
7545  /* "PyClical.pyx":621
7546  * + ", " + str(type(ixt)) + ").")
7547  *
7548  * def __dealloc__(self): # <<<<<<<<<<<<<<
7549  * """
7550  * Clean up by deallocating the instance of C++ class Clifford.
7551  */
7552 
7553  /* function exit code */
7554  __Pyx_RefNannyFinishContext();
7555  }
7556 
7557  /* "PyClical.pyx":627
7558  * del self.instance
7559  *
7560  * def __contains__(self, x): # <<<<<<<<<<<<<<
7561  * """
7562  * Not applicable.
7563  */
7564 
7565  /* Python wrapper */
7566  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7567  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 ";
7568  #if CYTHON_COMPILING_IN_CPYTHON
7569  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7570  #endif
7571  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7572  int __pyx_r;
7573  __Pyx_RefNannyDeclarations
7574  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7575  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7576 
7577  /* function exit code */
7578  __Pyx_RefNannyFinishContext();
7579  return __pyx_r;
7580  }
7581 
7582  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7583  int __pyx_r;
7584  __Pyx_RefNannyDeclarations
7585  PyObject *__pyx_t_1 = NULL;
7586  int __pyx_lineno = 0;
7587  const char *__pyx_filename = NULL;
7588  int __pyx_clineno = 0;
7589  __Pyx_RefNannySetupContext("__contains__", 0);
7590 
7591  /* "PyClical.pyx":636
7592  * TypeError: Not applicable.
7593  * """
7594  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7595  *
7596  * def __iter__(self):
7597  */
7598  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
7599  __Pyx_GOTREF(__pyx_t_1);
7600  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7601  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7602  __PYX_ERR(0, 636, __pyx_L1_error)
7603 
7604  /* "PyClical.pyx":627
7605  * del self.instance
7606  *
7607  * def __contains__(self, x): # <<<<<<<<<<<<<<
7608  * """
7609  * Not applicable.
7610  */
7611 
7612  /* function exit code */
7613  __pyx_L1_error:;
7614  __Pyx_XDECREF(__pyx_t_1);
7615  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7616  __pyx_r = -1;
7617  __Pyx_RefNannyFinishContext();
7618  return __pyx_r;
7619  }
7620 
7621  /* "PyClical.pyx":638
7622  * raise TypeError("Not applicable.")
7623  *
7624  * def __iter__(self): # <<<<<<<<<<<<<<
7625  * """
7626  * Not applicable.
7627  */
7628 
7629  /* Python wrapper */
7630  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7631  static char __pyx_doc_8PyClical_8clifford_8__iter__[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})):print(a, end=\",\")\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
7632  #if CYTHON_COMPILING_IN_CPYTHON
7633  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7634  #endif
7635  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7636  PyObject *__pyx_r = 0;
7637  __Pyx_RefNannyDeclarations
7638  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7639  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7640 
7641  /* function exit code */
7642  __Pyx_RefNannyFinishContext();
7643  return __pyx_r;
7644  }
7645 
7646  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7647  PyObject *__pyx_r = NULL;
7648  __Pyx_RefNannyDeclarations
7649  PyObject *__pyx_t_1 = NULL;
7650  int __pyx_lineno = 0;
7651  const char *__pyx_filename = NULL;
7652  int __pyx_clineno = 0;
7653  __Pyx_RefNannySetupContext("__iter__", 0);
7654 
7655  /* "PyClical.pyx":647
7656  * TypeError: Not applicable.
7657  * """
7658  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7659  *
7660  * def reframe(self, ixt):
7661  */
7662  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
7663  __Pyx_GOTREF(__pyx_t_1);
7664  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7665  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7666  __PYX_ERR(0, 647, __pyx_L1_error)
7667 
7668  /* "PyClical.pyx":638
7669  * raise TypeError("Not applicable.")
7670  *
7671  * def __iter__(self): # <<<<<<<<<<<<<<
7672  * """
7673  * Not applicable.
7674  */
7675 
7676  /* function exit code */
7677  __pyx_L1_error:;
7678  __Pyx_XDECREF(__pyx_t_1);
7679  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7680  __pyx_r = NULL;
7681  __Pyx_XGIVEREF(__pyx_r);
7682  __Pyx_RefNannyFinishContext();
7683  return __pyx_r;
7684  }
7685 
7686  /* "PyClical.pyx":649
7687  * raise TypeError("Not applicable.")
7688  *
7689  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7690  * """
7691  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7692  */
7693 
7694  /* Python wrapper */
7695  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7696  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 ";
7697  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7698  PyObject *__pyx_r = 0;
7699  __Pyx_RefNannyDeclarations
7700  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7701  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7702 
7703  /* function exit code */
7704  __Pyx_RefNannyFinishContext();
7705  return __pyx_r;
7706  }
7707 
7708  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7709  PyObject *__pyx_v_error_msg_prefix = NULL;
7710  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7711  PyObject *__pyx_v_err = NULL;
7712  PyObject *__pyx_r = NULL;
7713  __Pyx_RefNannyDeclarations
7714  int __pyx_t_1;
7715  int __pyx_t_2;
7716  PyObject *__pyx_t_3 = NULL;
7717  PyObject *__pyx_t_4 = NULL;
7718  PyObject *__pyx_t_5 = NULL;
7719  PyObject *__pyx_t_6 = NULL;
7720  Clifford *__pyx_t_7;
7721  int __pyx_t_8;
7722  PyObject *__pyx_t_9 = NULL;
7723  PyObject *__pyx_t_10 = NULL;
7724  PyObject *__pyx_t_11 = NULL;
7725  PyObject *__pyx_t_12 = NULL;
7726  PyObject *__pyx_t_13 = NULL;
7727  int __pyx_t_14;
7728  char const *__pyx_t_15;
7729  PyObject *__pyx_t_16 = NULL;
7730  PyObject *__pyx_t_17 = NULL;
7731  PyObject *__pyx_t_18 = NULL;
7732  PyObject *__pyx_t_19 = NULL;
7733  PyObject *__pyx_t_20 = NULL;
7734  PyObject *__pyx_t_21 = NULL;
7735  int __pyx_lineno = 0;
7736  const char *__pyx_filename = NULL;
7737  int __pyx_clineno = 0;
7738  __Pyx_RefNannySetupContext("reframe", 0);
7739 
7740  /* "PyClical.pyx":659
7741  * True
7742  * """
7743  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7744  * if isinstance(ixt, index_set):
7745  * try:
7746  */
7747  __Pyx_INCREF(__pyx_kp_u_Cannot_reframe);
7748  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_reframe;
7749 
7750  /* "PyClical.pyx":660
7751  * """
7752  * error_msg_prefix = "Cannot reframe"
7753  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7754  * try:
7755  * result = clifford()
7756  */
7757  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7758  __pyx_t_2 = (__pyx_t_1 != 0);
7759  if (likely(__pyx_t_2)) {
7760 
7761  /* "PyClical.pyx":661
7762  * error_msg_prefix = "Cannot reframe"
7763  * if isinstance(ixt, index_set):
7764  * try: # <<<<<<<<<<<<<<
7765  * result = clifford()
7766  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7767  */
7768  {
7769  __Pyx_PyThreadState_declare
7770  __Pyx_PyThreadState_assign
7771  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7772  __Pyx_XGOTREF(__pyx_t_3);
7773  __Pyx_XGOTREF(__pyx_t_4);
7774  __Pyx_XGOTREF(__pyx_t_5);
7775  /*try:*/ {
7776 
7777  /* "PyClical.pyx":662
7778  * if isinstance(ixt, index_set):
7779  * try:
7780  * result = clifford() # <<<<<<<<<<<<<<
7781  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7782  * except RuntimeError as err:
7783  */
7784  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L4_error)
7785  __Pyx_GOTREF(__pyx_t_6);
7786  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7787  __pyx_t_6 = 0;
7788 
7789  /* "PyClical.pyx":663
7790  * try:
7791  * result = clifford()
7792  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7793  * except RuntimeError as err:
7794  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7795  */
7796  try {
7797  __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)));
7798  } catch(...) {
7799  __Pyx_CppExn2PyErr();
7800  __PYX_ERR(0, 663, __pyx_L4_error)
7801  }
7802  __pyx_v_result->instance = __pyx_t_7;
7803 
7804  /* "PyClical.pyx":661
7805  * error_msg_prefix = "Cannot reframe"
7806  * if isinstance(ixt, index_set):
7807  * try: # <<<<<<<<<<<<<<
7808  * result = clifford()
7809  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7810  */
7811  }
7812  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7813  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7814  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7815  goto __pyx_L9_try_end;
7816  __pyx_L4_error:;
7817  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7818 
7819  /* "PyClical.pyx":664
7820  * result = clifford()
7821  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7822  * except RuntimeError as err: # <<<<<<<<<<<<<<
7823  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7824  * + str(ixt) + ":"
7825  */
7826  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7827  if (__pyx_t_8) {
7828  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7829  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 664, __pyx_L6_except_error)
7830  __Pyx_GOTREF(__pyx_t_6);
7831  __Pyx_GOTREF(__pyx_t_9);
7832  __Pyx_GOTREF(__pyx_t_10);
7833  __Pyx_INCREF(__pyx_t_9);
7834  __pyx_v_err = __pyx_t_9;
7835  /*try:*/ {
7836 
7837  /* "PyClical.pyx":665
7838  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7839  * except RuntimeError as err:
7840  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7841  * + str(ixt) + ":"
7842  * + "\n\t" + str(err))
7843  */
7844  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_from); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L15_error)
7845  __Pyx_GOTREF(__pyx_t_11);
7846  __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L15_error)
7847  __Pyx_GOTREF(__pyx_t_12);
7848  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7849  __Pyx_GOTREF(__pyx_t_13);
7850  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7851  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7852  __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_kp_u_to_frame); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L15_error)
7853  __Pyx_GOTREF(__pyx_t_12);
7854  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7855 
7856  /* "PyClical.pyx":666
7857  * except RuntimeError as err:
7858  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7859  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7860  * + "\n\t" + str(err))
7861  * else:
7862  */
7863  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_ixt); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L15_error)
7864  __Pyx_GOTREF(__pyx_t_13);
7865  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L15_error)
7866  __Pyx_GOTREF(__pyx_t_11);
7867  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7868  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7869  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_kp_u__5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L15_error)
7870  __Pyx_GOTREF(__pyx_t_13);
7871  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7872 
7873  /* "PyClical.pyx":667
7874  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7875  * + str(ixt) + ":"
7876  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7877  * else:
7878  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7879  */
7880  __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_kp_u__6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 667, __pyx_L15_error)
7881  __Pyx_GOTREF(__pyx_t_11);
7882  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7883  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 667, __pyx_L15_error)
7884  __Pyx_GOTREF(__pyx_t_13);
7885  __pyx_t_12 = __Pyx_PyUnicode_Concat(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 667, __pyx_L15_error)
7886  __Pyx_GOTREF(__pyx_t_12);
7887  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7888  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7889 
7890  /* "PyClical.pyx":665
7891  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7892  * except RuntimeError as err:
7893  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7894  * + str(ixt) + ":"
7895  * + "\n\t" + str(err))
7896  */
7897  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L15_error)
7898  __Pyx_GOTREF(__pyx_t_13);
7899  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7900  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7901  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7902  __PYX_ERR(0, 665, __pyx_L15_error)
7903  }
7904 
7905  /* "PyClical.pyx":664
7906  * result = clifford()
7907  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7908  * except RuntimeError as err: # <<<<<<<<<<<<<<
7909  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7910  * + str(ixt) + ":"
7911  */
7912  /*finally:*/ {
7913  __pyx_L15_error:;
7914  /*exception exit:*/{
7915  __Pyx_PyThreadState_declare
7916  __Pyx_PyThreadState_assign
7917  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7918  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
7919  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
7920  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
7921  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
7922  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
7923  __Pyx_XGOTREF(__pyx_t_16);
7924  __Pyx_XGOTREF(__pyx_t_17);
7925  __Pyx_XGOTREF(__pyx_t_18);
7926  __Pyx_XGOTREF(__pyx_t_19);
7927  __Pyx_XGOTREF(__pyx_t_20);
7928  __Pyx_XGOTREF(__pyx_t_21);
7929  __pyx_t_8 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
7930  {
7931  __Pyx_DECREF(__pyx_v_err);
7932  __pyx_v_err = NULL;
7933  }
7934  if (PY_MAJOR_VERSION >= 3) {
7935  __Pyx_XGIVEREF(__pyx_t_19);
7936  __Pyx_XGIVEREF(__pyx_t_20);
7937  __Pyx_XGIVEREF(__pyx_t_21);
7938  __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
7939  }
7940  __Pyx_XGIVEREF(__pyx_t_16);
7941  __Pyx_XGIVEREF(__pyx_t_17);
7942  __Pyx_XGIVEREF(__pyx_t_18);
7943  __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
7944  __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
7945  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
7946  goto __pyx_L6_except_error;
7947  }
7948  }
7949  }
7950  goto __pyx_L6_except_error;
7951  __pyx_L6_except_error:;
7952 
7953  /* "PyClical.pyx":661
7954  * error_msg_prefix = "Cannot reframe"
7955  * if isinstance(ixt, index_set):
7956  * try: # <<<<<<<<<<<<<<
7957  * result = clifford()
7958  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7959  */
7960  __Pyx_XGIVEREF(__pyx_t_3);
7961  __Pyx_XGIVEREF(__pyx_t_4);
7962  __Pyx_XGIVEREF(__pyx_t_5);
7963  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7964  goto __pyx_L1_error;
7965  __pyx_L9_try_end:;
7966  }
7967 
7968  /* "PyClical.pyx":660
7969  * """
7970  * error_msg_prefix = "Cannot reframe"
7971  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7972  * try:
7973  * result = clifford()
7974  */
7975  goto __pyx_L3;
7976  }
7977 
7978  /* "PyClical.pyx":669
7979  * + "\n\t" + str(err))
7980  * else:
7981  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7982  * return result
7983  *
7984  */
7985  /*else*/ {
7986  __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_kp_u_using); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 669, __pyx_L1_error)
7987  __Pyx_GOTREF(__pyx_t_10);
7988  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 669, __pyx_L1_error)
7989  __Pyx_GOTREF(__pyx_t_9);
7990  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7991  __Pyx_GOTREF(__pyx_t_6);
7992  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7993  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7994  __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 669, __pyx_L1_error)
7995  __Pyx_GOTREF(__pyx_t_9);
7996  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7997  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 669, __pyx_L1_error)
7998  __Pyx_GOTREF(__pyx_t_6);
7999  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8000  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
8001  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8002  __PYX_ERR(0, 669, __pyx_L1_error)
8003  }
8004  __pyx_L3:;
8005 
8006  /* "PyClical.pyx":670
8007  * else:
8008  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
8009  * return result # <<<<<<<<<<<<<<
8010  *
8011  * def __richcmp__(lhs, rhs, int op):
8012  */
8013  __Pyx_XDECREF(__pyx_r);
8014  __Pyx_INCREF(((PyObject *)__pyx_v_result));
8015  __pyx_r = ((PyObject *)__pyx_v_result);
8016  goto __pyx_L0;
8017 
8018  /* "PyClical.pyx":649
8019  * raise TypeError("Not applicable.")
8020  *
8021  * def reframe(self, ixt): # <<<<<<<<<<<<<<
8022  * """
8023  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
8024  */
8025 
8026  /* function exit code */
8027  __pyx_L1_error:;
8028  __Pyx_XDECREF(__pyx_t_6);
8029  __Pyx_XDECREF(__pyx_t_9);
8030  __Pyx_XDECREF(__pyx_t_10);
8031  __Pyx_XDECREF(__pyx_t_11);
8032  __Pyx_XDECREF(__pyx_t_12);
8033  __Pyx_XDECREF(__pyx_t_13);
8034  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
8035  __pyx_r = NULL;
8036  __pyx_L0:;
8037  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
8038  __Pyx_XDECREF((PyObject *)__pyx_v_result);
8039  __Pyx_XDECREF(__pyx_v_err);
8040  __Pyx_XGIVEREF(__pyx_r);
8041  __Pyx_RefNannyFinishContext();
8042  return __pyx_r;
8043  }
8044 
8045  /* "PyClical.pyx":672
8046  * return result
8047  *
8048  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
8049  * """
8050  * Compare objects of type clifford.
8051  */
8052 
8053  /* Python wrapper */
8054  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
8055  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
8056  PyObject *__pyx_r = 0;
8057  __Pyx_RefNannyDeclarations
8058  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
8059  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
8060 
8061  /* function exit code */
8062  __Pyx_RefNannyFinishContext();
8063  return __pyx_r;
8064  }
8065 
8066  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
8067  PyObject *__pyx_r = NULL;
8068  __Pyx_RefNannyDeclarations
8069  int __pyx_t_1;
8070  int __pyx_t_2;
8071  int __pyx_t_3;
8072  PyObject *__pyx_t_4 = NULL;
8073  PyObject *__pyx_t_5 = NULL;
8074  PyObject *__pyx_t_6 = NULL;
8075  int __pyx_lineno = 0;
8076  const char *__pyx_filename = NULL;
8077  int __pyx_clineno = 0;
8078  __Pyx_RefNannySetupContext("__richcmp__", 0);
8079 
8080  /* "PyClical.pyx":691
8081  * True
8082  * """
8083  * if op == 2: # == # <<<<<<<<<<<<<<
8084  * if (lhs is None) or (rhs is None):
8085  * return bool(lhs is rhs)
8086  */
8087  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
8088  if (__pyx_t_1) {
8089 
8090  /* "PyClical.pyx":692
8091  * """
8092  * if op == 2: # ==
8093  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8094  * return bool(lhs is rhs)
8095  * else:
8096  */
8097  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
8098  __pyx_t_3 = (__pyx_t_2 != 0);
8099  if (!__pyx_t_3) {
8100  } else {
8101  __pyx_t_1 = __pyx_t_3;
8102  goto __pyx_L5_bool_binop_done;
8103  }
8104  __pyx_t_3 = (__pyx_v_rhs == Py_None);
8105  __pyx_t_2 = (__pyx_t_3 != 0);
8106  __pyx_t_1 = __pyx_t_2;
8107  __pyx_L5_bool_binop_done:;
8108  if (__pyx_t_1) {
8109 
8110  /* "PyClical.pyx":693
8111  * if op == 2: # ==
8112  * if (lhs is None) or (rhs is None):
8113  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
8114  * else:
8115  * return bool( toClifford(lhs) == toClifford(rhs) )
8116  */
8117  __Pyx_XDECREF(__pyx_r);
8118  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
8119  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
8120  __Pyx_GOTREF(__pyx_t_4);
8121  __pyx_r = __pyx_t_4;
8122  __pyx_t_4 = 0;
8123  goto __pyx_L0;
8124 
8125  /* "PyClical.pyx":692
8126  * """
8127  * if op == 2: # ==
8128  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8129  * return bool(lhs is rhs)
8130  * else:
8131  */
8132  }
8133 
8134  /* "PyClical.pyx":695
8135  * return bool(lhs is rhs)
8136  * else:
8137  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
8138  * elif op == 3: # !=
8139  * if (lhs is None) or (rhs is None):
8140  */
8141  /*else*/ {
8142  __Pyx_XDECREF(__pyx_r);
8143  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
8144  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error)
8145  __Pyx_GOTREF(__pyx_t_4);
8146  __pyx_r = __pyx_t_4;
8147  __pyx_t_4 = 0;
8148  goto __pyx_L0;
8149  }
8150 
8151  /* "PyClical.pyx":691
8152  * True
8153  * """
8154  * if op == 2: # == # <<<<<<<<<<<<<<
8155  * if (lhs is None) or (rhs is None):
8156  * return bool(lhs is rhs)
8157  */
8158  }
8159 
8160  /* "PyClical.pyx":696
8161  * else:
8162  * return bool( toClifford(lhs) == toClifford(rhs) )
8163  * elif op == 3: # != # <<<<<<<<<<<<<<
8164  * if (lhs is None) or (rhs is None):
8165  * return not bool(lhs is rhs)
8166  */
8167  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
8168  if (__pyx_t_1) {
8169 
8170  /* "PyClical.pyx":697
8171  * return bool( toClifford(lhs) == toClifford(rhs) )
8172  * elif op == 3: # !=
8173  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8174  * return not bool(lhs is rhs)
8175  * else:
8176  */
8177  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
8178  __pyx_t_3 = (__pyx_t_2 != 0);
8179  if (!__pyx_t_3) {
8180  } else {
8181  __pyx_t_1 = __pyx_t_3;
8182  goto __pyx_L8_bool_binop_done;
8183  }
8184  __pyx_t_3 = (__pyx_v_rhs == Py_None);
8185  __pyx_t_2 = (__pyx_t_3 != 0);
8186  __pyx_t_1 = __pyx_t_2;
8187  __pyx_L8_bool_binop_done:;
8188  if (__pyx_t_1) {
8189 
8190  /* "PyClical.pyx":698
8191  * elif op == 3: # !=
8192  * if (lhs is None) or (rhs is None):
8193  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
8194  * else:
8195  * return bool( toClifford(lhs) != toClifford(rhs) )
8196  */
8197  __Pyx_XDECREF(__pyx_r);
8198  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
8199  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
8200  __Pyx_GOTREF(__pyx_t_4);
8201  __pyx_r = __pyx_t_4;
8202  __pyx_t_4 = 0;
8203  goto __pyx_L0;
8204 
8205  /* "PyClical.pyx":697
8206  * return bool( toClifford(lhs) == toClifford(rhs) )
8207  * elif op == 3: # !=
8208  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
8209  * return not bool(lhs is rhs)
8210  * else:
8211  */
8212  }
8213 
8214  /* "PyClical.pyx":700
8215  * return not bool(lhs is rhs)
8216  * else:
8217  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
8218  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8219  * raise TypeError("This comparison operator is not implemented for "
8220  */
8221  /*else*/ {
8222  __Pyx_XDECREF(__pyx_r);
8223  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
8224  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error)
8225  __Pyx_GOTREF(__pyx_t_4);
8226  __pyx_r = __pyx_t_4;
8227  __pyx_t_4 = 0;
8228  goto __pyx_L0;
8229  }
8230 
8231  /* "PyClical.pyx":696
8232  * else:
8233  * return bool( toClifford(lhs) == toClifford(rhs) )
8234  * elif op == 3: # != # <<<<<<<<<<<<<<
8235  * if (lhs is None) or (rhs is None):
8236  * return not bool(lhs is rhs)
8237  */
8238  }
8239 
8240  /* "PyClical.pyx":701
8241  * else:
8242  * return bool( toClifford(lhs) != toClifford(rhs) )
8243  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8244  * raise TypeError("This comparison operator is not implemented for "
8245  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8246  */
8247  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
8248  __pyx_t_3 = (__pyx_t_2 != 0);
8249  if (!__pyx_t_3) {
8250  } else {
8251  __pyx_t_1 = __pyx_t_3;
8252  goto __pyx_L10_bool_binop_done;
8253  }
8254  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
8255  __pyx_t_2 = (__pyx_t_3 != 0);
8256  __pyx_t_1 = __pyx_t_2;
8257  __pyx_L10_bool_binop_done:;
8258  if (unlikely(__pyx_t_1)) {
8259 
8260  /* "PyClical.pyx":703
8261  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8262  * raise TypeError("This comparison operator is not implemented for "
8263  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
8264  * else:
8265  * return NotImplemented
8266  */
8267  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_lhs)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error)
8268  __Pyx_GOTREF(__pyx_t_4);
8269  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_This_comparison_operator_is_not, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8270  __Pyx_GOTREF(__pyx_t_5);
8271  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8272  __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error)
8273  __Pyx_GOTREF(__pyx_t_4);
8274  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8275  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)Py_TYPE(__pyx_v_rhs))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8276  __Pyx_GOTREF(__pyx_t_5);
8277  __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
8278  __Pyx_GOTREF(__pyx_t_6);
8279  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8280  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8281  __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error)
8282  __Pyx_GOTREF(__pyx_t_5);
8283  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8284 
8285  /* "PyClical.pyx":702
8286  * return bool( toClifford(lhs) != toClifford(rhs) )
8287  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
8288  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
8289  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8290  * else:
8291  */
8292  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
8293  __Pyx_GOTREF(__pyx_t_6);
8294  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8295  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
8296  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8297  __PYX_ERR(0, 702, __pyx_L1_error)
8298 
8299  /* "PyClical.pyx":701
8300  * else:
8301  * return bool( toClifford(lhs) != toClifford(rhs) )
8302  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
8303  * raise TypeError("This comparison operator is not implemented for "
8304  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8305  */
8306  }
8307 
8308  /* "PyClical.pyx":705
8309  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
8310  * else:
8311  * return NotImplemented # <<<<<<<<<<<<<<
8312  *
8313  * def __getitem__(self, ixt):
8314  */
8315  /*else*/ {
8316  __Pyx_XDECREF(__pyx_r);
8317  __Pyx_INCREF(__pyx_builtin_NotImplemented);
8318  __pyx_r = __pyx_builtin_NotImplemented;
8319  goto __pyx_L0;
8320  }
8321 
8322  /* "PyClical.pyx":672
8323  * return result
8324  *
8325  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
8326  * """
8327  * Compare objects of type clifford.
8328  */
8329 
8330  /* function exit code */
8331  __pyx_L1_error:;
8332  __Pyx_XDECREF(__pyx_t_4);
8333  __Pyx_XDECREF(__pyx_t_5);
8334  __Pyx_XDECREF(__pyx_t_6);
8335  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8336  __pyx_r = NULL;
8337  __pyx_L0:;
8338  __Pyx_XGIVEREF(__pyx_r);
8339  __Pyx_RefNannyFinishContext();
8340  return __pyx_r;
8341  }
8342 
8343  /* "PyClical.pyx":707
8344  * return NotImplemented
8345  *
8346  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8347  * """
8348  * Subscripting: map from index set to scalar coordinate.
8349  */
8350 
8351  /* Python wrapper */
8352  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
8353  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 ";
8354  #if CYTHON_COMPILING_IN_CPYTHON
8355  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
8356  #endif
8357  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
8358  PyObject *__pyx_r = 0;
8359  __Pyx_RefNannyDeclarations
8360  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
8361  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
8362 
8363  /* function exit code */
8364  __Pyx_RefNannyFinishContext();
8365  return __pyx_r;
8366  }
8367 
8368  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
8369  PyObject *__pyx_r = NULL;
8370  __Pyx_RefNannyDeclarations
8371  PyObject *__pyx_t_1 = NULL;
8372  int __pyx_lineno = 0;
8373  const char *__pyx_filename = NULL;
8374  int __pyx_clineno = 0;
8375  __Pyx_RefNannySetupContext("__getitem__", 0);
8376 
8377  /* "PyClical.pyx":720
8378  * 2.0
8379  * """
8380  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
8381  *
8382  * def __neg__(self):
8383  */
8384  __Pyx_XDECREF(__pyx_r);
8385  __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, 720, __pyx_L1_error)
8386  __Pyx_GOTREF(__pyx_t_1);
8387  __pyx_r = __pyx_t_1;
8388  __pyx_t_1 = 0;
8389  goto __pyx_L0;
8390 
8391  /* "PyClical.pyx":707
8392  * return NotImplemented
8393  *
8394  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
8395  * """
8396  * Subscripting: map from index set to scalar coordinate.
8397  */
8398 
8399  /* function exit code */
8400  __pyx_L1_error:;
8401  __Pyx_XDECREF(__pyx_t_1);
8402  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8403  __pyx_r = NULL;
8404  __pyx_L0:;
8405  __Pyx_XGIVEREF(__pyx_r);
8406  __Pyx_RefNannyFinishContext();
8407  return __pyx_r;
8408  }
8409 
8410  /* "PyClical.pyx":722
8411  * return self.instance.getitem(toIndexSet(ixt))
8412  *
8413  * def __neg__(self): # <<<<<<<<<<<<<<
8414  * """
8415  * Unary -.
8416  */
8417 
8418  /* Python wrapper */
8419  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
8420  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print(-clifford(\"{1}\"))\n -{1}\n ";
8421  #if CYTHON_COMPILING_IN_CPYTHON
8422  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
8423  #endif
8424  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
8425  PyObject *__pyx_r = 0;
8426  __Pyx_RefNannyDeclarations
8427  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
8428  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8429 
8430  /* function exit code */
8431  __Pyx_RefNannyFinishContext();
8432  return __pyx_r;
8433  }
8434 
8435  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8436  PyObject *__pyx_r = NULL;
8437  __Pyx_RefNannyDeclarations
8438  PyObject *__pyx_t_1 = NULL;
8439  PyObject *__pyx_t_2 = NULL;
8440  int __pyx_lineno = 0;
8441  const char *__pyx_filename = NULL;
8442  int __pyx_clineno = 0;
8443  __Pyx_RefNannySetupContext("__neg__", 0);
8444 
8445  /* "PyClical.pyx":729
8446  * -{1}
8447  * """
8448  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
8449  *
8450  * def __pos__(self):
8451  */
8452  __Pyx_XDECREF(__pyx_r);
8453  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
8454  __Pyx_GOTREF(__pyx_t_1);
8455  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->operator-()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
8456  __Pyx_GOTREF(__pyx_t_2);
8457  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8458  __pyx_r = __pyx_t_2;
8459  __pyx_t_2 = 0;
8460  goto __pyx_L0;
8461 
8462  /* "PyClical.pyx":722
8463  * return self.instance.getitem(toIndexSet(ixt))
8464  *
8465  * def __neg__(self): # <<<<<<<<<<<<<<
8466  * """
8467  * Unary -.
8468  */
8469 
8470  /* function exit code */
8471  __pyx_L1_error:;
8472  __Pyx_XDECREF(__pyx_t_1);
8473  __Pyx_XDECREF(__pyx_t_2);
8474  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8475  __pyx_r = NULL;
8476  __pyx_L0:;
8477  __Pyx_XGIVEREF(__pyx_r);
8478  __Pyx_RefNannyFinishContext();
8479  return __pyx_r;
8480  }
8481 
8482  /* "PyClical.pyx":731
8483  * return clifford().wrap( self.instance.neg() )
8484  *
8485  * def __pos__(self): # <<<<<<<<<<<<<<
8486  * """
8487  * Unary +.
8488  */
8489 
8490  /* Python wrapper */
8491  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8492  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print(+clifford(\"{1}\"))\n {1}\n ";
8493  #if CYTHON_COMPILING_IN_CPYTHON
8494  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8495  #endif
8496  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8497  PyObject *__pyx_r = 0;
8498  __Pyx_RefNannyDeclarations
8499  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8500  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8501 
8502  /* function exit code */
8503  __Pyx_RefNannyFinishContext();
8504  return __pyx_r;
8505  }
8506 
8507  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8508  PyObject *__pyx_r = NULL;
8509  __Pyx_RefNannyDeclarations
8510  PyObject *__pyx_t_1 = NULL;
8511  int __pyx_lineno = 0;
8512  const char *__pyx_filename = NULL;
8513  int __pyx_clineno = 0;
8514  __Pyx_RefNannySetupContext("__pos__", 0);
8515 
8516  /* "PyClical.pyx":738
8517  * {1}
8518  * """
8519  * return clifford(self) # <<<<<<<<<<<<<<
8520  *
8521  * def __add__(lhs, rhs):
8522  */
8523  __Pyx_XDECREF(__pyx_r);
8524  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
8525  __Pyx_GOTREF(__pyx_t_1);
8526  __pyx_r = __pyx_t_1;
8527  __pyx_t_1 = 0;
8528  goto __pyx_L0;
8529 
8530  /* "PyClical.pyx":731
8531  * return clifford().wrap( self.instance.neg() )
8532  *
8533  * def __pos__(self): # <<<<<<<<<<<<<<
8534  * """
8535  * Unary +.
8536  */
8537 
8538  /* function exit code */
8539  __pyx_L1_error:;
8540  __Pyx_XDECREF(__pyx_t_1);
8541  __Pyx_AddTraceback("PyClical.clifford.__pos__", __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":740
8550  * return clifford(self)
8551  *
8552  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8553  * """
8554  * Geometric sum.
8555  */
8556 
8557  /* Python wrapper */
8558  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8559  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 ";
8560  #if CYTHON_COMPILING_IN_CPYTHON
8561  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8562  #endif
8563  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8564  PyObject *__pyx_r = 0;
8565  __Pyx_RefNannyDeclarations
8566  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8567  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((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_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8575  PyObject *__pyx_r = NULL;
8576  __Pyx_RefNannyDeclarations
8577  PyObject *__pyx_t_1 = NULL;
8578  PyObject *__pyx_t_2 = NULL;
8579  int __pyx_lineno = 0;
8580  const char *__pyx_filename = NULL;
8581  int __pyx_clineno = 0;
8582  __Pyx_RefNannySetupContext("__add__", 0);
8583 
8584  /* "PyClical.pyx":749
8585  * {1}+{2}
8586  * """
8587  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8588  *
8589  * def __iadd__(self, rhs):
8590  */
8591  __Pyx_XDECREF(__pyx_r);
8592  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
8593  __Pyx_GOTREF(__pyx_t_1);
8594  __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, 749, __pyx_L1_error)
8595  __Pyx_GOTREF(__pyx_t_2);
8596  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8597  __pyx_r = __pyx_t_2;
8598  __pyx_t_2 = 0;
8599  goto __pyx_L0;
8600 
8601  /* "PyClical.pyx":740
8602  * return clifford(self)
8603  *
8604  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8605  * """
8606  * Geometric sum.
8607  */
8608 
8609  /* function exit code */
8610  __pyx_L1_error:;
8611  __Pyx_XDECREF(__pyx_t_1);
8612  __Pyx_XDECREF(__pyx_t_2);
8613  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8614  __pyx_r = NULL;
8615  __pyx_L0:;
8616  __Pyx_XGIVEREF(__pyx_r);
8617  __Pyx_RefNannyFinishContext();
8618  return __pyx_r;
8619  }
8620 
8621  /* "PyClical.pyx":751
8622  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8623  *
8624  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8625  * """
8626  * Geometric sum.
8627  */
8628 
8629  /* Python wrapper */
8630  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8631  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 ";
8632  #if CYTHON_COMPILING_IN_CPYTHON
8633  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8634  #endif
8635  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8636  PyObject *__pyx_r = 0;
8637  __Pyx_RefNannyDeclarations
8638  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8639  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8640 
8641  /* function exit code */
8642  __Pyx_RefNannyFinishContext();
8643  return __pyx_r;
8644  }
8645 
8646  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8647  PyObject *__pyx_r = NULL;
8648  __Pyx_RefNannyDeclarations
8649  PyObject *__pyx_t_1 = NULL;
8650  int __pyx_lineno = 0;
8651  const char *__pyx_filename = NULL;
8652  int __pyx_clineno = 0;
8653  __Pyx_RefNannySetupContext("__iadd__", 0);
8654 
8655  /* "PyClical.pyx":758
8656  * 1+{2}
8657  * """
8658  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8659  *
8660  * def __sub__(lhs, rhs):
8661  */
8662  __Pyx_XDECREF(__pyx_r);
8663  __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, 758, __pyx_L1_error)
8664  __Pyx_GOTREF(__pyx_t_1);
8665  __pyx_r = __pyx_t_1;
8666  __pyx_t_1 = 0;
8667  goto __pyx_L0;
8668 
8669  /* "PyClical.pyx":751
8670  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8671  *
8672  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8673  * """
8674  * Geometric sum.
8675  */
8676 
8677  /* function exit code */
8678  __pyx_L1_error:;
8679  __Pyx_XDECREF(__pyx_t_1);
8680  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8681  __pyx_r = NULL;
8682  __pyx_L0:;
8683  __Pyx_XGIVEREF(__pyx_r);
8684  __Pyx_RefNannyFinishContext();
8685  return __pyx_r;
8686  }
8687 
8688  /* "PyClical.pyx":760
8689  * return self.wrap( self.unwrap() + toClifford(rhs) )
8690  *
8691  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8692  * """
8693  * Geometric difference.
8694  */
8695 
8696  /* Python wrapper */
8697  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8698  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 ";
8699  #if CYTHON_COMPILING_IN_CPYTHON
8700  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8701  #endif
8702  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8703  PyObject *__pyx_r = 0;
8704  __Pyx_RefNannyDeclarations
8705  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8706  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8707 
8708  /* function exit code */
8709  __Pyx_RefNannyFinishContext();
8710  return __pyx_r;
8711  }
8712 
8713  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8714  PyObject *__pyx_r = NULL;
8715  __Pyx_RefNannyDeclarations
8716  PyObject *__pyx_t_1 = NULL;
8717  PyObject *__pyx_t_2 = NULL;
8718  int __pyx_lineno = 0;
8719  const char *__pyx_filename = NULL;
8720  int __pyx_clineno = 0;
8721  __Pyx_RefNannySetupContext("__sub__", 0);
8722 
8723  /* "PyClical.pyx":769
8724  * {1}-{2}
8725  * """
8726  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8727  *
8728  * def __isub__(self, rhs):
8729  */
8730  __Pyx_XDECREF(__pyx_r);
8731  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
8732  __Pyx_GOTREF(__pyx_t_1);
8733  __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, 769, __pyx_L1_error)
8734  __Pyx_GOTREF(__pyx_t_2);
8735  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8736  __pyx_r = __pyx_t_2;
8737  __pyx_t_2 = 0;
8738  goto __pyx_L0;
8739 
8740  /* "PyClical.pyx":760
8741  * return self.wrap( self.unwrap() + toClifford(rhs) )
8742  *
8743  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8744  * """
8745  * Geometric difference.
8746  */
8747 
8748  /* function exit code */
8749  __pyx_L1_error:;
8750  __Pyx_XDECREF(__pyx_t_1);
8751  __Pyx_XDECREF(__pyx_t_2);
8752  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8753  __pyx_r = NULL;
8754  __pyx_L0:;
8755  __Pyx_XGIVEREF(__pyx_r);
8756  __Pyx_RefNannyFinishContext();
8757  return __pyx_r;
8758  }
8759 
8760  /* "PyClical.pyx":771
8761  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8762  *
8763  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8764  * """
8765  * Geometric difference.
8766  */
8767 
8768  /* Python wrapper */
8769  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8770  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 ";
8771  #if CYTHON_COMPILING_IN_CPYTHON
8772  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8773  #endif
8774  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8775  PyObject *__pyx_r = 0;
8776  __Pyx_RefNannyDeclarations
8777  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8778  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8779 
8780  /* function exit code */
8781  __Pyx_RefNannyFinishContext();
8782  return __pyx_r;
8783  }
8784 
8785  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8786  PyObject *__pyx_r = NULL;
8787  __Pyx_RefNannyDeclarations
8788  PyObject *__pyx_t_1 = NULL;
8789  int __pyx_lineno = 0;
8790  const char *__pyx_filename = NULL;
8791  int __pyx_clineno = 0;
8792  __Pyx_RefNannySetupContext("__isub__", 0);
8793 
8794  /* "PyClical.pyx":778
8795  * 1-{2}
8796  * """
8797  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8798  *
8799  * def __mul__(lhs, rhs):
8800  */
8801  __Pyx_XDECREF(__pyx_r);
8802  __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, 778, __pyx_L1_error)
8803  __Pyx_GOTREF(__pyx_t_1);
8804  __pyx_r = __pyx_t_1;
8805  __pyx_t_1 = 0;
8806  goto __pyx_L0;
8807 
8808  /* "PyClical.pyx":771
8809  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8810  *
8811  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8812  * """
8813  * Geometric difference.
8814  */
8815 
8816  /* function exit code */
8817  __pyx_L1_error:;
8818  __Pyx_XDECREF(__pyx_t_1);
8819  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8820  __pyx_r = NULL;
8821  __pyx_L0:;
8822  __Pyx_XGIVEREF(__pyx_r);
8823  __Pyx_RefNannyFinishContext();
8824  return __pyx_r;
8825  }
8826 
8827  /* "PyClical.pyx":780
8828  * return self.wrap( self.unwrap() - toClifford(rhs) )
8829  *
8830  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8831  * """
8832  * Geometric product.
8833  */
8834 
8835  /* Python wrapper */
8836  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8837  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 ";
8838  #if CYTHON_COMPILING_IN_CPYTHON
8839  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8840  #endif
8841  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8842  PyObject *__pyx_r = 0;
8843  __Pyx_RefNannyDeclarations
8844  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8845  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8846 
8847  /* function exit code */
8848  __Pyx_RefNannyFinishContext();
8849  return __pyx_r;
8850  }
8851 
8852  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8853  PyObject *__pyx_r = NULL;
8854  __Pyx_RefNannyDeclarations
8855  PyObject *__pyx_t_1 = NULL;
8856  PyObject *__pyx_t_2 = NULL;
8857  int __pyx_lineno = 0;
8858  const char *__pyx_filename = NULL;
8859  int __pyx_clineno = 0;
8860  __Pyx_RefNannySetupContext("__mul__", 0);
8861 
8862  /* "PyClical.pyx":791
8863  * {2}
8864  * """
8865  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8866  *
8867  * def __imul__(self, rhs):
8868  */
8869  __Pyx_XDECREF(__pyx_r);
8870  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
8871  __Pyx_GOTREF(__pyx_t_1);
8872  __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, 791, __pyx_L1_error)
8873  __Pyx_GOTREF(__pyx_t_2);
8874  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8875  __pyx_r = __pyx_t_2;
8876  __pyx_t_2 = 0;
8877  goto __pyx_L0;
8878 
8879  /* "PyClical.pyx":780
8880  * return self.wrap( self.unwrap() - toClifford(rhs) )
8881  *
8882  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8883  * """
8884  * Geometric product.
8885  */
8886 
8887  /* function exit code */
8888  __pyx_L1_error:;
8889  __Pyx_XDECREF(__pyx_t_1);
8890  __Pyx_XDECREF(__pyx_t_2);
8891  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8892  __pyx_r = NULL;
8893  __pyx_L0:;
8894  __Pyx_XGIVEREF(__pyx_r);
8895  __Pyx_RefNannyFinishContext();
8896  return __pyx_r;
8897  }
8898 
8899  /* "PyClical.pyx":793
8900  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8901  *
8902  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8903  * """
8904  * Geometric product.
8905  */
8906 
8907  /* Python wrapper */
8908  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8909  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 ";
8910  #if CYTHON_COMPILING_IN_CPYTHON
8911  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8912  #endif
8913  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8914  PyObject *__pyx_r = 0;
8915  __Pyx_RefNannyDeclarations
8916  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8917  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8918 
8919  /* function exit code */
8920  __Pyx_RefNannyFinishContext();
8921  return __pyx_r;
8922  }
8923 
8924  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8925  PyObject *__pyx_r = NULL;
8926  __Pyx_RefNannyDeclarations
8927  PyObject *__pyx_t_1 = NULL;
8928  int __pyx_lineno = 0;
8929  const char *__pyx_filename = NULL;
8930  int __pyx_clineno = 0;
8931  __Pyx_RefNannySetupContext("__imul__", 0);
8932 
8933  /* "PyClical.pyx":804
8934  * {2}
8935  * """
8936  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8937  *
8938  * def __mod__(lhs, rhs):
8939  */
8940  __Pyx_XDECREF(__pyx_r);
8941  __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, 804, __pyx_L1_error)
8942  __Pyx_GOTREF(__pyx_t_1);
8943  __pyx_r = __pyx_t_1;
8944  __pyx_t_1 = 0;
8945  goto __pyx_L0;
8946 
8947  /* "PyClical.pyx":793
8948  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8949  *
8950  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8951  * """
8952  * Geometric product.
8953  */
8954 
8955  /* function exit code */
8956  __pyx_L1_error:;
8957  __Pyx_XDECREF(__pyx_t_1);
8958  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8959  __pyx_r = NULL;
8960  __pyx_L0:;
8961  __Pyx_XGIVEREF(__pyx_r);
8962  __Pyx_RefNannyFinishContext();
8963  return __pyx_r;
8964  }
8965 
8966  /* "PyClical.pyx":806
8967  * return self.wrap( self.unwrap() * toClifford(rhs) )
8968  *
8969  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8970  * """
8971  * Contraction.
8972  */
8973 
8974  /* Python wrapper */
8975  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8976  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 ";
8977  #if CYTHON_COMPILING_IN_CPYTHON
8978  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8979  #endif
8980  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8981  PyObject *__pyx_r = 0;
8982  __Pyx_RefNannyDeclarations
8983  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8984  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8985 
8986  /* function exit code */
8987  __Pyx_RefNannyFinishContext();
8988  return __pyx_r;
8989  }
8990 
8991  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8992  PyObject *__pyx_r = NULL;
8993  __Pyx_RefNannyDeclarations
8994  PyObject *__pyx_t_1 = NULL;
8995  PyObject *__pyx_t_2 = NULL;
8996  int __pyx_lineno = 0;
8997  const char *__pyx_filename = NULL;
8998  int __pyx_clineno = 0;
8999  __Pyx_RefNannySetupContext("__mod__", 0);
9000 
9001  /* "PyClical.pyx":819
9002  * {2}
9003  * """
9004  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
9005  *
9006  * def __imod__(self, rhs):
9007  */
9008  __Pyx_XDECREF(__pyx_r);
9009  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
9010  __Pyx_GOTREF(__pyx_t_1);
9011  __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, 819, __pyx_L1_error)
9012  __Pyx_GOTREF(__pyx_t_2);
9013  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9014  __pyx_r = __pyx_t_2;
9015  __pyx_t_2 = 0;
9016  goto __pyx_L0;
9017 
9018  /* "PyClical.pyx":806
9019  * return self.wrap( self.unwrap() * toClifford(rhs) )
9020  *
9021  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
9022  * """
9023  * Contraction.
9024  */
9025 
9026  /* function exit code */
9027  __pyx_L1_error:;
9028  __Pyx_XDECREF(__pyx_t_1);
9029  __Pyx_XDECREF(__pyx_t_2);
9030  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9031  __pyx_r = NULL;
9032  __pyx_L0:;
9033  __Pyx_XGIVEREF(__pyx_r);
9034  __Pyx_RefNannyFinishContext();
9035  return __pyx_r;
9036  }
9037 
9038  /* "PyClical.pyx":821
9039  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
9040  *
9041  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
9042  * """
9043  * Contraction.
9044  */
9045 
9046  /* Python wrapper */
9047  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9048  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 ";
9049  #if CYTHON_COMPILING_IN_CPYTHON
9050  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
9051  #endif
9052  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9053  PyObject *__pyx_r = 0;
9054  __Pyx_RefNannyDeclarations
9055  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
9056  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9057 
9058  /* function exit code */
9059  __Pyx_RefNannyFinishContext();
9060  return __pyx_r;
9061  }
9062 
9063  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9064  PyObject *__pyx_r = NULL;
9065  __Pyx_RefNannyDeclarations
9066  PyObject *__pyx_t_1 = NULL;
9067  int __pyx_lineno = 0;
9068  const char *__pyx_filename = NULL;
9069  int __pyx_clineno = 0;
9070  __Pyx_RefNannySetupContext("__imod__", 0);
9071 
9072  /* "PyClical.pyx":834
9073  * {2}
9074  * """
9075  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
9076  *
9077  * def __and__(lhs, rhs):
9078  */
9079  __Pyx_XDECREF(__pyx_r);
9080  __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, 834, __pyx_L1_error)
9081  __Pyx_GOTREF(__pyx_t_1);
9082  __pyx_r = __pyx_t_1;
9083  __pyx_t_1 = 0;
9084  goto __pyx_L0;
9085 
9086  /* "PyClical.pyx":821
9087  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
9088  *
9089  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
9090  * """
9091  * Contraction.
9092  */
9093 
9094  /* function exit code */
9095  __pyx_L1_error:;
9096  __Pyx_XDECREF(__pyx_t_1);
9097  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9098  __pyx_r = NULL;
9099  __pyx_L0:;
9100  __Pyx_XGIVEREF(__pyx_r);
9101  __Pyx_RefNannyFinishContext();
9102  return __pyx_r;
9103  }
9104 
9105  /* "PyClical.pyx":836
9106  * return self.wrap( self.unwrap() % toClifford(rhs) )
9107  *
9108  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
9109  * """
9110  * Inner product.
9111  */
9112 
9113  /* Python wrapper */
9114  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9115  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 ";
9116  #if CYTHON_COMPILING_IN_CPYTHON
9117  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
9118  #endif
9119  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9120  PyObject *__pyx_r = 0;
9121  __Pyx_RefNannyDeclarations
9122  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
9123  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9124 
9125  /* function exit code */
9126  __Pyx_RefNannyFinishContext();
9127  return __pyx_r;
9128  }
9129 
9130  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9131  PyObject *__pyx_r = NULL;
9132  __Pyx_RefNannyDeclarations
9133  PyObject *__pyx_t_1 = NULL;
9134  PyObject *__pyx_t_2 = NULL;
9135  int __pyx_lineno = 0;
9136  const char *__pyx_filename = NULL;
9137  int __pyx_clineno = 0;
9138  __Pyx_RefNannySetupContext("__and__", 0);
9139 
9140  /* "PyClical.pyx":849
9141  * {2}
9142  * """
9143  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
9144  *
9145  * def __iand__(self, rhs):
9146  */
9147  __Pyx_XDECREF(__pyx_r);
9148  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error)
9149  __Pyx_GOTREF(__pyx_t_1);
9150  __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, 849, __pyx_L1_error)
9151  __Pyx_GOTREF(__pyx_t_2);
9152  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9153  __pyx_r = __pyx_t_2;
9154  __pyx_t_2 = 0;
9155  goto __pyx_L0;
9156 
9157  /* "PyClical.pyx":836
9158  * return self.wrap( self.unwrap() % toClifford(rhs) )
9159  *
9160  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
9161  * """
9162  * Inner product.
9163  */
9164 
9165  /* function exit code */
9166  __pyx_L1_error:;
9167  __Pyx_XDECREF(__pyx_t_1);
9168  __Pyx_XDECREF(__pyx_t_2);
9169  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9170  __pyx_r = NULL;
9171  __pyx_L0:;
9172  __Pyx_XGIVEREF(__pyx_r);
9173  __Pyx_RefNannyFinishContext();
9174  return __pyx_r;
9175  }
9176 
9177  /* "PyClical.pyx":851
9178  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
9179  *
9180  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
9181  * """
9182  * Inner product.
9183  */
9184 
9185  /* Python wrapper */
9186  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9187  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 ";
9188  #if CYTHON_COMPILING_IN_CPYTHON
9189  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
9190  #endif
9191  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9192  PyObject *__pyx_r = 0;
9193  __Pyx_RefNannyDeclarations
9194  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
9195  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9196 
9197  /* function exit code */
9198  __Pyx_RefNannyFinishContext();
9199  return __pyx_r;
9200  }
9201 
9202  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9203  PyObject *__pyx_r = NULL;
9204  __Pyx_RefNannyDeclarations
9205  PyObject *__pyx_t_1 = NULL;
9206  int __pyx_lineno = 0;
9207  const char *__pyx_filename = NULL;
9208  int __pyx_clineno = 0;
9209  __Pyx_RefNannySetupContext("__iand__", 0);
9210 
9211  /* "PyClical.pyx":864
9212  * {2}
9213  * """
9214  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
9215  *
9216  * def __xor__(lhs, rhs):
9217  */
9218  __Pyx_XDECREF(__pyx_r);
9219  __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, 864, __pyx_L1_error)
9220  __Pyx_GOTREF(__pyx_t_1);
9221  __pyx_r = __pyx_t_1;
9222  __pyx_t_1 = 0;
9223  goto __pyx_L0;
9224 
9225  /* "PyClical.pyx":851
9226  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
9227  *
9228  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
9229  * """
9230  * Inner product.
9231  */
9232 
9233  /* function exit code */
9234  __pyx_L1_error:;
9235  __Pyx_XDECREF(__pyx_t_1);
9236  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9237  __pyx_r = NULL;
9238  __pyx_L0:;
9239  __Pyx_XGIVEREF(__pyx_r);
9240  __Pyx_RefNannyFinishContext();
9241  return __pyx_r;
9242  }
9243 
9244  /* "PyClical.pyx":866
9245  * return self.wrap( self.unwrap() & toClifford(rhs) )
9246  *
9247  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
9248  * """
9249  * Outer product.
9250  */
9251 
9252  /* Python wrapper */
9253  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9254  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 ";
9255  #if CYTHON_COMPILING_IN_CPYTHON
9256  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
9257  #endif
9258  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9259  PyObject *__pyx_r = 0;
9260  __Pyx_RefNannyDeclarations
9261  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
9262  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9263 
9264  /* function exit code */
9265  __Pyx_RefNannyFinishContext();
9266  return __pyx_r;
9267  }
9268 
9269  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9270  PyObject *__pyx_r = NULL;
9271  __Pyx_RefNannyDeclarations
9272  PyObject *__pyx_t_1 = NULL;
9273  PyObject *__pyx_t_2 = NULL;
9274  int __pyx_lineno = 0;
9275  const char *__pyx_filename = NULL;
9276  int __pyx_clineno = 0;
9277  __Pyx_RefNannySetupContext("__xor__", 0);
9278 
9279  /* "PyClical.pyx":879
9280  * 0
9281  * """
9282  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9283  *
9284  * def __ixor__(self, rhs):
9285  */
9286  __Pyx_XDECREF(__pyx_r);
9287  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
9288  __Pyx_GOTREF(__pyx_t_1);
9289  __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, 879, __pyx_L1_error)
9290  __Pyx_GOTREF(__pyx_t_2);
9291  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9292  __pyx_r = __pyx_t_2;
9293  __pyx_t_2 = 0;
9294  goto __pyx_L0;
9295 
9296  /* "PyClical.pyx":866
9297  * return self.wrap( self.unwrap() & toClifford(rhs) )
9298  *
9299  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
9300  * """
9301  * Outer product.
9302  */
9303 
9304  /* function exit code */
9305  __pyx_L1_error:;
9306  __Pyx_XDECREF(__pyx_t_1);
9307  __Pyx_XDECREF(__pyx_t_2);
9308  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9309  __pyx_r = NULL;
9310  __pyx_L0:;
9311  __Pyx_XGIVEREF(__pyx_r);
9312  __Pyx_RefNannyFinishContext();
9313  return __pyx_r;
9314  }
9315 
9316  /* "PyClical.pyx":881
9317  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9318  *
9319  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9320  * """
9321  * Outer product.
9322  */
9323 
9324  /* Python wrapper */
9325  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9326  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 ";
9327  #if CYTHON_COMPILING_IN_CPYTHON
9328  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
9329  #endif
9330  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9331  PyObject *__pyx_r = 0;
9332  __Pyx_RefNannyDeclarations
9333  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
9334  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9335 
9336  /* function exit code */
9337  __Pyx_RefNannyFinishContext();
9338  return __pyx_r;
9339  }
9340 
9341  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9342  PyObject *__pyx_r = NULL;
9343  __Pyx_RefNannyDeclarations
9344  PyObject *__pyx_t_1 = NULL;
9345  int __pyx_lineno = 0;
9346  const char *__pyx_filename = NULL;
9347  int __pyx_clineno = 0;
9348  __Pyx_RefNannySetupContext("__ixor__", 0);
9349 
9350  /* "PyClical.pyx":894
9351  * 0
9352  * """
9353  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
9354  *
9355  * def __truediv__(lhs, rhs):
9356  */
9357  __Pyx_XDECREF(__pyx_r);
9358  __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, 894, __pyx_L1_error)
9359  __Pyx_GOTREF(__pyx_t_1);
9360  __pyx_r = __pyx_t_1;
9361  __pyx_t_1 = 0;
9362  goto __pyx_L0;
9363 
9364  /* "PyClical.pyx":881
9365  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
9366  *
9367  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
9368  * """
9369  * Outer product.
9370  */
9371 
9372  /* function exit code */
9373  __pyx_L1_error:;
9374  __Pyx_XDECREF(__pyx_t_1);
9375  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9376  __pyx_r = NULL;
9377  __pyx_L0:;
9378  __Pyx_XGIVEREF(__pyx_r);
9379  __Pyx_RefNannyFinishContext();
9380  return __pyx_r;
9381  }
9382 
9383  /* "PyClical.pyx":896
9384  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9385  *
9386  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9387  * """
9388  * Geometric quotient.
9389  */
9390 
9391  /* Python wrapper */
9392  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9393  static char __pyx_doc_8PyClical_8clifford_44__truediv__[] = "\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 ";
9394  #if CYTHON_COMPILING_IN_CPYTHON
9395  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
9396  #endif
9397  static PyObject *__pyx_pw_8PyClical_8clifford_45__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9398  PyObject *__pyx_r = 0;
9399  __Pyx_RefNannyDeclarations
9400  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
9401  __pyx_r = __pyx_pf_8PyClical_8clifford_44__truediv__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9402 
9403  /* function exit code */
9404  __Pyx_RefNannyFinishContext();
9405  return __pyx_r;
9406  }
9407 
9408  static PyObject *__pyx_pf_8PyClical_8clifford_44__truediv__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9409  PyObject *__pyx_r = NULL;
9410  __Pyx_RefNannyDeclarations
9411  PyObject *__pyx_t_1 = NULL;
9412  PyObject *__pyx_t_2 = NULL;
9413  int __pyx_lineno = 0;
9414  const char *__pyx_filename = NULL;
9415  int __pyx_clineno = 0;
9416  __Pyx_RefNannySetupContext("__truediv__", 0);
9417 
9418  /* "PyClical.pyx":909
9419  * -{2}
9420  * """
9421  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
9422  *
9423  * def __idiv__(self, rhs):
9424  */
9425  __Pyx_XDECREF(__pyx_r);
9426  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
9427  __Pyx_GOTREF(__pyx_t_1);
9428  __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, 909, __pyx_L1_error)
9429  __Pyx_GOTREF(__pyx_t_2);
9430  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9431  __pyx_r = __pyx_t_2;
9432  __pyx_t_2 = 0;
9433  goto __pyx_L0;
9434 
9435  /* "PyClical.pyx":896
9436  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
9437  *
9438  * def __truediv__(lhs, rhs): # <<<<<<<<<<<<<<
9439  * """
9440  * Geometric quotient.
9441  */
9442 
9443  /* function exit code */
9444  __pyx_L1_error:;
9445  __Pyx_XDECREF(__pyx_t_1);
9446  __Pyx_XDECREF(__pyx_t_2);
9447  __Pyx_AddTraceback("PyClical.clifford.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9448  __pyx_r = NULL;
9449  __pyx_L0:;
9450  __Pyx_XGIVEREF(__pyx_r);
9451  __Pyx_RefNannyFinishContext();
9452  return __pyx_r;
9453  }
9454 
9455  /* "PyClical.pyx":911
9456  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9457  *
9458  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9459  * """
9460  * Geometric quotient.
9461  */
9462 
9463  /* Python wrapper */
9464  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9465  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9466  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 ";
9467  #if CYTHON_COMPILING_IN_CPYTHON
9468  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
9469  #endif
9470  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9471  PyObject *__pyx_r = 0;
9472  __Pyx_RefNannyDeclarations
9473  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
9474  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9475 
9476  /* function exit code */
9477  __Pyx_RefNannyFinishContext();
9478  return __pyx_r;
9479  }
9480  #endif
9482  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9483  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9484  PyObject *__pyx_r = NULL;
9485  __Pyx_RefNannyDeclarations
9486  PyObject *__pyx_t_1 = NULL;
9487  int __pyx_lineno = 0;
9488  const char *__pyx_filename = NULL;
9489  int __pyx_clineno = 0;
9490  __Pyx_RefNannySetupContext("__idiv__", 0);
9491 
9492  /* "PyClical.pyx":924
9493  * -{2}
9494  * """
9495  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
9496  *
9497  * def inv(self):
9498  */
9499  __Pyx_XDECREF(__pyx_r);
9500  __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, 924, __pyx_L1_error)
9501  __Pyx_GOTREF(__pyx_t_1);
9502  __pyx_r = __pyx_t_1;
9503  __pyx_t_1 = 0;
9504  goto __pyx_L0;
9505 
9506  /* "PyClical.pyx":911
9507  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9508  *
9509  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9510  * """
9511  * Geometric quotient.
9512  */
9513 
9514  /* function exit code */
9515  __pyx_L1_error:;
9516  __Pyx_XDECREF(__pyx_t_1);
9517  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9518  __pyx_r = NULL;
9519  __pyx_L0:;
9520  __Pyx_XGIVEREF(__pyx_r);
9521  __Pyx_RefNannyFinishContext();
9522  return __pyx_r;
9523  }
9524  #endif
9526  /* "PyClical.pyx":926
9527  * return self.wrap( self.unwrap() / toClifford(rhs) )
9528  *
9529  * def inv(self): # <<<<<<<<<<<<<<
9530  * """
9531  * Geometric multiplicative inverse.
9532  */
9533 
9534  /* Python wrapper */
9535  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9536  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 ";
9537  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9538  PyObject *__pyx_r = 0;
9539  __Pyx_RefNannyDeclarations
9540  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9541  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9542 
9543  /* function exit code */
9544  __Pyx_RefNannyFinishContext();
9545  return __pyx_r;
9546  }
9547 
9548  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9549  PyObject *__pyx_r = NULL;
9550  __Pyx_RefNannyDeclarations
9551  PyObject *__pyx_t_1 = NULL;
9552  PyObject *__pyx_t_2 = NULL;
9553  int __pyx_lineno = 0;
9554  const char *__pyx_filename = NULL;
9555  int __pyx_clineno = 0;
9556  __Pyx_RefNannySetupContext("inv", 0);
9557 
9558  /* "PyClical.pyx":937
9559  * -{1,2}
9560  * """
9561  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9562  *
9563  * def __or__(lhs, rhs):
9564  */
9565  __Pyx_XDECREF(__pyx_r);
9566  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
9567  __Pyx_GOTREF(__pyx_t_1);
9568  __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, 937, __pyx_L1_error)
9569  __Pyx_GOTREF(__pyx_t_2);
9570  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9571  __pyx_r = __pyx_t_2;
9572  __pyx_t_2 = 0;
9573  goto __pyx_L0;
9574 
9575  /* "PyClical.pyx":926
9576  * return self.wrap( self.unwrap() / toClifford(rhs) )
9577  *
9578  * def inv(self): # <<<<<<<<<<<<<<
9579  * """
9580  * Geometric multiplicative inverse.
9581  */
9582 
9583  /* function exit code */
9584  __pyx_L1_error:;
9585  __Pyx_XDECREF(__pyx_t_1);
9586  __Pyx_XDECREF(__pyx_t_2);
9587  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9588  __pyx_r = NULL;
9589  __pyx_L0:;
9590  __Pyx_XGIVEREF(__pyx_r);
9591  __Pyx_RefNannyFinishContext();
9592  return __pyx_r;
9593  }
9594 
9595  /* "PyClical.pyx":939
9596  * return clifford().wrap( self.instance.inv() )
9597  *
9598  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9599  * """
9600  * Transform left hand side, using right hand side as a transformation.
9601  */
9602 
9603  /* Python wrapper */
9604  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9605  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 ";
9606  #if CYTHON_COMPILING_IN_CPYTHON
9607  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9608  #endif
9609  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9610  PyObject *__pyx_r = 0;
9611  __Pyx_RefNannyDeclarations
9612  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9613  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9614 
9615  /* function exit code */
9616  __Pyx_RefNannyFinishContext();
9617  return __pyx_r;
9618  }
9619 
9620  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9621  PyObject *__pyx_r = NULL;
9622  __Pyx_RefNannyDeclarations
9623  PyObject *__pyx_t_1 = NULL;
9624  PyObject *__pyx_t_2 = NULL;
9625  int __pyx_lineno = 0;
9626  const char *__pyx_filename = NULL;
9627  int __pyx_clineno = 0;
9628  __Pyx_RefNannySetupContext("__or__", 0);
9629 
9630  /* "PyClical.pyx":948
9631  * -{1}
9632  * """
9633  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9634  *
9635  * def __ior__(self, rhs):
9636  */
9637  __Pyx_XDECREF(__pyx_r);
9638  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
9639  __Pyx_GOTREF(__pyx_t_1);
9640  __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, 948, __pyx_L1_error)
9641  __Pyx_GOTREF(__pyx_t_2);
9642  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9643  __pyx_r = __pyx_t_2;
9644  __pyx_t_2 = 0;
9645  goto __pyx_L0;
9646 
9647  /* "PyClical.pyx":939
9648  * return clifford().wrap( self.instance.inv() )
9649  *
9650  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9651  * """
9652  * Transform left hand side, using right hand side as a transformation.
9653  */
9654 
9655  /* function exit code */
9656  __pyx_L1_error:;
9657  __Pyx_XDECREF(__pyx_t_1);
9658  __Pyx_XDECREF(__pyx_t_2);
9659  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9660  __pyx_r = NULL;
9661  __pyx_L0:;
9662  __Pyx_XGIVEREF(__pyx_r);
9663  __Pyx_RefNannyFinishContext();
9664  return __pyx_r;
9665  }
9666 
9667  /* "PyClical.pyx":950
9668  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9669  *
9670  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9671  * """
9672  * Transform left hand side, using right hand side as a transformation.
9673  */
9674 
9675  /* Python wrapper */
9676  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9677  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 ";
9678  #if CYTHON_COMPILING_IN_CPYTHON
9679  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9680  #endif
9681  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9682  PyObject *__pyx_r = 0;
9683  __Pyx_RefNannyDeclarations
9684  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9685  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9686 
9687  /* function exit code */
9688  __Pyx_RefNannyFinishContext();
9689  return __pyx_r;
9690  }
9691 
9692  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9693  PyObject *__pyx_r = NULL;
9694  __Pyx_RefNannyDeclarations
9695  PyObject *__pyx_t_1 = NULL;
9696  int __pyx_lineno = 0;
9697  const char *__pyx_filename = NULL;
9698  int __pyx_clineno = 0;
9699  __Pyx_RefNannySetupContext("__ior__", 0);
9700 
9701  /* "PyClical.pyx":959
9702  * -{1}
9703  * """
9704  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9705  *
9706  * def __pow__(self, m, dummy):
9707  */
9708  __Pyx_XDECREF(__pyx_r);
9709  __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, 959, __pyx_L1_error)
9710  __Pyx_GOTREF(__pyx_t_1);
9711  __pyx_r = __pyx_t_1;
9712  __pyx_t_1 = 0;
9713  goto __pyx_L0;
9714 
9715  /* "PyClical.pyx":950
9716  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9717  *
9718  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9719  * """
9720  * Transform left hand side, using right hand side as a transformation.
9721  */
9722 
9723  /* function exit code */
9724  __pyx_L1_error:;
9725  __Pyx_XDECREF(__pyx_t_1);
9726  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9727  __pyx_r = NULL;
9728  __pyx_L0:;
9729  __Pyx_XGIVEREF(__pyx_r);
9730  __Pyx_RefNannyFinishContext();
9731  return __pyx_r;
9732  }
9733 
9734  /* "PyClical.pyx":961
9735  * return self.wrap( self.unwrap() | toClifford(rhs) )
9736  *
9737  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9738  * """
9739  * Power: self to the m.
9740  */
9741 
9742  /* Python wrapper */
9743  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9744  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 ";
9745  #if CYTHON_COMPILING_IN_CPYTHON
9746  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9747  #endif
9748  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9749  PyObject *__pyx_r = 0;
9750  __Pyx_RefNannyDeclarations
9751  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9752  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9753 
9754  /* function exit code */
9755  __Pyx_RefNannyFinishContext();
9756  return __pyx_r;
9757  }
9758 
9759  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9760  PyObject *__pyx_r = NULL;
9761  __Pyx_RefNannyDeclarations
9762  PyObject *__pyx_t_1 = NULL;
9763  int __pyx_lineno = 0;
9764  const char *__pyx_filename = NULL;
9765  int __pyx_clineno = 0;
9766  __Pyx_RefNannySetupContext("__pow__", 0);
9767 
9768  /* "PyClical.pyx":978
9769  * 1
9770  * """
9771  * return pow(self, m) # <<<<<<<<<<<<<<
9772  *
9773  * def pow(self, m):
9774  */
9775  __Pyx_XDECREF(__pyx_r);
9776  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_self, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
9777  __Pyx_GOTREF(__pyx_t_1);
9778  __pyx_r = __pyx_t_1;
9779  __pyx_t_1 = 0;
9780  goto __pyx_L0;
9781 
9782  /* "PyClical.pyx":961
9783  * return self.wrap( self.unwrap() | toClifford(rhs) )
9784  *
9785  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9786  * """
9787  * Power: self to the m.
9788  */
9789 
9790  /* function exit code */
9791  __pyx_L1_error:;
9792  __Pyx_XDECREF(__pyx_t_1);
9793  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9794  __pyx_r = NULL;
9795  __pyx_L0:;
9796  __Pyx_XGIVEREF(__pyx_r);
9797  __Pyx_RefNannyFinishContext();
9798  return __pyx_r;
9799  }
9800 
9801  /* "PyClical.pyx":980
9802  * return pow(self, m)
9803  *
9804  * def pow(self, m): # <<<<<<<<<<<<<<
9805  * """
9806  * Power: self to the m.
9807  */
9808 
9809  /* Python wrapper */
9810  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9811  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 ";
9812  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9813  PyObject *__pyx_r = 0;
9814  __Pyx_RefNannyDeclarations
9815  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9816  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9817 
9818  /* function exit code */
9819  __Pyx_RefNannyFinishContext();
9820  return __pyx_r;
9821  }
9822 
9823  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9824  PyObject *__pyx_r = NULL;
9825  __Pyx_RefNannyDeclarations
9826  PyObject *__pyx_t_1 = NULL;
9827  PyObject *__pyx_t_2 = NULL;
9828  int __pyx_t_3;
9829  int __pyx_t_4;
9830  int __pyx_t_5;
9831  int __pyx_lineno = 0;
9832  const char *__pyx_filename = NULL;
9833  int __pyx_clineno = 0;
9834  __Pyx_RefNannySetupContext("pow", 0);
9835 
9836  /* "PyClical.pyx":999
9837  * 1
9838  * """
9839  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9840  * return clifford().wrap( self.instance.pow(m) )
9841  * else:
9842  */
9843  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
9844  __Pyx_GOTREF(__pyx_t_1);
9845  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Integral); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9846  __Pyx_GOTREF(__pyx_t_2);
9847  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9848  __pyx_t_3 = PyObject_IsInstance(__pyx_v_m, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 999, __pyx_L1_error)
9849  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9850  __pyx_t_4 = (__pyx_t_3 != 0);
9851  if (__pyx_t_4) {
9852 
9853  /* "PyClical.pyx":1000
9854  * """
9855  * if isinstance(m, numbers.Integral):
9856  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9857  * else:
9858  * return exp(m * log(self))
9859  */
9860  __Pyx_XDECREF(__pyx_r);
9861  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
9862  __Pyx_GOTREF(__pyx_t_2);
9863  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error)
9864  __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, 1000, __pyx_L1_error)
9865  __Pyx_GOTREF(__pyx_t_1);
9866  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9867  __pyx_r = __pyx_t_1;
9868  __pyx_t_1 = 0;
9869  goto __pyx_L0;
9870 
9871  /* "PyClical.pyx":999
9872  * 1
9873  * """
9874  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9875  * return clifford().wrap( self.instance.pow(m) )
9876  * else:
9877  */
9878  }
9879 
9880  /* "PyClical.pyx":1002
9881  * return clifford().wrap( self.instance.pow(m) )
9882  * else:
9883  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9884  *
9885  * def outer_pow(self, m):
9886  */
9887  /*else*/ {
9888  __Pyx_XDECREF(__pyx_r);
9889  __pyx_t_1 = __pyx_f_8PyClical_log(((PyObject *)__pyx_v_self), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
9890  __Pyx_GOTREF(__pyx_t_1);
9891  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
9892  __Pyx_GOTREF(__pyx_t_2);
9893  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9894  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
9895  __Pyx_GOTREF(__pyx_t_1);
9896  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9897  __pyx_r = __pyx_t_1;
9898  __pyx_t_1 = 0;
9899  goto __pyx_L0;
9900  }
9901 
9902  /* "PyClical.pyx":980
9903  * return pow(self, m)
9904  *
9905  * def pow(self, m): # <<<<<<<<<<<<<<
9906  * """
9907  * Power: self to the m.
9908  */
9909 
9910  /* function exit code */
9911  __pyx_L1_error:;
9912  __Pyx_XDECREF(__pyx_t_1);
9913  __Pyx_XDECREF(__pyx_t_2);
9914  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9915  __pyx_r = NULL;
9916  __pyx_L0:;
9917  __Pyx_XGIVEREF(__pyx_r);
9918  __Pyx_RefNannyFinishContext();
9919  return __pyx_r;
9920  }
9921 
9922  /* "PyClical.pyx":1004
9923  * return exp(m * log(self))
9924  *
9925  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9926  * """
9927  * Outer product power.
9928  */
9929 
9930  /* Python wrapper */
9931  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9932  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 ";
9933  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9934  PyObject *__pyx_r = 0;
9935  __Pyx_RefNannyDeclarations
9936  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9937  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9938 
9939  /* function exit code */
9940  __Pyx_RefNannyFinishContext();
9941  return __pyx_r;
9942  }
9943 
9944  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9945  PyObject *__pyx_r = NULL;
9946  __Pyx_RefNannyDeclarations
9947  PyObject *__pyx_t_1 = NULL;
9948  int __pyx_t_2;
9949  PyObject *__pyx_t_3 = NULL;
9950  int __pyx_lineno = 0;
9951  const char *__pyx_filename = NULL;
9952  int __pyx_clineno = 0;
9953  __Pyx_RefNannySetupContext("outer_pow", 0);
9954 
9955  /* "PyClical.pyx":1018
9956  *
9957  * """
9958  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9959  *
9960  * def __call__(self, grade):
9961  */
9962  __Pyx_XDECREF(__pyx_r);
9963  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
9964  __Pyx_GOTREF(__pyx_t_1);
9965  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
9966  __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, 1018, __pyx_L1_error)
9967  __Pyx_GOTREF(__pyx_t_3);
9968  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9969  __pyx_r = __pyx_t_3;
9970  __pyx_t_3 = 0;
9971  goto __pyx_L0;
9972 
9973  /* "PyClical.pyx":1004
9974  * return exp(m * log(self))
9975  *
9976  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9977  * """
9978  * Outer product power.
9979  */
9980 
9981  /* function exit code */
9982  __pyx_L1_error:;
9983  __Pyx_XDECREF(__pyx_t_1);
9984  __Pyx_XDECREF(__pyx_t_3);
9985  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9986  __pyx_r = NULL;
9987  __pyx_L0:;
9988  __Pyx_XGIVEREF(__pyx_r);
9989  __Pyx_RefNannyFinishContext();
9990  return __pyx_r;
9991  }
9992 
9993  /* "PyClical.pyx":1020
9994  * return clifford().wrap( self.instance.outer_pow(m) )
9995  *
9996  * def __call__(self, grade): # <<<<<<<<<<<<<<
9997  * """
9998  * Pure grade-vector part.
9999  */
10000 
10001  /* Python wrapper */
10002  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10003  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 ";
10004  #if CYTHON_COMPILING_IN_CPYTHON
10005  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
10006  #endif
10007  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10008  PyObject *__pyx_v_grade = 0;
10009  int __pyx_lineno = 0;
10010  const char *__pyx_filename = NULL;
10011  int __pyx_clineno = 0;
10012  PyObject *__pyx_r = 0;
10013  __Pyx_RefNannyDeclarations
10014  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
10015  {
10016  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
10017  PyObject* values[1] = {0};
10018  if (unlikely(__pyx_kwds)) {
10019  Py_ssize_t kw_args;
10020  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10021  switch (pos_args) {
10022  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10023  CYTHON_FALLTHROUGH;
10024  case 0: break;
10025  default: goto __pyx_L5_argtuple_error;
10026  }
10027  kw_args = PyDict_Size(__pyx_kwds);
10028  switch (pos_args) {
10029  case 0:
10030  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
10031  else goto __pyx_L5_argtuple_error;
10032  }
10033  if (unlikely(kw_args > 0)) {
10034  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1020, __pyx_L3_error)
10035  }
10036  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
10037  goto __pyx_L5_argtuple_error;
10038  } else {
10039  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10040  }
10041  __pyx_v_grade = values[0];
10042  }
10043  goto __pyx_L4_argument_unpacking_done;
10044  __pyx_L5_argtuple_error:;
10045  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1020, __pyx_L3_error)
10046  __pyx_L3_error:;
10047  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10048  __Pyx_RefNannyFinishContext();
10049  return NULL;
10050  __pyx_L4_argument_unpacking_done:;
10051  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
10052 
10053  /* function exit code */
10054  __Pyx_RefNannyFinishContext();
10055  return __pyx_r;
10056  }
10057 
10058  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
10059  PyObject *__pyx_r = NULL;
10060  __Pyx_RefNannyDeclarations
10061  PyObject *__pyx_t_1 = NULL;
10062  int __pyx_t_2;
10063  PyObject *__pyx_t_3 = NULL;
10064  int __pyx_lineno = 0;
10065  const char *__pyx_filename = NULL;
10066  int __pyx_clineno = 0;
10067  __Pyx_RefNannySetupContext("__call__", 0);
10068 
10069  /* "PyClical.pyx":1037
10070  * 0
10071  * """
10072  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
10073  *
10074  * def scalar(self):
10075  */
10076  __Pyx_XDECREF(__pyx_r);
10077  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
10078  __Pyx_GOTREF(__pyx_t_1);
10079  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_grade); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
10080  __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, 1037, __pyx_L1_error)
10081  __Pyx_GOTREF(__pyx_t_3);
10082  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10083  __pyx_r = __pyx_t_3;
10084  __pyx_t_3 = 0;
10085  goto __pyx_L0;
10086 
10087  /* "PyClical.pyx":1020
10088  * return clifford().wrap( self.instance.outer_pow(m) )
10089  *
10090  * def __call__(self, grade): # <<<<<<<<<<<<<<
10091  * """
10092  * Pure grade-vector part.
10093  */
10094 
10095  /* function exit code */
10096  __pyx_L1_error:;
10097  __Pyx_XDECREF(__pyx_t_1);
10098  __Pyx_XDECREF(__pyx_t_3);
10099  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10100  __pyx_r = NULL;
10101  __pyx_L0:;
10102  __Pyx_XGIVEREF(__pyx_r);
10103  __Pyx_RefNannyFinishContext();
10104  return __pyx_r;
10105  }
10106 
10107  /* "PyClical.pyx":1039
10108  * return clifford().wrap( self.instance.call(grade) )
10109  *
10110  * def scalar(self): # <<<<<<<<<<<<<<
10111  * """
10112  * Scalar part.
10113  */
10114 
10115  /* Python wrapper */
10116  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10117  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 ";
10118  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10119  PyObject *__pyx_r = 0;
10120  __Pyx_RefNannyDeclarations
10121  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
10122  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10123 
10124  /* function exit code */
10125  __Pyx_RefNannyFinishContext();
10126  return __pyx_r;
10127  }
10128 
10129  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10130  PyObject *__pyx_r = NULL;
10131  __Pyx_RefNannyDeclarations
10132  PyObject *__pyx_t_1 = NULL;
10133  int __pyx_lineno = 0;
10134  const char *__pyx_filename = NULL;
10135  int __pyx_clineno = 0;
10136  __Pyx_RefNannySetupContext("scalar", 0);
10137 
10138  /* "PyClical.pyx":1048
10139  * 0.0
10140  * """
10141  * return self.instance.scalar() # <<<<<<<<<<<<<<
10142  *
10143  * def pure(self):
10144  */
10145  __Pyx_XDECREF(__pyx_r);
10146  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error)
10147  __Pyx_GOTREF(__pyx_t_1);
10148  __pyx_r = __pyx_t_1;
10149  __pyx_t_1 = 0;
10150  goto __pyx_L0;
10151 
10152  /* "PyClical.pyx":1039
10153  * return clifford().wrap( self.instance.call(grade) )
10154  *
10155  * def scalar(self): # <<<<<<<<<<<<<<
10156  * """
10157  * Scalar part.
10158  */
10159 
10160  /* function exit code */
10161  __pyx_L1_error:;
10162  __Pyx_XDECREF(__pyx_t_1);
10163  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10164  __pyx_r = NULL;
10165  __pyx_L0:;
10166  __Pyx_XGIVEREF(__pyx_r);
10167  __Pyx_RefNannyFinishContext();
10168  return __pyx_r;
10169  }
10170 
10171  /* "PyClical.pyx":1050
10172  * return self.instance.scalar()
10173  *
10174  * def pure(self): # <<<<<<<<<<<<<<
10175  * """
10176  * Pure part.
10177  */
10178 
10179  /* Python wrapper */
10180  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10181  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 ";
10182  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10183  PyObject *__pyx_r = 0;
10184  __Pyx_RefNannyDeclarations
10185  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
10186  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10187 
10188  /* function exit code */
10189  __Pyx_RefNannyFinishContext();
10190  return __pyx_r;
10191  }
10192 
10193  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10194  PyObject *__pyx_r = NULL;
10195  __Pyx_RefNannyDeclarations
10196  PyObject *__pyx_t_1 = NULL;
10197  PyObject *__pyx_t_2 = NULL;
10198  int __pyx_lineno = 0;
10199  const char *__pyx_filename = NULL;
10200  int __pyx_clineno = 0;
10201  __Pyx_RefNannySetupContext("pure", 0);
10202 
10203  /* "PyClical.pyx":1059
10204  * {1,2}
10205  * """
10206  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
10207  *
10208  * def even(self):
10209  */
10210  __Pyx_XDECREF(__pyx_r);
10211  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error)
10212  __Pyx_GOTREF(__pyx_t_1);
10213  __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, 1059, __pyx_L1_error)
10214  __Pyx_GOTREF(__pyx_t_2);
10215  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10216  __pyx_r = __pyx_t_2;
10217  __pyx_t_2 = 0;
10218  goto __pyx_L0;
10219 
10220  /* "PyClical.pyx":1050
10221  * return self.instance.scalar()
10222  *
10223  * def pure(self): # <<<<<<<<<<<<<<
10224  * """
10225  * Pure part.
10226  */
10227 
10228  /* function exit code */
10229  __pyx_L1_error:;
10230  __Pyx_XDECREF(__pyx_t_1);
10231  __Pyx_XDECREF(__pyx_t_2);
10232  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10233  __pyx_r = NULL;
10234  __pyx_L0:;
10235  __Pyx_XGIVEREF(__pyx_r);
10236  __Pyx_RefNannyFinishContext();
10237  return __pyx_r;
10238  }
10239 
10240  /* "PyClical.pyx":1061
10241  * return clifford().wrap( self.instance.pure() )
10242  *
10243  * def even(self): # <<<<<<<<<<<<<<
10244  * """
10245  * Even part of multivector, sum of even grade terms.
10246  */
10247 
10248  /* Python wrapper */
10249  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10250  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 ";
10251  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10252  PyObject *__pyx_r = 0;
10253  __Pyx_RefNannyDeclarations
10254  __Pyx_RefNannySetupContext("even (wrapper)", 0);
10255  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10256 
10257  /* function exit code */
10258  __Pyx_RefNannyFinishContext();
10259  return __pyx_r;
10260  }
10261 
10262  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10263  PyObject *__pyx_r = NULL;
10264  __Pyx_RefNannyDeclarations
10265  PyObject *__pyx_t_1 = NULL;
10266  PyObject *__pyx_t_2 = NULL;
10267  int __pyx_lineno = 0;
10268  const char *__pyx_filename = NULL;
10269  int __pyx_clineno = 0;
10270  __Pyx_RefNannySetupContext("even", 0);
10271 
10272  /* "PyClical.pyx":1068
10273  * 1+{1,2}
10274  * """
10275  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
10276  *
10277  * def odd(self):
10278  */
10279  __Pyx_XDECREF(__pyx_r);
10280  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
10281  __Pyx_GOTREF(__pyx_t_1);
10282  __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, 1068, __pyx_L1_error)
10283  __Pyx_GOTREF(__pyx_t_2);
10284  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10285  __pyx_r = __pyx_t_2;
10286  __pyx_t_2 = 0;
10287  goto __pyx_L0;
10288 
10289  /* "PyClical.pyx":1061
10290  * return clifford().wrap( self.instance.pure() )
10291  *
10292  * def even(self): # <<<<<<<<<<<<<<
10293  * """
10294  * Even part of multivector, sum of even grade terms.
10295  */
10296 
10297  /* function exit code */
10298  __pyx_L1_error:;
10299  __Pyx_XDECREF(__pyx_t_1);
10300  __Pyx_XDECREF(__pyx_t_2);
10301  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10302  __pyx_r = NULL;
10303  __pyx_L0:;
10304  __Pyx_XGIVEREF(__pyx_r);
10305  __Pyx_RefNannyFinishContext();
10306  return __pyx_r;
10307  }
10308 
10309  /* "PyClical.pyx":1070
10310  * return clifford().wrap( self.instance.even() )
10311  *
10312  * def odd(self): # <<<<<<<<<<<<<<
10313  * """
10314  * Odd part of multivector, sum of odd grade terms.
10315  */
10316 
10317  /* Python wrapper */
10318  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10319  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 ";
10320  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10321  PyObject *__pyx_r = 0;
10322  __Pyx_RefNannyDeclarations
10323  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
10324  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10325 
10326  /* function exit code */
10327  __Pyx_RefNannyFinishContext();
10328  return __pyx_r;
10329  }
10330 
10331  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10332  PyObject *__pyx_r = NULL;
10333  __Pyx_RefNannyDeclarations
10334  PyObject *__pyx_t_1 = NULL;
10335  PyObject *__pyx_t_2 = NULL;
10336  int __pyx_lineno = 0;
10337  const char *__pyx_filename = NULL;
10338  int __pyx_clineno = 0;
10339  __Pyx_RefNannySetupContext("odd", 0);
10340 
10341  /* "PyClical.pyx":1077
10342  * {1}
10343  * """
10344  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
10345  *
10346  * def vector_part(self, frm = None):
10347  */
10348  __Pyx_XDECREF(__pyx_r);
10349  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
10350  __Pyx_GOTREF(__pyx_t_1);
10351  __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, 1077, __pyx_L1_error)
10352  __Pyx_GOTREF(__pyx_t_2);
10353  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10354  __pyx_r = __pyx_t_2;
10355  __pyx_t_2 = 0;
10356  goto __pyx_L0;
10357 
10358  /* "PyClical.pyx":1070
10359  * return clifford().wrap( self.instance.even() )
10360  *
10361  * def odd(self): # <<<<<<<<<<<<<<
10362  * """
10363  * Odd part of multivector, sum of odd grade terms.
10364  */
10365 
10366  /* function exit code */
10367  __pyx_L1_error:;
10368  __Pyx_XDECREF(__pyx_t_1);
10369  __Pyx_XDECREF(__pyx_t_2);
10370  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
10371  __pyx_r = NULL;
10372  __pyx_L0:;
10373  __Pyx_XGIVEREF(__pyx_r);
10374  __Pyx_RefNannyFinishContext();
10375  return __pyx_r;
10376  }
10377 
10378  /* "PyClical.pyx":1079
10379  * return clifford().wrap( self.instance.odd() )
10380  *
10381  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10382  * """
10383  * Vector part of multivector, as a Python list, with respect to frm.
10384  */
10385 
10386  /* Python wrapper */
10387  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10388  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 ";
10389  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10390  PyObject *__pyx_v_frm = 0;
10391  int __pyx_lineno = 0;
10392  const char *__pyx_filename = NULL;
10393  int __pyx_clineno = 0;
10394  PyObject *__pyx_r = 0;
10395  __Pyx_RefNannyDeclarations
10396  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
10397  {
10398  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
10399  PyObject* values[1] = {0};
10400  values[0] = ((PyObject *)Py_None);
10401  if (unlikely(__pyx_kwds)) {
10402  Py_ssize_t kw_args;
10403  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
10404  switch (pos_args) {
10405  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10406  CYTHON_FALLTHROUGH;
10407  case 0: break;
10408  default: goto __pyx_L5_argtuple_error;
10409  }
10410  kw_args = PyDict_Size(__pyx_kwds);
10411  switch (pos_args) {
10412  case 0:
10413  if (kw_args > 0) {
10414  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
10415  if (value) { values[0] = value; kw_args--; }
10416  }
10417  }
10418  if (unlikely(kw_args > 0)) {
10419  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1079, __pyx_L3_error)
10420  }
10421  } else {
10422  switch (PyTuple_GET_SIZE(__pyx_args)) {
10423  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10424  CYTHON_FALLTHROUGH;
10425  case 0: break;
10426  default: goto __pyx_L5_argtuple_error;
10427  }
10428  }
10429  __pyx_v_frm = values[0];
10430  }
10431  goto __pyx_L4_argument_unpacking_done;
10432  __pyx_L5_argtuple_error:;
10433  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1079, __pyx_L3_error)
10434  __pyx_L3_error:;
10435  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10436  __Pyx_RefNannyFinishContext();
10437  return NULL;
10438  __pyx_L4_argument_unpacking_done:;
10439  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
10440 
10441  /* function exit code */
10442  __Pyx_RefNannyFinishContext();
10443  return __pyx_r;
10444  }
10445 
10446  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
10447  PyObject *__pyx_v_error_msg_prefix = NULL;
10448  std::vector<scalar_t> __pyx_v_vec;
10449  int __pyx_v_n;
10450  int __pyx_v_i;
10451  PyObject *__pyx_v_lst = NULL;
10452  PyObject *__pyx_v_err = NULL;
10453  PyObject *__pyx_r = NULL;
10454  __Pyx_RefNannyDeclarations
10455  PyObject *__pyx_t_1 = NULL;
10456  PyObject *__pyx_t_2 = NULL;
10457  PyObject *__pyx_t_3 = NULL;
10458  int __pyx_t_4;
10459  int __pyx_t_5;
10460  std::vector<scalar_t> __pyx_t_6;
10461  PyObject *__pyx_t_7 = NULL;
10462  int __pyx_t_8;
10463  int __pyx_t_9;
10464  int __pyx_t_10;
10465  PyObject *__pyx_t_11 = NULL;
10466  PyObject *__pyx_t_12 = NULL;
10467  PyObject *__pyx_t_13 = NULL;
10468  PyObject *__pyx_t_14 = NULL;
10469  PyObject *__pyx_t_15 = NULL;
10470  char const *__pyx_t_16;
10471  PyObject *__pyx_t_17 = NULL;
10472  PyObject *__pyx_t_18 = NULL;
10473  PyObject *__pyx_t_19 = NULL;
10474  PyObject *__pyx_t_20 = NULL;
10475  PyObject *__pyx_t_21 = NULL;
10476  PyObject *__pyx_t_22 = NULL;
10477  int __pyx_lineno = 0;
10478  const char *__pyx_filename = NULL;
10479  int __pyx_clineno = 0;
10480  __Pyx_RefNannySetupContext("vector_part", 0);
10481 
10482  /* "PyClical.pyx":1088
10483  * [0.0, 2.0, 3.0]
10484  * """
10485  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
10486  * cdef vector[scalar_t] vec
10487  * cdef int n
10488  */
10489  __Pyx_INCREF(__pyx_kp_u_Cannot_take_vector_part_of);
10490  __pyx_v_error_msg_prefix = __pyx_kp_u_Cannot_take_vector_part_of;
10491 
10492  /* "PyClical.pyx":1092
10493  * cdef int n
10494  * cdef int i
10495  * try: # <<<<<<<<<<<<<<
10496  * if frm is None:
10497  * vec = self.instance.vector_part()
10498  */
10499  {
10500  __Pyx_PyThreadState_declare
10501  __Pyx_PyThreadState_assign
10502  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10503  __Pyx_XGOTREF(__pyx_t_1);
10504  __Pyx_XGOTREF(__pyx_t_2);
10505  __Pyx_XGOTREF(__pyx_t_3);
10506  /*try:*/ {
10507 
10508  /* "PyClical.pyx":1093
10509  * cdef int i
10510  * try:
10511  * if frm is None: # <<<<<<<<<<<<<<
10512  * vec = self.instance.vector_part()
10513  * else:
10514  */
10515  __pyx_t_4 = (__pyx_v_frm == Py_None);
10516  __pyx_t_5 = (__pyx_t_4 != 0);
10517  if (__pyx_t_5) {
10518 
10519  /* "PyClical.pyx":1094
10520  * try:
10521  * if frm is None:
10522  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
10523  * else:
10524  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10525  */
10526  __pyx_t_6 = __pyx_v_self->instance->vector_part();
10527  __pyx_v_vec = __pyx_t_6;
10528 
10529  /* "PyClical.pyx":1093
10530  * cdef int i
10531  * try:
10532  * if frm is None: # <<<<<<<<<<<<<<
10533  * vec = self.instance.vector_part()
10534  * else:
10535  */
10536  goto __pyx_L9;
10537  }
10538 
10539  /* "PyClical.pyx":1096
10540  * vec = self.instance.vector_part()
10541  * else:
10542  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
10543  * n = vec.size()
10544  * lst = [0.0]*n
10545  */
10546  /*else*/ {
10547  try {
10548  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10549  } catch(...) {
10550  __Pyx_CppExn2PyErr();
10551  __PYX_ERR(0, 1096, __pyx_L3_error)
10552  }
10553  __pyx_v_vec = __pyx_t_6;
10554  }
10555  __pyx_L9:;
10556 
10557  /* "PyClical.pyx":1097
10558  * else:
10559  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10560  * n = vec.size() # <<<<<<<<<<<<<<
10561  * lst = [0.0]*n
10562  * for i in xrange(n):
10563  */
10564  __pyx_v_n = __pyx_v_vec.size();
10565 
10566  /* "PyClical.pyx":1098
10567  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10568  * n = vec.size()
10569  * lst = [0.0]*n # <<<<<<<<<<<<<<
10570  * for i in xrange(n):
10571  * lst[i] = vec[i]
10572  */
10573  __pyx_t_7 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1098, __pyx_L3_error)
10574  __Pyx_GOTREF(__pyx_t_7);
10575  { Py_ssize_t __pyx_temp;
10576  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10577  __Pyx_INCREF(__pyx_float_0_0);
10578  __Pyx_GIVEREF(__pyx_float_0_0);
10579  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10580  }
10581  }
10582  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10583  __pyx_t_7 = 0;
10584 
10585  /* "PyClical.pyx":1099
10586  * n = vec.size()
10587  * lst = [0.0]*n
10588  * for i in xrange(n): # <<<<<<<<<<<<<<
10589  * lst[i] = vec[i]
10590  * return lst
10591  */
10592  __pyx_t_8 = __pyx_v_n;
10593  __pyx_t_9 = __pyx_t_8;
10594  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10595  __pyx_v_i = __pyx_t_10;
10596 
10597  /* "PyClical.pyx":1100
10598  * lst = [0.0]*n
10599  * for i in xrange(n):
10600  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10601  * return lst
10602  * except RuntimeError as err:
10603  */
10604  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L3_error)
10605  __Pyx_GOTREF(__pyx_t_7);
10606  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, 1100, __pyx_L3_error)
10607  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10608  }
10609 
10610  /* "PyClical.pyx":1101
10611  * for i in xrange(n):
10612  * lst[i] = vec[i]
10613  * return lst # <<<<<<<<<<<<<<
10614  * except RuntimeError as err:
10615  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10616  */
10617  __Pyx_XDECREF(__pyx_r);
10618  __Pyx_INCREF(__pyx_v_lst);
10619  __pyx_r = __pyx_v_lst;
10620  goto __pyx_L7_try_return;
10621 
10622  /* "PyClical.pyx":1092
10623  * cdef int n
10624  * cdef int i
10625  * try: # <<<<<<<<<<<<<<
10626  * if frm is None:
10627  * vec = self.instance.vector_part()
10628  */
10629  }
10630  __pyx_L3_error:;
10631  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10632 
10633  /* "PyClical.pyx":1102
10634  * lst[i] = vec[i]
10635  * return lst
10636  * except RuntimeError as err: # <<<<<<<<<<<<<<
10637  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10638  * + repr(frm) + " as frame:\n\t"
10639  */
10640  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10641  if (__pyx_t_8) {
10642  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10643  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10644  __Pyx_GOTREF(__pyx_t_7);
10645  __Pyx_GOTREF(__pyx_t_11);
10646  __Pyx_GOTREF(__pyx_t_12);
10647  __Pyx_INCREF(__pyx_t_11);
10648  __pyx_v_err = __pyx_t_11;
10649  /*try:*/ {
10650 
10651  /* "PyClical.pyx":1103
10652  * return lst
10653  * except RuntimeError as err:
10654  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10655  * + repr(frm) + " as frame:\n\t"
10656  * + str(err))
10657  */
10658  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1103, __pyx_L17_error)
10659  __Pyx_GOTREF(__pyx_t_13);
10660  __pyx_t_14 = __Pyx_PyUnicode_Concat(__pyx_v_error_msg_prefix, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L17_error)
10661  __Pyx_GOTREF(__pyx_t_14);
10662  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10663  __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_t_14, __pyx_kp_u_using_invalid); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1103, __pyx_L17_error)
10664  __Pyx_GOTREF(__pyx_t_13);
10665  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10666 
10667  /* "PyClical.pyx":1104
10668  * except RuntimeError as err:
10669  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10670  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10671  * + str(err))
10672  *
10673  */
10674  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L17_error)
10675  __Pyx_GOTREF(__pyx_t_14);
10676  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1104, __pyx_L17_error)
10677  __Pyx_GOTREF(__pyx_t_15);
10678  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10679  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10680  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_u_as_frame); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L17_error)
10681  __Pyx_GOTREF(__pyx_t_14);
10682  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10683 
10684  /* "PyClical.pyx":1105
10685  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10686  * + repr(frm) + " as frame:\n\t"
10687  * + str(err)) # <<<<<<<<<<<<<<
10688  *
10689  * def involute(self):
10690  */
10691  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_err); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1105, __pyx_L17_error)
10692  __Pyx_GOTREF(__pyx_t_15);
10693  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1105, __pyx_L17_error)
10694  __Pyx_GOTREF(__pyx_t_13);
10695  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10696  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10697 
10698  /* "PyClical.pyx":1103
10699  * return lst
10700  * except RuntimeError as err:
10701  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10702  * + repr(frm) + " as frame:\n\t"
10703  * + str(err))
10704  */
10705  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L17_error)
10706  __Pyx_GOTREF(__pyx_t_15);
10707  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10708  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10709  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10710  __PYX_ERR(0, 1103, __pyx_L17_error)
10711  }
10712 
10713  /* "PyClical.pyx":1102
10714  * lst[i] = vec[i]
10715  * return lst
10716  * except RuntimeError as err: # <<<<<<<<<<<<<<
10717  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10718  * + repr(frm) + " as frame:\n\t"
10719  */
10720  /*finally:*/ {
10721  __pyx_L17_error:;
10722  /*exception exit:*/{
10723  __Pyx_PyThreadState_declare
10724  __Pyx_PyThreadState_assign
10725  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10726  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
10727  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
10728  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
10729  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
10730  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
10731  __Pyx_XGOTREF(__pyx_t_17);
10732  __Pyx_XGOTREF(__pyx_t_18);
10733  __Pyx_XGOTREF(__pyx_t_19);
10734  __Pyx_XGOTREF(__pyx_t_20);
10735  __Pyx_XGOTREF(__pyx_t_21);
10736  __Pyx_XGOTREF(__pyx_t_22);
10737  __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
10738  {
10739  __Pyx_DECREF(__pyx_v_err);
10740  __pyx_v_err = NULL;
10741  }
10742  if (PY_MAJOR_VERSION >= 3) {
10743  __Pyx_XGIVEREF(__pyx_t_20);
10744  __Pyx_XGIVEREF(__pyx_t_21);
10745  __Pyx_XGIVEREF(__pyx_t_22);
10746  __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
10747  }
10748  __Pyx_XGIVEREF(__pyx_t_17);
10749  __Pyx_XGIVEREF(__pyx_t_18);
10750  __Pyx_XGIVEREF(__pyx_t_19);
10751  __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
10752  __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
10753  __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_16;
10754  goto __pyx_L5_except_error;
10755  }
10756  }
10757  }
10758  goto __pyx_L5_except_error;
10759  __pyx_L5_except_error:;
10760 
10761  /* "PyClical.pyx":1092
10762  * cdef int n
10763  * cdef int i
10764  * try: # <<<<<<<<<<<<<<
10765  * if frm is None:
10766  * vec = self.instance.vector_part()
10767  */
10768  __Pyx_XGIVEREF(__pyx_t_1);
10769  __Pyx_XGIVEREF(__pyx_t_2);
10770  __Pyx_XGIVEREF(__pyx_t_3);
10771  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10772  goto __pyx_L1_error;
10773  __pyx_L7_try_return:;
10774  __Pyx_XGIVEREF(__pyx_t_1);
10775  __Pyx_XGIVEREF(__pyx_t_2);
10776  __Pyx_XGIVEREF(__pyx_t_3);
10777  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10778  goto __pyx_L0;
10779  }
10780 
10781  /* "PyClical.pyx":1079
10782  * return clifford().wrap( self.instance.odd() )
10783  *
10784  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10785  * """
10786  * Vector part of multivector, as a Python list, with respect to frm.
10787  */
10788 
10789  /* function exit code */
10790  __pyx_L1_error:;
10791  __Pyx_XDECREF(__pyx_t_7);
10792  __Pyx_XDECREF(__pyx_t_11);
10793  __Pyx_XDECREF(__pyx_t_12);
10794  __Pyx_XDECREF(__pyx_t_13);
10795  __Pyx_XDECREF(__pyx_t_14);
10796  __Pyx_XDECREF(__pyx_t_15);
10797  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10798  __pyx_r = NULL;
10799  __pyx_L0:;
10800  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10801  __Pyx_XDECREF(__pyx_v_lst);
10802  __Pyx_XDECREF(__pyx_v_err);
10803  __Pyx_XGIVEREF(__pyx_r);
10804  __Pyx_RefNannyFinishContext();
10805  return __pyx_r;
10806  }
10807 
10808  /* "PyClical.pyx":1107
10809  * + str(err))
10810  *
10811  * def involute(self): # <<<<<<<<<<<<<<
10812  * """
10813  * Main involution, each {i} is replaced by -{i} in each term,
10814  */
10815 
10816  /* Python wrapper */
10817  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10818  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 ";
10819  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10820  PyObject *__pyx_r = 0;
10821  __Pyx_RefNannyDeclarations
10822  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10823  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10824 
10825  /* function exit code */
10826  __Pyx_RefNannyFinishContext();
10827  return __pyx_r;
10828  }
10829 
10830  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10831  PyObject *__pyx_r = NULL;
10832  __Pyx_RefNannyDeclarations
10833  PyObject *__pyx_t_1 = NULL;
10834  PyObject *__pyx_t_2 = NULL;
10835  int __pyx_lineno = 0;
10836  const char *__pyx_filename = NULL;
10837  int __pyx_clineno = 0;
10838  __Pyx_RefNannySetupContext("involute", 0);
10839 
10840  /* "PyClical.pyx":1121
10841  * 1-{1}+{1,2}
10842  * """
10843  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10844  *
10845  * def reverse(self):
10846  */
10847  __Pyx_XDECREF(__pyx_r);
10848  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
10849  __Pyx_GOTREF(__pyx_t_1);
10850  __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, 1121, __pyx_L1_error)
10851  __Pyx_GOTREF(__pyx_t_2);
10852  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10853  __pyx_r = __pyx_t_2;
10854  __pyx_t_2 = 0;
10855  goto __pyx_L0;
10856 
10857  /* "PyClical.pyx":1107
10858  * + str(err))
10859  *
10860  * def involute(self): # <<<<<<<<<<<<<<
10861  * """
10862  * Main involution, each {i} is replaced by -{i} in each term,
10863  */
10864 
10865  /* function exit code */
10866  __pyx_L1_error:;
10867  __Pyx_XDECREF(__pyx_t_1);
10868  __Pyx_XDECREF(__pyx_t_2);
10869  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10870  __pyx_r = NULL;
10871  __pyx_L0:;
10872  __Pyx_XGIVEREF(__pyx_r);
10873  __Pyx_RefNannyFinishContext();
10874  return __pyx_r;
10875  }
10876 
10877  /* "PyClical.pyx":1123
10878  * return clifford().wrap( self.instance.involute() )
10879  *
10880  * def reverse(self): # <<<<<<<<<<<<<<
10881  * """
10882  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10883  */
10884 
10885  /* Python wrapper */
10886  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10887  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 ";
10888  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10889  PyObject *__pyx_r = 0;
10890  __Pyx_RefNannyDeclarations
10891  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10892  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10893 
10894  /* function exit code */
10895  __Pyx_RefNannyFinishContext();
10896  return __pyx_r;
10897  }
10898 
10899  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10900  PyObject *__pyx_r = NULL;
10901  __Pyx_RefNannyDeclarations
10902  PyObject *__pyx_t_1 = NULL;
10903  PyObject *__pyx_t_2 = NULL;
10904  int __pyx_lineno = 0;
10905  const char *__pyx_filename = NULL;
10906  int __pyx_clineno = 0;
10907  __Pyx_RefNannySetupContext("reverse", 0);
10908 
10909  /* "PyClical.pyx":1136
10910  * 1+{1}-{1,2}
10911  * """
10912  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10913  *
10914  * def conj(self):
10915  */
10916  __Pyx_XDECREF(__pyx_r);
10917  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
10918  __Pyx_GOTREF(__pyx_t_1);
10919  __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, 1136, __pyx_L1_error)
10920  __Pyx_GOTREF(__pyx_t_2);
10921  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10922  __pyx_r = __pyx_t_2;
10923  __pyx_t_2 = 0;
10924  goto __pyx_L0;
10925 
10926  /* "PyClical.pyx":1123
10927  * return clifford().wrap( self.instance.involute() )
10928  *
10929  * def reverse(self): # <<<<<<<<<<<<<<
10930  * """
10931  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10932  */
10933 
10934  /* function exit code */
10935  __pyx_L1_error:;
10936  __Pyx_XDECREF(__pyx_t_1);
10937  __Pyx_XDECREF(__pyx_t_2);
10938  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10939  __pyx_r = NULL;
10940  __pyx_L0:;
10941  __Pyx_XGIVEREF(__pyx_r);
10942  __Pyx_RefNannyFinishContext();
10943  return __pyx_r;
10944  }
10945 
10946  /* "PyClical.pyx":1138
10947  * return clifford().wrap( self.instance.reverse() )
10948  *
10949  * def conj(self): # <<<<<<<<<<<<<<
10950  * """
10951  * Conjugation, reverse o involute == involute o reverse.
10952  */
10953 
10954  /* Python wrapper */
10955  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10956  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 ";
10957  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10958  PyObject *__pyx_r = 0;
10959  __Pyx_RefNannyDeclarations
10960  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10961  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10962 
10963  /* function exit code */
10964  __Pyx_RefNannyFinishContext();
10965  return __pyx_r;
10966  }
10967 
10968  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10969  PyObject *__pyx_r = NULL;
10970  __Pyx_RefNannyDeclarations
10971  PyObject *__pyx_t_1 = NULL;
10972  PyObject *__pyx_t_2 = NULL;
10973  int __pyx_lineno = 0;
10974  const char *__pyx_filename = NULL;
10975  int __pyx_clineno = 0;
10976  __Pyx_RefNannySetupContext("conj", 0);
10977 
10978  /* "PyClical.pyx":1151
10979  * 1-{1}-{1,2}
10980  * """
10981  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10982  *
10983  * def quad(self):
10984  */
10985  __Pyx_XDECREF(__pyx_r);
10986  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
10987  __Pyx_GOTREF(__pyx_t_1);
10988  __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, 1151, __pyx_L1_error)
10989  __Pyx_GOTREF(__pyx_t_2);
10990  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10991  __pyx_r = __pyx_t_2;
10992  __pyx_t_2 = 0;
10993  goto __pyx_L0;
10994 
10995  /* "PyClical.pyx":1138
10996  * return clifford().wrap( self.instance.reverse() )
10997  *
10998  * def conj(self): # <<<<<<<<<<<<<<
10999  * """
11000  * Conjugation, reverse o involute == involute o reverse.
11001  */
11002 
11003  /* function exit code */
11004  __pyx_L1_error:;
11005  __Pyx_XDECREF(__pyx_t_1);
11006  __Pyx_XDECREF(__pyx_t_2);
11007  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11008  __pyx_r = NULL;
11009  __pyx_L0:;
11010  __Pyx_XGIVEREF(__pyx_r);
11011  __Pyx_RefNannyFinishContext();
11012  return __pyx_r;
11013  }
11014 
11015  /* "PyClical.pyx":1153
11016  * return clifford().wrap( self.instance.conj() )
11017  *
11018  * def quad(self): # <<<<<<<<<<<<<<
11019  * """
11020  * Quadratic form == (rev(x)*x)(0).
11021  */
11022 
11023  /* Python wrapper */
11024  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11025  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 ";
11026  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11027  PyObject *__pyx_r = 0;
11028  __Pyx_RefNannyDeclarations
11029  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
11030  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11031 
11032  /* function exit code */
11033  __Pyx_RefNannyFinishContext();
11034  return __pyx_r;
11035  }
11036 
11037  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11038  PyObject *__pyx_r = NULL;
11039  __Pyx_RefNannyDeclarations
11040  PyObject *__pyx_t_1 = NULL;
11041  int __pyx_lineno = 0;
11042  const char *__pyx_filename = NULL;
11043  int __pyx_clineno = 0;
11044  __Pyx_RefNannySetupContext("quad", 0);
11045 
11046  /* "PyClical.pyx":1162
11047  * 2.0
11048  * """
11049  * return self.instance.quad() # <<<<<<<<<<<<<<
11050  *
11051  * def norm(self):
11052  */
11053  __Pyx_XDECREF(__pyx_r);
11054  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error)
11055  __Pyx_GOTREF(__pyx_t_1);
11056  __pyx_r = __pyx_t_1;
11057  __pyx_t_1 = 0;
11058  goto __pyx_L0;
11059 
11060  /* "PyClical.pyx":1153
11061  * return clifford().wrap( self.instance.conj() )
11062  *
11063  * def quad(self): # <<<<<<<<<<<<<<
11064  * """
11065  * Quadratic form == (rev(x)*x)(0).
11066  */
11067 
11068  /* function exit code */
11069  __pyx_L1_error:;
11070  __Pyx_XDECREF(__pyx_t_1);
11071  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
11072  __pyx_r = NULL;
11073  __pyx_L0:;
11074  __Pyx_XGIVEREF(__pyx_r);
11075  __Pyx_RefNannyFinishContext();
11076  return __pyx_r;
11077  }
11078 
11079  /* "PyClical.pyx":1164
11080  * return self.instance.quad()
11081  *
11082  * def norm(self): # <<<<<<<<<<<<<<
11083  * """
11084  * Norm == sum of squares of coordinates.
11085  */
11086 
11087  /* Python wrapper */
11088  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11089  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 ";
11090  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11091  PyObject *__pyx_r = 0;
11092  __Pyx_RefNannyDeclarations
11093  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
11094  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11095 
11096  /* function exit code */
11097  __Pyx_RefNannyFinishContext();
11098  return __pyx_r;
11099  }
11100 
11101  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11102  PyObject *__pyx_r = NULL;
11103  __Pyx_RefNannyDeclarations
11104  PyObject *__pyx_t_1 = NULL;
11105  int __pyx_lineno = 0;
11106  const char *__pyx_filename = NULL;
11107  int __pyx_clineno = 0;
11108  __Pyx_RefNannySetupContext("norm", 0);
11109 
11110  /* "PyClical.pyx":1173
11111  * 4.0
11112  * """
11113  * return self.instance.norm() # <<<<<<<<<<<<<<
11114  *
11115  * def abs(self):
11116  */
11117  __Pyx_XDECREF(__pyx_r);
11118  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
11119  __Pyx_GOTREF(__pyx_t_1);
11120  __pyx_r = __pyx_t_1;
11121  __pyx_t_1 = 0;
11122  goto __pyx_L0;
11123 
11124  /* "PyClical.pyx":1164
11125  * return self.instance.quad()
11126  *
11127  * def norm(self): # <<<<<<<<<<<<<<
11128  * """
11129  * Norm == sum of squares of coordinates.
11130  */
11131 
11132  /* function exit code */
11133  __pyx_L1_error:;
11134  __Pyx_XDECREF(__pyx_t_1);
11135  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
11136  __pyx_r = NULL;
11137  __pyx_L0:;
11138  __Pyx_XGIVEREF(__pyx_r);
11139  __Pyx_RefNannyFinishContext();
11140  return __pyx_r;
11141  }
11142 
11143  /* "PyClical.pyx":1175
11144  * return self.instance.norm()
11145  *
11146  * def abs(self): # <<<<<<<<<<<<<<
11147  * """
11148  * Absolute value: square root of norm.
11149  */
11150 
11151  /* Python wrapper */
11152  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11153  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 ";
11154  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11155  PyObject *__pyx_r = 0;
11156  __Pyx_RefNannyDeclarations
11157  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
11158  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11159 
11160  /* function exit code */
11161  __Pyx_RefNannyFinishContext();
11162  return __pyx_r;
11163  }
11164 
11165  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11166  PyObject *__pyx_r = NULL;
11167  __Pyx_RefNannyDeclarations
11168  PyObject *__pyx_t_1 = NULL;
11169  int __pyx_lineno = 0;
11170  const char *__pyx_filename = NULL;
11171  int __pyx_clineno = 0;
11172  __Pyx_RefNannySetupContext("abs", 0);
11173 
11174  /* "PyClical.pyx":1182
11175  * 2.0
11176  * """
11177  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
11178  *
11179  * def max_abs(self):
11180  */
11181  __Pyx_XDECREF(__pyx_r);
11182  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
11183  __Pyx_GOTREF(__pyx_t_1);
11184  __pyx_r = __pyx_t_1;
11185  __pyx_t_1 = 0;
11186  goto __pyx_L0;
11187 
11188  /* "PyClical.pyx":1175
11189  * return self.instance.norm()
11190  *
11191  * def abs(self): # <<<<<<<<<<<<<<
11192  * """
11193  * Absolute value: square root of norm.
11194  */
11195 
11196  /* function exit code */
11197  __pyx_L1_error:;
11198  __Pyx_XDECREF(__pyx_t_1);
11199  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11200  __pyx_r = NULL;
11201  __pyx_L0:;
11202  __Pyx_XGIVEREF(__pyx_r);
11203  __Pyx_RefNannyFinishContext();
11204  return __pyx_r;
11205  }
11206 
11207  /* "PyClical.pyx":1184
11208  * return glucat.abs( self.unwrap() )
11209  *
11210  * def max_abs(self): # <<<<<<<<<<<<<<
11211  * """
11212  * Maximum of absolute values of components of multivector: multivector infinity norm.
11213  */
11214 
11215  /* Python wrapper */
11216  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11217  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 ";
11218  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11219  PyObject *__pyx_r = 0;
11220  __Pyx_RefNannyDeclarations
11221  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
11222  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11223 
11224  /* function exit code */
11225  __Pyx_RefNannyFinishContext();
11226  return __pyx_r;
11227  }
11228 
11229  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11230  PyObject *__pyx_r = NULL;
11231  __Pyx_RefNannyDeclarations
11232  PyObject *__pyx_t_1 = NULL;
11233  int __pyx_lineno = 0;
11234  const char *__pyx_filename = NULL;
11235  int __pyx_clineno = 0;
11236  __Pyx_RefNannySetupContext("max_abs", 0);
11237 
11238  /* "PyClical.pyx":1193
11239  * 3.0
11240  * """
11241  * return self.instance.max_abs() # <<<<<<<<<<<<<<
11242  *
11243  * def truncated(self, limit):
11244  */
11245  __Pyx_XDECREF(__pyx_r);
11246  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error)
11247  __Pyx_GOTREF(__pyx_t_1);
11248  __pyx_r = __pyx_t_1;
11249  __pyx_t_1 = 0;
11250  goto __pyx_L0;
11251 
11252  /* "PyClical.pyx":1184
11253  * return glucat.abs( self.unwrap() )
11254  *
11255  * def max_abs(self): # <<<<<<<<<<<<<<
11256  * """
11257  * Maximum of absolute values of components of multivector: multivector infinity norm.
11258  */
11259 
11260  /* function exit code */
11261  __pyx_L1_error:;
11262  __Pyx_XDECREF(__pyx_t_1);
11263  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11264  __pyx_r = NULL;
11265  __pyx_L0:;
11266  __Pyx_XGIVEREF(__pyx_r);
11267  __Pyx_RefNannyFinishContext();
11268  return __pyx_r;
11269  }
11270 
11271  /* "PyClical.pyx":1195
11272  * return self.instance.max_abs()
11273  *
11274  * def truncated(self, limit): # <<<<<<<<<<<<<<
11275  * """
11276  * Remove all terms of self with relative size smaller than limit.
11277  */
11278 
11279  /* Python wrapper */
11280  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
11281  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 ";
11282  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
11283  PyObject *__pyx_r = 0;
11284  __Pyx_RefNannyDeclarations
11285  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
11286  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
11287 
11288  /* function exit code */
11289  __Pyx_RefNannyFinishContext();
11290  return __pyx_r;
11291  }
11292 
11293  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
11294  PyObject *__pyx_r = NULL;
11295  __Pyx_RefNannyDeclarations
11296  PyObject *__pyx_t_1 = NULL;
11297  scalar_t __pyx_t_2;
11298  PyObject *__pyx_t_3 = NULL;
11299  int __pyx_lineno = 0;
11300  const char *__pyx_filename = NULL;
11301  int __pyx_clineno = 0;
11302  __Pyx_RefNannySetupContext("truncated", 0);
11303 
11304  /* "PyClical.pyx":1204
11305  * clifford("10000+{1}")
11306  * """
11307  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
11308  *
11309  * def isinf(self):
11310  */
11311  __Pyx_XDECREF(__pyx_r);
11312  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error)
11313  __Pyx_GOTREF(__pyx_t_1);
11314  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_limit); if (unlikely((__pyx_t_2 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L1_error)
11315  __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, 1204, __pyx_L1_error)
11316  __Pyx_GOTREF(__pyx_t_3);
11317  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11318  __pyx_r = __pyx_t_3;
11319  __pyx_t_3 = 0;
11320  goto __pyx_L0;
11321 
11322  /* "PyClical.pyx":1195
11323  * return self.instance.max_abs()
11324  *
11325  * def truncated(self, limit): # <<<<<<<<<<<<<<
11326  * """
11327  * Remove all terms of self with relative size smaller than limit.
11328  */
11329 
11330  /* function exit code */
11331  __pyx_L1_error:;
11332  __Pyx_XDECREF(__pyx_t_1);
11333  __Pyx_XDECREF(__pyx_t_3);
11334  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
11335  __pyx_r = NULL;
11336  __pyx_L0:;
11337  __Pyx_XGIVEREF(__pyx_r);
11338  __Pyx_RefNannyFinishContext();
11339  return __pyx_r;
11340  }
11341 
11342  /* "PyClical.pyx":1206
11343  * return clifford().wrap( self.instance.truncated(limit) )
11344  *
11345  * def isinf(self): # <<<<<<<<<<<<<<
11346  * """
11347  * Check if a multivector contains any infinite values.
11348  */
11349 
11350  /* Python wrapper */
11351  static PyObject *__pyx_pw_8PyClical_8clifford_89isinf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11352  static char __pyx_doc_8PyClical_8clifford_88isinf[] = "\n Check if a multivector contains any infinite values.\n\n >>> clifford().isinf()\n False\n ";
11353  static PyObject *__pyx_pw_8PyClical_8clifford_89isinf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11354  PyObject *__pyx_r = 0;
11355  __Pyx_RefNannyDeclarations
11356  __Pyx_RefNannySetupContext("isinf (wrapper)", 0);
11357  __pyx_r = __pyx_pf_8PyClical_8clifford_88isinf(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11358 
11359  /* function exit code */
11360  __Pyx_RefNannyFinishContext();
11361  return __pyx_r;
11362  }
11363 
11364  static PyObject *__pyx_pf_8PyClical_8clifford_88isinf(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11365  PyObject *__pyx_r = NULL;
11366  __Pyx_RefNannyDeclarations
11367  PyObject *__pyx_t_1 = NULL;
11368  int __pyx_lineno = 0;
11369  const char *__pyx_filename = NULL;
11370  int __pyx_clineno = 0;
11371  __Pyx_RefNannySetupContext("isinf", 0);
11372 
11373  /* "PyClical.pyx":1213
11374  * False
11375  * """
11376  * return self.instance.isnan() # <<<<<<<<<<<<<<
11377  *
11378  * def isnan(self):
11379  */
11380  __Pyx_XDECREF(__pyx_r);
11381  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error)
11382  __Pyx_GOTREF(__pyx_t_1);
11383  __pyx_r = __pyx_t_1;
11384  __pyx_t_1 = 0;
11385  goto __pyx_L0;
11386 
11387  /* "PyClical.pyx":1206
11388  * return clifford().wrap( self.instance.truncated(limit) )
11389  *
11390  * def isinf(self): # <<<<<<<<<<<<<<
11391  * """
11392  * Check if a multivector contains any infinite values.
11393  */
11394 
11395  /* function exit code */
11396  __pyx_L1_error:;
11397  __Pyx_XDECREF(__pyx_t_1);
11398  __Pyx_AddTraceback("PyClical.clifford.isinf", __pyx_clineno, __pyx_lineno, __pyx_filename);
11399  __pyx_r = NULL;
11400  __pyx_L0:;
11401  __Pyx_XGIVEREF(__pyx_r);
11402  __Pyx_RefNannyFinishContext();
11403  return __pyx_r;
11404  }
11405 
11406  /* "PyClical.pyx":1215
11407  * return self.instance.isnan()
11408  *
11409  * def isnan(self): # <<<<<<<<<<<<<<
11410  * """
11411  * Check if a multivector contains any IEEE NaN values.
11412  */
11413 
11414  /* Python wrapper */
11415  static PyObject *__pyx_pw_8PyClical_8clifford_91isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11416  static char __pyx_doc_8PyClical_8clifford_90isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
11417  static PyObject *__pyx_pw_8PyClical_8clifford_91isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11418  PyObject *__pyx_r = 0;
11419  __Pyx_RefNannyDeclarations
11420  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
11421  __pyx_r = __pyx_pf_8PyClical_8clifford_90isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11422 
11423  /* function exit code */
11424  __Pyx_RefNannyFinishContext();
11425  return __pyx_r;
11426  }
11427 
11428  static PyObject *__pyx_pf_8PyClical_8clifford_90isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11429  PyObject *__pyx_r = NULL;
11430  __Pyx_RefNannyDeclarations
11431  PyObject *__pyx_t_1 = NULL;
11432  int __pyx_lineno = 0;
11433  const char *__pyx_filename = NULL;
11434  int __pyx_clineno = 0;
11435  __Pyx_RefNannySetupContext("isnan", 0);
11436 
11437  /* "PyClical.pyx":1222
11438  * False
11439  * """
11440  * return self.instance.isnan() # <<<<<<<<<<<<<<
11441  *
11442  * def frame(self):
11443  */
11444  __Pyx_XDECREF(__pyx_r);
11445  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error)
11446  __Pyx_GOTREF(__pyx_t_1);
11447  __pyx_r = __pyx_t_1;
11448  __pyx_t_1 = 0;
11449  goto __pyx_L0;
11450 
11451  /* "PyClical.pyx":1215
11452  * return self.instance.isnan()
11453  *
11454  * def isnan(self): # <<<<<<<<<<<<<<
11455  * """
11456  * Check if a multivector contains any IEEE NaN values.
11457  */
11458 
11459  /* function exit code */
11460  __pyx_L1_error:;
11461  __Pyx_XDECREF(__pyx_t_1);
11462  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
11463  __pyx_r = NULL;
11464  __pyx_L0:;
11465  __Pyx_XGIVEREF(__pyx_r);
11466  __Pyx_RefNannyFinishContext();
11467  return __pyx_r;
11468  }
11469 
11470  /* "PyClical.pyx":1224
11471  * return self.instance.isnan()
11472  *
11473  * def frame(self): # <<<<<<<<<<<<<<
11474  * """
11475  * Subalgebra generated by all generators of terms of given multivector.
11476  */
11477 
11478  /* Python wrapper */
11479  static PyObject *__pyx_pw_8PyClical_8clifford_93frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11480  static char __pyx_doc_8PyClical_8clifford_92frame[] = "\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 <class 'PyClical.index_set'>\n ";
11481  static PyObject *__pyx_pw_8PyClical_8clifford_93frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11482  PyObject *__pyx_r = 0;
11483  __Pyx_RefNannyDeclarations
11484  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
11485  __pyx_r = __pyx_pf_8PyClical_8clifford_92frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11486 
11487  /* function exit code */
11488  __Pyx_RefNannyFinishContext();
11489  return __pyx_r;
11490  }
11491 
11492  static PyObject *__pyx_pf_8PyClical_8clifford_92frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11493  PyObject *__pyx_r = NULL;
11494  __Pyx_RefNannyDeclarations
11495  PyObject *__pyx_t_1 = NULL;
11496  PyObject *__pyx_t_2 = NULL;
11497  int __pyx_lineno = 0;
11498  const char *__pyx_filename = NULL;
11499  int __pyx_clineno = 0;
11500  __Pyx_RefNannySetupContext("frame", 0);
11501 
11502  /* "PyClical.pyx":1233
11503  * <class 'PyClical.index_set'>
11504  * """
11505  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
11506  *
11507  * def __repr__(self):
11508  */
11509  __Pyx_XDECREF(__pyx_r);
11510  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
11511  __Pyx_GOTREF(__pyx_t_1);
11512  __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, 1233, __pyx_L1_error)
11513  __Pyx_GOTREF(__pyx_t_2);
11514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11515  __pyx_r = __pyx_t_2;
11516  __pyx_t_2 = 0;
11517  goto __pyx_L0;
11518 
11519  /* "PyClical.pyx":1224
11520  * return self.instance.isnan()
11521  *
11522  * def frame(self): # <<<<<<<<<<<<<<
11523  * """
11524  * Subalgebra generated by all generators of terms of given multivector.
11525  */
11526 
11527  /* function exit code */
11528  __pyx_L1_error:;
11529  __Pyx_XDECREF(__pyx_t_1);
11530  __Pyx_XDECREF(__pyx_t_2);
11531  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
11532  __pyx_r = NULL;
11533  __pyx_L0:;
11534  __Pyx_XGIVEREF(__pyx_r);
11535  __Pyx_RefNannyFinishContext();
11536  return __pyx_r;
11537  }
11538 
11539  /* "PyClical.pyx":1235
11540  * return index_set().wrap( self.instance.frame() )
11541  *
11542  * def __repr__(self): # <<<<<<<<<<<<<<
11543  * """
11544  * The official string representation of self.
11545  */
11546 
11547  /* Python wrapper */
11548  static PyObject *__pyx_pw_8PyClical_8clifford_95__repr__(PyObject *__pyx_v_self); /*proto*/
11549  static char __pyx_doc_8PyClical_8clifford_94__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 ";
11550  #if CYTHON_COMPILING_IN_CPYTHON
11551  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__repr__;
11552  #endif
11553  static PyObject *__pyx_pw_8PyClical_8clifford_95__repr__(PyObject *__pyx_v_self) {
11554  PyObject *__pyx_r = 0;
11555  __Pyx_RefNannyDeclarations
11556  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
11557  __pyx_r = __pyx_pf_8PyClical_8clifford_94__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11558 
11559  /* function exit code */
11560  __Pyx_RefNannyFinishContext();
11561  return __pyx_r;
11562  }
11563 
11564  static PyObject *__pyx_pf_8PyClical_8clifford_94__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11565  PyObject *__pyx_r = NULL;
11566  __Pyx_RefNannyDeclarations
11567  PyObject *__pyx_t_1 = NULL;
11568  int __pyx_lineno = 0;
11569  const char *__pyx_filename = NULL;
11570  int __pyx_clineno = 0;
11571  __Pyx_RefNannySetupContext("__repr__", 0);
11572 
11573  /* "PyClical.pyx":1242
11574  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
11575  * """
11576  * return clifford_to_repr( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11577  *
11578  * def __str__(self):
11579  */
11580  __Pyx_XDECREF(__pyx_r);
11581  __pyx_t_1 = __Pyx_decode_cpp_string(clifford_to_repr(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1242, __pyx_L1_error)
11582  __Pyx_GOTREF(__pyx_t_1);
11583  __pyx_r = __pyx_t_1;
11584  __pyx_t_1 = 0;
11585  goto __pyx_L0;
11586 
11587  /* "PyClical.pyx":1235
11588  * return index_set().wrap( self.instance.frame() )
11589  *
11590  * def __repr__(self): # <<<<<<<<<<<<<<
11591  * """
11592  * The official string representation of self.
11593  */
11594 
11595  /* function exit code */
11596  __pyx_L1_error:;
11597  __Pyx_XDECREF(__pyx_t_1);
11598  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11599  __pyx_r = NULL;
11600  __pyx_L0:;
11601  __Pyx_XGIVEREF(__pyx_r);
11602  __Pyx_RefNannyFinishContext();
11603  return __pyx_r;
11604  }
11605 
11606  /* "PyClical.pyx":1244
11607  * return clifford_to_repr( self.unwrap() ).decode()
11608  *
11609  * def __str__(self): # <<<<<<<<<<<<<<
11610  * """
11611  * The informal string representation of self.
11612  */
11613 
11614  /* Python wrapper */
11615  static PyObject *__pyx_pw_8PyClical_8clifford_97__str__(PyObject *__pyx_v_self); /*proto*/
11616  static char __pyx_doc_8PyClical_8clifford_96__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 ";
11617  #if CYTHON_COMPILING_IN_CPYTHON
11618  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_96__str__;
11619  #endif
11620  static PyObject *__pyx_pw_8PyClical_8clifford_97__str__(PyObject *__pyx_v_self) {
11621  PyObject *__pyx_r = 0;
11622  __Pyx_RefNannyDeclarations
11623  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11624  __pyx_r = __pyx_pf_8PyClical_8clifford_96__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11625 
11626  /* function exit code */
11627  __Pyx_RefNannyFinishContext();
11628  return __pyx_r;
11629  }
11630 
11631  static PyObject *__pyx_pf_8PyClical_8clifford_96__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11632  PyObject *__pyx_r = NULL;
11633  __Pyx_RefNannyDeclarations
11634  PyObject *__pyx_t_1 = NULL;
11635  int __pyx_lineno = 0;
11636  const char *__pyx_filename = NULL;
11637  int __pyx_clineno = 0;
11638  __Pyx_RefNannySetupContext("__str__", 0);
11639 
11640  /* "PyClical.pyx":1251
11641  * '1+3{-1}+2{1,2}+4{-2,7}'
11642  * """
11643  * return clifford_to_str( self.unwrap() ).decode() # <<<<<<<<<<<<<<
11644  *
11645  * def clifford_hidden_doctests():
11646  */
11647  __Pyx_XDECREF(__pyx_r);
11648  __pyx_t_1 = __Pyx_decode_cpp_string(clifford_to_str(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)), 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
11649  __Pyx_GOTREF(__pyx_t_1);
11650  __pyx_r = __pyx_t_1;
11651  __pyx_t_1 = 0;
11652  goto __pyx_L0;
11653 
11654  /* "PyClical.pyx":1244
11655  * return clifford_to_repr( self.unwrap() ).decode()
11656  *
11657  * def __str__(self): # <<<<<<<<<<<<<<
11658  * """
11659  * The informal string representation of self.
11660  */
11661 
11662  /* function exit code */
11663  __pyx_L1_error:;
11664  __Pyx_XDECREF(__pyx_t_1);
11665  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11666  __pyx_r = NULL;
11667  __pyx_L0:;
11668  __Pyx_XGIVEREF(__pyx_r);
11669  __Pyx_RefNannyFinishContext();
11670  return __pyx_r;
11671  }
11672 
11673  /* "(tree fragment)":1
11674  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11675  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11676  * def __setstate_cython__(self, __pyx_state):
11677  */
11678 
11679  /* Python wrapper */
11680  static PyObject *__pyx_pw_8PyClical_8clifford_99__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11681  static PyObject *__pyx_pw_8PyClical_8clifford_99__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11682  PyObject *__pyx_r = 0;
11683  __Pyx_RefNannyDeclarations
11684  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11685  __pyx_r = __pyx_pf_8PyClical_8clifford_98__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11686 
11687  /* function exit code */
11688  __Pyx_RefNannyFinishContext();
11689  return __pyx_r;
11690  }
11691 
11692  static PyObject *__pyx_pf_8PyClical_8clifford_98__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11693  PyObject *__pyx_r = NULL;
11694  __Pyx_RefNannyDeclarations
11695  PyObject *__pyx_t_1 = NULL;
11696  int __pyx_lineno = 0;
11697  const char *__pyx_filename = NULL;
11698  int __pyx_clineno = 0;
11699  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11700 
11701  /* "(tree fragment)":2
11702  * def __reduce_cython__(self):
11703  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11704  * def __setstate_cython__(self, __pyx_state):
11705  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11706  */
11707  __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)
11708  __Pyx_GOTREF(__pyx_t_1);
11709  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11710  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11711  __PYX_ERR(1, 2, __pyx_L1_error)
11712 
11713  /* "(tree fragment)":1
11714  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11715  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11716  * def __setstate_cython__(self, __pyx_state):
11717  */
11718 
11719  /* function exit code */
11720  __pyx_L1_error:;
11721  __Pyx_XDECREF(__pyx_t_1);
11722  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11723  __pyx_r = NULL;
11724  __Pyx_XGIVEREF(__pyx_r);
11725  __Pyx_RefNannyFinishContext();
11726  return __pyx_r;
11727  }
11728 
11729  /* "(tree fragment)":3
11730  * def __reduce_cython__(self):
11731  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11732  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11733  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11734  */
11735 
11736  /* Python wrapper */
11737  static PyObject *__pyx_pw_8PyClical_8clifford_101__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11738  static PyObject *__pyx_pw_8PyClical_8clifford_101__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11739  PyObject *__pyx_r = 0;
11740  __Pyx_RefNannyDeclarations
11741  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11742  __pyx_r = __pyx_pf_8PyClical_8clifford_100__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11743 
11744  /* function exit code */
11745  __Pyx_RefNannyFinishContext();
11746  return __pyx_r;
11747  }
11748 
11749  static PyObject *__pyx_pf_8PyClical_8clifford_100__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
11750  PyObject *__pyx_r = NULL;
11751  __Pyx_RefNannyDeclarations
11752  PyObject *__pyx_t_1 = NULL;
11753  int __pyx_lineno = 0;
11754  const char *__pyx_filename = NULL;
11755  int __pyx_clineno = 0;
11756  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11757 
11758  /* "(tree fragment)":4
11759  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11760  * def __setstate_cython__(self, __pyx_state):
11761  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11762  */
11763  __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)
11764  __Pyx_GOTREF(__pyx_t_1);
11765  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11766  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11767  __PYX_ERR(1, 4, __pyx_L1_error)
11768 
11769  /* "(tree fragment)":3
11770  * def __reduce_cython__(self):
11771  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11772  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11773  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11774  */
11775 
11776  /* function exit code */
11777  __pyx_L1_error:;
11778  __Pyx_XDECREF(__pyx_t_1);
11779  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11780  __pyx_r = NULL;
11781  __Pyx_XGIVEREF(__pyx_r);
11782  __Pyx_RefNannyFinishContext();
11783  return __pyx_r;
11784  }
11785 
11786  /* "PyClical.pyx":1253
11787  * return clifford_to_str( self.unwrap() ).decode()
11788  *
11789  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11790  * """
11791  * Tests for functions that Doctest cannot see.
11792  */
11793 
11794  /* Python wrapper */
11795  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11796  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(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 <class 'list'>.\n >>> print(clifford(None))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <class 'NoneType'>.\n >>> print(clifford(None,[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'NoneType'>, <class 'list'>).\n >>> print(clifford([1,2],[1,2]))\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<class 'list'>, <class '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 fro""m 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 ";
11797  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};
11798  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11799  PyObject *__pyx_r = 0;
11800  __Pyx_RefNannyDeclarations
11801  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11802  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11803 
11804  /* function exit code */
11805  __Pyx_RefNannyFinishContext();
11806  return __pyx_r;
11807  }
11808 
11809  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11810  PyObject *__pyx_r = NULL;
11811  __Pyx_RefNannyDeclarations
11812  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11813 
11814  /* "PyClical.pyx":1335
11815  * True
11816  * """
11817  * return # <<<<<<<<<<<<<<
11818  *
11819  * cpdef inline error_squared_tol(obj):
11820  */
11821  __Pyx_XDECREF(__pyx_r);
11822  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11823  goto __pyx_L0;
11824 
11825  /* "PyClical.pyx":1253
11826  * return clifford_to_str( self.unwrap() ).decode()
11827  *
11828  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11829  * """
11830  * Tests for functions that Doctest cannot see.
11831  */
11832 
11833  /* function exit code */
11834  __pyx_L0:;
11835  __Pyx_XGIVEREF(__pyx_r);
11836  __Pyx_RefNannyFinishContext();
11837  return __pyx_r;
11838  }
11839 
11840  /* "PyClical.pyx":1337
11841  * return
11842  *
11843  * cpdef inline error_squared_tol(obj): # <<<<<<<<<<<<<<
11844  * """
11845  * Quadratic norm error tolerance relative to a specific multivector.
11846  */
11847 
11848  static PyObject *__pyx_pw_8PyClical_11error_squared_tol(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11849  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared_tol(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11850  PyObject *__pyx_r = NULL;
11851  __Pyx_RefNannyDeclarations
11852  PyObject *__pyx_t_1 = NULL;
11853  int __pyx_lineno = 0;
11854  const char *__pyx_filename = NULL;
11855  int __pyx_clineno = 0;
11856  __Pyx_RefNannySetupContext("error_squared_tol", 0);
11857 
11858  /* "PyClical.pyx":1344
11859  * 0.0
11860  * """
11861  * return glucat.error_squared_tol(toClifford(obj)) # <<<<<<<<<<<<<<
11862  *
11863  * cpdef inline error_squared(lhs, rhs, threshold):
11864  */
11865  __Pyx_XDECREF(__pyx_r);
11866  __pyx_t_1 = PyFloat_FromDouble(error_squared_tol(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11867  __Pyx_GOTREF(__pyx_t_1);
11868  __pyx_r = __pyx_t_1;
11869  __pyx_t_1 = 0;
11870  goto __pyx_L0;
11871 
11872  /* "PyClical.pyx":1337
11873  * return
11874  *
11875  * cpdef inline error_squared_tol(obj): # <<<<<<<<<<<<<<
11876  * """
11877  * Quadratic norm error tolerance relative to a specific multivector.
11878  */
11879 
11880  /* function exit code */
11881  __pyx_L1_error:;
11882  __Pyx_XDECREF(__pyx_t_1);
11883  __Pyx_AddTraceback("PyClical.error_squared_tol", __pyx_clineno, __pyx_lineno, __pyx_filename);
11884  __pyx_r = 0;
11885  __pyx_L0:;
11886  __Pyx_XGIVEREF(__pyx_r);
11887  __Pyx_RefNannyFinishContext();
11888  return __pyx_r;
11889  }
11890 
11891  /* Python wrapper */
11892  static PyObject *__pyx_pw_8PyClical_11error_squared_tol(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11893  static char __pyx_doc_8PyClical_10error_squared_tol[] = "\n Quadratic norm error tolerance relative to a specific multivector.\n\n >>> print(error_squared_tol(clifford(\"{1}\")) * 3.0 - error_squared_tol(clifford(\"1{1}-2{2}+3{3}\")))\n 0.0\n ";
11894  static PyObject *__pyx_pw_8PyClical_11error_squared_tol(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11895  PyObject *__pyx_r = 0;
11896  __Pyx_RefNannyDeclarations
11897  __Pyx_RefNannySetupContext("error_squared_tol (wrapper)", 0);
11898  __pyx_r = __pyx_pf_8PyClical_10error_squared_tol(__pyx_self, ((PyObject *)__pyx_v_obj));
11899 
11900  /* function exit code */
11901  __Pyx_RefNannyFinishContext();
11902  return __pyx_r;
11903  }
11904 
11905  static PyObject *__pyx_pf_8PyClical_10error_squared_tol(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11906  PyObject *__pyx_r = NULL;
11907  __Pyx_RefNannyDeclarations
11908  PyObject *__pyx_t_1 = NULL;
11909  int __pyx_lineno = 0;
11910  const char *__pyx_filename = NULL;
11911  int __pyx_clineno = 0;
11912  __Pyx_RefNannySetupContext("error_squared_tol", 0);
11913  __Pyx_XDECREF(__pyx_r);
11914  __pyx_t_1 = __pyx_f_8PyClical_error_squared_tol(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
11915  __Pyx_GOTREF(__pyx_t_1);
11916  __pyx_r = __pyx_t_1;
11917  __pyx_t_1 = 0;
11918  goto __pyx_L0;
11919 
11920  /* function exit code */
11921  __pyx_L1_error:;
11922  __Pyx_XDECREF(__pyx_t_1);
11923  __Pyx_AddTraceback("PyClical.error_squared_tol", __pyx_clineno, __pyx_lineno, __pyx_filename);
11924  __pyx_r = NULL;
11925  __pyx_L0:;
11926  __Pyx_XGIVEREF(__pyx_r);
11927  __Pyx_RefNannyFinishContext();
11928  return __pyx_r;
11929  }
11930 
11931  /* "PyClical.pyx":1346
11932  * return glucat.error_squared_tol(toClifford(obj))
11933  *
11934  * cpdef inline error_squared(lhs, rhs, threshold): # <<<<<<<<<<<<<<
11935  * """
11936  * Relative or absolute error using the quadratic norm.
11937  */
11938 
11939  static PyObject *__pyx_pw_8PyClical_13error_squared(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11940  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_error_squared(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold, CYTHON_UNUSED int __pyx_skip_dispatch) {
11941  PyObject *__pyx_r = NULL;
11942  __Pyx_RefNannyDeclarations
11943  scalar_t __pyx_t_1;
11944  PyObject *__pyx_t_2 = NULL;
11945  int __pyx_lineno = 0;
11946  const char *__pyx_filename = NULL;
11947  int __pyx_clineno = 0;
11948  __Pyx_RefNannySetupContext("error_squared", 0);
11949 
11950  /* "PyClical.pyx":1357
11951  * 25.0
11952  * """
11953  * return glucat.error_squared(toClifford(lhs), toClifford(rhs), <scalar_t>threshold) # <<<<<<<<<<<<<<
11954  *
11955  * cpdef inline approx_equal(lhs, rhs, threshold=None, tol=None):
11956  */
11957  __Pyx_XDECREF(__pyx_r);
11958  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_threshold); if (unlikely((__pyx_t_1 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L1_error)
11959  __pyx_t_2 = PyFloat_FromDouble(error_squared(__pyx_f_8PyClical_toClifford(__pyx_v_lhs), __pyx_f_8PyClical_toClifford(__pyx_v_rhs), ((scalar_t)__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
11960  __Pyx_GOTREF(__pyx_t_2);
11961  __pyx_r = __pyx_t_2;
11962  __pyx_t_2 = 0;
11963  goto __pyx_L0;
11964 
11965  /* "PyClical.pyx":1346
11966  * return glucat.error_squared_tol(toClifford(obj))
11967  *
11968  * cpdef inline error_squared(lhs, rhs, threshold): # <<<<<<<<<<<<<<
11969  * """
11970  * Relative or absolute error using the quadratic norm.
11971  */
11972 
11973  /* function exit code */
11974  __pyx_L1_error:;
11975  __Pyx_XDECREF(__pyx_t_2);
11976  __Pyx_AddTraceback("PyClical.error_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
11977  __pyx_r = 0;
11978  __pyx_L0:;
11979  __Pyx_XGIVEREF(__pyx_r);
11980  __Pyx_RefNannyFinishContext();
11981  return __pyx_r;
11982  }
11983 
11984  /* Python wrapper */
11985  static PyObject *__pyx_pw_8PyClical_13error_squared(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11986  static char __pyx_doc_8PyClical_12error_squared[] = "\n Relative or absolute error using the quadratic norm.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(error_squared(clifford(\"{1}\"), clifford(\"1{1}\"), err2))\n 0.0\n >>> print(error_squared(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\"), err2))\n 25.0\n ";
11987  static PyObject *__pyx_pw_8PyClical_13error_squared(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11988  PyObject *__pyx_v_lhs = 0;
11989  PyObject *__pyx_v_rhs = 0;
11990  PyObject *__pyx_v_threshold = 0;
11991  int __pyx_lineno = 0;
11992  const char *__pyx_filename = NULL;
11993  int __pyx_clineno = 0;
11994  PyObject *__pyx_r = 0;
11995  __Pyx_RefNannyDeclarations
11996  __Pyx_RefNannySetupContext("error_squared (wrapper)", 0);
11997  {
11998  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_threshold,0};
11999  PyObject* values[3] = {0,0,0};
12000  if (unlikely(__pyx_kwds)) {
12001  Py_ssize_t kw_args;
12002  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12003  switch (pos_args) {
12004  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12005  CYTHON_FALLTHROUGH;
12006  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12007  CYTHON_FALLTHROUGH;
12008  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12009  CYTHON_FALLTHROUGH;
12010  case 0: break;
12011  default: goto __pyx_L5_argtuple_error;
12012  }
12013  kw_args = PyDict_Size(__pyx_kwds);
12014  switch (pos_args) {
12015  case 0:
12016  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
12017  else goto __pyx_L5_argtuple_error;
12018  CYTHON_FALLTHROUGH;
12019  case 1:
12020  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
12021  else {
12022  __Pyx_RaiseArgtupleInvalid("error_squared", 1, 3, 3, 1); __PYX_ERR(0, 1346, __pyx_L3_error)
12023  }
12024  CYTHON_FALLTHROUGH;
12025  case 2:
12026  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threshold)) != 0)) kw_args--;
12027  else {
12028  __Pyx_RaiseArgtupleInvalid("error_squared", 1, 3, 3, 2); __PYX_ERR(0, 1346, __pyx_L3_error)
12029  }
12030  }
12031  if (unlikely(kw_args > 0)) {
12032  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "error_squared") < 0)) __PYX_ERR(0, 1346, __pyx_L3_error)
12033  }
12034  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
12035  goto __pyx_L5_argtuple_error;
12036  } else {
12037  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12038  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12039  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12040  }
12041  __pyx_v_lhs = values[0];
12042  __pyx_v_rhs = values[1];
12043  __pyx_v_threshold = values[2];
12044  }
12045  goto __pyx_L4_argument_unpacking_done;
12046  __pyx_L5_argtuple_error:;
12047  __Pyx_RaiseArgtupleInvalid("error_squared", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1346, __pyx_L3_error)
12048  __pyx_L3_error:;
12049  __Pyx_AddTraceback("PyClical.error_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
12050  __Pyx_RefNannyFinishContext();
12051  return NULL;
12052  __pyx_L4_argument_unpacking_done:;
12053  __pyx_r = __pyx_pf_8PyClical_12error_squared(__pyx_self, __pyx_v_lhs, __pyx_v_rhs, __pyx_v_threshold);
12054 
12055  /* function exit code */
12056  __Pyx_RefNannyFinishContext();
12057  return __pyx_r;
12058  }
12059 
12060  static PyObject *__pyx_pf_8PyClical_12error_squared(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold) {
12061  PyObject *__pyx_r = NULL;
12062  __Pyx_RefNannyDeclarations
12063  PyObject *__pyx_t_1 = NULL;
12064  int __pyx_lineno = 0;
12065  const char *__pyx_filename = NULL;
12066  int __pyx_clineno = 0;
12067  __Pyx_RefNannySetupContext("error_squared", 0);
12068  __Pyx_XDECREF(__pyx_r);
12069  __pyx_t_1 = __pyx_f_8PyClical_error_squared(__pyx_v_lhs, __pyx_v_rhs, __pyx_v_threshold, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1346, __pyx_L1_error)
12070  __Pyx_GOTREF(__pyx_t_1);
12071  __pyx_r = __pyx_t_1;
12072  __pyx_t_1 = 0;
12073  goto __pyx_L0;
12074 
12075  /* function exit code */
12076  __pyx_L1_error:;
12077  __Pyx_XDECREF(__pyx_t_1);
12078  __Pyx_AddTraceback("PyClical.error_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
12079  __pyx_r = NULL;
12080  __pyx_L0:;
12081  __Pyx_XGIVEREF(__pyx_r);
12082  __Pyx_RefNannyFinishContext();
12083  return __pyx_r;
12084  }
12085 
12086  /* "PyClical.pyx":1359
12087  * return glucat.error_squared(toClifford(lhs), toClifford(rhs), <scalar_t>threshold)
12088  *
12089  * cpdef inline approx_equal(lhs, rhs, threshold=None, tol=None): # <<<<<<<<<<<<<<
12090  * """
12091  * Test for approximate equality of multivectors.
12092  */
12093 
12094  static PyObject *__pyx_pw_8PyClical_15approx_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12095  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_approx_equal(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_approx_equal *__pyx_optional_args) {
12096  PyObject *__pyx_v_threshold = ((PyObject *)Py_None);
12097  PyObject *__pyx_v_tol = ((PyObject *)Py_None);
12098  PyObject *__pyx_r = NULL;
12099  __Pyx_RefNannyDeclarations
12100  PyObject *__pyx_t_1 = NULL;
12101  int __pyx_t_2;
12102  PyObject *__pyx_t_3 = NULL;
12103  scalar_t __pyx_t_4;
12104  scalar_t __pyx_t_5;
12105  int __pyx_lineno = 0;
12106  const char *__pyx_filename = NULL;
12107  int __pyx_clineno = 0;
12108  __Pyx_RefNannySetupContext("approx_equal", 0);
12109  if (__pyx_optional_args) {
12110  if (__pyx_optional_args->__pyx_n > 0) {
12111  __pyx_v_threshold = __pyx_optional_args->threshold;
12112  if (__pyx_optional_args->__pyx_n > 1) {
12113  __pyx_v_tol = __pyx_optional_args->tol;
12114  }
12115  }
12116  }
12117  __Pyx_INCREF(__pyx_v_threshold);
12118  __Pyx_INCREF(__pyx_v_tol);
12119 
12120  /* "PyClical.pyx":1374
12121  * True
12122  * """
12123  * threshold = error_squared_tol(rhs) if threshold is None else threshold # <<<<<<<<<<<<<<
12124  * tol = error_squared_tol(rhs) if tol is None else tol
12125  * return glucat.approx_equal(toClifford(lhs), toClifford(rhs), <scalar_t>threshold, <scalar_t>tol)
12126  */
12127  __pyx_t_2 = (__pyx_v_threshold == Py_None);
12128  if ((__pyx_t_2 != 0)) {
12129  __pyx_t_3 = __pyx_f_8PyClical_error_squared_tol(__pyx_v_rhs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1374, __pyx_L1_error)
12130  __Pyx_GOTREF(__pyx_t_3);
12131  __pyx_t_1 = __pyx_t_3;
12132  __pyx_t_3 = 0;
12133  } else {
12134  __Pyx_INCREF(__pyx_v_threshold);
12135  __pyx_t_1 = __pyx_v_threshold;
12136  }
12137  __Pyx_DECREF_SET(__pyx_v_threshold, __pyx_t_1);
12138  __pyx_t_1 = 0;
12139 
12140  /* "PyClical.pyx":1375
12141  * """
12142  * threshold = error_squared_tol(rhs) if threshold is None else threshold
12143  * tol = error_squared_tol(rhs) if tol is None else tol # <<<<<<<<<<<<<<
12144  * return glucat.approx_equal(toClifford(lhs), toClifford(rhs), <scalar_t>threshold, <scalar_t>tol)
12145  *
12146  */
12147  __pyx_t_2 = (__pyx_v_tol == Py_None);
12148  if ((__pyx_t_2 != 0)) {
12149  __pyx_t_3 = __pyx_f_8PyClical_error_squared_tol(__pyx_v_rhs, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1375, __pyx_L1_error)
12150  __Pyx_GOTREF(__pyx_t_3);
12151  __pyx_t_1 = __pyx_t_3;
12152  __pyx_t_3 = 0;
12153  } else {
12154  __Pyx_INCREF(__pyx_v_tol);
12155  __pyx_t_1 = __pyx_v_tol;
12156  }
12157  __Pyx_DECREF_SET(__pyx_v_tol, __pyx_t_1);
12158  __pyx_t_1 = 0;
12159 
12160  /* "PyClical.pyx":1376
12161  * threshold = error_squared_tol(rhs) if threshold is None else threshold
12162  * tol = error_squared_tol(rhs) if tol is None else tol
12163  * return glucat.approx_equal(toClifford(lhs), toClifford(rhs), <scalar_t>threshold, <scalar_t>tol) # <<<<<<<<<<<<<<
12164  *
12165  * cpdef inline inv(obj):
12166  */
12167  __Pyx_XDECREF(__pyx_r);
12168  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_threshold); if (unlikely((__pyx_t_4 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L1_error)
12169  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_tol); if (unlikely((__pyx_t_5 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L1_error)
12170  __pyx_t_1 = __Pyx_PyBool_FromLong(approx_equal(__pyx_f_8PyClical_toClifford(__pyx_v_lhs), __pyx_f_8PyClical_toClifford(__pyx_v_rhs), ((scalar_t)__pyx_t_4), ((scalar_t)__pyx_t_5))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error)
12171  __Pyx_GOTREF(__pyx_t_1);
12172  __pyx_r = __pyx_t_1;
12173  __pyx_t_1 = 0;
12174  goto __pyx_L0;
12175 
12176  /* "PyClical.pyx":1359
12177  * return glucat.error_squared(toClifford(lhs), toClifford(rhs), <scalar_t>threshold)
12178  *
12179  * cpdef inline approx_equal(lhs, rhs, threshold=None, tol=None): # <<<<<<<<<<<<<<
12180  * """
12181  * Test for approximate equality of multivectors.
12182  */
12183 
12184  /* function exit code */
12185  __pyx_L1_error:;
12186  __Pyx_XDECREF(__pyx_t_1);
12187  __Pyx_XDECREF(__pyx_t_3);
12188  __Pyx_AddTraceback("PyClical.approx_equal", __pyx_clineno, __pyx_lineno, __pyx_filename);
12189  __pyx_r = 0;
12190  __pyx_L0:;
12191  __Pyx_XDECREF(__pyx_v_threshold);
12192  __Pyx_XDECREF(__pyx_v_tol);
12193  __Pyx_XGIVEREF(__pyx_r);
12194  __Pyx_RefNannyFinishContext();
12195  return __pyx_r;
12196  }
12197 
12198  /* Python wrapper */
12199  static PyObject *__pyx_pw_8PyClical_15approx_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12200  static char __pyx_doc_8PyClical_14approx_equal[] = "\n Test for approximate equality of multivectors.\n\n >>> err2=scalar_epsilon*scalar_epsilon\n\n >>> print(approx_equal(clifford(\"{1}\"), clifford(\"1{1}\")))\n True\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}\"), clifford(\"{1}\")))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+0.001\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n False\n >>> print(approx_equal(clifford(\"1{1}-3{2}+4{3}+1.0e-30\"), clifford(\"1{1}-3{2}+4{3}\"), err2, err2))\n True\n ";
12201  static PyObject *__pyx_pw_8PyClical_15approx_equal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12202  PyObject *__pyx_v_lhs = 0;
12203  PyObject *__pyx_v_rhs = 0;
12204  PyObject *__pyx_v_threshold = 0;
12205  PyObject *__pyx_v_tol = 0;
12206  int __pyx_lineno = 0;
12207  const char *__pyx_filename = NULL;
12208  int __pyx_clineno = 0;
12209  PyObject *__pyx_r = 0;
12210  __Pyx_RefNannyDeclarations
12211  __Pyx_RefNannySetupContext("approx_equal (wrapper)", 0);
12212  {
12213  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_threshold,&__pyx_n_s_tol,0};
12214  PyObject* values[4] = {0,0,0,0};
12215  values[2] = ((PyObject *)Py_None);
12216  values[3] = ((PyObject *)Py_None);
12217  if (unlikely(__pyx_kwds)) {
12218  Py_ssize_t kw_args;
12219  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12220  switch (pos_args) {
12221  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12222  CYTHON_FALLTHROUGH;
12223  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12224  CYTHON_FALLTHROUGH;
12225  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12226  CYTHON_FALLTHROUGH;
12227  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12228  CYTHON_FALLTHROUGH;
12229  case 0: break;
12230  default: goto __pyx_L5_argtuple_error;
12231  }
12232  kw_args = PyDict_Size(__pyx_kwds);
12233  switch (pos_args) {
12234  case 0:
12235  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
12236  else goto __pyx_L5_argtuple_error;
12237  CYTHON_FALLTHROUGH;
12238  case 1:
12239  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
12240  else {
12241  __Pyx_RaiseArgtupleInvalid("approx_equal", 0, 2, 4, 1); __PYX_ERR(0, 1359, __pyx_L3_error)
12242  }
12243  CYTHON_FALLTHROUGH;
12244  case 2:
12245  if (kw_args > 0) {
12246  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threshold);
12247  if (value) { values[2] = value; kw_args--; }
12248  }
12249  CYTHON_FALLTHROUGH;
12250  case 3:
12251  if (kw_args > 0) {
12252  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tol);
12253  if (value) { values[3] = value; kw_args--; }
12254  }
12255  }
12256  if (unlikely(kw_args > 0)) {
12257  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "approx_equal") < 0)) __PYX_ERR(0, 1359, __pyx_L3_error)
12258  }
12259  } else {
12260  switch (PyTuple_GET_SIZE(__pyx_args)) {
12261  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12262  CYTHON_FALLTHROUGH;
12263  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12264  CYTHON_FALLTHROUGH;
12265  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12266  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12267  break;
12268  default: goto __pyx_L5_argtuple_error;
12269  }
12270  }
12271  __pyx_v_lhs = values[0];
12272  __pyx_v_rhs = values[1];
12273  __pyx_v_threshold = values[2];
12274  __pyx_v_tol = values[3];
12275  }
12276  goto __pyx_L4_argument_unpacking_done;
12277  __pyx_L5_argtuple_error:;
12278  __Pyx_RaiseArgtupleInvalid("approx_equal", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1359, __pyx_L3_error)
12279  __pyx_L3_error:;
12280  __Pyx_AddTraceback("PyClical.approx_equal", __pyx_clineno, __pyx_lineno, __pyx_filename);
12281  __Pyx_RefNannyFinishContext();
12282  return NULL;
12283  __pyx_L4_argument_unpacking_done:;
12284  __pyx_r = __pyx_pf_8PyClical_14approx_equal(__pyx_self, __pyx_v_lhs, __pyx_v_rhs, __pyx_v_threshold, __pyx_v_tol);
12285 
12286  /* function exit code */
12287  __Pyx_RefNannyFinishContext();
12288  return __pyx_r;
12289  }
12290 
12291  static PyObject *__pyx_pf_8PyClical_14approx_equal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_threshold, PyObject *__pyx_v_tol) {
12292  PyObject *__pyx_r = NULL;
12293  __Pyx_RefNannyDeclarations
12294  PyObject *__pyx_t_1 = NULL;
12295  struct __pyx_opt_args_8PyClical_approx_equal __pyx_t_2;
12296  int __pyx_lineno = 0;
12297  const char *__pyx_filename = NULL;
12298  int __pyx_clineno = 0;
12299  __Pyx_RefNannySetupContext("approx_equal", 0);
12300  __Pyx_XDECREF(__pyx_r);
12301  __pyx_t_2.__pyx_n = 2;
12302  __pyx_t_2.threshold = __pyx_v_threshold;
12303  __pyx_t_2.tol = __pyx_v_tol;
12304  __pyx_t_1 = __pyx_f_8PyClical_approx_equal(__pyx_v_lhs, __pyx_v_rhs, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error)
12305  __Pyx_GOTREF(__pyx_t_1);
12306  __pyx_r = __pyx_t_1;
12307  __pyx_t_1 = 0;
12308  goto __pyx_L0;
12309 
12310  /* function exit code */
12311  __pyx_L1_error:;
12312  __Pyx_XDECREF(__pyx_t_1);
12313  __Pyx_AddTraceback("PyClical.approx_equal", __pyx_clineno, __pyx_lineno, __pyx_filename);
12314  __pyx_r = NULL;
12315  __pyx_L0:;
12316  __Pyx_XGIVEREF(__pyx_r);
12317  __Pyx_RefNannyFinishContext();
12318  return __pyx_r;
12319  }
12320 
12321  /* "PyClical.pyx":1378
12322  * return glucat.approx_equal(toClifford(lhs), toClifford(rhs), <scalar_t>threshold, <scalar_t>tol)
12323  *
12324  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
12325  * """
12326  * Geometric multiplicative inverse.
12327  */
12328 
12329  static PyObject *__pyx_pw_8PyClical_17inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12330  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12331  PyObject *__pyx_r = NULL;
12332  __Pyx_RefNannyDeclarations
12333  PyObject *__pyx_t_1 = NULL;
12334  PyObject *__pyx_t_2 = NULL;
12335  PyObject *__pyx_t_3 = NULL;
12336  int __pyx_lineno = 0;
12337  const char *__pyx_filename = NULL;
12338  int __pyx_clineno = 0;
12339  __Pyx_RefNannySetupContext("inv", 0);
12340 
12341  /* "PyClical.pyx":1391
12342  * nan
12343  * """
12344  * return clifford(obj).inv() # <<<<<<<<<<<<<<
12345  *
12346  * cpdef inline scalar(obj):
12347  */
12348  __Pyx_XDECREF(__pyx_r);
12349  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error)
12350  __Pyx_GOTREF(__pyx_t_2);
12351  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1391, __pyx_L1_error)
12352  __Pyx_GOTREF(__pyx_t_3);
12353  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12354  __pyx_t_2 = NULL;
12355  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12356  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12357  if (likely(__pyx_t_2)) {
12358  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12359  __Pyx_INCREF(__pyx_t_2);
12360  __Pyx_INCREF(function);
12361  __Pyx_DECREF_SET(__pyx_t_3, function);
12362  }
12363  }
12364  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12365  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12366  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
12367  __Pyx_GOTREF(__pyx_t_1);
12368  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12369  __pyx_r = __pyx_t_1;
12370  __pyx_t_1 = 0;
12371  goto __pyx_L0;
12372 
12373  /* "PyClical.pyx":1378
12374  * return glucat.approx_equal(toClifford(lhs), toClifford(rhs), <scalar_t>threshold, <scalar_t>tol)
12375  *
12376  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
12377  * """
12378  * Geometric multiplicative inverse.
12379  */
12380 
12381  /* function exit code */
12382  __pyx_L1_error:;
12383  __Pyx_XDECREF(__pyx_t_1);
12384  __Pyx_XDECREF(__pyx_t_2);
12385  __Pyx_XDECREF(__pyx_t_3);
12386  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
12387  __pyx_r = 0;
12388  __pyx_L0:;
12389  __Pyx_XGIVEREF(__pyx_r);
12390  __Pyx_RefNannyFinishContext();
12391  return __pyx_r;
12392  }
12393 
12394  /* Python wrapper */
12395  static PyObject *__pyx_pw_8PyClical_17inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12396  static char __pyx_doc_8PyClical_16inv[] = "\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 ";
12397  static PyObject *__pyx_pw_8PyClical_17inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12398  PyObject *__pyx_r = 0;
12399  __Pyx_RefNannyDeclarations
12400  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
12401  __pyx_r = __pyx_pf_8PyClical_16inv(__pyx_self, ((PyObject *)__pyx_v_obj));
12402 
12403  /* function exit code */
12404  __Pyx_RefNannyFinishContext();
12405  return __pyx_r;
12406  }
12407 
12408  static PyObject *__pyx_pf_8PyClical_16inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12409  PyObject *__pyx_r = NULL;
12410  __Pyx_RefNannyDeclarations
12411  PyObject *__pyx_t_1 = NULL;
12412  int __pyx_lineno = 0;
12413  const char *__pyx_filename = NULL;
12414  int __pyx_clineno = 0;
12415  __Pyx_RefNannySetupContext("inv", 0);
12416  __Pyx_XDECREF(__pyx_r);
12417  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
12418  __Pyx_GOTREF(__pyx_t_1);
12419  __pyx_r = __pyx_t_1;
12420  __pyx_t_1 = 0;
12421  goto __pyx_L0;
12422 
12423  /* function exit code */
12424  __pyx_L1_error:;
12425  __Pyx_XDECREF(__pyx_t_1);
12426  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
12427  __pyx_r = NULL;
12428  __pyx_L0:;
12429  __Pyx_XGIVEREF(__pyx_r);
12430  __Pyx_RefNannyFinishContext();
12431  return __pyx_r;
12432  }
12433 
12434  /* "PyClical.pyx":1393
12435  * return clifford(obj).inv()
12436  *
12437  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
12438  * """
12439  * Scalar part.
12440  */
12441 
12442  static PyObject *__pyx_pw_8PyClical_19scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12443  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12444  PyObject *__pyx_r = NULL;
12445  __Pyx_RefNannyDeclarations
12446  PyObject *__pyx_t_1 = NULL;
12447  PyObject *__pyx_t_2 = NULL;
12448  PyObject *__pyx_t_3 = NULL;
12449  int __pyx_lineno = 0;
12450  const char *__pyx_filename = NULL;
12451  int __pyx_clineno = 0;
12452  __Pyx_RefNannySetupContext("scalar", 0);
12453 
12454  /* "PyClical.pyx":1402
12455  * 0.0
12456  * """
12457  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
12458  *
12459  * cpdef inline real(obj):
12460  */
12461  __Pyx_XDECREF(__pyx_r);
12462  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error)
12463  __Pyx_GOTREF(__pyx_t_2);
12464  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
12465  __Pyx_GOTREF(__pyx_t_3);
12466  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12467  __pyx_t_2 = NULL;
12468  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12469  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12470  if (likely(__pyx_t_2)) {
12471  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12472  __Pyx_INCREF(__pyx_t_2);
12473  __Pyx_INCREF(function);
12474  __Pyx_DECREF_SET(__pyx_t_3, function);
12475  }
12476  }
12477  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12478  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12479  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error)
12480  __Pyx_GOTREF(__pyx_t_1);
12481  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12482  __pyx_r = __pyx_t_1;
12483  __pyx_t_1 = 0;
12484  goto __pyx_L0;
12485 
12486  /* "PyClical.pyx":1393
12487  * return clifford(obj).inv()
12488  *
12489  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
12490  * """
12491  * Scalar part.
12492  */
12493 
12494  /* function exit code */
12495  __pyx_L1_error:;
12496  __Pyx_XDECREF(__pyx_t_1);
12497  __Pyx_XDECREF(__pyx_t_2);
12498  __Pyx_XDECREF(__pyx_t_3);
12499  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
12500  __pyx_r = 0;
12501  __pyx_L0:;
12502  __Pyx_XGIVEREF(__pyx_r);
12503  __Pyx_RefNannyFinishContext();
12504  return __pyx_r;
12505  }
12506 
12507  /* Python wrapper */
12508  static PyObject *__pyx_pw_8PyClical_19scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12509  static char __pyx_doc_8PyClical_18scalar[] = "\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
12510  static PyObject *__pyx_pw_8PyClical_19scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12511  PyObject *__pyx_r = 0;
12512  __Pyx_RefNannyDeclarations
12513  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
12514  __pyx_r = __pyx_pf_8PyClical_18scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
12515 
12516  /* function exit code */
12517  __Pyx_RefNannyFinishContext();
12518  return __pyx_r;
12519  }
12520 
12521  static PyObject *__pyx_pf_8PyClical_18scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12522  PyObject *__pyx_r = NULL;
12523  __Pyx_RefNannyDeclarations
12524  PyObject *__pyx_t_1 = NULL;
12525  int __pyx_lineno = 0;
12526  const char *__pyx_filename = NULL;
12527  int __pyx_clineno = 0;
12528  __Pyx_RefNannySetupContext("scalar", 0);
12529  __Pyx_XDECREF(__pyx_r);
12530  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error)
12531  __Pyx_GOTREF(__pyx_t_1);
12532  __pyx_r = __pyx_t_1;
12533  __pyx_t_1 = 0;
12534  goto __pyx_L0;
12535 
12536  /* function exit code */
12537  __pyx_L1_error:;
12538  __Pyx_XDECREF(__pyx_t_1);
12539  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
12540  __pyx_r = NULL;
12541  __pyx_L0:;
12542  __Pyx_XGIVEREF(__pyx_r);
12543  __Pyx_RefNannyFinishContext();
12544  return __pyx_r;
12545  }
12546 
12547  /* "PyClical.pyx":1404
12548  * return clifford(obj).scalar()
12549  *
12550  * cpdef inline real(obj): # <<<<<<<<<<<<<<
12551  * """
12552  * Real part: synonym for scalar part.
12553  */
12554 
12555  static PyObject *__pyx_pw_8PyClical_21real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12556  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12557  PyObject *__pyx_r = NULL;
12558  __Pyx_RefNannyDeclarations
12559  PyObject *__pyx_t_1 = NULL;
12560  PyObject *__pyx_t_2 = NULL;
12561  PyObject *__pyx_t_3 = NULL;
12562  int __pyx_lineno = 0;
12563  const char *__pyx_filename = NULL;
12564  int __pyx_clineno = 0;
12565  __Pyx_RefNannySetupContext("real", 0);
12566 
12567  /* "PyClical.pyx":1413
12568  * 0.0
12569  * """
12570  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
12571  *
12572  * cpdef inline imag(obj):
12573  */
12574  __Pyx_XDECREF(__pyx_r);
12575  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error)
12576  __Pyx_GOTREF(__pyx_t_2);
12577  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1413, __pyx_L1_error)
12578  __Pyx_GOTREF(__pyx_t_3);
12579  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12580  __pyx_t_2 = NULL;
12581  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12582  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12583  if (likely(__pyx_t_2)) {
12584  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12585  __Pyx_INCREF(__pyx_t_2);
12586  __Pyx_INCREF(function);
12587  __Pyx_DECREF_SET(__pyx_t_3, function);
12588  }
12589  }
12590  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12591  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12592  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
12593  __Pyx_GOTREF(__pyx_t_1);
12594  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12595  __pyx_r = __pyx_t_1;
12596  __pyx_t_1 = 0;
12597  goto __pyx_L0;
12598 
12599  /* "PyClical.pyx":1404
12600  * return clifford(obj).scalar()
12601  *
12602  * cpdef inline real(obj): # <<<<<<<<<<<<<<
12603  * """
12604  * Real part: synonym for scalar part.
12605  */
12606 
12607  /* function exit code */
12608  __pyx_L1_error:;
12609  __Pyx_XDECREF(__pyx_t_1);
12610  __Pyx_XDECREF(__pyx_t_2);
12611  __Pyx_XDECREF(__pyx_t_3);
12612  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
12613  __pyx_r = 0;
12614  __pyx_L0:;
12615  __Pyx_XGIVEREF(__pyx_r);
12616  __Pyx_RefNannyFinishContext();
12617  return __pyx_r;
12618  }
12619 
12620  /* Python wrapper */
12621  static PyObject *__pyx_pw_8PyClical_21real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12622  static char __pyx_doc_8PyClical_20real[] = "\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 ";
12623  static PyObject *__pyx_pw_8PyClical_21real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12624  PyObject *__pyx_r = 0;
12625  __Pyx_RefNannyDeclarations
12626  __Pyx_RefNannySetupContext("real (wrapper)", 0);
12627  __pyx_r = __pyx_pf_8PyClical_20real(__pyx_self, ((PyObject *)__pyx_v_obj));
12628 
12629  /* function exit code */
12630  __Pyx_RefNannyFinishContext();
12631  return __pyx_r;
12632  }
12633 
12634  static PyObject *__pyx_pf_8PyClical_20real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12635  PyObject *__pyx_r = NULL;
12636  __Pyx_RefNannyDeclarations
12637  PyObject *__pyx_t_1 = NULL;
12638  int __pyx_lineno = 0;
12639  const char *__pyx_filename = NULL;
12640  int __pyx_clineno = 0;
12641  __Pyx_RefNannySetupContext("real", 0);
12642  __Pyx_XDECREF(__pyx_r);
12643  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
12644  __Pyx_GOTREF(__pyx_t_1);
12645  __pyx_r = __pyx_t_1;
12646  __pyx_t_1 = 0;
12647  goto __pyx_L0;
12648 
12649  /* function exit code */
12650  __pyx_L1_error:;
12651  __Pyx_XDECREF(__pyx_t_1);
12652  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
12653  __pyx_r = NULL;
12654  __pyx_L0:;
12655  __Pyx_XGIVEREF(__pyx_r);
12656  __Pyx_RefNannyFinishContext();
12657  return __pyx_r;
12658  }
12659 
12660  /* "PyClical.pyx":1415
12661  * return clifford(obj).scalar()
12662  *
12663  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
12664  * """
12665  * Imaginary part: deprecated (always 0).
12666  */
12667 
12668  static PyObject *__pyx_pw_8PyClical_23imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12669  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12670  PyObject *__pyx_r = NULL;
12671  __Pyx_RefNannyDeclarations
12672  __Pyx_RefNannySetupContext("imag", 0);
12673 
12674  /* "PyClical.pyx":1424
12675  * 0.0
12676  * """
12677  * return 0.0 # <<<<<<<<<<<<<<
12678  *
12679  * cpdef inline pure(obj):
12680  */
12681  __Pyx_XDECREF(__pyx_r);
12682  __Pyx_INCREF(__pyx_float_0_0);
12683  __pyx_r = __pyx_float_0_0;
12684  goto __pyx_L0;
12685 
12686  /* "PyClical.pyx":1415
12687  * return clifford(obj).scalar()
12688  *
12689  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
12690  * """
12691  * Imaginary part: deprecated (always 0).
12692  */
12693 
12694  /* function exit code */
12695  __pyx_L0:;
12696  __Pyx_XGIVEREF(__pyx_r);
12697  __Pyx_RefNannyFinishContext();
12698  return __pyx_r;
12699  }
12700 
12701  /* Python wrapper */
12702  static PyObject *__pyx_pw_8PyClical_23imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12703  static char __pyx_doc_8PyClical_22imag[] = "\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 ";
12704  static PyObject *__pyx_pw_8PyClical_23imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12705  PyObject *__pyx_r = 0;
12706  __Pyx_RefNannyDeclarations
12707  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
12708  __pyx_r = __pyx_pf_8PyClical_22imag(__pyx_self, ((PyObject *)__pyx_v_obj));
12709 
12710  /* function exit code */
12711  __Pyx_RefNannyFinishContext();
12712  return __pyx_r;
12713  }
12714 
12715  static PyObject *__pyx_pf_8PyClical_22imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12716  PyObject *__pyx_r = NULL;
12717  __Pyx_RefNannyDeclarations
12718  PyObject *__pyx_t_1 = NULL;
12719  int __pyx_lineno = 0;
12720  const char *__pyx_filename = NULL;
12721  int __pyx_clineno = 0;
12722  __Pyx_RefNannySetupContext("imag", 0);
12723  __Pyx_XDECREF(__pyx_r);
12724  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
12725  __Pyx_GOTREF(__pyx_t_1);
12726  __pyx_r = __pyx_t_1;
12727  __pyx_t_1 = 0;
12728  goto __pyx_L0;
12729 
12730  /* function exit code */
12731  __pyx_L1_error:;
12732  __Pyx_XDECREF(__pyx_t_1);
12733  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
12734  __pyx_r = NULL;
12735  __pyx_L0:;
12736  __Pyx_XGIVEREF(__pyx_r);
12737  __Pyx_RefNannyFinishContext();
12738  return __pyx_r;
12739  }
12740 
12741  /* "PyClical.pyx":1426
12742  * return 0.0
12743  *
12744  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
12745  * """
12746  * Pure part
12747  */
12748 
12749  static PyObject *__pyx_pw_8PyClical_25pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12750  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12751  PyObject *__pyx_r = NULL;
12752  __Pyx_RefNannyDeclarations
12753  PyObject *__pyx_t_1 = NULL;
12754  PyObject *__pyx_t_2 = NULL;
12755  PyObject *__pyx_t_3 = NULL;
12756  int __pyx_lineno = 0;
12757  const char *__pyx_filename = NULL;
12758  int __pyx_clineno = 0;
12759  __Pyx_RefNannySetupContext("pure", 0);
12760 
12761  /* "PyClical.pyx":1435
12762  * {1,2}
12763  * """
12764  * return clifford(obj).pure() # <<<<<<<<<<<<<<
12765  *
12766  * cpdef inline even(obj):
12767  */
12768  __Pyx_XDECREF(__pyx_r);
12769  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1435, __pyx_L1_error)
12770  __Pyx_GOTREF(__pyx_t_2);
12771  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1435, __pyx_L1_error)
12772  __Pyx_GOTREF(__pyx_t_3);
12773  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12774  __pyx_t_2 = NULL;
12775  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12776  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12777  if (likely(__pyx_t_2)) {
12778  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12779  __Pyx_INCREF(__pyx_t_2);
12780  __Pyx_INCREF(function);
12781  __Pyx_DECREF_SET(__pyx_t_3, function);
12782  }
12783  }
12784  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12785  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12786  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error)
12787  __Pyx_GOTREF(__pyx_t_1);
12788  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12789  __pyx_r = __pyx_t_1;
12790  __pyx_t_1 = 0;
12791  goto __pyx_L0;
12792 
12793  /* "PyClical.pyx":1426
12794  * return 0.0
12795  *
12796  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
12797  * """
12798  * Pure part
12799  */
12800 
12801  /* function exit code */
12802  __pyx_L1_error:;
12803  __Pyx_XDECREF(__pyx_t_1);
12804  __Pyx_XDECREF(__pyx_t_2);
12805  __Pyx_XDECREF(__pyx_t_3);
12806  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
12807  __pyx_r = 0;
12808  __pyx_L0:;
12809  __Pyx_XGIVEREF(__pyx_r);
12810  __Pyx_RefNannyFinishContext();
12811  return __pyx_r;
12812  }
12813 
12814  /* Python wrapper */
12815  static PyObject *__pyx_pw_8PyClical_25pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12816  static char __pyx_doc_8PyClical_24pure[] = "\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 ";
12817  static PyObject *__pyx_pw_8PyClical_25pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12818  PyObject *__pyx_r = 0;
12819  __Pyx_RefNannyDeclarations
12820  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
12821  __pyx_r = __pyx_pf_8PyClical_24pure(__pyx_self, ((PyObject *)__pyx_v_obj));
12822 
12823  /* function exit code */
12824  __Pyx_RefNannyFinishContext();
12825  return __pyx_r;
12826  }
12827 
12828  static PyObject *__pyx_pf_8PyClical_24pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12829  PyObject *__pyx_r = NULL;
12830  __Pyx_RefNannyDeclarations
12831  PyObject *__pyx_t_1 = NULL;
12832  int __pyx_lineno = 0;
12833  const char *__pyx_filename = NULL;
12834  int __pyx_clineno = 0;
12835  __Pyx_RefNannySetupContext("pure", 0);
12836  __Pyx_XDECREF(__pyx_r);
12837  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
12838  __Pyx_GOTREF(__pyx_t_1);
12839  __pyx_r = __pyx_t_1;
12840  __pyx_t_1 = 0;
12841  goto __pyx_L0;
12842 
12843  /* function exit code */
12844  __pyx_L1_error:;
12845  __Pyx_XDECREF(__pyx_t_1);
12846  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
12847  __pyx_r = NULL;
12848  __pyx_L0:;
12849  __Pyx_XGIVEREF(__pyx_r);
12850  __Pyx_RefNannyFinishContext();
12851  return __pyx_r;
12852  }
12853 
12854  /* "PyClical.pyx":1437
12855  * return clifford(obj).pure()
12856  *
12857  * cpdef inline even(obj): # <<<<<<<<<<<<<<
12858  * """
12859  * Even part of multivector, sum of even grade terms.
12860  */
12861 
12862  static PyObject *__pyx_pw_8PyClical_27even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12863  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12864  PyObject *__pyx_r = NULL;
12865  __Pyx_RefNannyDeclarations
12866  PyObject *__pyx_t_1 = NULL;
12867  PyObject *__pyx_t_2 = NULL;
12868  PyObject *__pyx_t_3 = NULL;
12869  int __pyx_lineno = 0;
12870  const char *__pyx_filename = NULL;
12871  int __pyx_clineno = 0;
12872  __Pyx_RefNannySetupContext("even", 0);
12873 
12874  /* "PyClical.pyx":1444
12875  * 1+{1,2}
12876  * """
12877  * return clifford(obj).even() # <<<<<<<<<<<<<<
12878  *
12879  * cpdef inline odd(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, 1444, __pyx_L1_error)
12883  __Pyx_GOTREF(__pyx_t_2);
12884  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_even); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1444, __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_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12898  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12899  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1444, __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":1437
12907  * return clifford(obj).pure()
12908  *
12909  * cpdef inline even(obj): # <<<<<<<<<<<<<<
12910  * """
12911  * Even part of multivector, sum of even grade terms.
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.even", __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_27even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12929  static char __pyx_doc_8PyClical_26even[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print(even(clifford(\"1+{1}+{1,2}\")))\n 1+{1,2}\n ";
12930  static PyObject *__pyx_pw_8PyClical_27even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12931  PyObject *__pyx_r = 0;
12932  __Pyx_RefNannyDeclarations
12933  __Pyx_RefNannySetupContext("even (wrapper)", 0);
12934  __pyx_r = __pyx_pf_8PyClical_26even(__pyx_self, ((PyObject *)__pyx_v_obj));
12935 
12936  /* function exit code */
12937  __Pyx_RefNannyFinishContext();
12938  return __pyx_r;
12939  }
12940 
12941  static PyObject *__pyx_pf_8PyClical_26even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12942  PyObject *__pyx_r = NULL;
12943  __Pyx_RefNannyDeclarations
12944  PyObject *__pyx_t_1 = NULL;
12945  int __pyx_lineno = 0;
12946  const char *__pyx_filename = NULL;
12947  int __pyx_clineno = 0;
12948  __Pyx_RefNannySetupContext("even", 0);
12949  __Pyx_XDECREF(__pyx_r);
12950  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error)
12951  __Pyx_GOTREF(__pyx_t_1);
12952  __pyx_r = __pyx_t_1;
12953  __pyx_t_1 = 0;
12954  goto __pyx_L0;
12955 
12956  /* function exit code */
12957  __pyx_L1_error:;
12958  __Pyx_XDECREF(__pyx_t_1);
12959  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
12960  __pyx_r = NULL;
12961  __pyx_L0:;
12962  __Pyx_XGIVEREF(__pyx_r);
12963  __Pyx_RefNannyFinishContext();
12964  return __pyx_r;
12965  }
12966 
12967  /* "PyClical.pyx":1446
12968  * return clifford(obj).even()
12969  *
12970  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
12971  * """
12972  * Odd part of multivector, sum of odd grade terms.
12973  */
12974 
12975  static PyObject *__pyx_pw_8PyClical_29odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12976  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12977  PyObject *__pyx_r = NULL;
12978  __Pyx_RefNannyDeclarations
12979  PyObject *__pyx_t_1 = NULL;
12980  PyObject *__pyx_t_2 = NULL;
12981  PyObject *__pyx_t_3 = NULL;
12982  int __pyx_lineno = 0;
12983  const char *__pyx_filename = NULL;
12984  int __pyx_clineno = 0;
12985  __Pyx_RefNannySetupContext("odd", 0);
12986 
12987  /* "PyClical.pyx":1453
12988  * {1}
12989  * """
12990  * return clifford(obj).odd() # <<<<<<<<<<<<<<
12991  *
12992  * cpdef inline involute(obj):
12993  */
12994  __Pyx_XDECREF(__pyx_r);
12995  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error)
12996  __Pyx_GOTREF(__pyx_t_2);
12997  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_odd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error)
12998  __Pyx_GOTREF(__pyx_t_3);
12999  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13000  __pyx_t_2 = NULL;
13001  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13002  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13003  if (likely(__pyx_t_2)) {
13004  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13005  __Pyx_INCREF(__pyx_t_2);
13006  __Pyx_INCREF(function);
13007  __Pyx_DECREF_SET(__pyx_t_3, function);
13008  }
13009  }
13010  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13011  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13012  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error)
13013  __Pyx_GOTREF(__pyx_t_1);
13014  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13015  __pyx_r = __pyx_t_1;
13016  __pyx_t_1 = 0;
13017  goto __pyx_L0;
13018 
13019  /* "PyClical.pyx":1446
13020  * return clifford(obj).even()
13021  *
13022  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
13023  * """
13024  * Odd part of multivector, sum of odd grade terms.
13025  */
13026 
13027  /* function exit code */
13028  __pyx_L1_error:;
13029  __Pyx_XDECREF(__pyx_t_1);
13030  __Pyx_XDECREF(__pyx_t_2);
13031  __Pyx_XDECREF(__pyx_t_3);
13032  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
13033  __pyx_r = 0;
13034  __pyx_L0:;
13035  __Pyx_XGIVEREF(__pyx_r);
13036  __Pyx_RefNannyFinishContext();
13037  return __pyx_r;
13038  }
13039 
13040  /* Python wrapper */
13041  static PyObject *__pyx_pw_8PyClical_29odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13042  static char __pyx_doc_8PyClical_28odd[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print(odd(clifford(\"1+{1}+{1,2}\")))\n {1}\n ";
13043  static PyObject *__pyx_pw_8PyClical_29odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13044  PyObject *__pyx_r = 0;
13045  __Pyx_RefNannyDeclarations
13046  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
13047  __pyx_r = __pyx_pf_8PyClical_28odd(__pyx_self, ((PyObject *)__pyx_v_obj));
13048 
13049  /* function exit code */
13050  __Pyx_RefNannyFinishContext();
13051  return __pyx_r;
13052  }
13053 
13054  static PyObject *__pyx_pf_8PyClical_28odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13055  PyObject *__pyx_r = NULL;
13056  __Pyx_RefNannyDeclarations
13057  PyObject *__pyx_t_1 = NULL;
13058  int __pyx_lineno = 0;
13059  const char *__pyx_filename = NULL;
13060  int __pyx_clineno = 0;
13061  __Pyx_RefNannySetupContext("odd", 0);
13062  __Pyx_XDECREF(__pyx_r);
13063  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error)
13064  __Pyx_GOTREF(__pyx_t_1);
13065  __pyx_r = __pyx_t_1;
13066  __pyx_t_1 = 0;
13067  goto __pyx_L0;
13068 
13069  /* function exit code */
13070  __pyx_L1_error:;
13071  __Pyx_XDECREF(__pyx_t_1);
13072  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
13073  __pyx_r = NULL;
13074  __pyx_L0:;
13075  __Pyx_XGIVEREF(__pyx_r);
13076  __Pyx_RefNannyFinishContext();
13077  return __pyx_r;
13078  }
13079 
13080  /* "PyClical.pyx":1455
13081  * return clifford(obj).odd()
13082  *
13083  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
13084  * """
13085  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
13086  */
13087 
13088  static PyObject *__pyx_pw_8PyClical_31involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13089  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13090  PyObject *__pyx_r = NULL;
13091  __Pyx_RefNannyDeclarations
13092  PyObject *__pyx_t_1 = NULL;
13093  PyObject *__pyx_t_2 = NULL;
13094  PyObject *__pyx_t_3 = NULL;
13095  int __pyx_lineno = 0;
13096  const char *__pyx_filename = NULL;
13097  int __pyx_clineno = 0;
13098  __Pyx_RefNannySetupContext("involute", 0);
13099 
13100  /* "PyClical.pyx":1468
13101  * 1-{1}+{1,2}
13102  * """
13103  * return clifford(obj).involute() # <<<<<<<<<<<<<<
13104  *
13105  * cpdef inline reverse(obj):
13106  */
13107  __Pyx_XDECREF(__pyx_r);
13108  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error)
13109  __Pyx_GOTREF(__pyx_t_2);
13110  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_involute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1468, __pyx_L1_error)
13111  __Pyx_GOTREF(__pyx_t_3);
13112  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13113  __pyx_t_2 = NULL;
13114  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13115  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13116  if (likely(__pyx_t_2)) {
13117  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13118  __Pyx_INCREF(__pyx_t_2);
13119  __Pyx_INCREF(function);
13120  __Pyx_DECREF_SET(__pyx_t_3, function);
13121  }
13122  }
13123  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13124  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13125  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
13126  __Pyx_GOTREF(__pyx_t_1);
13127  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13128  __pyx_r = __pyx_t_1;
13129  __pyx_t_1 = 0;
13130  goto __pyx_L0;
13131 
13132  /* "PyClical.pyx":1455
13133  * return clifford(obj).odd()
13134  *
13135  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
13136  * """
13137  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
13138  */
13139 
13140  /* function exit code */
13141  __pyx_L1_error:;
13142  __Pyx_XDECREF(__pyx_t_1);
13143  __Pyx_XDECREF(__pyx_t_2);
13144  __Pyx_XDECREF(__pyx_t_3);
13145  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
13146  __pyx_r = 0;
13147  __pyx_L0:;
13148  __Pyx_XGIVEREF(__pyx_r);
13149  __Pyx_RefNannyFinishContext();
13150  return __pyx_r;
13151  }
13152 
13153  /* Python wrapper */
13154  static PyObject *__pyx_pw_8PyClical_31involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13155  static char __pyx_doc_8PyClical_30involute[] = "\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 ";
13156  static PyObject *__pyx_pw_8PyClical_31involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13157  PyObject *__pyx_r = 0;
13158  __Pyx_RefNannyDeclarations
13159  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
13160  __pyx_r = __pyx_pf_8PyClical_30involute(__pyx_self, ((PyObject *)__pyx_v_obj));
13161 
13162  /* function exit code */
13163  __Pyx_RefNannyFinishContext();
13164  return __pyx_r;
13165  }
13166 
13167  static PyObject *__pyx_pf_8PyClical_30involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13168  PyObject *__pyx_r = NULL;
13169  __Pyx_RefNannyDeclarations
13170  PyObject *__pyx_t_1 = NULL;
13171  int __pyx_lineno = 0;
13172  const char *__pyx_filename = NULL;
13173  int __pyx_clineno = 0;
13174  __Pyx_RefNannySetupContext("involute", 0);
13175  __Pyx_XDECREF(__pyx_r);
13176  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error)
13177  __Pyx_GOTREF(__pyx_t_1);
13178  __pyx_r = __pyx_t_1;
13179  __pyx_t_1 = 0;
13180  goto __pyx_L0;
13181 
13182  /* function exit code */
13183  __pyx_L1_error:;
13184  __Pyx_XDECREF(__pyx_t_1);
13185  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
13186  __pyx_r = NULL;
13187  __pyx_L0:;
13188  __Pyx_XGIVEREF(__pyx_r);
13189  __Pyx_RefNannyFinishContext();
13190  return __pyx_r;
13191  }
13192 
13193  /* "PyClical.pyx":1470
13194  * return clifford(obj).involute()
13195  *
13196  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
13197  * """
13198  * Reversion, eg. {1}*{2} -> {2}*{1}
13199  */
13200 
13201  static PyObject *__pyx_pw_8PyClical_33reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13202  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13203  PyObject *__pyx_r = NULL;
13204  __Pyx_RefNannyDeclarations
13205  PyObject *__pyx_t_1 = NULL;
13206  PyObject *__pyx_t_2 = NULL;
13207  PyObject *__pyx_t_3 = NULL;
13208  int __pyx_lineno = 0;
13209  const char *__pyx_filename = NULL;
13210  int __pyx_clineno = 0;
13211  __Pyx_RefNannySetupContext("reverse", 0);
13212 
13213  /* "PyClical.pyx":1483
13214  * 1+{1}-{1,2}
13215  * """
13216  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
13217  *
13218  * cpdef inline conj(obj):
13219  */
13220  __Pyx_XDECREF(__pyx_r);
13221  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1483, __pyx_L1_error)
13222  __Pyx_GOTREF(__pyx_t_2);
13223  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
13224  __Pyx_GOTREF(__pyx_t_3);
13225  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13226  __pyx_t_2 = NULL;
13227  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13228  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13229  if (likely(__pyx_t_2)) {
13230  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13231  __Pyx_INCREF(__pyx_t_2);
13232  __Pyx_INCREF(function);
13233  __Pyx_DECREF_SET(__pyx_t_3, function);
13234  }
13235  }
13236  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13237  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13238  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
13239  __Pyx_GOTREF(__pyx_t_1);
13240  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13241  __pyx_r = __pyx_t_1;
13242  __pyx_t_1 = 0;
13243  goto __pyx_L0;
13244 
13245  /* "PyClical.pyx":1470
13246  * return clifford(obj).involute()
13247  *
13248  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
13249  * """
13250  * Reversion, eg. {1}*{2} -> {2}*{1}
13251  */
13252 
13253  /* function exit code */
13254  __pyx_L1_error:;
13255  __Pyx_XDECREF(__pyx_t_1);
13256  __Pyx_XDECREF(__pyx_t_2);
13257  __Pyx_XDECREF(__pyx_t_3);
13258  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
13259  __pyx_r = 0;
13260  __pyx_L0:;
13261  __Pyx_XGIVEREF(__pyx_r);
13262  __Pyx_RefNannyFinishContext();
13263  return __pyx_r;
13264  }
13265 
13266  /* Python wrapper */
13267  static PyObject *__pyx_pw_8PyClical_33reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13268  static char __pyx_doc_8PyClical_32reverse[] = "\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 ";
13269  static PyObject *__pyx_pw_8PyClical_33reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13270  PyObject *__pyx_r = 0;
13271  __Pyx_RefNannyDeclarations
13272  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
13273  __pyx_r = __pyx_pf_8PyClical_32reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
13274 
13275  /* function exit code */
13276  __Pyx_RefNannyFinishContext();
13277  return __pyx_r;
13278  }
13279 
13280  static PyObject *__pyx_pf_8PyClical_32reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13281  PyObject *__pyx_r = NULL;
13282  __Pyx_RefNannyDeclarations
13283  PyObject *__pyx_t_1 = NULL;
13284  int __pyx_lineno = 0;
13285  const char *__pyx_filename = NULL;
13286  int __pyx_clineno = 0;
13287  __Pyx_RefNannySetupContext("reverse", 0);
13288  __Pyx_XDECREF(__pyx_r);
13289  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
13290  __Pyx_GOTREF(__pyx_t_1);
13291  __pyx_r = __pyx_t_1;
13292  __pyx_t_1 = 0;
13293  goto __pyx_L0;
13294 
13295  /* function exit code */
13296  __pyx_L1_error:;
13297  __Pyx_XDECREF(__pyx_t_1);
13298  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
13299  __pyx_r = NULL;
13300  __pyx_L0:;
13301  __Pyx_XGIVEREF(__pyx_r);
13302  __Pyx_RefNannyFinishContext();
13303  return __pyx_r;
13304  }
13305 
13306  /* "PyClical.pyx":1485
13307  * return clifford(obj).reverse()
13308  *
13309  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
13310  * """
13311  * Conjugation, reverse o involute == involute o reverse.
13312  */
13313 
13314  static PyObject *__pyx_pw_8PyClical_35conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13315  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13316  PyObject *__pyx_r = NULL;
13317  __Pyx_RefNannyDeclarations
13318  PyObject *__pyx_t_1 = NULL;
13319  PyObject *__pyx_t_2 = NULL;
13320  PyObject *__pyx_t_3 = NULL;
13321  int __pyx_lineno = 0;
13322  const char *__pyx_filename = NULL;
13323  int __pyx_clineno = 0;
13324  __Pyx_RefNannySetupContext("conj", 0);
13325 
13326  /* "PyClical.pyx":1498
13327  * 1-{1}-{1,2}
13328  * """
13329  * return clifford(obj).conj() # <<<<<<<<<<<<<<
13330  *
13331  * cpdef inline quad(obj):
13332  */
13333  __Pyx_XDECREF(__pyx_r);
13334  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error)
13335  __Pyx_GOTREF(__pyx_t_2);
13336  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_conj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
13337  __Pyx_GOTREF(__pyx_t_3);
13338  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13339  __pyx_t_2 = NULL;
13340  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13341  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13342  if (likely(__pyx_t_2)) {
13343  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13344  __Pyx_INCREF(__pyx_t_2);
13345  __Pyx_INCREF(function);
13346  __Pyx_DECREF_SET(__pyx_t_3, function);
13347  }
13348  }
13349  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13350  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13351  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
13352  __Pyx_GOTREF(__pyx_t_1);
13353  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13354  __pyx_r = __pyx_t_1;
13355  __pyx_t_1 = 0;
13356  goto __pyx_L0;
13357 
13358  /* "PyClical.pyx":1485
13359  * return clifford(obj).reverse()
13360  *
13361  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
13362  * """
13363  * Conjugation, reverse o involute == involute o reverse.
13364  */
13365 
13366  /* function exit code */
13367  __pyx_L1_error:;
13368  __Pyx_XDECREF(__pyx_t_1);
13369  __Pyx_XDECREF(__pyx_t_2);
13370  __Pyx_XDECREF(__pyx_t_3);
13371  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
13372  __pyx_r = 0;
13373  __pyx_L0:;
13374  __Pyx_XGIVEREF(__pyx_r);
13375  __Pyx_RefNannyFinishContext();
13376  return __pyx_r;
13377  }
13378 
13379  /* Python wrapper */
13380  static PyObject *__pyx_pw_8PyClical_35conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13381  static char __pyx_doc_8PyClical_34conj[] = "\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 ";
13382  static PyObject *__pyx_pw_8PyClical_35conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13383  PyObject *__pyx_r = 0;
13384  __Pyx_RefNannyDeclarations
13385  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
13386  __pyx_r = __pyx_pf_8PyClical_34conj(__pyx_self, ((PyObject *)__pyx_v_obj));
13387 
13388  /* function exit code */
13389  __Pyx_RefNannyFinishContext();
13390  return __pyx_r;
13391  }
13392 
13393  static PyObject *__pyx_pf_8PyClical_34conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13394  PyObject *__pyx_r = NULL;
13395  __Pyx_RefNannyDeclarations
13396  PyObject *__pyx_t_1 = NULL;
13397  int __pyx_lineno = 0;
13398  const char *__pyx_filename = NULL;
13399  int __pyx_clineno = 0;
13400  __Pyx_RefNannySetupContext("conj", 0);
13401  __Pyx_XDECREF(__pyx_r);
13402  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
13403  __Pyx_GOTREF(__pyx_t_1);
13404  __pyx_r = __pyx_t_1;
13405  __pyx_t_1 = 0;
13406  goto __pyx_L0;
13407 
13408  /* function exit code */
13409  __pyx_L1_error:;
13410  __Pyx_XDECREF(__pyx_t_1);
13411  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
13412  __pyx_r = NULL;
13413  __pyx_L0:;
13414  __Pyx_XGIVEREF(__pyx_r);
13415  __Pyx_RefNannyFinishContext();
13416  return __pyx_r;
13417  }
13418 
13419  /* "PyClical.pyx":1500
13420  * return clifford(obj).conj()
13421  *
13422  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
13423  * """
13424  * Quadratic form == (rev(x)*x)(0).
13425  */
13426 
13427  static PyObject *__pyx_pw_8PyClical_37quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13428  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13429  PyObject *__pyx_r = NULL;
13430  __Pyx_RefNannyDeclarations
13431  PyObject *__pyx_t_1 = NULL;
13432  PyObject *__pyx_t_2 = NULL;
13433  PyObject *__pyx_t_3 = NULL;
13434  int __pyx_lineno = 0;
13435  const char *__pyx_filename = NULL;
13436  int __pyx_clineno = 0;
13437  __Pyx_RefNannySetupContext("quad", 0);
13438 
13439  /* "PyClical.pyx":1509
13440  * 2.0
13441  * """
13442  * return clifford(obj).quad() # <<<<<<<<<<<<<<
13443  *
13444  * cpdef inline norm(obj):
13445  */
13446  __Pyx_XDECREF(__pyx_r);
13447  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
13448  __Pyx_GOTREF(__pyx_t_2);
13449  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_quad); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error)
13450  __Pyx_GOTREF(__pyx_t_3);
13451  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13452  __pyx_t_2 = NULL;
13453  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13454  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13455  if (likely(__pyx_t_2)) {
13456  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13457  __Pyx_INCREF(__pyx_t_2);
13458  __Pyx_INCREF(function);
13459  __Pyx_DECREF_SET(__pyx_t_3, function);
13460  }
13461  }
13462  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13463  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13464  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
13465  __Pyx_GOTREF(__pyx_t_1);
13466  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13467  __pyx_r = __pyx_t_1;
13468  __pyx_t_1 = 0;
13469  goto __pyx_L0;
13470 
13471  /* "PyClical.pyx":1500
13472  * return clifford(obj).conj()
13473  *
13474  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
13475  * """
13476  * Quadratic form == (rev(x)*x)(0).
13477  */
13478 
13479  /* function exit code */
13480  __pyx_L1_error:;
13481  __Pyx_XDECREF(__pyx_t_1);
13482  __Pyx_XDECREF(__pyx_t_2);
13483  __Pyx_XDECREF(__pyx_t_3);
13484  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
13485  __pyx_r = 0;
13486  __pyx_L0:;
13487  __Pyx_XGIVEREF(__pyx_r);
13488  __Pyx_RefNannyFinishContext();
13489  return __pyx_r;
13490  }
13491 
13492  /* Python wrapper */
13493  static PyObject *__pyx_pw_8PyClical_37quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13494  static char __pyx_doc_8PyClical_36quad[] = "\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 ";
13495  static PyObject *__pyx_pw_8PyClical_37quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13496  PyObject *__pyx_r = 0;
13497  __Pyx_RefNannyDeclarations
13498  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
13499  __pyx_r = __pyx_pf_8PyClical_36quad(__pyx_self, ((PyObject *)__pyx_v_obj));
13500 
13501  /* function exit code */
13502  __Pyx_RefNannyFinishContext();
13503  return __pyx_r;
13504  }
13505 
13506  static PyObject *__pyx_pf_8PyClical_36quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13507  PyObject *__pyx_r = NULL;
13508  __Pyx_RefNannyDeclarations
13509  PyObject *__pyx_t_1 = NULL;
13510  int __pyx_lineno = 0;
13511  const char *__pyx_filename = NULL;
13512  int __pyx_clineno = 0;
13513  __Pyx_RefNannySetupContext("quad", 0);
13514  __Pyx_XDECREF(__pyx_r);
13515  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __pyx_L1_error)
13516  __Pyx_GOTREF(__pyx_t_1);
13517  __pyx_r = __pyx_t_1;
13518  __pyx_t_1 = 0;
13519  goto __pyx_L0;
13520 
13521  /* function exit code */
13522  __pyx_L1_error:;
13523  __Pyx_XDECREF(__pyx_t_1);
13524  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
13525  __pyx_r = NULL;
13526  __pyx_L0:;
13527  __Pyx_XGIVEREF(__pyx_r);
13528  __Pyx_RefNannyFinishContext();
13529  return __pyx_r;
13530  }
13531 
13532  /* "PyClical.pyx":1511
13533  * return clifford(obj).quad()
13534  *
13535  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
13536  * """
13537  * norm == sum of squares of coordinates.
13538  */
13539 
13540  static PyObject *__pyx_pw_8PyClical_39norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13541  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13542  PyObject *__pyx_r = NULL;
13543  __Pyx_RefNannyDeclarations
13544  PyObject *__pyx_t_1 = NULL;
13545  PyObject *__pyx_t_2 = NULL;
13546  PyObject *__pyx_t_3 = NULL;
13547  int __pyx_lineno = 0;
13548  const char *__pyx_filename = NULL;
13549  int __pyx_clineno = 0;
13550  __Pyx_RefNannySetupContext("norm", 0);
13551 
13552  /* "PyClical.pyx":1520
13553  * 4.0
13554  * """
13555  * return clifford(obj).norm() # <<<<<<<<<<<<<<
13556  *
13557  * cpdef inline abs(obj):
13558  */
13559  __Pyx_XDECREF(__pyx_r);
13560  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error)
13561  __Pyx_GOTREF(__pyx_t_2);
13562  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_norm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error)
13563  __Pyx_GOTREF(__pyx_t_3);
13564  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13565  __pyx_t_2 = NULL;
13566  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13567  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
13568  if (likely(__pyx_t_2)) {
13569  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13570  __Pyx_INCREF(__pyx_t_2);
13571  __Pyx_INCREF(function);
13572  __Pyx_DECREF_SET(__pyx_t_3, function);
13573  }
13574  }
13575  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
13576  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13577  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
13578  __Pyx_GOTREF(__pyx_t_1);
13579  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13580  __pyx_r = __pyx_t_1;
13581  __pyx_t_1 = 0;
13582  goto __pyx_L0;
13583 
13584  /* "PyClical.pyx":1511
13585  * return clifford(obj).quad()
13586  *
13587  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
13588  * """
13589  * norm == sum of squares of coordinates.
13590  */
13591 
13592  /* function exit code */
13593  __pyx_L1_error:;
13594  __Pyx_XDECREF(__pyx_t_1);
13595  __Pyx_XDECREF(__pyx_t_2);
13596  __Pyx_XDECREF(__pyx_t_3);
13597  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
13598  __pyx_r = 0;
13599  __pyx_L0:;
13600  __Pyx_XGIVEREF(__pyx_r);
13601  __Pyx_RefNannyFinishContext();
13602  return __pyx_r;
13603  }
13604 
13605  /* Python wrapper */
13606  static PyObject *__pyx_pw_8PyClical_39norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13607  static char __pyx_doc_8PyClical_38norm[] = "\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 ";
13608  static PyObject *__pyx_pw_8PyClical_39norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13609  PyObject *__pyx_r = 0;
13610  __Pyx_RefNannyDeclarations
13611  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
13612  __pyx_r = __pyx_pf_8PyClical_38norm(__pyx_self, ((PyObject *)__pyx_v_obj));
13613 
13614  /* function exit code */
13615  __Pyx_RefNannyFinishContext();
13616  return __pyx_r;
13617  }
13618 
13619  static PyObject *__pyx_pf_8PyClical_38norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13620  PyObject *__pyx_r = NULL;
13621  __Pyx_RefNannyDeclarations
13622  PyObject *__pyx_t_1 = NULL;
13623  int __pyx_lineno = 0;
13624  const char *__pyx_filename = NULL;
13625  int __pyx_clineno = 0;
13626  __Pyx_RefNannySetupContext("norm", 0);
13627  __Pyx_XDECREF(__pyx_r);
13628  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __pyx_L1_error)
13629  __Pyx_GOTREF(__pyx_t_1);
13630  __pyx_r = __pyx_t_1;
13631  __pyx_t_1 = 0;
13632  goto __pyx_L0;
13633 
13634  /* function exit code */
13635  __pyx_L1_error:;
13636  __Pyx_XDECREF(__pyx_t_1);
13637  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
13638  __pyx_r = NULL;
13639  __pyx_L0:;
13640  __Pyx_XGIVEREF(__pyx_r);
13641  __Pyx_RefNannyFinishContext();
13642  return __pyx_r;
13643  }
13644 
13645  /* "PyClical.pyx":1522
13646  * return clifford(obj).norm()
13647  *
13648  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
13649  * """
13650  * Absolute value of multivector: multivector 2-norm.
13651  */
13652 
13653  static PyObject *__pyx_pw_8PyClical_41abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13654  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13655  PyObject *__pyx_r = NULL;
13656  __Pyx_RefNannyDeclarations
13657  PyObject *__pyx_t_1 = NULL;
13658  int __pyx_lineno = 0;
13659  const char *__pyx_filename = NULL;
13660  int __pyx_clineno = 0;
13661  __Pyx_RefNannySetupContext("abs", 0);
13662 
13663  /* "PyClical.pyx":1529
13664  * 2.0
13665  * """
13666  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
13667  *
13668  * cpdef inline max_abs(obj):
13669  */
13670  __Pyx_XDECREF(__pyx_r);
13671  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
13672  __Pyx_GOTREF(__pyx_t_1);
13673  __pyx_r = __pyx_t_1;
13674  __pyx_t_1 = 0;
13675  goto __pyx_L0;
13676 
13677  /* "PyClical.pyx":1522
13678  * return clifford(obj).norm()
13679  *
13680  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
13681  * """
13682  * Absolute value of multivector: multivector 2-norm.
13683  */
13684 
13685  /* function exit code */
13686  __pyx_L1_error:;
13687  __Pyx_XDECREF(__pyx_t_1);
13688  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13689  __pyx_r = 0;
13690  __pyx_L0:;
13691  __Pyx_XGIVEREF(__pyx_r);
13692  __Pyx_RefNannyFinishContext();
13693  return __pyx_r;
13694  }
13695 
13696  /* Python wrapper */
13697  static PyObject *__pyx_pw_8PyClical_41abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13698  static char __pyx_doc_8PyClical_40abs[] = "\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
13699  static PyObject *__pyx_pw_8PyClical_41abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13700  PyObject *__pyx_r = 0;
13701  __Pyx_RefNannyDeclarations
13702  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
13703  __pyx_r = __pyx_pf_8PyClical_40abs(__pyx_self, ((PyObject *)__pyx_v_obj));
13704 
13705  /* function exit code */
13706  __Pyx_RefNannyFinishContext();
13707  return __pyx_r;
13708  }
13709 
13710  static PyObject *__pyx_pf_8PyClical_40abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13711  PyObject *__pyx_r = NULL;
13712  __Pyx_RefNannyDeclarations
13713  PyObject *__pyx_t_1 = NULL;
13714  int __pyx_lineno = 0;
13715  const char *__pyx_filename = NULL;
13716  int __pyx_clineno = 0;
13717  __Pyx_RefNannySetupContext("abs", 0);
13718  __Pyx_XDECREF(__pyx_r);
13719  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error)
13720  __Pyx_GOTREF(__pyx_t_1);
13721  __pyx_r = __pyx_t_1;
13722  __pyx_t_1 = 0;
13723  goto __pyx_L0;
13724 
13725  /* function exit code */
13726  __pyx_L1_error:;
13727  __Pyx_XDECREF(__pyx_t_1);
13728  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13729  __pyx_r = NULL;
13730  __pyx_L0:;
13731  __Pyx_XGIVEREF(__pyx_r);
13732  __Pyx_RefNannyFinishContext();
13733  return __pyx_r;
13734  }
13735 
13736  /* "PyClical.pyx":1531
13737  * return glucat.abs(toClifford(obj))
13738  *
13739  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
13740  * """
13741  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
13742  */
13743 
13744  static PyObject *__pyx_pw_8PyClical_43max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13745  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13746  PyObject *__pyx_r = NULL;
13747  __Pyx_RefNannyDeclarations
13748  PyObject *__pyx_t_1 = NULL;
13749  int __pyx_lineno = 0;
13750  const char *__pyx_filename = NULL;
13751  int __pyx_clineno = 0;
13752  __Pyx_RefNannySetupContext("max_abs", 0);
13753 
13754  /* "PyClical.pyx":1541
13755  *
13756  * """
13757  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
13758  *
13759  * cpdef inline pow(obj, m):
13760  */
13761  __Pyx_XDECREF(__pyx_r);
13762  __pyx_t_1 = PyFloat_FromDouble(max_abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
13763  __Pyx_GOTREF(__pyx_t_1);
13764  __pyx_r = __pyx_t_1;
13765  __pyx_t_1 = 0;
13766  goto __pyx_L0;
13767 
13768  /* "PyClical.pyx":1531
13769  * return glucat.abs(toClifford(obj))
13770  *
13771  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
13772  * """
13773  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
13774  */
13775 
13776  /* function exit code */
13777  __pyx_L1_error:;
13778  __Pyx_XDECREF(__pyx_t_1);
13779  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13780  __pyx_r = 0;
13781  __pyx_L0:;
13782  __Pyx_XGIVEREF(__pyx_r);
13783  __Pyx_RefNannyFinishContext();
13784  return __pyx_r;
13785  }
13786 
13787  /* Python wrapper */
13788  static PyObject *__pyx_pw_8PyClical_43max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13789  static char __pyx_doc_8PyClical_42max_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 ";
13790  static PyObject *__pyx_pw_8PyClical_43max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13791  PyObject *__pyx_r = 0;
13792  __Pyx_RefNannyDeclarations
13793  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
13794  __pyx_r = __pyx_pf_8PyClical_42max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
13795 
13796  /* function exit code */
13797  __Pyx_RefNannyFinishContext();
13798  return __pyx_r;
13799  }
13800 
13801  static PyObject *__pyx_pf_8PyClical_42max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13802  PyObject *__pyx_r = NULL;
13803  __Pyx_RefNannyDeclarations
13804  PyObject *__pyx_t_1 = NULL;
13805  int __pyx_lineno = 0;
13806  const char *__pyx_filename = NULL;
13807  int __pyx_clineno = 0;
13808  __Pyx_RefNannySetupContext("max_abs", 0);
13809  __Pyx_XDECREF(__pyx_r);
13810  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error)
13811  __Pyx_GOTREF(__pyx_t_1);
13812  __pyx_r = __pyx_t_1;
13813  __pyx_t_1 = 0;
13814  goto __pyx_L0;
13815 
13816  /* function exit code */
13817  __pyx_L1_error:;
13818  __Pyx_XDECREF(__pyx_t_1);
13819  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
13820  __pyx_r = NULL;
13821  __pyx_L0:;
13822  __Pyx_XGIVEREF(__pyx_r);
13823  __Pyx_RefNannyFinishContext();
13824  return __pyx_r;
13825  }
13826 
13827  /* "PyClical.pyx":1543
13828  * return glucat.max_abs(toClifford(obj))
13829  *
13830  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
13831  * """
13832  * Integer power of multivector: obj to the m.
13833  */
13834 
13835  static PyObject *__pyx_pw_8PyClical_45pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13836  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13837  PyObject *__pyx_r = NULL;
13838  __Pyx_RefNannyDeclarations
13839  PyObject *__pyx_t_1 = NULL;
13840  PyObject *__pyx_t_2 = NULL;
13841  PyObject *__pyx_t_3 = NULL;
13842  PyObject *__pyx_t_4 = NULL;
13843  PyObject *__pyx_t_5 = NULL;
13844  PyObject *__pyx_t_6 = NULL;
13845  int __pyx_t_7;
13846  PyObject *__pyx_t_8 = NULL;
13847  PyObject *__pyx_t_9 = NULL;
13848  PyObject *__pyx_t_10 = NULL;
13849  int __pyx_lineno = 0;
13850  const char *__pyx_filename = NULL;
13851  int __pyx_clineno = 0;
13852  __Pyx_RefNannySetupContext("pow", 0);
13853 
13854  /* "PyClical.pyx":1562
13855  * 1
13856  * """
13857  * try: # <<<<<<<<<<<<<<
13858  * math.pow(obj, m)
13859  * except:
13860  */
13861  {
13862  __Pyx_PyThreadState_declare
13863  __Pyx_PyThreadState_assign
13864  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13865  __Pyx_XGOTREF(__pyx_t_1);
13866  __Pyx_XGOTREF(__pyx_t_2);
13867  __Pyx_XGOTREF(__pyx_t_3);
13868  /*try:*/ {
13869 
13870  /* "PyClical.pyx":1563
13871  * """
13872  * try:
13873  * math.pow(obj, m) # <<<<<<<<<<<<<<
13874  * except:
13875  * return clifford(obj).pow(m)
13876  */
13877  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L3_error)
13878  __Pyx_GOTREF(__pyx_t_5);
13879  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pow); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1563, __pyx_L3_error)
13880  __Pyx_GOTREF(__pyx_t_6);
13881  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13882  __pyx_t_5 = NULL;
13883  __pyx_t_7 = 0;
13884  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13885  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13886  if (likely(__pyx_t_5)) {
13887  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13888  __Pyx_INCREF(__pyx_t_5);
13889  __Pyx_INCREF(function);
13890  __Pyx_DECREF_SET(__pyx_t_6, function);
13891  __pyx_t_7 = 1;
13892  }
13893  }
13894  #if CYTHON_FAST_PYCALL
13895  if (PyFunction_Check(__pyx_t_6)) {
13896  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
13897  __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, 1563, __pyx_L3_error)
13898  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13899  __Pyx_GOTREF(__pyx_t_4);
13900  } else
13901  #endif
13902  #if CYTHON_FAST_PYCCALL
13903  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13904  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
13905  __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, 1563, __pyx_L3_error)
13906  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13907  __Pyx_GOTREF(__pyx_t_4);
13908  } else
13909  #endif
13910  {
13911  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1563, __pyx_L3_error)
13912  __Pyx_GOTREF(__pyx_t_8);
13913  if (__pyx_t_5) {
13914  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
13915  }
13916  __Pyx_INCREF(__pyx_v_obj);
13917  __Pyx_GIVEREF(__pyx_v_obj);
13918  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
13919  __Pyx_INCREF(__pyx_v_m);
13920  __Pyx_GIVEREF(__pyx_v_m);
13921  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
13922  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L3_error)
13923  __Pyx_GOTREF(__pyx_t_4);
13924  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13925  }
13926  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13927  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13928 
13929  /* "PyClical.pyx":1562
13930  * 1
13931  * """
13932  * try: # <<<<<<<<<<<<<<
13933  * math.pow(obj, m)
13934  * except:
13935  */
13936  }
13937  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
13938  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
13939  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13940  goto __pyx_L8_try_end;
13941  __pyx_L3_error:;
13942  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13943  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13944  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13945  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13946 
13947  /* "PyClical.pyx":1564
13948  * try:
13949  * math.pow(obj, m)
13950  * except: # <<<<<<<<<<<<<<
13951  * return clifford(obj).pow(m)
13952  *
13953  */
13954  /*except:*/ {
13955  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13956  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1564, __pyx_L5_except_error)
13957  __Pyx_GOTREF(__pyx_t_4);
13958  __Pyx_GOTREF(__pyx_t_6);
13959  __Pyx_GOTREF(__pyx_t_8);
13960 
13961  /* "PyClical.pyx":1565
13962  * math.pow(obj, m)
13963  * except:
13964  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
13965  *
13966  * cpdef inline outer_pow(obj, m):
13967  */
13968  __Pyx_XDECREF(__pyx_r);
13969  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1565, __pyx_L5_except_error)
13970  __Pyx_GOTREF(__pyx_t_9);
13971  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_pow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1565, __pyx_L5_except_error)
13972  __Pyx_GOTREF(__pyx_t_10);
13973  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13974  __pyx_t_9 = NULL;
13975  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
13976  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
13977  if (likely(__pyx_t_9)) {
13978  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
13979  __Pyx_INCREF(__pyx_t_9);
13980  __Pyx_INCREF(function);
13981  __Pyx_DECREF_SET(__pyx_t_10, function);
13982  }
13983  }
13984  __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);
13985  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13986  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1565, __pyx_L5_except_error)
13987  __Pyx_GOTREF(__pyx_t_5);
13988  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13989  __pyx_r = __pyx_t_5;
13990  __pyx_t_5 = 0;
13991  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13992  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13993  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13994  goto __pyx_L6_except_return;
13995  }
13996  __pyx_L5_except_error:;
13997 
13998  /* "PyClical.pyx":1562
13999  * 1
14000  * """
14001  * try: # <<<<<<<<<<<<<<
14002  * math.pow(obj, m)
14003  * except:
14004  */
14005  __Pyx_XGIVEREF(__pyx_t_1);
14006  __Pyx_XGIVEREF(__pyx_t_2);
14007  __Pyx_XGIVEREF(__pyx_t_3);
14008  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14009  goto __pyx_L1_error;
14010  __pyx_L6_except_return:;
14011  __Pyx_XGIVEREF(__pyx_t_1);
14012  __Pyx_XGIVEREF(__pyx_t_2);
14013  __Pyx_XGIVEREF(__pyx_t_3);
14014  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14015  goto __pyx_L0;
14016  __pyx_L8_try_end:;
14017  }
14018 
14019  /* "PyClical.pyx":1543
14020  * return glucat.max_abs(toClifford(obj))
14021  *
14022  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
14023  * """
14024  * Integer power of multivector: obj to the m.
14025  */
14026 
14027  /* function exit code */
14028  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14029  goto __pyx_L0;
14030  __pyx_L1_error:;
14031  __Pyx_XDECREF(__pyx_t_4);
14032  __Pyx_XDECREF(__pyx_t_5);
14033  __Pyx_XDECREF(__pyx_t_6);
14034  __Pyx_XDECREF(__pyx_t_8);
14035  __Pyx_XDECREF(__pyx_t_9);
14036  __Pyx_XDECREF(__pyx_t_10);
14037  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14038  __pyx_r = 0;
14039  __pyx_L0:;
14040  __Pyx_XGIVEREF(__pyx_r);
14041  __Pyx_RefNannyFinishContext();
14042  return __pyx_r;
14043  }
14044 
14045  /* Python wrapper */
14046  static PyObject *__pyx_pw_8PyClical_45pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14047  static char __pyx_doc_8PyClical_44pow[] = "\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 ";
14048  static PyObject *__pyx_pw_8PyClical_45pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14049  PyObject *__pyx_v_obj = 0;
14050  PyObject *__pyx_v_m = 0;
14051  int __pyx_lineno = 0;
14052  const char *__pyx_filename = NULL;
14053  int __pyx_clineno = 0;
14054  PyObject *__pyx_r = 0;
14055  __Pyx_RefNannyDeclarations
14056  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
14057  {
14058  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
14059  PyObject* values[2] = {0,0};
14060  if (unlikely(__pyx_kwds)) {
14061  Py_ssize_t kw_args;
14062  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14063  switch (pos_args) {
14064  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14065  CYTHON_FALLTHROUGH;
14066  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14067  CYTHON_FALLTHROUGH;
14068  case 0: break;
14069  default: goto __pyx_L5_argtuple_error;
14070  }
14071  kw_args = PyDict_Size(__pyx_kwds);
14072  switch (pos_args) {
14073  case 0:
14074  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14075  else goto __pyx_L5_argtuple_error;
14076  CYTHON_FALLTHROUGH;
14077  case 1:
14078  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
14079  else {
14080  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1543, __pyx_L3_error)
14081  }
14082  }
14083  if (unlikely(kw_args > 0)) {
14084  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1543, __pyx_L3_error)
14085  }
14086  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
14087  goto __pyx_L5_argtuple_error;
14088  } else {
14089  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14090  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14091  }
14092  __pyx_v_obj = values[0];
14093  __pyx_v_m = values[1];
14094  }
14095  goto __pyx_L4_argument_unpacking_done;
14096  __pyx_L5_argtuple_error:;
14097  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1543, __pyx_L3_error)
14098  __pyx_L3_error:;
14099  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14100  __Pyx_RefNannyFinishContext();
14101  return NULL;
14102  __pyx_L4_argument_unpacking_done:;
14103  __pyx_r = __pyx_pf_8PyClical_44pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
14104 
14105  /* function exit code */
14106  __Pyx_RefNannyFinishContext();
14107  return __pyx_r;
14108  }
14109 
14110  static PyObject *__pyx_pf_8PyClical_44pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
14111  PyObject *__pyx_r = NULL;
14112  __Pyx_RefNannyDeclarations
14113  PyObject *__pyx_t_1 = NULL;
14114  int __pyx_lineno = 0;
14115  const char *__pyx_filename = NULL;
14116  int __pyx_clineno = 0;
14117  __Pyx_RefNannySetupContext("pow", 0);
14118  __Pyx_XDECREF(__pyx_r);
14119  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error)
14120  __Pyx_GOTREF(__pyx_t_1);
14121  __pyx_r = __pyx_t_1;
14122  __pyx_t_1 = 0;
14123  goto __pyx_L0;
14124 
14125  /* function exit code */
14126  __pyx_L1_error:;
14127  __Pyx_XDECREF(__pyx_t_1);
14128  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14129  __pyx_r = NULL;
14130  __pyx_L0:;
14131  __Pyx_XGIVEREF(__pyx_r);
14132  __Pyx_RefNannyFinishContext();
14133  return __pyx_r;
14134  }
14135 
14136  /* "PyClical.pyx":1567
14137  * return clifford(obj).pow(m)
14138  *
14139  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
14140  * """
14141  * Outer product power of multivector.
14142  */
14143 
14144  static PyObject *__pyx_pw_8PyClical_47outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14145  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
14146  PyObject *__pyx_r = NULL;
14147  __Pyx_RefNannyDeclarations
14148  PyObject *__pyx_t_1 = NULL;
14149  PyObject *__pyx_t_2 = NULL;
14150  PyObject *__pyx_t_3 = NULL;
14151  int __pyx_lineno = 0;
14152  const char *__pyx_filename = NULL;
14153  int __pyx_clineno = 0;
14154  __Pyx_RefNannySetupContext("outer_pow", 0);
14155 
14156  /* "PyClical.pyx":1574
14157  * 1+3{1}+3{1,2}
14158  * """
14159  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
14160  *
14161  * cpdef inline complexifier(obj):
14162  */
14163  __Pyx_XDECREF(__pyx_r);
14164  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error)
14165  __Pyx_GOTREF(__pyx_t_2);
14166  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outer_pow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error)
14167  __Pyx_GOTREF(__pyx_t_3);
14168  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14169  __pyx_t_2 = NULL;
14170  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
14171  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
14172  if (likely(__pyx_t_2)) {
14173  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
14174  __Pyx_INCREF(__pyx_t_2);
14175  __Pyx_INCREF(function);
14176  __Pyx_DECREF_SET(__pyx_t_3, function);
14177  }
14178  }
14179  __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);
14180  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14181  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error)
14182  __Pyx_GOTREF(__pyx_t_1);
14183  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14184  __pyx_r = __pyx_t_1;
14185  __pyx_t_1 = 0;
14186  goto __pyx_L0;
14187 
14188  /* "PyClical.pyx":1567
14189  * return clifford(obj).pow(m)
14190  *
14191  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
14192  * """
14193  * Outer product power of multivector.
14194  */
14195 
14196  /* function exit code */
14197  __pyx_L1_error:;
14198  __Pyx_XDECREF(__pyx_t_1);
14199  __Pyx_XDECREF(__pyx_t_2);
14200  __Pyx_XDECREF(__pyx_t_3);
14201  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14202  __pyx_r = 0;
14203  __pyx_L0:;
14204  __Pyx_XGIVEREF(__pyx_r);
14205  __Pyx_RefNannyFinishContext();
14206  return __pyx_r;
14207  }
14208 
14209  /* Python wrapper */
14210  static PyObject *__pyx_pw_8PyClical_47outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14211  static char __pyx_doc_8PyClical_46outer_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 ";
14212  static PyObject *__pyx_pw_8PyClical_47outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14213  PyObject *__pyx_v_obj = 0;
14214  PyObject *__pyx_v_m = 0;
14215  int __pyx_lineno = 0;
14216  const char *__pyx_filename = NULL;
14217  int __pyx_clineno = 0;
14218  PyObject *__pyx_r = 0;
14219  __Pyx_RefNannyDeclarations
14220  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
14221  {
14222  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
14223  PyObject* values[2] = {0,0};
14224  if (unlikely(__pyx_kwds)) {
14225  Py_ssize_t kw_args;
14226  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14227  switch (pos_args) {
14228  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14229  CYTHON_FALLTHROUGH;
14230  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14231  CYTHON_FALLTHROUGH;
14232  case 0: break;
14233  default: goto __pyx_L5_argtuple_error;
14234  }
14235  kw_args = PyDict_Size(__pyx_kwds);
14236  switch (pos_args) {
14237  case 0:
14238  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14239  else goto __pyx_L5_argtuple_error;
14240  CYTHON_FALLTHROUGH;
14241  case 1:
14242  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
14243  else {
14244  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1567, __pyx_L3_error)
14245  }
14246  }
14247  if (unlikely(kw_args > 0)) {
14248  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1567, __pyx_L3_error)
14249  }
14250  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
14251  goto __pyx_L5_argtuple_error;
14252  } else {
14253  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14254  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14255  }
14256  __pyx_v_obj = values[0];
14257  __pyx_v_m = values[1];
14258  }
14259  goto __pyx_L4_argument_unpacking_done;
14260  __pyx_L5_argtuple_error:;
14261  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1567, __pyx_L3_error)
14262  __pyx_L3_error:;
14263  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14264  __Pyx_RefNannyFinishContext();
14265  return NULL;
14266  __pyx_L4_argument_unpacking_done:;
14267  __pyx_r = __pyx_pf_8PyClical_46outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
14268 
14269  /* function exit code */
14270  __Pyx_RefNannyFinishContext();
14271  return __pyx_r;
14272  }
14273 
14274  static PyObject *__pyx_pf_8PyClical_46outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
14275  PyObject *__pyx_r = NULL;
14276  __Pyx_RefNannyDeclarations
14277  PyObject *__pyx_t_1 = NULL;
14278  int __pyx_lineno = 0;
14279  const char *__pyx_filename = NULL;
14280  int __pyx_clineno = 0;
14281  __Pyx_RefNannySetupContext("outer_pow", 0);
14282  __Pyx_XDECREF(__pyx_r);
14283  __pyx_t_1 = __pyx_f_8PyClical_outer_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error)
14284  __Pyx_GOTREF(__pyx_t_1);
14285  __pyx_r = __pyx_t_1;
14286  __pyx_t_1 = 0;
14287  goto __pyx_L0;
14288 
14289  /* function exit code */
14290  __pyx_L1_error:;
14291  __Pyx_XDECREF(__pyx_t_1);
14292  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
14293  __pyx_r = NULL;
14294  __pyx_L0:;
14295  __Pyx_XGIVEREF(__pyx_r);
14296  __Pyx_RefNannyFinishContext();
14297  return __pyx_r;
14298  }
14299 
14300  /* "PyClical.pyx":1576
14301  * return clifford(obj).outer_pow(m)
14302  *
14303  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
14304  * """
14305  * Square root of -1 which commutes with all members of the frame of the given multivector.
14306  */
14307 
14308  static PyObject *__pyx_pw_8PyClical_49complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14309  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14310  PyObject *__pyx_r = NULL;
14311  __Pyx_RefNannyDeclarations
14312  PyObject *__pyx_t_1 = NULL;
14313  PyObject *__pyx_t_2 = NULL;
14314  int __pyx_lineno = 0;
14315  const char *__pyx_filename = NULL;
14316  int __pyx_clineno = 0;
14317  __Pyx_RefNannySetupContext("complexifier", 0);
14318 
14319  /* "PyClical.pyx":1589
14320  * {-1}
14321  * """
14322  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
14323  *
14324  * cpdef inline sqrt(obj, i = None):
14325  */
14326  __Pyx_XDECREF(__pyx_r);
14327  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1589, __pyx_L1_error)
14328  __Pyx_GOTREF(__pyx_t_1);
14329  __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, 1589, __pyx_L1_error)
14330  __Pyx_GOTREF(__pyx_t_2);
14331  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14332  __pyx_r = __pyx_t_2;
14333  __pyx_t_2 = 0;
14334  goto __pyx_L0;
14335 
14336  /* "PyClical.pyx":1576
14337  * return clifford(obj).outer_pow(m)
14338  *
14339  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
14340  * """
14341  * Square root of -1 which commutes with all members of the frame of the given multivector.
14342  */
14343 
14344  /* function exit code */
14345  __pyx_L1_error:;
14346  __Pyx_XDECREF(__pyx_t_1);
14347  __Pyx_XDECREF(__pyx_t_2);
14348  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
14349  __pyx_r = 0;
14350  __pyx_L0:;
14351  __Pyx_XGIVEREF(__pyx_r);
14352  __Pyx_RefNannyFinishContext();
14353  return __pyx_r;
14354  }
14355 
14356  /* Python wrapper */
14357  static PyObject *__pyx_pw_8PyClical_49complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14358  static char __pyx_doc_8PyClical_48complexifier[] = "\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 ";
14359  static PyObject *__pyx_pw_8PyClical_49complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14360  PyObject *__pyx_r = 0;
14361  __Pyx_RefNannyDeclarations
14362  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
14363  __pyx_r = __pyx_pf_8PyClical_48complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
14364 
14365  /* function exit code */
14366  __Pyx_RefNannyFinishContext();
14367  return __pyx_r;
14368  }
14369 
14370  static PyObject *__pyx_pf_8PyClical_48complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14371  PyObject *__pyx_r = NULL;
14372  __Pyx_RefNannyDeclarations
14373  PyObject *__pyx_t_1 = NULL;
14374  int __pyx_lineno = 0;
14375  const char *__pyx_filename = NULL;
14376  int __pyx_clineno = 0;
14377  __Pyx_RefNannySetupContext("complexifier", 0);
14378  __Pyx_XDECREF(__pyx_r);
14379  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
14380  __Pyx_GOTREF(__pyx_t_1);
14381  __pyx_r = __pyx_t_1;
14382  __pyx_t_1 = 0;
14383  goto __pyx_L0;
14384 
14385  /* function exit code */
14386  __pyx_L1_error:;
14387  __Pyx_XDECREF(__pyx_t_1);
14388  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
14389  __pyx_r = NULL;
14390  __pyx_L0:;
14391  __Pyx_XGIVEREF(__pyx_r);
14392  __Pyx_RefNannyFinishContext();
14393  return __pyx_r;
14394  }
14395 
14396  /* "PyClical.pyx":1591
14397  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
14398  *
14399  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
14400  * """
14401  * Square root of multivector with optional complexifier.
14402  */
14403 
14404  static PyObject *__pyx_pw_8PyClical_51sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14405  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) {
14406  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14407  PyObject *__pyx_r = NULL;
14408  __Pyx_RefNannyDeclarations
14409  int __pyx_t_1;
14410  int __pyx_t_2;
14411  PyObject *__pyx_t_3 = NULL;
14412  Clifford __pyx_t_4;
14413  PyObject *__pyx_t_5 = NULL;
14414  PyObject *__pyx_t_6 = NULL;
14415  PyObject *__pyx_t_7 = NULL;
14416  PyObject *__pyx_t_8 = NULL;
14417  PyObject *__pyx_t_9 = NULL;
14418  PyObject *__pyx_t_10 = NULL;
14419  PyObject *__pyx_t_11 = NULL;
14420  int __pyx_lineno = 0;
14421  const char *__pyx_filename = NULL;
14422  int __pyx_clineno = 0;
14423  __Pyx_RefNannySetupContext("sqrt", 0);
14424  if (__pyx_optional_args) {
14425  if (__pyx_optional_args->__pyx_n > 0) {
14426  __pyx_v_i = __pyx_optional_args->i;
14427  }
14428  }
14429 
14430  /* "PyClical.pyx":1606
14431  * -1
14432  * """
14433  * if not (i is None): # <<<<<<<<<<<<<<
14434  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
14435  * else:
14436  */
14437  __pyx_t_1 = (__pyx_v_i != Py_None);
14438  __pyx_t_2 = (__pyx_t_1 != 0);
14439  if (__pyx_t_2) {
14440 
14441  /* "PyClical.pyx":1607
14442  * """
14443  * if not (i is None):
14444  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14445  * else:
14446  * try:
14447  */
14448  __Pyx_XDECREF(__pyx_r);
14449  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error)
14450  __Pyx_GOTREF(__pyx_t_3);
14451  try {
14452  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14453  } catch(...) {
14454  __Pyx_CppExn2PyErr();
14455  __PYX_ERR(0, 1607, __pyx_L1_error)
14456  }
14457  __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, 1607, __pyx_L1_error)
14458  __Pyx_GOTREF(__pyx_t_5);
14459  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14460  __pyx_r = __pyx_t_5;
14461  __pyx_t_5 = 0;
14462  goto __pyx_L0;
14463 
14464  /* "PyClical.pyx":1606
14465  * -1
14466  * """
14467  * if not (i is None): # <<<<<<<<<<<<<<
14468  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
14469  * else:
14470  */
14471  }
14472 
14473  /* "PyClical.pyx":1609
14474  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
14475  * else:
14476  * try: # <<<<<<<<<<<<<<
14477  * return math.sqrt(obj)
14478  * except:
14479  */
14480  /*else*/ {
14481  {
14482  __Pyx_PyThreadState_declare
14483  __Pyx_PyThreadState_assign
14484  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14485  __Pyx_XGOTREF(__pyx_t_6);
14486  __Pyx_XGOTREF(__pyx_t_7);
14487  __Pyx_XGOTREF(__pyx_t_8);
14488  /*try:*/ {
14489 
14490  /* "PyClical.pyx":1610
14491  * else:
14492  * try:
14493  * return math.sqrt(obj) # <<<<<<<<<<<<<<
14494  * except:
14495  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14496  */
14497  __Pyx_XDECREF(__pyx_r);
14498  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1610, __pyx_L4_error)
14499  __Pyx_GOTREF(__pyx_t_3);
14500  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1610, __pyx_L4_error)
14501  __Pyx_GOTREF(__pyx_t_9);
14502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14503  __pyx_t_3 = NULL;
14504  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14505  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14506  if (likely(__pyx_t_3)) {
14507  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14508  __Pyx_INCREF(__pyx_t_3);
14509  __Pyx_INCREF(function);
14510  __Pyx_DECREF_SET(__pyx_t_9, function);
14511  }
14512  }
14513  __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);
14514  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14515  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1610, __pyx_L4_error)
14516  __Pyx_GOTREF(__pyx_t_5);
14517  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14518  __pyx_r = __pyx_t_5;
14519  __pyx_t_5 = 0;
14520  goto __pyx_L8_try_return;
14521 
14522  /* "PyClical.pyx":1609
14523  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
14524  * else:
14525  * try: # <<<<<<<<<<<<<<
14526  * return math.sqrt(obj)
14527  * except:
14528  */
14529  }
14530  __pyx_L4_error:;
14531  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14532  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14533  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14534 
14535  /* "PyClical.pyx":1611
14536  * try:
14537  * return math.sqrt(obj)
14538  * except: # <<<<<<<<<<<<<<
14539  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14540  *
14541  */
14542  /*except:*/ {
14543  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14544  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1611, __pyx_L6_except_error)
14545  __Pyx_GOTREF(__pyx_t_5);
14546  __Pyx_GOTREF(__pyx_t_9);
14547  __Pyx_GOTREF(__pyx_t_3);
14548 
14549  /* "PyClical.pyx":1612
14550  * return math.sqrt(obj)
14551  * except:
14552  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
14553  *
14554  * cpdef inline exp(obj):
14555  */
14556  __Pyx_XDECREF(__pyx_r);
14557  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1612, __pyx_L6_except_error)
14558  __Pyx_GOTREF(__pyx_t_10);
14559  __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, 1612, __pyx_L6_except_error)
14560  __Pyx_GOTREF(__pyx_t_11);
14561  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14562  __pyx_r = __pyx_t_11;
14563  __pyx_t_11 = 0;
14564  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14565  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14566  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14567  goto __pyx_L7_except_return;
14568  }
14569  __pyx_L6_except_error:;
14570 
14571  /* "PyClical.pyx":1609
14572  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
14573  * else:
14574  * try: # <<<<<<<<<<<<<<
14575  * return math.sqrt(obj)
14576  * except:
14577  */
14578  __Pyx_XGIVEREF(__pyx_t_6);
14579  __Pyx_XGIVEREF(__pyx_t_7);
14580  __Pyx_XGIVEREF(__pyx_t_8);
14581  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14582  goto __pyx_L1_error;
14583  __pyx_L8_try_return:;
14584  __Pyx_XGIVEREF(__pyx_t_6);
14585  __Pyx_XGIVEREF(__pyx_t_7);
14586  __Pyx_XGIVEREF(__pyx_t_8);
14587  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14588  goto __pyx_L0;
14589  __pyx_L7_except_return:;
14590  __Pyx_XGIVEREF(__pyx_t_6);
14591  __Pyx_XGIVEREF(__pyx_t_7);
14592  __Pyx_XGIVEREF(__pyx_t_8);
14593  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14594  goto __pyx_L0;
14595  }
14596  }
14597 
14598  /* "PyClical.pyx":1591
14599  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
14600  *
14601  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
14602  * """
14603  * Square root of multivector with optional complexifier.
14604  */
14605 
14606  /* function exit code */
14607  __pyx_L1_error:;
14608  __Pyx_XDECREF(__pyx_t_3);
14609  __Pyx_XDECREF(__pyx_t_5);
14610  __Pyx_XDECREF(__pyx_t_9);
14611  __Pyx_XDECREF(__pyx_t_10);
14612  __Pyx_XDECREF(__pyx_t_11);
14613  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14614  __pyx_r = 0;
14615  __pyx_L0:;
14616  __Pyx_XGIVEREF(__pyx_r);
14617  __Pyx_RefNannyFinishContext();
14618  return __pyx_r;
14619  }
14620 
14621  /* Python wrapper */
14622  static PyObject *__pyx_pw_8PyClical_51sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14623  static char __pyx_doc_8PyClical_50sqrt[] = "\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 ";
14624  static PyObject *__pyx_pw_8PyClical_51sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14625  PyObject *__pyx_v_obj = 0;
14626  PyObject *__pyx_v_i = 0;
14627  int __pyx_lineno = 0;
14628  const char *__pyx_filename = NULL;
14629  int __pyx_clineno = 0;
14630  PyObject *__pyx_r = 0;
14631  __Pyx_RefNannyDeclarations
14632  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
14633  {
14634  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14635  PyObject* values[2] = {0,0};
14636  values[1] = ((PyObject *)Py_None);
14637  if (unlikely(__pyx_kwds)) {
14638  Py_ssize_t kw_args;
14639  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14640  switch (pos_args) {
14641  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14642  CYTHON_FALLTHROUGH;
14643  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14644  CYTHON_FALLTHROUGH;
14645  case 0: break;
14646  default: goto __pyx_L5_argtuple_error;
14647  }
14648  kw_args = PyDict_Size(__pyx_kwds);
14649  switch (pos_args) {
14650  case 0:
14651  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14652  else goto __pyx_L5_argtuple_error;
14653  CYTHON_FALLTHROUGH;
14654  case 1:
14655  if (kw_args > 0) {
14656  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14657  if (value) { values[1] = value; kw_args--; }
14658  }
14659  }
14660  if (unlikely(kw_args > 0)) {
14661  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1591, __pyx_L3_error)
14662  }
14663  } else {
14664  switch (PyTuple_GET_SIZE(__pyx_args)) {
14665  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14666  CYTHON_FALLTHROUGH;
14667  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14668  break;
14669  default: goto __pyx_L5_argtuple_error;
14670  }
14671  }
14672  __pyx_v_obj = values[0];
14673  __pyx_v_i = values[1];
14674  }
14675  goto __pyx_L4_argument_unpacking_done;
14676  __pyx_L5_argtuple_error:;
14677  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1591, __pyx_L3_error)
14678  __pyx_L3_error:;
14679  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14680  __Pyx_RefNannyFinishContext();
14681  return NULL;
14682  __pyx_L4_argument_unpacking_done:;
14683  __pyx_r = __pyx_pf_8PyClical_50sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
14684 
14685  /* function exit code */
14686  __Pyx_RefNannyFinishContext();
14687  return __pyx_r;
14688  }
14689 
14690  static PyObject *__pyx_pf_8PyClical_50sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14691  PyObject *__pyx_r = NULL;
14692  __Pyx_RefNannyDeclarations
14693  PyObject *__pyx_t_1 = NULL;
14694  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
14695  int __pyx_lineno = 0;
14696  const char *__pyx_filename = NULL;
14697  int __pyx_clineno = 0;
14698  __Pyx_RefNannySetupContext("sqrt", 0);
14699  __Pyx_XDECREF(__pyx_r);
14700  __pyx_t_2.__pyx_n = 1;
14701  __pyx_t_2.i = __pyx_v_i;
14702  __pyx_t_1 = __pyx_f_8PyClical_sqrt(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error)
14703  __Pyx_GOTREF(__pyx_t_1);
14704  __pyx_r = __pyx_t_1;
14705  __pyx_t_1 = 0;
14706  goto __pyx_L0;
14707 
14708  /* function exit code */
14709  __pyx_L1_error:;
14710  __Pyx_XDECREF(__pyx_t_1);
14711  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14712  __pyx_r = NULL;
14713  __pyx_L0:;
14714  __Pyx_XGIVEREF(__pyx_r);
14715  __Pyx_RefNannyFinishContext();
14716  return __pyx_r;
14717  }
14718 
14719  /* "PyClical.pyx":1614
14720  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14721  *
14722  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
14723  * """
14724  * Exponential of multivector.
14725  */
14726 
14727  static PyObject *__pyx_pw_8PyClical_53exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14728  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14729  PyObject *__pyx_r = NULL;
14730  __Pyx_RefNannyDeclarations
14731  PyObject *__pyx_t_1 = NULL;
14732  PyObject *__pyx_t_2 = NULL;
14733  PyObject *__pyx_t_3 = NULL;
14734  PyObject *__pyx_t_4 = NULL;
14735  PyObject *__pyx_t_5 = NULL;
14736  PyObject *__pyx_t_6 = NULL;
14737  PyObject *__pyx_t_7 = NULL;
14738  PyObject *__pyx_t_8 = NULL;
14739  int __pyx_lineno = 0;
14740  const char *__pyx_filename = NULL;
14741  int __pyx_clineno = 0;
14742  __Pyx_RefNannySetupContext("exp", 0);
14743 
14744  /* "PyClical.pyx":1623
14745  * {1,2}
14746  * """
14747  * try: # <<<<<<<<<<<<<<
14748  * return math.exp(obj)
14749  * except:
14750  */
14751  {
14752  __Pyx_PyThreadState_declare
14753  __Pyx_PyThreadState_assign
14754  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14755  __Pyx_XGOTREF(__pyx_t_1);
14756  __Pyx_XGOTREF(__pyx_t_2);
14757  __Pyx_XGOTREF(__pyx_t_3);
14758  /*try:*/ {
14759 
14760  /* "PyClical.pyx":1624
14761  * """
14762  * try:
14763  * return math.exp(obj) # <<<<<<<<<<<<<<
14764  * except:
14765  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14766  */
14767  __Pyx_XDECREF(__pyx_r);
14768  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1624, __pyx_L3_error)
14769  __Pyx_GOTREF(__pyx_t_5);
14770  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1624, __pyx_L3_error)
14771  __Pyx_GOTREF(__pyx_t_6);
14772  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14773  __pyx_t_5 = NULL;
14774  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14775  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14776  if (likely(__pyx_t_5)) {
14777  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14778  __Pyx_INCREF(__pyx_t_5);
14779  __Pyx_INCREF(function);
14780  __Pyx_DECREF_SET(__pyx_t_6, function);
14781  }
14782  }
14783  __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);
14784  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14785  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1624, __pyx_L3_error)
14786  __Pyx_GOTREF(__pyx_t_4);
14787  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14788  __pyx_r = __pyx_t_4;
14789  __pyx_t_4 = 0;
14790  goto __pyx_L7_try_return;
14791 
14792  /* "PyClical.pyx":1623
14793  * {1,2}
14794  * """
14795  * try: # <<<<<<<<<<<<<<
14796  * return math.exp(obj)
14797  * except:
14798  */
14799  }
14800  __pyx_L3_error:;
14801  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14802  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14803  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14804 
14805  /* "PyClical.pyx":1625
14806  * try:
14807  * return math.exp(obj)
14808  * except: # <<<<<<<<<<<<<<
14809  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14810  *
14811  */
14812  /*except:*/ {
14813  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14814  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1625, __pyx_L5_except_error)
14815  __Pyx_GOTREF(__pyx_t_4);
14816  __Pyx_GOTREF(__pyx_t_6);
14817  __Pyx_GOTREF(__pyx_t_5);
14818 
14819  /* "PyClical.pyx":1626
14820  * return math.exp(obj)
14821  * except:
14822  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
14823  *
14824  * cpdef inline log(obj,i = None):
14825  */
14826  __Pyx_XDECREF(__pyx_r);
14827  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1626, __pyx_L5_except_error)
14828  __Pyx_GOTREF(__pyx_t_7);
14829  __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, 1626, __pyx_L5_except_error)
14830  __Pyx_GOTREF(__pyx_t_8);
14831  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14832  __pyx_r = __pyx_t_8;
14833  __pyx_t_8 = 0;
14834  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14835  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14836  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14837  goto __pyx_L6_except_return;
14838  }
14839  __pyx_L5_except_error:;
14840 
14841  /* "PyClical.pyx":1623
14842  * {1,2}
14843  * """
14844  * try: # <<<<<<<<<<<<<<
14845  * return math.exp(obj)
14846  * except:
14847  */
14848  __Pyx_XGIVEREF(__pyx_t_1);
14849  __Pyx_XGIVEREF(__pyx_t_2);
14850  __Pyx_XGIVEREF(__pyx_t_3);
14851  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14852  goto __pyx_L1_error;
14853  __pyx_L7_try_return:;
14854  __Pyx_XGIVEREF(__pyx_t_1);
14855  __Pyx_XGIVEREF(__pyx_t_2);
14856  __Pyx_XGIVEREF(__pyx_t_3);
14857  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14858  goto __pyx_L0;
14859  __pyx_L6_except_return:;
14860  __Pyx_XGIVEREF(__pyx_t_1);
14861  __Pyx_XGIVEREF(__pyx_t_2);
14862  __Pyx_XGIVEREF(__pyx_t_3);
14863  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14864  goto __pyx_L0;
14865  }
14866 
14867  /* "PyClical.pyx":1614
14868  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
14869  *
14870  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
14871  * """
14872  * Exponential of multivector.
14873  */
14874 
14875  /* function exit code */
14876  __pyx_L1_error:;
14877  __Pyx_XDECREF(__pyx_t_4);
14878  __Pyx_XDECREF(__pyx_t_5);
14879  __Pyx_XDECREF(__pyx_t_6);
14880  __Pyx_XDECREF(__pyx_t_7);
14881  __Pyx_XDECREF(__pyx_t_8);
14882  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14883  __pyx_r = 0;
14884  __pyx_L0:;
14885  __Pyx_XGIVEREF(__pyx_r);
14886  __Pyx_RefNannyFinishContext();
14887  return __pyx_r;
14888  }
14889 
14890  /* Python wrapper */
14891  static PyObject *__pyx_pw_8PyClical_53exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14892  static char __pyx_doc_8PyClical_52exp[] = "\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 ";
14893  static PyObject *__pyx_pw_8PyClical_53exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14894  PyObject *__pyx_r = 0;
14895  __Pyx_RefNannyDeclarations
14896  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
14897  __pyx_r = __pyx_pf_8PyClical_52exp(__pyx_self, ((PyObject *)__pyx_v_obj));
14898 
14899  /* function exit code */
14900  __Pyx_RefNannyFinishContext();
14901  return __pyx_r;
14902  }
14903 
14904  static PyObject *__pyx_pf_8PyClical_52exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14905  PyObject *__pyx_r = NULL;
14906  __Pyx_RefNannyDeclarations
14907  PyObject *__pyx_t_1 = NULL;
14908  int __pyx_lineno = 0;
14909  const char *__pyx_filename = NULL;
14910  int __pyx_clineno = 0;
14911  __Pyx_RefNannySetupContext("exp", 0);
14912  __Pyx_XDECREF(__pyx_r);
14913  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1614, __pyx_L1_error)
14914  __Pyx_GOTREF(__pyx_t_1);
14915  __pyx_r = __pyx_t_1;
14916  __pyx_t_1 = 0;
14917  goto __pyx_L0;
14918 
14919  /* function exit code */
14920  __pyx_L1_error:;
14921  __Pyx_XDECREF(__pyx_t_1);
14922  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
14923  __pyx_r = NULL;
14924  __pyx_L0:;
14925  __Pyx_XGIVEREF(__pyx_r);
14926  __Pyx_RefNannyFinishContext();
14927  return __pyx_r;
14928  }
14929 
14930  /* "PyClical.pyx":1628
14931  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14932  *
14933  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14934  * """
14935  * Natural logarithm of multivector with optional complexifier.
14936  */
14937 
14938  static PyObject *__pyx_pw_8PyClical_55log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14939  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) {
14940  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14941  PyObject *__pyx_r = NULL;
14942  __Pyx_RefNannyDeclarations
14943  int __pyx_t_1;
14944  int __pyx_t_2;
14945  PyObject *__pyx_t_3 = NULL;
14946  Clifford __pyx_t_4;
14947  PyObject *__pyx_t_5 = NULL;
14948  PyObject *__pyx_t_6 = NULL;
14949  PyObject *__pyx_t_7 = NULL;
14950  PyObject *__pyx_t_8 = NULL;
14951  PyObject *__pyx_t_9 = NULL;
14952  PyObject *__pyx_t_10 = NULL;
14953  PyObject *__pyx_t_11 = NULL;
14954  int __pyx_lineno = 0;
14955  const char *__pyx_filename = NULL;
14956  int __pyx_clineno = 0;
14957  __Pyx_RefNannySetupContext("log", 0);
14958  if (__pyx_optional_args) {
14959  if (__pyx_optional_args->__pyx_n > 0) {
14960  __pyx_v_i = __pyx_optional_args->i;
14961  }
14962  }
14963 
14964  /* "PyClical.pyx":1643
14965  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
14966  * """
14967  * if not (i is None): # <<<<<<<<<<<<<<
14968  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14969  * else:
14970  */
14971  __pyx_t_1 = (__pyx_v_i != Py_None);
14972  __pyx_t_2 = (__pyx_t_1 != 0);
14973  if (__pyx_t_2) {
14974 
14975  /* "PyClical.pyx":1644
14976  * """
14977  * if not (i is None):
14978  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14979  * else:
14980  * try:
14981  */
14982  __Pyx_XDECREF(__pyx_r);
14983  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1644, __pyx_L1_error)
14984  __Pyx_GOTREF(__pyx_t_3);
14985  try {
14986  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14987  } catch(...) {
14988  __Pyx_CppExn2PyErr();
14989  __PYX_ERR(0, 1644, __pyx_L1_error)
14990  }
14991  __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, 1644, __pyx_L1_error)
14992  __Pyx_GOTREF(__pyx_t_5);
14993  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14994  __pyx_r = __pyx_t_5;
14995  __pyx_t_5 = 0;
14996  goto __pyx_L0;
14997 
14998  /* "PyClical.pyx":1643
14999  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
15000  * """
15001  * if not (i is None): # <<<<<<<<<<<<<<
15002  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
15003  * else:
15004  */
15005  }
15006 
15007  /* "PyClical.pyx":1646
15008  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
15009  * else:
15010  * try: # <<<<<<<<<<<<<<
15011  * return math.log(obj)
15012  * except:
15013  */
15014  /*else*/ {
15015  {
15016  __Pyx_PyThreadState_declare
15017  __Pyx_PyThreadState_assign
15018  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15019  __Pyx_XGOTREF(__pyx_t_6);
15020  __Pyx_XGOTREF(__pyx_t_7);
15021  __Pyx_XGOTREF(__pyx_t_8);
15022  /*try:*/ {
15023 
15024  /* "PyClical.pyx":1647
15025  * else:
15026  * try:
15027  * return math.log(obj) # <<<<<<<<<<<<<<
15028  * except:
15029  * return clifford().wrap( glucat.log(toClifford(obj)) )
15030  */
15031  __Pyx_XDECREF(__pyx_r);
15032  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1647, __pyx_L4_error)
15033  __Pyx_GOTREF(__pyx_t_3);
15034  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1647, __pyx_L4_error)
15035  __Pyx_GOTREF(__pyx_t_9);
15036  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15037  __pyx_t_3 = NULL;
15038  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15039  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15040  if (likely(__pyx_t_3)) {
15041  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15042  __Pyx_INCREF(__pyx_t_3);
15043  __Pyx_INCREF(function);
15044  __Pyx_DECREF_SET(__pyx_t_9, function);
15045  }
15046  }
15047  __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);
15048  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15049  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1647, __pyx_L4_error)
15050  __Pyx_GOTREF(__pyx_t_5);
15051  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15052  __pyx_r = __pyx_t_5;
15053  __pyx_t_5 = 0;
15054  goto __pyx_L8_try_return;
15055 
15056  /* "PyClical.pyx":1646
15057  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
15058  * else:
15059  * try: # <<<<<<<<<<<<<<
15060  * return math.log(obj)
15061  * except:
15062  */
15063  }
15064  __pyx_L4_error:;
15065  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15066  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15067  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15068 
15069  /* "PyClical.pyx":1648
15070  * try:
15071  * return math.log(obj)
15072  * except: # <<<<<<<<<<<<<<
15073  * return clifford().wrap( glucat.log(toClifford(obj)) )
15074  *
15075  */
15076  /*except:*/ {
15077  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
15078  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1648, __pyx_L6_except_error)
15079  __Pyx_GOTREF(__pyx_t_5);
15080  __Pyx_GOTREF(__pyx_t_9);
15081  __Pyx_GOTREF(__pyx_t_3);
15082 
15083  /* "PyClical.pyx":1649
15084  * return math.log(obj)
15085  * except:
15086  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
15087  *
15088  * cpdef inline cos(obj,i = None):
15089  */
15090  __Pyx_XDECREF(__pyx_r);
15091  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1649, __pyx_L6_except_error)
15092  __Pyx_GOTREF(__pyx_t_10);
15093  __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, 1649, __pyx_L6_except_error)
15094  __Pyx_GOTREF(__pyx_t_11);
15095  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15096  __pyx_r = __pyx_t_11;
15097  __pyx_t_11 = 0;
15098  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15099  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15100  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15101  goto __pyx_L7_except_return;
15102  }
15103  __pyx_L6_except_error:;
15104 
15105  /* "PyClical.pyx":1646
15106  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
15107  * else:
15108  * try: # <<<<<<<<<<<<<<
15109  * return math.log(obj)
15110  * except:
15111  */
15112  __Pyx_XGIVEREF(__pyx_t_6);
15113  __Pyx_XGIVEREF(__pyx_t_7);
15114  __Pyx_XGIVEREF(__pyx_t_8);
15115  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15116  goto __pyx_L1_error;
15117  __pyx_L8_try_return:;
15118  __Pyx_XGIVEREF(__pyx_t_6);
15119  __Pyx_XGIVEREF(__pyx_t_7);
15120  __Pyx_XGIVEREF(__pyx_t_8);
15121  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15122  goto __pyx_L0;
15123  __pyx_L7_except_return:;
15124  __Pyx_XGIVEREF(__pyx_t_6);
15125  __Pyx_XGIVEREF(__pyx_t_7);
15126  __Pyx_XGIVEREF(__pyx_t_8);
15127  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15128  goto __pyx_L0;
15129  }
15130  }
15131 
15132  /* "PyClical.pyx":1628
15133  * return clifford().wrap( glucat.exp(toClifford(obj)) )
15134  *
15135  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
15136  * """
15137  * Natural logarithm of multivector with optional complexifier.
15138  */
15139 
15140  /* function exit code */
15141  __pyx_L1_error:;
15142  __Pyx_XDECREF(__pyx_t_3);
15143  __Pyx_XDECREF(__pyx_t_5);
15144  __Pyx_XDECREF(__pyx_t_9);
15145  __Pyx_XDECREF(__pyx_t_10);
15146  __Pyx_XDECREF(__pyx_t_11);
15147  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
15148  __pyx_r = 0;
15149  __pyx_L0:;
15150  __Pyx_XGIVEREF(__pyx_r);
15151  __Pyx_RefNannyFinishContext();
15152  return __pyx_r;
15153  }
15154 
15155  /* Python wrapper */
15156  static PyObject *__pyx_pw_8PyClical_55log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15157  static char __pyx_doc_8PyClical_54log[] = "\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 ";
15158  static PyObject *__pyx_pw_8PyClical_55log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15159  PyObject *__pyx_v_obj = 0;
15160  PyObject *__pyx_v_i = 0;
15161  int __pyx_lineno = 0;
15162  const char *__pyx_filename = NULL;
15163  int __pyx_clineno = 0;
15164  PyObject *__pyx_r = 0;
15165  __Pyx_RefNannyDeclarations
15166  __Pyx_RefNannySetupContext("log (wrapper)", 0);
15167  {
15168  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15169  PyObject* values[2] = {0,0};
15170  values[1] = ((PyObject *)Py_None);
15171  if (unlikely(__pyx_kwds)) {
15172  Py_ssize_t kw_args;
15173  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15174  switch (pos_args) {
15175  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15176  CYTHON_FALLTHROUGH;
15177  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15178  CYTHON_FALLTHROUGH;
15179  case 0: break;
15180  default: goto __pyx_L5_argtuple_error;
15181  }
15182  kw_args = PyDict_Size(__pyx_kwds);
15183  switch (pos_args) {
15184  case 0:
15185  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15186  else goto __pyx_L5_argtuple_error;
15187  CYTHON_FALLTHROUGH;
15188  case 1:
15189  if (kw_args > 0) {
15190  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15191  if (value) { values[1] = value; kw_args--; }
15192  }
15193  }
15194  if (unlikely(kw_args > 0)) {
15195  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1628, __pyx_L3_error)
15196  }
15197  } else {
15198  switch (PyTuple_GET_SIZE(__pyx_args)) {
15199  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15200  CYTHON_FALLTHROUGH;
15201  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15202  break;
15203  default: goto __pyx_L5_argtuple_error;
15204  }
15205  }
15206  __pyx_v_obj = values[0];
15207  __pyx_v_i = values[1];
15208  }
15209  goto __pyx_L4_argument_unpacking_done;
15210  __pyx_L5_argtuple_error:;
15211  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1628, __pyx_L3_error)
15212  __pyx_L3_error:;
15213  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
15214  __Pyx_RefNannyFinishContext();
15215  return NULL;
15216  __pyx_L4_argument_unpacking_done:;
15217  __pyx_r = __pyx_pf_8PyClical_54log(__pyx_self, __pyx_v_obj, __pyx_v_i);
15218 
15219  /* function exit code */
15220  __Pyx_RefNannyFinishContext();
15221  return __pyx_r;
15222  }
15223 
15224  static PyObject *__pyx_pf_8PyClical_54log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15225  PyObject *__pyx_r = NULL;
15226  __Pyx_RefNannyDeclarations
15227  PyObject *__pyx_t_1 = NULL;
15228  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
15229  int __pyx_lineno = 0;
15230  const char *__pyx_filename = NULL;
15231  int __pyx_clineno = 0;
15232  __Pyx_RefNannySetupContext("log", 0);
15233  __Pyx_XDECREF(__pyx_r);
15234  __pyx_t_2.__pyx_n = 1;
15235  __pyx_t_2.i = __pyx_v_i;
15236  __pyx_t_1 = __pyx_f_8PyClical_log(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error)
15237  __Pyx_GOTREF(__pyx_t_1);
15238  __pyx_r = __pyx_t_1;
15239  __pyx_t_1 = 0;
15240  goto __pyx_L0;
15241 
15242  /* function exit code */
15243  __pyx_L1_error:;
15244  __Pyx_XDECREF(__pyx_t_1);
15245  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
15246  __pyx_r = NULL;
15247  __pyx_L0:;
15248  __Pyx_XGIVEREF(__pyx_r);
15249  __Pyx_RefNannyFinishContext();
15250  return __pyx_r;
15251  }
15252 
15253  /* "PyClical.pyx":1651
15254  * return clifford().wrap( glucat.log(toClifford(obj)) )
15255  *
15256  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
15257  * """
15258  * Cosine of multivector with optional complexifier.
15259  */
15260 
15261  static PyObject *__pyx_pw_8PyClical_57cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15262  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) {
15263  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15264  PyObject *__pyx_r = NULL;
15265  __Pyx_RefNannyDeclarations
15266  int __pyx_t_1;
15267  int __pyx_t_2;
15268  PyObject *__pyx_t_3 = NULL;
15269  Clifford __pyx_t_4;
15270  PyObject *__pyx_t_5 = NULL;
15271  PyObject *__pyx_t_6 = NULL;
15272  PyObject *__pyx_t_7 = NULL;
15273  PyObject *__pyx_t_8 = NULL;
15274  PyObject *__pyx_t_9 = NULL;
15275  PyObject *__pyx_t_10 = NULL;
15276  PyObject *__pyx_t_11 = NULL;
15277  int __pyx_lineno = 0;
15278  const char *__pyx_filename = NULL;
15279  int __pyx_clineno = 0;
15280  __Pyx_RefNannySetupContext("cos", 0);
15281  if (__pyx_optional_args) {
15282  if (__pyx_optional_args->__pyx_n > 0) {
15283  __pyx_v_i = __pyx_optional_args->i;
15284  }
15285  }
15286 
15287  /* "PyClical.pyx":1660
15288  * {1,2}
15289  * """
15290  * if not (i is None): # <<<<<<<<<<<<<<
15291  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
15292  * else:
15293  */
15294  __pyx_t_1 = (__pyx_v_i != Py_None);
15295  __pyx_t_2 = (__pyx_t_1 != 0);
15296  if (__pyx_t_2) {
15297 
15298  /* "PyClical.pyx":1661
15299  * """
15300  * if not (i is None):
15301  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15302  * else:
15303  * try:
15304  */
15305  __Pyx_XDECREF(__pyx_r);
15306  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1661, __pyx_L1_error)
15307  __Pyx_GOTREF(__pyx_t_3);
15308  try {
15309  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15310  } catch(...) {
15311  __Pyx_CppExn2PyErr();
15312  __PYX_ERR(0, 1661, __pyx_L1_error)
15313  }
15314  __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, 1661, __pyx_L1_error)
15315  __Pyx_GOTREF(__pyx_t_5);
15316  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15317  __pyx_r = __pyx_t_5;
15318  __pyx_t_5 = 0;
15319  goto __pyx_L0;
15320 
15321  /* "PyClical.pyx":1660
15322  * {1,2}
15323  * """
15324  * if not (i is None): # <<<<<<<<<<<<<<
15325  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
15326  * else:
15327  */
15328  }
15329 
15330  /* "PyClical.pyx":1663
15331  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
15332  * else:
15333  * try: # <<<<<<<<<<<<<<
15334  * return math.cos(obj)
15335  * except:
15336  */
15337  /*else*/ {
15338  {
15339  __Pyx_PyThreadState_declare
15340  __Pyx_PyThreadState_assign
15341  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15342  __Pyx_XGOTREF(__pyx_t_6);
15343  __Pyx_XGOTREF(__pyx_t_7);
15344  __Pyx_XGOTREF(__pyx_t_8);
15345  /*try:*/ {
15346 
15347  /* "PyClical.pyx":1664
15348  * else:
15349  * try:
15350  * return math.cos(obj) # <<<<<<<<<<<<<<
15351  * except:
15352  * return clifford().wrap( glucat.cos(toClifford(obj)) )
15353  */
15354  __Pyx_XDECREF(__pyx_r);
15355  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1664, __pyx_L4_error)
15356  __Pyx_GOTREF(__pyx_t_3);
15357  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1664, __pyx_L4_error)
15358  __Pyx_GOTREF(__pyx_t_9);
15359  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15360  __pyx_t_3 = NULL;
15361  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15362  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15363  if (likely(__pyx_t_3)) {
15364  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15365  __Pyx_INCREF(__pyx_t_3);
15366  __Pyx_INCREF(function);
15367  __Pyx_DECREF_SET(__pyx_t_9, function);
15368  }
15369  }
15370  __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);
15371  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15372  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1664, __pyx_L4_error)
15373  __Pyx_GOTREF(__pyx_t_5);
15374  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15375  __pyx_r = __pyx_t_5;
15376  __pyx_t_5 = 0;
15377  goto __pyx_L8_try_return;
15378 
15379  /* "PyClical.pyx":1663
15380  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
15381  * else:
15382  * try: # <<<<<<<<<<<<<<
15383  * return math.cos(obj)
15384  * except:
15385  */
15386  }
15387  __pyx_L4_error:;
15388  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15389  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15390  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15391 
15392  /* "PyClical.pyx":1665
15393  * try:
15394  * return math.cos(obj)
15395  * except: # <<<<<<<<<<<<<<
15396  * return clifford().wrap( glucat.cos(toClifford(obj)) )
15397  *
15398  */
15399  /*except:*/ {
15400  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15401  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1665, __pyx_L6_except_error)
15402  __Pyx_GOTREF(__pyx_t_5);
15403  __Pyx_GOTREF(__pyx_t_9);
15404  __Pyx_GOTREF(__pyx_t_3);
15405 
15406  /* "PyClical.pyx":1666
15407  * return math.cos(obj)
15408  * except:
15409  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
15410  *
15411  * cpdef inline acos(obj,i = None):
15412  */
15413  __Pyx_XDECREF(__pyx_r);
15414  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1666, __pyx_L6_except_error)
15415  __Pyx_GOTREF(__pyx_t_10);
15416  __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, 1666, __pyx_L6_except_error)
15417  __Pyx_GOTREF(__pyx_t_11);
15418  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15419  __pyx_r = __pyx_t_11;
15420  __pyx_t_11 = 0;
15421  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15422  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15423  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15424  goto __pyx_L7_except_return;
15425  }
15426  __pyx_L6_except_error:;
15427 
15428  /* "PyClical.pyx":1663
15429  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
15430  * else:
15431  * try: # <<<<<<<<<<<<<<
15432  * return math.cos(obj)
15433  * except:
15434  */
15435  __Pyx_XGIVEREF(__pyx_t_6);
15436  __Pyx_XGIVEREF(__pyx_t_7);
15437  __Pyx_XGIVEREF(__pyx_t_8);
15438  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15439  goto __pyx_L1_error;
15440  __pyx_L8_try_return:;
15441  __Pyx_XGIVEREF(__pyx_t_6);
15442  __Pyx_XGIVEREF(__pyx_t_7);
15443  __Pyx_XGIVEREF(__pyx_t_8);
15444  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15445  goto __pyx_L0;
15446  __pyx_L7_except_return:;
15447  __Pyx_XGIVEREF(__pyx_t_6);
15448  __Pyx_XGIVEREF(__pyx_t_7);
15449  __Pyx_XGIVEREF(__pyx_t_8);
15450  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15451  goto __pyx_L0;
15452  }
15453  }
15454 
15455  /* "PyClical.pyx":1651
15456  * return clifford().wrap( glucat.log(toClifford(obj)) )
15457  *
15458  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
15459  * """
15460  * Cosine of multivector with optional complexifier.
15461  */
15462 
15463  /* function exit code */
15464  __pyx_L1_error:;
15465  __Pyx_XDECREF(__pyx_t_3);
15466  __Pyx_XDECREF(__pyx_t_5);
15467  __Pyx_XDECREF(__pyx_t_9);
15468  __Pyx_XDECREF(__pyx_t_10);
15469  __Pyx_XDECREF(__pyx_t_11);
15470  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15471  __pyx_r = 0;
15472  __pyx_L0:;
15473  __Pyx_XGIVEREF(__pyx_r);
15474  __Pyx_RefNannyFinishContext();
15475  return __pyx_r;
15476  }
15477 
15478  /* Python wrapper */
15479  static PyObject *__pyx_pw_8PyClical_57cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15480  static char __pyx_doc_8PyClical_56cos[] = "\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 ";
15481  static PyObject *__pyx_pw_8PyClical_57cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15482  PyObject *__pyx_v_obj = 0;
15483  PyObject *__pyx_v_i = 0;
15484  int __pyx_lineno = 0;
15485  const char *__pyx_filename = NULL;
15486  int __pyx_clineno = 0;
15487  PyObject *__pyx_r = 0;
15488  __Pyx_RefNannyDeclarations
15489  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
15490  {
15491  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15492  PyObject* values[2] = {0,0};
15493  values[1] = ((PyObject *)Py_None);
15494  if (unlikely(__pyx_kwds)) {
15495  Py_ssize_t kw_args;
15496  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15497  switch (pos_args) {
15498  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15499  CYTHON_FALLTHROUGH;
15500  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15501  CYTHON_FALLTHROUGH;
15502  case 0: break;
15503  default: goto __pyx_L5_argtuple_error;
15504  }
15505  kw_args = PyDict_Size(__pyx_kwds);
15506  switch (pos_args) {
15507  case 0:
15508  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15509  else goto __pyx_L5_argtuple_error;
15510  CYTHON_FALLTHROUGH;
15511  case 1:
15512  if (kw_args > 0) {
15513  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15514  if (value) { values[1] = value; kw_args--; }
15515  }
15516  }
15517  if (unlikely(kw_args > 0)) {
15518  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1651, __pyx_L3_error)
15519  }
15520  } else {
15521  switch (PyTuple_GET_SIZE(__pyx_args)) {
15522  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15523  CYTHON_FALLTHROUGH;
15524  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15525  break;
15526  default: goto __pyx_L5_argtuple_error;
15527  }
15528  }
15529  __pyx_v_obj = values[0];
15530  __pyx_v_i = values[1];
15531  }
15532  goto __pyx_L4_argument_unpacking_done;
15533  __pyx_L5_argtuple_error:;
15534  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1651, __pyx_L3_error)
15535  __pyx_L3_error:;
15536  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15537  __Pyx_RefNannyFinishContext();
15538  return NULL;
15539  __pyx_L4_argument_unpacking_done:;
15540  __pyx_r = __pyx_pf_8PyClical_56cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
15541 
15542  /* function exit code */
15543  __Pyx_RefNannyFinishContext();
15544  return __pyx_r;
15545  }
15546 
15547  static PyObject *__pyx_pf_8PyClical_56cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15548  PyObject *__pyx_r = NULL;
15549  __Pyx_RefNannyDeclarations
15550  PyObject *__pyx_t_1 = NULL;
15551  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
15552  int __pyx_lineno = 0;
15553  const char *__pyx_filename = NULL;
15554  int __pyx_clineno = 0;
15555  __Pyx_RefNannySetupContext("cos", 0);
15556  __Pyx_XDECREF(__pyx_r);
15557  __pyx_t_2.__pyx_n = 1;
15558  __pyx_t_2.i = __pyx_v_i;
15559  __pyx_t_1 = __pyx_f_8PyClical_cos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error)
15560  __Pyx_GOTREF(__pyx_t_1);
15561  __pyx_r = __pyx_t_1;
15562  __pyx_t_1 = 0;
15563  goto __pyx_L0;
15564 
15565  /* function exit code */
15566  __pyx_L1_error:;
15567  __Pyx_XDECREF(__pyx_t_1);
15568  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15569  __pyx_r = NULL;
15570  __pyx_L0:;
15571  __Pyx_XGIVEREF(__pyx_r);
15572  __Pyx_RefNannyFinishContext();
15573  return __pyx_r;
15574  }
15575 
15576  /* "PyClical.pyx":1668
15577  * return clifford().wrap( glucat.cos(toClifford(obj)) )
15578  *
15579  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
15580  * """
15581  * Inverse cosine of multivector with optional complexifier.
15582  */
15583 
15584  static PyObject *__pyx_pw_8PyClical_59acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15585  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) {
15586  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15587  PyObject *__pyx_r = NULL;
15588  __Pyx_RefNannyDeclarations
15589  int __pyx_t_1;
15590  int __pyx_t_2;
15591  PyObject *__pyx_t_3 = NULL;
15592  Clifford __pyx_t_4;
15593  PyObject *__pyx_t_5 = NULL;
15594  PyObject *__pyx_t_6 = NULL;
15595  PyObject *__pyx_t_7 = NULL;
15596  PyObject *__pyx_t_8 = NULL;
15597  PyObject *__pyx_t_9 = NULL;
15598  PyObject *__pyx_t_10 = NULL;
15599  PyObject *__pyx_t_11 = NULL;
15600  int __pyx_lineno = 0;
15601  const char *__pyx_filename = NULL;
15602  int __pyx_clineno = 0;
15603  __Pyx_RefNannySetupContext("acos", 0);
15604  if (__pyx_optional_args) {
15605  if (__pyx_optional_args->__pyx_n > 0) {
15606  __pyx_v_i = __pyx_optional_args->i;
15607  }
15608  }
15609 
15610  /* "PyClical.pyx":1681
15611  * {1,2}
15612  * """
15613  * if not (i is None): # <<<<<<<<<<<<<<
15614  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15615  * else:
15616  */
15617  __pyx_t_1 = (__pyx_v_i != Py_None);
15618  __pyx_t_2 = (__pyx_t_1 != 0);
15619  if (__pyx_t_2) {
15620 
15621  /* "PyClical.pyx":1682
15622  * """
15623  * if not (i is None):
15624  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15625  * else:
15626  * try:
15627  */
15628  __Pyx_XDECREF(__pyx_r);
15629  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
15630  __Pyx_GOTREF(__pyx_t_3);
15631  try {
15632  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15633  } catch(...) {
15634  __Pyx_CppExn2PyErr();
15635  __PYX_ERR(0, 1682, __pyx_L1_error)
15636  }
15637  __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, 1682, __pyx_L1_error)
15638  __Pyx_GOTREF(__pyx_t_5);
15639  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15640  __pyx_r = __pyx_t_5;
15641  __pyx_t_5 = 0;
15642  goto __pyx_L0;
15643 
15644  /* "PyClical.pyx":1681
15645  * {1,2}
15646  * """
15647  * if not (i is None): # <<<<<<<<<<<<<<
15648  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15649  * else:
15650  */
15651  }
15652 
15653  /* "PyClical.pyx":1684
15654  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15655  * else:
15656  * try: # <<<<<<<<<<<<<<
15657  * return math.acos(obj)
15658  * except:
15659  */
15660  /*else*/ {
15661  {
15662  __Pyx_PyThreadState_declare
15663  __Pyx_PyThreadState_assign
15664  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15665  __Pyx_XGOTREF(__pyx_t_6);
15666  __Pyx_XGOTREF(__pyx_t_7);
15667  __Pyx_XGOTREF(__pyx_t_8);
15668  /*try:*/ {
15669 
15670  /* "PyClical.pyx":1685
15671  * else:
15672  * try:
15673  * return math.acos(obj) # <<<<<<<<<<<<<<
15674  * except:
15675  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15676  */
15677  __Pyx_XDECREF(__pyx_r);
15678  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1685, __pyx_L4_error)
15679  __Pyx_GOTREF(__pyx_t_3);
15680  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1685, __pyx_L4_error)
15681  __Pyx_GOTREF(__pyx_t_9);
15682  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15683  __pyx_t_3 = NULL;
15684  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15685  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15686  if (likely(__pyx_t_3)) {
15687  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15688  __Pyx_INCREF(__pyx_t_3);
15689  __Pyx_INCREF(function);
15690  __Pyx_DECREF_SET(__pyx_t_9, function);
15691  }
15692  }
15693  __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);
15694  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15695  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1685, __pyx_L4_error)
15696  __Pyx_GOTREF(__pyx_t_5);
15697  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15698  __pyx_r = __pyx_t_5;
15699  __pyx_t_5 = 0;
15700  goto __pyx_L8_try_return;
15701 
15702  /* "PyClical.pyx":1684
15703  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15704  * else:
15705  * try: # <<<<<<<<<<<<<<
15706  * return math.acos(obj)
15707  * except:
15708  */
15709  }
15710  __pyx_L4_error:;
15711  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15712  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15713  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15714 
15715  /* "PyClical.pyx":1686
15716  * try:
15717  * return math.acos(obj)
15718  * except: # <<<<<<<<<<<<<<
15719  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15720  *
15721  */
15722  /*except:*/ {
15723  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15724  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1686, __pyx_L6_except_error)
15725  __Pyx_GOTREF(__pyx_t_5);
15726  __Pyx_GOTREF(__pyx_t_9);
15727  __Pyx_GOTREF(__pyx_t_3);
15728 
15729  /* "PyClical.pyx":1687
15730  * return math.acos(obj)
15731  * except:
15732  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
15733  *
15734  * cpdef inline cosh(obj):
15735  */
15736  __Pyx_XDECREF(__pyx_r);
15737  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1687, __pyx_L6_except_error)
15738  __Pyx_GOTREF(__pyx_t_10);
15739  __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, 1687, __pyx_L6_except_error)
15740  __Pyx_GOTREF(__pyx_t_11);
15741  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15742  __pyx_r = __pyx_t_11;
15743  __pyx_t_11 = 0;
15744  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15745  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15746  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15747  goto __pyx_L7_except_return;
15748  }
15749  __pyx_L6_except_error:;
15750 
15751  /* "PyClical.pyx":1684
15752  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
15753  * else:
15754  * try: # <<<<<<<<<<<<<<
15755  * return math.acos(obj)
15756  * except:
15757  */
15758  __Pyx_XGIVEREF(__pyx_t_6);
15759  __Pyx_XGIVEREF(__pyx_t_7);
15760  __Pyx_XGIVEREF(__pyx_t_8);
15761  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15762  goto __pyx_L1_error;
15763  __pyx_L8_try_return:;
15764  __Pyx_XGIVEREF(__pyx_t_6);
15765  __Pyx_XGIVEREF(__pyx_t_7);
15766  __Pyx_XGIVEREF(__pyx_t_8);
15767  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15768  goto __pyx_L0;
15769  __pyx_L7_except_return:;
15770  __Pyx_XGIVEREF(__pyx_t_6);
15771  __Pyx_XGIVEREF(__pyx_t_7);
15772  __Pyx_XGIVEREF(__pyx_t_8);
15773  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15774  goto __pyx_L0;
15775  }
15776  }
15777 
15778  /* "PyClical.pyx":1668
15779  * return clifford().wrap( glucat.cos(toClifford(obj)) )
15780  *
15781  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
15782  * """
15783  * Inverse cosine of multivector with optional complexifier.
15784  */
15785 
15786  /* function exit code */
15787  __pyx_L1_error:;
15788  __Pyx_XDECREF(__pyx_t_3);
15789  __Pyx_XDECREF(__pyx_t_5);
15790  __Pyx_XDECREF(__pyx_t_9);
15791  __Pyx_XDECREF(__pyx_t_10);
15792  __Pyx_XDECREF(__pyx_t_11);
15793  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15794  __pyx_r = 0;
15795  __pyx_L0:;
15796  __Pyx_XGIVEREF(__pyx_r);
15797  __Pyx_RefNannyFinishContext();
15798  return __pyx_r;
15799  }
15800 
15801  /* Python wrapper */
15802  static PyObject *__pyx_pw_8PyClical_59acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15803  static char __pyx_doc_8PyClical_58acos[] = "\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 ";
15804  static PyObject *__pyx_pw_8PyClical_59acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15805  PyObject *__pyx_v_obj = 0;
15806  PyObject *__pyx_v_i = 0;
15807  int __pyx_lineno = 0;
15808  const char *__pyx_filename = NULL;
15809  int __pyx_clineno = 0;
15810  PyObject *__pyx_r = 0;
15811  __Pyx_RefNannyDeclarations
15812  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
15813  {
15814  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15815  PyObject* values[2] = {0,0};
15816  values[1] = ((PyObject *)Py_None);
15817  if (unlikely(__pyx_kwds)) {
15818  Py_ssize_t kw_args;
15819  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15820  switch (pos_args) {
15821  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15822  CYTHON_FALLTHROUGH;
15823  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15824  CYTHON_FALLTHROUGH;
15825  case 0: break;
15826  default: goto __pyx_L5_argtuple_error;
15827  }
15828  kw_args = PyDict_Size(__pyx_kwds);
15829  switch (pos_args) {
15830  case 0:
15831  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15832  else goto __pyx_L5_argtuple_error;
15833  CYTHON_FALLTHROUGH;
15834  case 1:
15835  if (kw_args > 0) {
15836  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15837  if (value) { values[1] = value; kw_args--; }
15838  }
15839  }
15840  if (unlikely(kw_args > 0)) {
15841  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1668, __pyx_L3_error)
15842  }
15843  } else {
15844  switch (PyTuple_GET_SIZE(__pyx_args)) {
15845  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15846  CYTHON_FALLTHROUGH;
15847  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15848  break;
15849  default: goto __pyx_L5_argtuple_error;
15850  }
15851  }
15852  __pyx_v_obj = values[0];
15853  __pyx_v_i = values[1];
15854  }
15855  goto __pyx_L4_argument_unpacking_done;
15856  __pyx_L5_argtuple_error:;
15857  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1668, __pyx_L3_error)
15858  __pyx_L3_error:;
15859  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15860  __Pyx_RefNannyFinishContext();
15861  return NULL;
15862  __pyx_L4_argument_unpacking_done:;
15863  __pyx_r = __pyx_pf_8PyClical_58acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
15864 
15865  /* function exit code */
15866  __Pyx_RefNannyFinishContext();
15867  return __pyx_r;
15868  }
15869 
15870  static PyObject *__pyx_pf_8PyClical_58acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15871  PyObject *__pyx_r = NULL;
15872  __Pyx_RefNannyDeclarations
15873  PyObject *__pyx_t_1 = NULL;
15874  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
15875  int __pyx_lineno = 0;
15876  const char *__pyx_filename = NULL;
15877  int __pyx_clineno = 0;
15878  __Pyx_RefNannySetupContext("acos", 0);
15879  __Pyx_XDECREF(__pyx_r);
15880  __pyx_t_2.__pyx_n = 1;
15881  __pyx_t_2.i = __pyx_v_i;
15882  __pyx_t_1 = __pyx_f_8PyClical_acos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
15883  __Pyx_GOTREF(__pyx_t_1);
15884  __pyx_r = __pyx_t_1;
15885  __pyx_t_1 = 0;
15886  goto __pyx_L0;
15887 
15888  /* function exit code */
15889  __pyx_L1_error:;
15890  __Pyx_XDECREF(__pyx_t_1);
15891  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
15892  __pyx_r = NULL;
15893  __pyx_L0:;
15894  __Pyx_XGIVEREF(__pyx_r);
15895  __Pyx_RefNannyFinishContext();
15896  return __pyx_r;
15897  }
15898 
15899  /* "PyClical.pyx":1689
15900  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15901  *
15902  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15903  * """
15904  * Hyperbolic cosine of multivector.
15905  */
15906 
15907  static PyObject *__pyx_pw_8PyClical_61cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15908  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15909  PyObject *__pyx_r = NULL;
15910  __Pyx_RefNannyDeclarations
15911  PyObject *__pyx_t_1 = NULL;
15912  PyObject *__pyx_t_2 = NULL;
15913  PyObject *__pyx_t_3 = NULL;
15914  PyObject *__pyx_t_4 = NULL;
15915  PyObject *__pyx_t_5 = NULL;
15916  PyObject *__pyx_t_6 = NULL;
15917  PyObject *__pyx_t_7 = NULL;
15918  PyObject *__pyx_t_8 = NULL;
15919  int __pyx_lineno = 0;
15920  const char *__pyx_filename = NULL;
15921  int __pyx_clineno = 0;
15922  __Pyx_RefNannySetupContext("cosh", 0);
15923 
15924  /* "PyClical.pyx":1700
15925  * {1,2}
15926  * """
15927  * try: # <<<<<<<<<<<<<<
15928  * return math.cosh(obj)
15929  * except:
15930  */
15931  {
15932  __Pyx_PyThreadState_declare
15933  __Pyx_PyThreadState_assign
15934  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15935  __Pyx_XGOTREF(__pyx_t_1);
15936  __Pyx_XGOTREF(__pyx_t_2);
15937  __Pyx_XGOTREF(__pyx_t_3);
15938  /*try:*/ {
15939 
15940  /* "PyClical.pyx":1701
15941  * """
15942  * try:
15943  * return math.cosh(obj) # <<<<<<<<<<<<<<
15944  * except:
15945  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15946  */
15947  __Pyx_XDECREF(__pyx_r);
15948  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1701, __pyx_L3_error)
15949  __Pyx_GOTREF(__pyx_t_5);
15950  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cosh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1701, __pyx_L3_error)
15951  __Pyx_GOTREF(__pyx_t_6);
15952  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15953  __pyx_t_5 = NULL;
15954  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15955  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15956  if (likely(__pyx_t_5)) {
15957  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15958  __Pyx_INCREF(__pyx_t_5);
15959  __Pyx_INCREF(function);
15960  __Pyx_DECREF_SET(__pyx_t_6, function);
15961  }
15962  }
15963  __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);
15964  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15965  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1701, __pyx_L3_error)
15966  __Pyx_GOTREF(__pyx_t_4);
15967  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15968  __pyx_r = __pyx_t_4;
15969  __pyx_t_4 = 0;
15970  goto __pyx_L7_try_return;
15971 
15972  /* "PyClical.pyx":1700
15973  * {1,2}
15974  * """
15975  * try: # <<<<<<<<<<<<<<
15976  * return math.cosh(obj)
15977  * except:
15978  */
15979  }
15980  __pyx_L3_error:;
15981  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15982  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15983  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15984 
15985  /* "PyClical.pyx":1702
15986  * try:
15987  * return math.cosh(obj)
15988  * except: # <<<<<<<<<<<<<<
15989  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15990  *
15991  */
15992  /*except:*/ {
15993  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15994  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1702, __pyx_L5_except_error)
15995  __Pyx_GOTREF(__pyx_t_4);
15996  __Pyx_GOTREF(__pyx_t_6);
15997  __Pyx_GOTREF(__pyx_t_5);
15998 
15999  /* "PyClical.pyx":1703
16000  * return math.cosh(obj)
16001  * except:
16002  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16003  *
16004  * cpdef inline acosh(obj,i = None):
16005  */
16006  __Pyx_XDECREF(__pyx_r);
16007  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1703, __pyx_L5_except_error)
16008  __Pyx_GOTREF(__pyx_t_7);
16009  __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, 1703, __pyx_L5_except_error)
16010  __Pyx_GOTREF(__pyx_t_8);
16011  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16012  __pyx_r = __pyx_t_8;
16013  __pyx_t_8 = 0;
16014  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16015  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16016  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16017  goto __pyx_L6_except_return;
16018  }
16019  __pyx_L5_except_error:;
16020 
16021  /* "PyClical.pyx":1700
16022  * {1,2}
16023  * """
16024  * try: # <<<<<<<<<<<<<<
16025  * return math.cosh(obj)
16026  * except:
16027  */
16028  __Pyx_XGIVEREF(__pyx_t_1);
16029  __Pyx_XGIVEREF(__pyx_t_2);
16030  __Pyx_XGIVEREF(__pyx_t_3);
16031  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16032  goto __pyx_L1_error;
16033  __pyx_L7_try_return:;
16034  __Pyx_XGIVEREF(__pyx_t_1);
16035  __Pyx_XGIVEREF(__pyx_t_2);
16036  __Pyx_XGIVEREF(__pyx_t_3);
16037  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16038  goto __pyx_L0;
16039  __pyx_L6_except_return:;
16040  __Pyx_XGIVEREF(__pyx_t_1);
16041  __Pyx_XGIVEREF(__pyx_t_2);
16042  __Pyx_XGIVEREF(__pyx_t_3);
16043  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16044  goto __pyx_L0;
16045  }
16046 
16047  /* "PyClical.pyx":1689
16048  * return clifford().wrap( glucat.acos(toClifford(obj)) )
16049  *
16050  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
16051  * """
16052  * Hyperbolic cosine of multivector.
16053  */
16054 
16055  /* function exit code */
16056  __pyx_L1_error:;
16057  __Pyx_XDECREF(__pyx_t_4);
16058  __Pyx_XDECREF(__pyx_t_5);
16059  __Pyx_XDECREF(__pyx_t_6);
16060  __Pyx_XDECREF(__pyx_t_7);
16061  __Pyx_XDECREF(__pyx_t_8);
16062  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16063  __pyx_r = 0;
16064  __pyx_L0:;
16065  __Pyx_XGIVEREF(__pyx_r);
16066  __Pyx_RefNannyFinishContext();
16067  return __pyx_r;
16068  }
16069 
16070  /* Python wrapper */
16071  static PyObject *__pyx_pw_8PyClical_61cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16072  static char __pyx_doc_8PyClical_60cosh[] = "\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 ";
16073  static PyObject *__pyx_pw_8PyClical_61cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16074  PyObject *__pyx_r = 0;
16075  __Pyx_RefNannyDeclarations
16076  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
16077  __pyx_r = __pyx_pf_8PyClical_60cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
16078 
16079  /* function exit code */
16080  __Pyx_RefNannyFinishContext();
16081  return __pyx_r;
16082  }
16083 
16084  static PyObject *__pyx_pf_8PyClical_60cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16085  PyObject *__pyx_r = NULL;
16086  __Pyx_RefNannyDeclarations
16087  PyObject *__pyx_t_1 = NULL;
16088  int __pyx_lineno = 0;
16089  const char *__pyx_filename = NULL;
16090  int __pyx_clineno = 0;
16091  __Pyx_RefNannySetupContext("cosh", 0);
16092  __Pyx_XDECREF(__pyx_r);
16093  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1689, __pyx_L1_error)
16094  __Pyx_GOTREF(__pyx_t_1);
16095  __pyx_r = __pyx_t_1;
16096  __pyx_t_1 = 0;
16097  goto __pyx_L0;
16098 
16099  /* function exit code */
16100  __pyx_L1_error:;
16101  __Pyx_XDECREF(__pyx_t_1);
16102  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16103  __pyx_r = NULL;
16104  __pyx_L0:;
16105  __Pyx_XGIVEREF(__pyx_r);
16106  __Pyx_RefNannyFinishContext();
16107  return __pyx_r;
16108  }
16109 
16110  /* "PyClical.pyx":1705
16111  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
16112  *
16113  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
16114  * """
16115  * Inverse hyperbolic cosine of multivector with optional complexifier.
16116  */
16117 
16118  static PyObject *__pyx_pw_8PyClical_63acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16119  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) {
16120  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16121  PyObject *__pyx_r = NULL;
16122  __Pyx_RefNannyDeclarations
16123  int __pyx_t_1;
16124  int __pyx_t_2;
16125  PyObject *__pyx_t_3 = NULL;
16126  Clifford __pyx_t_4;
16127  PyObject *__pyx_t_5 = NULL;
16128  PyObject *__pyx_t_6 = NULL;
16129  PyObject *__pyx_t_7 = NULL;
16130  PyObject *__pyx_t_8 = NULL;
16131  PyObject *__pyx_t_9 = NULL;
16132  PyObject *__pyx_t_10 = NULL;
16133  PyObject *__pyx_t_11 = NULL;
16134  int __pyx_lineno = 0;
16135  const char *__pyx_filename = NULL;
16136  int __pyx_clineno = 0;
16137  __Pyx_RefNannySetupContext("acosh", 0);
16138  if (__pyx_optional_args) {
16139  if (__pyx_optional_args->__pyx_n > 0) {
16140  __pyx_v_i = __pyx_optional_args->i;
16141  }
16142  }
16143 
16144  /* "PyClical.pyx":1720
16145  * {1,2}
16146  * """
16147  * if not (i is None): # <<<<<<<<<<<<<<
16148  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
16149  * else:
16150  */
16151  __pyx_t_1 = (__pyx_v_i != Py_None);
16152  __pyx_t_2 = (__pyx_t_1 != 0);
16153  if (__pyx_t_2) {
16154 
16155  /* "PyClical.pyx":1721
16156  * """
16157  * if not (i is None):
16158  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16159  * else:
16160  * try:
16161  */
16162  __Pyx_XDECREF(__pyx_r);
16163  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1721, __pyx_L1_error)
16164  __Pyx_GOTREF(__pyx_t_3);
16165  try {
16166  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16167  } catch(...) {
16168  __Pyx_CppExn2PyErr();
16169  __PYX_ERR(0, 1721, __pyx_L1_error)
16170  }
16171  __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, 1721, __pyx_L1_error)
16172  __Pyx_GOTREF(__pyx_t_5);
16173  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16174  __pyx_r = __pyx_t_5;
16175  __pyx_t_5 = 0;
16176  goto __pyx_L0;
16177 
16178  /* "PyClical.pyx":1720
16179  * {1,2}
16180  * """
16181  * if not (i is None): # <<<<<<<<<<<<<<
16182  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
16183  * else:
16184  */
16185  }
16186 
16187  /* "PyClical.pyx":1723
16188  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
16189  * else:
16190  * try: # <<<<<<<<<<<<<<
16191  * return math.acosh(obj)
16192  * except:
16193  */
16194  /*else*/ {
16195  {
16196  __Pyx_PyThreadState_declare
16197  __Pyx_PyThreadState_assign
16198  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16199  __Pyx_XGOTREF(__pyx_t_6);
16200  __Pyx_XGOTREF(__pyx_t_7);
16201  __Pyx_XGOTREF(__pyx_t_8);
16202  /*try:*/ {
16203 
16204  /* "PyClical.pyx":1724
16205  * else:
16206  * try:
16207  * return math.acosh(obj) # <<<<<<<<<<<<<<
16208  * except:
16209  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
16210  */
16211  __Pyx_XDECREF(__pyx_r);
16212  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1724, __pyx_L4_error)
16213  __Pyx_GOTREF(__pyx_t_3);
16214  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acosh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1724, __pyx_L4_error)
16215  __Pyx_GOTREF(__pyx_t_9);
16216  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16217  __pyx_t_3 = NULL;
16218  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16219  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16220  if (likely(__pyx_t_3)) {
16221  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16222  __Pyx_INCREF(__pyx_t_3);
16223  __Pyx_INCREF(function);
16224  __Pyx_DECREF_SET(__pyx_t_9, function);
16225  }
16226  }
16227  __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);
16228  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16229  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1724, __pyx_L4_error)
16230  __Pyx_GOTREF(__pyx_t_5);
16231  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16232  __pyx_r = __pyx_t_5;
16233  __pyx_t_5 = 0;
16234  goto __pyx_L8_try_return;
16235 
16236  /* "PyClical.pyx":1723
16237  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
16238  * else:
16239  * try: # <<<<<<<<<<<<<<
16240  * return math.acosh(obj)
16241  * except:
16242  */
16243  }
16244  __pyx_L4_error:;
16245  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16246  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16247  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16248 
16249  /* "PyClical.pyx":1725
16250  * try:
16251  * return math.acosh(obj)
16252  * except: # <<<<<<<<<<<<<<
16253  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
16254  *
16255  */
16256  /*except:*/ {
16257  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16258  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1725, __pyx_L6_except_error)
16259  __Pyx_GOTREF(__pyx_t_5);
16260  __Pyx_GOTREF(__pyx_t_9);
16261  __Pyx_GOTREF(__pyx_t_3);
16262 
16263  /* "PyClical.pyx":1726
16264  * return math.acosh(obj)
16265  * except:
16266  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16267  *
16268  * cpdef inline sin(obj,i = None):
16269  */
16270  __Pyx_XDECREF(__pyx_r);
16271  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1726, __pyx_L6_except_error)
16272  __Pyx_GOTREF(__pyx_t_10);
16273  __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, 1726, __pyx_L6_except_error)
16274  __Pyx_GOTREF(__pyx_t_11);
16275  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16276  __pyx_r = __pyx_t_11;
16277  __pyx_t_11 = 0;
16278  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16279  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16280  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16281  goto __pyx_L7_except_return;
16282  }
16283  __pyx_L6_except_error:;
16284 
16285  /* "PyClical.pyx":1723
16286  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
16287  * else:
16288  * try: # <<<<<<<<<<<<<<
16289  * return math.acosh(obj)
16290  * except:
16291  */
16292  __Pyx_XGIVEREF(__pyx_t_6);
16293  __Pyx_XGIVEREF(__pyx_t_7);
16294  __Pyx_XGIVEREF(__pyx_t_8);
16295  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16296  goto __pyx_L1_error;
16297  __pyx_L8_try_return:;
16298  __Pyx_XGIVEREF(__pyx_t_6);
16299  __Pyx_XGIVEREF(__pyx_t_7);
16300  __Pyx_XGIVEREF(__pyx_t_8);
16301  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16302  goto __pyx_L0;
16303  __pyx_L7_except_return:;
16304  __Pyx_XGIVEREF(__pyx_t_6);
16305  __Pyx_XGIVEREF(__pyx_t_7);
16306  __Pyx_XGIVEREF(__pyx_t_8);
16307  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16308  goto __pyx_L0;
16309  }
16310  }
16311 
16312  /* "PyClical.pyx":1705
16313  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
16314  *
16315  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
16316  * """
16317  * Inverse hyperbolic cosine of multivector with optional complexifier.
16318  */
16319 
16320  /* function exit code */
16321  __pyx_L1_error:;
16322  __Pyx_XDECREF(__pyx_t_3);
16323  __Pyx_XDECREF(__pyx_t_5);
16324  __Pyx_XDECREF(__pyx_t_9);
16325  __Pyx_XDECREF(__pyx_t_10);
16326  __Pyx_XDECREF(__pyx_t_11);
16327  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16328  __pyx_r = 0;
16329  __pyx_L0:;
16330  __Pyx_XGIVEREF(__pyx_r);
16331  __Pyx_RefNannyFinishContext();
16332  return __pyx_r;
16333  }
16334 
16335  /* Python wrapper */
16336  static PyObject *__pyx_pw_8PyClical_63acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16337  static char __pyx_doc_8PyClical_62acosh[] = "\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 ";
16338  static PyObject *__pyx_pw_8PyClical_63acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16339  PyObject *__pyx_v_obj = 0;
16340  PyObject *__pyx_v_i = 0;
16341  int __pyx_lineno = 0;
16342  const char *__pyx_filename = NULL;
16343  int __pyx_clineno = 0;
16344  PyObject *__pyx_r = 0;
16345  __Pyx_RefNannyDeclarations
16346  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
16347  {
16348  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16349  PyObject* values[2] = {0,0};
16350  values[1] = ((PyObject *)Py_None);
16351  if (unlikely(__pyx_kwds)) {
16352  Py_ssize_t kw_args;
16353  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16354  switch (pos_args) {
16355  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16356  CYTHON_FALLTHROUGH;
16357  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16358  CYTHON_FALLTHROUGH;
16359  case 0: break;
16360  default: goto __pyx_L5_argtuple_error;
16361  }
16362  kw_args = PyDict_Size(__pyx_kwds);
16363  switch (pos_args) {
16364  case 0:
16365  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16366  else goto __pyx_L5_argtuple_error;
16367  CYTHON_FALLTHROUGH;
16368  case 1:
16369  if (kw_args > 0) {
16370  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16371  if (value) { values[1] = value; kw_args--; }
16372  }
16373  }
16374  if (unlikely(kw_args > 0)) {
16375  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1705, __pyx_L3_error)
16376  }
16377  } else {
16378  switch (PyTuple_GET_SIZE(__pyx_args)) {
16379  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16380  CYTHON_FALLTHROUGH;
16381  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16382  break;
16383  default: goto __pyx_L5_argtuple_error;
16384  }
16385  }
16386  __pyx_v_obj = values[0];
16387  __pyx_v_i = values[1];
16388  }
16389  goto __pyx_L4_argument_unpacking_done;
16390  __pyx_L5_argtuple_error:;
16391  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1705, __pyx_L3_error)
16392  __pyx_L3_error:;
16393  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16394  __Pyx_RefNannyFinishContext();
16395  return NULL;
16396  __pyx_L4_argument_unpacking_done:;
16397  __pyx_r = __pyx_pf_8PyClical_62acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16398 
16399  /* function exit code */
16400  __Pyx_RefNannyFinishContext();
16401  return __pyx_r;
16402  }
16403 
16404  static PyObject *__pyx_pf_8PyClical_62acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16405  PyObject *__pyx_r = NULL;
16406  __Pyx_RefNannyDeclarations
16407  PyObject *__pyx_t_1 = NULL;
16408  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
16409  int __pyx_lineno = 0;
16410  const char *__pyx_filename = NULL;
16411  int __pyx_clineno = 0;
16412  __Pyx_RefNannySetupContext("acosh", 0);
16413  __Pyx_XDECREF(__pyx_r);
16414  __pyx_t_2.__pyx_n = 1;
16415  __pyx_t_2.i = __pyx_v_i;
16416  __pyx_t_1 = __pyx_f_8PyClical_acosh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error)
16417  __Pyx_GOTREF(__pyx_t_1);
16418  __pyx_r = __pyx_t_1;
16419  __pyx_t_1 = 0;
16420  goto __pyx_L0;
16421 
16422  /* function exit code */
16423  __pyx_L1_error:;
16424  __Pyx_XDECREF(__pyx_t_1);
16425  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16426  __pyx_r = NULL;
16427  __pyx_L0:;
16428  __Pyx_XGIVEREF(__pyx_r);
16429  __Pyx_RefNannyFinishContext();
16430  return __pyx_r;
16431  }
16432 
16433  /* "PyClical.pyx":1728
16434  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
16435  *
16436  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
16437  * """
16438  * Sine of multivector with optional complexifier.
16439  */
16440 
16441  static PyObject *__pyx_pw_8PyClical_65sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16442  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) {
16443  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16444  PyObject *__pyx_r = NULL;
16445  __Pyx_RefNannyDeclarations
16446  int __pyx_t_1;
16447  int __pyx_t_2;
16448  PyObject *__pyx_t_3 = NULL;
16449  Clifford __pyx_t_4;
16450  PyObject *__pyx_t_5 = NULL;
16451  PyObject *__pyx_t_6 = NULL;
16452  PyObject *__pyx_t_7 = NULL;
16453  PyObject *__pyx_t_8 = NULL;
16454  PyObject *__pyx_t_9 = NULL;
16455  PyObject *__pyx_t_10 = NULL;
16456  PyObject *__pyx_t_11 = NULL;
16457  int __pyx_lineno = 0;
16458  const char *__pyx_filename = NULL;
16459  int __pyx_clineno = 0;
16460  __Pyx_RefNannySetupContext("sin", 0);
16461  if (__pyx_optional_args) {
16462  if (__pyx_optional_args->__pyx_n > 0) {
16463  __pyx_v_i = __pyx_optional_args->i;
16464  }
16465  }
16466 
16467  /* "PyClical.pyx":1739
16468  * {1,2,3}
16469  * """
16470  * if not (i is None): # <<<<<<<<<<<<<<
16471  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
16472  * else:
16473  */
16474  __pyx_t_1 = (__pyx_v_i != Py_None);
16475  __pyx_t_2 = (__pyx_t_1 != 0);
16476  if (__pyx_t_2) {
16477 
16478  /* "PyClical.pyx":1740
16479  * """
16480  * if not (i is None):
16481  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16482  * else:
16483  * try:
16484  */
16485  __Pyx_XDECREF(__pyx_r);
16486  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
16487  __Pyx_GOTREF(__pyx_t_3);
16488  try {
16489  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16490  } catch(...) {
16491  __Pyx_CppExn2PyErr();
16492  __PYX_ERR(0, 1740, __pyx_L1_error)
16493  }
16494  __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, 1740, __pyx_L1_error)
16495  __Pyx_GOTREF(__pyx_t_5);
16496  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16497  __pyx_r = __pyx_t_5;
16498  __pyx_t_5 = 0;
16499  goto __pyx_L0;
16500 
16501  /* "PyClical.pyx":1739
16502  * {1,2,3}
16503  * """
16504  * if not (i is None): # <<<<<<<<<<<<<<
16505  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
16506  * else:
16507  */
16508  }
16509 
16510  /* "PyClical.pyx":1742
16511  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
16512  * else:
16513  * try: # <<<<<<<<<<<<<<
16514  * return math.sin(obj)
16515  * except:
16516  */
16517  /*else*/ {
16518  {
16519  __Pyx_PyThreadState_declare
16520  __Pyx_PyThreadState_assign
16521  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16522  __Pyx_XGOTREF(__pyx_t_6);
16523  __Pyx_XGOTREF(__pyx_t_7);
16524  __Pyx_XGOTREF(__pyx_t_8);
16525  /*try:*/ {
16526 
16527  /* "PyClical.pyx":1743
16528  * else:
16529  * try:
16530  * return math.sin(obj) # <<<<<<<<<<<<<<
16531  * except:
16532  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16533  */
16534  __Pyx_XDECREF(__pyx_r);
16535  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L4_error)
16536  __Pyx_GOTREF(__pyx_t_3);
16537  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1743, __pyx_L4_error)
16538  __Pyx_GOTREF(__pyx_t_9);
16539  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16540  __pyx_t_3 = NULL;
16541  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16542  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16543  if (likely(__pyx_t_3)) {
16544  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16545  __Pyx_INCREF(__pyx_t_3);
16546  __Pyx_INCREF(function);
16547  __Pyx_DECREF_SET(__pyx_t_9, function);
16548  }
16549  }
16550  __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);
16551  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16552  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1743, __pyx_L4_error)
16553  __Pyx_GOTREF(__pyx_t_5);
16554  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16555  __pyx_r = __pyx_t_5;
16556  __pyx_t_5 = 0;
16557  goto __pyx_L8_try_return;
16558 
16559  /* "PyClical.pyx":1742
16560  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
16561  * else:
16562  * try: # <<<<<<<<<<<<<<
16563  * return math.sin(obj)
16564  * except:
16565  */
16566  }
16567  __pyx_L4_error:;
16568  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16569  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16570  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16571 
16572  /* "PyClical.pyx":1744
16573  * try:
16574  * return math.sin(obj)
16575  * except: # <<<<<<<<<<<<<<
16576  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16577  *
16578  */
16579  /*except:*/ {
16580  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16581  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1744, __pyx_L6_except_error)
16582  __Pyx_GOTREF(__pyx_t_5);
16583  __Pyx_GOTREF(__pyx_t_9);
16584  __Pyx_GOTREF(__pyx_t_3);
16585 
16586  /* "PyClical.pyx":1745
16587  * return math.sin(obj)
16588  * except:
16589  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
16590  *
16591  * cpdef inline asin(obj,i = None):
16592  */
16593  __Pyx_XDECREF(__pyx_r);
16594  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1745, __pyx_L6_except_error)
16595  __Pyx_GOTREF(__pyx_t_10);
16596  __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, 1745, __pyx_L6_except_error)
16597  __Pyx_GOTREF(__pyx_t_11);
16598  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16599  __pyx_r = __pyx_t_11;
16600  __pyx_t_11 = 0;
16601  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16602  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16603  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16604  goto __pyx_L7_except_return;
16605  }
16606  __pyx_L6_except_error:;
16607 
16608  /* "PyClical.pyx":1742
16609  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
16610  * else:
16611  * try: # <<<<<<<<<<<<<<
16612  * return math.sin(obj)
16613  * except:
16614  */
16615  __Pyx_XGIVEREF(__pyx_t_6);
16616  __Pyx_XGIVEREF(__pyx_t_7);
16617  __Pyx_XGIVEREF(__pyx_t_8);
16618  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16619  goto __pyx_L1_error;
16620  __pyx_L8_try_return:;
16621  __Pyx_XGIVEREF(__pyx_t_6);
16622  __Pyx_XGIVEREF(__pyx_t_7);
16623  __Pyx_XGIVEREF(__pyx_t_8);
16624  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16625  goto __pyx_L0;
16626  __pyx_L7_except_return:;
16627  __Pyx_XGIVEREF(__pyx_t_6);
16628  __Pyx_XGIVEREF(__pyx_t_7);
16629  __Pyx_XGIVEREF(__pyx_t_8);
16630  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16631  goto __pyx_L0;
16632  }
16633  }
16634 
16635  /* "PyClical.pyx":1728
16636  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
16637  *
16638  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
16639  * """
16640  * Sine of multivector with optional complexifier.
16641  */
16642 
16643  /* function exit code */
16644  __pyx_L1_error:;
16645  __Pyx_XDECREF(__pyx_t_3);
16646  __Pyx_XDECREF(__pyx_t_5);
16647  __Pyx_XDECREF(__pyx_t_9);
16648  __Pyx_XDECREF(__pyx_t_10);
16649  __Pyx_XDECREF(__pyx_t_11);
16650  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16651  __pyx_r = 0;
16652  __pyx_L0:;
16653  __Pyx_XGIVEREF(__pyx_r);
16654  __Pyx_RefNannyFinishContext();
16655  return __pyx_r;
16656  }
16657 
16658  /* Python wrapper */
16659  static PyObject *__pyx_pw_8PyClical_65sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16660  static char __pyx_doc_8PyClical_64sin[] = "\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 ";
16661  static PyObject *__pyx_pw_8PyClical_65sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16662  PyObject *__pyx_v_obj = 0;
16663  PyObject *__pyx_v_i = 0;
16664  int __pyx_lineno = 0;
16665  const char *__pyx_filename = NULL;
16666  int __pyx_clineno = 0;
16667  PyObject *__pyx_r = 0;
16668  __Pyx_RefNannyDeclarations
16669  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
16670  {
16671  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16672  PyObject* values[2] = {0,0};
16673  values[1] = ((PyObject *)Py_None);
16674  if (unlikely(__pyx_kwds)) {
16675  Py_ssize_t kw_args;
16676  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16677  switch (pos_args) {
16678  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16679  CYTHON_FALLTHROUGH;
16680  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16681  CYTHON_FALLTHROUGH;
16682  case 0: break;
16683  default: goto __pyx_L5_argtuple_error;
16684  }
16685  kw_args = PyDict_Size(__pyx_kwds);
16686  switch (pos_args) {
16687  case 0:
16688  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16689  else goto __pyx_L5_argtuple_error;
16690  CYTHON_FALLTHROUGH;
16691  case 1:
16692  if (kw_args > 0) {
16693  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16694  if (value) { values[1] = value; kw_args--; }
16695  }
16696  }
16697  if (unlikely(kw_args > 0)) {
16698  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1728, __pyx_L3_error)
16699  }
16700  } else {
16701  switch (PyTuple_GET_SIZE(__pyx_args)) {
16702  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16703  CYTHON_FALLTHROUGH;
16704  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16705  break;
16706  default: goto __pyx_L5_argtuple_error;
16707  }
16708  }
16709  __pyx_v_obj = values[0];
16710  __pyx_v_i = values[1];
16711  }
16712  goto __pyx_L4_argument_unpacking_done;
16713  __pyx_L5_argtuple_error:;
16714  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1728, __pyx_L3_error)
16715  __pyx_L3_error:;
16716  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16717  __Pyx_RefNannyFinishContext();
16718  return NULL;
16719  __pyx_L4_argument_unpacking_done:;
16720  __pyx_r = __pyx_pf_8PyClical_64sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16721 
16722  /* function exit code */
16723  __Pyx_RefNannyFinishContext();
16724  return __pyx_r;
16725  }
16726 
16727  static PyObject *__pyx_pf_8PyClical_64sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16728  PyObject *__pyx_r = NULL;
16729  __Pyx_RefNannyDeclarations
16730  PyObject *__pyx_t_1 = NULL;
16731  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
16732  int __pyx_lineno = 0;
16733  const char *__pyx_filename = NULL;
16734  int __pyx_clineno = 0;
16735  __Pyx_RefNannySetupContext("sin", 0);
16736  __Pyx_XDECREF(__pyx_r);
16737  __pyx_t_2.__pyx_n = 1;
16738  __pyx_t_2.i = __pyx_v_i;
16739  __pyx_t_1 = __pyx_f_8PyClical_sin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L1_error)
16740  __Pyx_GOTREF(__pyx_t_1);
16741  __pyx_r = __pyx_t_1;
16742  __pyx_t_1 = 0;
16743  goto __pyx_L0;
16744 
16745  /* function exit code */
16746  __pyx_L1_error:;
16747  __Pyx_XDECREF(__pyx_t_1);
16748  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16749  __pyx_r = NULL;
16750  __pyx_L0:;
16751  __Pyx_XGIVEREF(__pyx_r);
16752  __Pyx_RefNannyFinishContext();
16753  return __pyx_r;
16754  }
16755 
16756  /* "PyClical.pyx":1747
16757  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16758  *
16759  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16760  * """
16761  * Inverse sine of multivector with optional complexifier.
16762  */
16763 
16764  static PyObject *__pyx_pw_8PyClical_67asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16765  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) {
16766  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16767  PyObject *__pyx_r = NULL;
16768  __Pyx_RefNannyDeclarations
16769  int __pyx_t_1;
16770  int __pyx_t_2;
16771  PyObject *__pyx_t_3 = NULL;
16772  Clifford __pyx_t_4;
16773  PyObject *__pyx_t_5 = NULL;
16774  PyObject *__pyx_t_6 = NULL;
16775  PyObject *__pyx_t_7 = NULL;
16776  PyObject *__pyx_t_8 = NULL;
16777  PyObject *__pyx_t_9 = NULL;
16778  PyObject *__pyx_t_10 = NULL;
16779  PyObject *__pyx_t_11 = NULL;
16780  int __pyx_lineno = 0;
16781  const char *__pyx_filename = NULL;
16782  int __pyx_clineno = 0;
16783  __Pyx_RefNannySetupContext("asin", 0);
16784  if (__pyx_optional_args) {
16785  if (__pyx_optional_args->__pyx_n > 0) {
16786  __pyx_v_i = __pyx_optional_args->i;
16787  }
16788  }
16789 
16790  /* "PyClical.pyx":1760
16791  * {1,2,3}
16792  * """
16793  * if not (i is None): # <<<<<<<<<<<<<<
16794  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16795  * else:
16796  */
16797  __pyx_t_1 = (__pyx_v_i != Py_None);
16798  __pyx_t_2 = (__pyx_t_1 != 0);
16799  if (__pyx_t_2) {
16800 
16801  /* "PyClical.pyx":1761
16802  * """
16803  * if not (i is None):
16804  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16805  * else:
16806  * try:
16807  */
16808  __Pyx_XDECREF(__pyx_r);
16809  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __pyx_L1_error)
16810  __Pyx_GOTREF(__pyx_t_3);
16811  try {
16812  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16813  } catch(...) {
16814  __Pyx_CppExn2PyErr();
16815  __PYX_ERR(0, 1761, __pyx_L1_error)
16816  }
16817  __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, 1761, __pyx_L1_error)
16818  __Pyx_GOTREF(__pyx_t_5);
16819  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16820  __pyx_r = __pyx_t_5;
16821  __pyx_t_5 = 0;
16822  goto __pyx_L0;
16823 
16824  /* "PyClical.pyx":1760
16825  * {1,2,3}
16826  * """
16827  * if not (i is None): # <<<<<<<<<<<<<<
16828  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16829  * else:
16830  */
16831  }
16832 
16833  /* "PyClical.pyx":1763
16834  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16835  * else:
16836  * try: # <<<<<<<<<<<<<<
16837  * return math.asin(obj)
16838  * except:
16839  */
16840  /*else*/ {
16841  {
16842  __Pyx_PyThreadState_declare
16843  __Pyx_PyThreadState_assign
16844  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16845  __Pyx_XGOTREF(__pyx_t_6);
16846  __Pyx_XGOTREF(__pyx_t_7);
16847  __Pyx_XGOTREF(__pyx_t_8);
16848  /*try:*/ {
16849 
16850  /* "PyClical.pyx":1764
16851  * else:
16852  * try:
16853  * return math.asin(obj) # <<<<<<<<<<<<<<
16854  * except:
16855  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16856  */
16857  __Pyx_XDECREF(__pyx_r);
16858  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1764, __pyx_L4_error)
16859  __Pyx_GOTREF(__pyx_t_3);
16860  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1764, __pyx_L4_error)
16861  __Pyx_GOTREF(__pyx_t_9);
16862  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16863  __pyx_t_3 = NULL;
16864  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16865  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16866  if (likely(__pyx_t_3)) {
16867  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16868  __Pyx_INCREF(__pyx_t_3);
16869  __Pyx_INCREF(function);
16870  __Pyx_DECREF_SET(__pyx_t_9, function);
16871  }
16872  }
16873  __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);
16874  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16875  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1764, __pyx_L4_error)
16876  __Pyx_GOTREF(__pyx_t_5);
16877  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16878  __pyx_r = __pyx_t_5;
16879  __pyx_t_5 = 0;
16880  goto __pyx_L8_try_return;
16881 
16882  /* "PyClical.pyx":1763
16883  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16884  * else:
16885  * try: # <<<<<<<<<<<<<<
16886  * return math.asin(obj)
16887  * except:
16888  */
16889  }
16890  __pyx_L4_error:;
16891  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16892  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16893  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16894 
16895  /* "PyClical.pyx":1765
16896  * try:
16897  * return math.asin(obj)
16898  * except: # <<<<<<<<<<<<<<
16899  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16900  *
16901  */
16902  /*except:*/ {
16903  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16904  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1765, __pyx_L6_except_error)
16905  __Pyx_GOTREF(__pyx_t_5);
16906  __Pyx_GOTREF(__pyx_t_9);
16907  __Pyx_GOTREF(__pyx_t_3);
16908 
16909  /* "PyClical.pyx":1766
16910  * return math.asin(obj)
16911  * except:
16912  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
16913  *
16914  * cpdef inline sinh(obj):
16915  */
16916  __Pyx_XDECREF(__pyx_r);
16917  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16918  __Pyx_GOTREF(__pyx_t_10);
16919  __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, 1766, __pyx_L6_except_error)
16920  __Pyx_GOTREF(__pyx_t_11);
16921  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16922  __pyx_r = __pyx_t_11;
16923  __pyx_t_11 = 0;
16924  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16925  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16926  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16927  goto __pyx_L7_except_return;
16928  }
16929  __pyx_L6_except_error:;
16930 
16931  /* "PyClical.pyx":1763
16932  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16933  * else:
16934  * try: # <<<<<<<<<<<<<<
16935  * return math.asin(obj)
16936  * except:
16937  */
16938  __Pyx_XGIVEREF(__pyx_t_6);
16939  __Pyx_XGIVEREF(__pyx_t_7);
16940  __Pyx_XGIVEREF(__pyx_t_8);
16941  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16942  goto __pyx_L1_error;
16943  __pyx_L8_try_return:;
16944  __Pyx_XGIVEREF(__pyx_t_6);
16945  __Pyx_XGIVEREF(__pyx_t_7);
16946  __Pyx_XGIVEREF(__pyx_t_8);
16947  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16948  goto __pyx_L0;
16949  __pyx_L7_except_return:;
16950  __Pyx_XGIVEREF(__pyx_t_6);
16951  __Pyx_XGIVEREF(__pyx_t_7);
16952  __Pyx_XGIVEREF(__pyx_t_8);
16953  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16954  goto __pyx_L0;
16955  }
16956  }
16957 
16958  /* "PyClical.pyx":1747
16959  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16960  *
16961  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16962  * """
16963  * Inverse sine of multivector with optional complexifier.
16964  */
16965 
16966  /* function exit code */
16967  __pyx_L1_error:;
16968  __Pyx_XDECREF(__pyx_t_3);
16969  __Pyx_XDECREF(__pyx_t_5);
16970  __Pyx_XDECREF(__pyx_t_9);
16971  __Pyx_XDECREF(__pyx_t_10);
16972  __Pyx_XDECREF(__pyx_t_11);
16973  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16974  __pyx_r = 0;
16975  __pyx_L0:;
16976  __Pyx_XGIVEREF(__pyx_r);
16977  __Pyx_RefNannyFinishContext();
16978  return __pyx_r;
16979  }
16980 
16981  /* Python wrapper */
16982  static PyObject *__pyx_pw_8PyClical_67asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16983  static char __pyx_doc_8PyClical_66asin[] = "\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 ";
16984  static PyObject *__pyx_pw_8PyClical_67asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16985  PyObject *__pyx_v_obj = 0;
16986  PyObject *__pyx_v_i = 0;
16987  int __pyx_lineno = 0;
16988  const char *__pyx_filename = NULL;
16989  int __pyx_clineno = 0;
16990  PyObject *__pyx_r = 0;
16991  __Pyx_RefNannyDeclarations
16992  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
16993  {
16994  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16995  PyObject* values[2] = {0,0};
16996  values[1] = ((PyObject *)Py_None);
16997  if (unlikely(__pyx_kwds)) {
16998  Py_ssize_t kw_args;
16999  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17000  switch (pos_args) {
17001  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17002  CYTHON_FALLTHROUGH;
17003  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17004  CYTHON_FALLTHROUGH;
17005  case 0: break;
17006  default: goto __pyx_L5_argtuple_error;
17007  }
17008  kw_args = PyDict_Size(__pyx_kwds);
17009  switch (pos_args) {
17010  case 0:
17011  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17012  else goto __pyx_L5_argtuple_error;
17013  CYTHON_FALLTHROUGH;
17014  case 1:
17015  if (kw_args > 0) {
17016  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17017  if (value) { values[1] = value; kw_args--; }
17018  }
17019  }
17020  if (unlikely(kw_args > 0)) {
17021  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1747, __pyx_L3_error)
17022  }
17023  } else {
17024  switch (PyTuple_GET_SIZE(__pyx_args)) {
17025  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17026  CYTHON_FALLTHROUGH;
17027  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17028  break;
17029  default: goto __pyx_L5_argtuple_error;
17030  }
17031  }
17032  __pyx_v_obj = values[0];
17033  __pyx_v_i = values[1];
17034  }
17035  goto __pyx_L4_argument_unpacking_done;
17036  __pyx_L5_argtuple_error:;
17037  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1747, __pyx_L3_error)
17038  __pyx_L3_error:;
17039  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
17040  __Pyx_RefNannyFinishContext();
17041  return NULL;
17042  __pyx_L4_argument_unpacking_done:;
17043  __pyx_r = __pyx_pf_8PyClical_66asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
17044 
17045  /* function exit code */
17046  __Pyx_RefNannyFinishContext();
17047  return __pyx_r;
17048  }
17049 
17050  static PyObject *__pyx_pf_8PyClical_66asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17051  PyObject *__pyx_r = NULL;
17052  __Pyx_RefNannyDeclarations
17053  PyObject *__pyx_t_1 = NULL;
17054  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
17055  int __pyx_lineno = 0;
17056  const char *__pyx_filename = NULL;
17057  int __pyx_clineno = 0;
17058  __Pyx_RefNannySetupContext("asin", 0);
17059  __Pyx_XDECREF(__pyx_r);
17060  __pyx_t_2.__pyx_n = 1;
17061  __pyx_t_2.i = __pyx_v_i;
17062  __pyx_t_1 = __pyx_f_8PyClical_asin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1747, __pyx_L1_error)
17063  __Pyx_GOTREF(__pyx_t_1);
17064  __pyx_r = __pyx_t_1;
17065  __pyx_t_1 = 0;
17066  goto __pyx_L0;
17067 
17068  /* function exit code */
17069  __pyx_L1_error:;
17070  __Pyx_XDECREF(__pyx_t_1);
17071  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
17072  __pyx_r = NULL;
17073  __pyx_L0:;
17074  __Pyx_XGIVEREF(__pyx_r);
17075  __Pyx_RefNannyFinishContext();
17076  return __pyx_r;
17077  }
17078 
17079  /* "PyClical.pyx":1768
17080  * return clifford().wrap( glucat.asin(toClifford(obj)) )
17081  *
17082  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
17083  * """
17084  * Hyperbolic sine of multivector.
17085  */
17086 
17087  static PyObject *__pyx_pw_8PyClical_69sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17088  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17089  PyObject *__pyx_r = NULL;
17090  __Pyx_RefNannyDeclarations
17091  PyObject *__pyx_t_1 = NULL;
17092  PyObject *__pyx_t_2 = NULL;
17093  PyObject *__pyx_t_3 = NULL;
17094  PyObject *__pyx_t_4 = NULL;
17095  PyObject *__pyx_t_5 = NULL;
17096  PyObject *__pyx_t_6 = NULL;
17097  PyObject *__pyx_t_7 = NULL;
17098  PyObject *__pyx_t_8 = NULL;
17099  int __pyx_lineno = 0;
17100  const char *__pyx_filename = NULL;
17101  int __pyx_clineno = 0;
17102  __Pyx_RefNannySetupContext("sinh", 0);
17103 
17104  /* "PyClical.pyx":1777
17105  * 0.5{1,2}
17106  * """
17107  * try: # <<<<<<<<<<<<<<
17108  * return math.sinh(obj)
17109  * except:
17110  */
17111  {
17112  __Pyx_PyThreadState_declare
17113  __Pyx_PyThreadState_assign
17114  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17115  __Pyx_XGOTREF(__pyx_t_1);
17116  __Pyx_XGOTREF(__pyx_t_2);
17117  __Pyx_XGOTREF(__pyx_t_3);
17118  /*try:*/ {
17119 
17120  /* "PyClical.pyx":1778
17121  * """
17122  * try:
17123  * return math.sinh(obj) # <<<<<<<<<<<<<<
17124  * except:
17125  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
17126  */
17127  __Pyx_XDECREF(__pyx_r);
17128  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1778, __pyx_L3_error)
17129  __Pyx_GOTREF(__pyx_t_5);
17130  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sinh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1778, __pyx_L3_error)
17131  __Pyx_GOTREF(__pyx_t_6);
17132  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17133  __pyx_t_5 = NULL;
17134  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17135  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17136  if (likely(__pyx_t_5)) {
17137  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17138  __Pyx_INCREF(__pyx_t_5);
17139  __Pyx_INCREF(function);
17140  __Pyx_DECREF_SET(__pyx_t_6, function);
17141  }
17142  }
17143  __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);
17144  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17145  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1778, __pyx_L3_error)
17146  __Pyx_GOTREF(__pyx_t_4);
17147  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17148  __pyx_r = __pyx_t_4;
17149  __pyx_t_4 = 0;
17150  goto __pyx_L7_try_return;
17151 
17152  /* "PyClical.pyx":1777
17153  * 0.5{1,2}
17154  * """
17155  * try: # <<<<<<<<<<<<<<
17156  * return math.sinh(obj)
17157  * except:
17158  */
17159  }
17160  __pyx_L3_error:;
17161  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17162  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17163  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17164 
17165  /* "PyClical.pyx":1779
17166  * try:
17167  * return math.sinh(obj)
17168  * except: # <<<<<<<<<<<<<<
17169  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
17170  *
17171  */
17172  /*except:*/ {
17173  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17174  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1779, __pyx_L5_except_error)
17175  __Pyx_GOTREF(__pyx_t_4);
17176  __Pyx_GOTREF(__pyx_t_6);
17177  __Pyx_GOTREF(__pyx_t_5);
17178 
17179  /* "PyClical.pyx":1780
17180  * return math.sinh(obj)
17181  * except:
17182  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17183  *
17184  * cpdef inline asinh(obj,i = None):
17185  */
17186  __Pyx_XDECREF(__pyx_r);
17187  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1780, __pyx_L5_except_error)
17188  __Pyx_GOTREF(__pyx_t_7);
17189  __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, 1780, __pyx_L5_except_error)
17190  __Pyx_GOTREF(__pyx_t_8);
17191  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17192  __pyx_r = __pyx_t_8;
17193  __pyx_t_8 = 0;
17194  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17195  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17196  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17197  goto __pyx_L6_except_return;
17198  }
17199  __pyx_L5_except_error:;
17200 
17201  /* "PyClical.pyx":1777
17202  * 0.5{1,2}
17203  * """
17204  * try: # <<<<<<<<<<<<<<
17205  * return math.sinh(obj)
17206  * except:
17207  */
17208  __Pyx_XGIVEREF(__pyx_t_1);
17209  __Pyx_XGIVEREF(__pyx_t_2);
17210  __Pyx_XGIVEREF(__pyx_t_3);
17211  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17212  goto __pyx_L1_error;
17213  __pyx_L7_try_return:;
17214  __Pyx_XGIVEREF(__pyx_t_1);
17215  __Pyx_XGIVEREF(__pyx_t_2);
17216  __Pyx_XGIVEREF(__pyx_t_3);
17217  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17218  goto __pyx_L0;
17219  __pyx_L6_except_return:;
17220  __Pyx_XGIVEREF(__pyx_t_1);
17221  __Pyx_XGIVEREF(__pyx_t_2);
17222  __Pyx_XGIVEREF(__pyx_t_3);
17223  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17224  goto __pyx_L0;
17225  }
17226 
17227  /* "PyClical.pyx":1768
17228  * return clifford().wrap( glucat.asin(toClifford(obj)) )
17229  *
17230  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
17231  * """
17232  * Hyperbolic sine of multivector.
17233  */
17234 
17235  /* function exit code */
17236  __pyx_L1_error:;
17237  __Pyx_XDECREF(__pyx_t_4);
17238  __Pyx_XDECREF(__pyx_t_5);
17239  __Pyx_XDECREF(__pyx_t_6);
17240  __Pyx_XDECREF(__pyx_t_7);
17241  __Pyx_XDECREF(__pyx_t_8);
17242  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17243  __pyx_r = 0;
17244  __pyx_L0:;
17245  __Pyx_XGIVEREF(__pyx_r);
17246  __Pyx_RefNannyFinishContext();
17247  return __pyx_r;
17248  }
17249 
17250  /* Python wrapper */
17251  static PyObject *__pyx_pw_8PyClical_69sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17252  static char __pyx_doc_8PyClical_68sinh[] = "\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 ";
17253  static PyObject *__pyx_pw_8PyClical_69sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17254  PyObject *__pyx_r = 0;
17255  __Pyx_RefNannyDeclarations
17256  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
17257  __pyx_r = __pyx_pf_8PyClical_68sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
17258 
17259  /* function exit code */
17260  __Pyx_RefNannyFinishContext();
17261  return __pyx_r;
17262  }
17263 
17264  static PyObject *__pyx_pf_8PyClical_68sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17265  PyObject *__pyx_r = NULL;
17266  __Pyx_RefNannyDeclarations
17267  PyObject *__pyx_t_1 = NULL;
17268  int __pyx_lineno = 0;
17269  const char *__pyx_filename = NULL;
17270  int __pyx_clineno = 0;
17271  __Pyx_RefNannySetupContext("sinh", 0);
17272  __Pyx_XDECREF(__pyx_r);
17273  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
17274  __Pyx_GOTREF(__pyx_t_1);
17275  __pyx_r = __pyx_t_1;
17276  __pyx_t_1 = 0;
17277  goto __pyx_L0;
17278 
17279  /* function exit code */
17280  __pyx_L1_error:;
17281  __Pyx_XDECREF(__pyx_t_1);
17282  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17283  __pyx_r = NULL;
17284  __pyx_L0:;
17285  __Pyx_XGIVEREF(__pyx_r);
17286  __Pyx_RefNannyFinishContext();
17287  return __pyx_r;
17288  }
17289 
17290  /* "PyClical.pyx":1782
17291  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
17292  *
17293  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
17294  * """
17295  * Inverse hyperbolic sine of multivector with optional complexifier.
17296  */
17297 
17298  static PyObject *__pyx_pw_8PyClical_71asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17299  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) {
17300  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17301  PyObject *__pyx_r = NULL;
17302  __Pyx_RefNannyDeclarations
17303  int __pyx_t_1;
17304  int __pyx_t_2;
17305  PyObject *__pyx_t_3 = NULL;
17306  Clifford __pyx_t_4;
17307  PyObject *__pyx_t_5 = NULL;
17308  PyObject *__pyx_t_6 = NULL;
17309  PyObject *__pyx_t_7 = NULL;
17310  PyObject *__pyx_t_8 = NULL;
17311  PyObject *__pyx_t_9 = NULL;
17312  PyObject *__pyx_t_10 = NULL;
17313  PyObject *__pyx_t_11 = NULL;
17314  int __pyx_lineno = 0;
17315  const char *__pyx_filename = NULL;
17316  int __pyx_clineno = 0;
17317  __Pyx_RefNannySetupContext("asinh", 0);
17318  if (__pyx_optional_args) {
17319  if (__pyx_optional_args->__pyx_n > 0) {
17320  __pyx_v_i = __pyx_optional_args->i;
17321  }
17322  }
17323 
17324  /* "PyClical.pyx":1793
17325  * {1,2}
17326  * """
17327  * if not (i is None): # <<<<<<<<<<<<<<
17328  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
17329  * else:
17330  */
17331  __pyx_t_1 = (__pyx_v_i != Py_None);
17332  __pyx_t_2 = (__pyx_t_1 != 0);
17333  if (__pyx_t_2) {
17334 
17335  /* "PyClical.pyx":1794
17336  * """
17337  * if not (i is None):
17338  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17339  * else:
17340  * try:
17341  */
17342  __Pyx_XDECREF(__pyx_r);
17343  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1794, __pyx_L1_error)
17344  __Pyx_GOTREF(__pyx_t_3);
17345  try {
17346  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17347  } catch(...) {
17348  __Pyx_CppExn2PyErr();
17349  __PYX_ERR(0, 1794, __pyx_L1_error)
17350  }
17351  __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, 1794, __pyx_L1_error)
17352  __Pyx_GOTREF(__pyx_t_5);
17353  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17354  __pyx_r = __pyx_t_5;
17355  __pyx_t_5 = 0;
17356  goto __pyx_L0;
17357 
17358  /* "PyClical.pyx":1793
17359  * {1,2}
17360  * """
17361  * if not (i is None): # <<<<<<<<<<<<<<
17362  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
17363  * else:
17364  */
17365  }
17366 
17367  /* "PyClical.pyx":1796
17368  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
17369  * else:
17370  * try: # <<<<<<<<<<<<<<
17371  * return math.asinh(obj)
17372  * except:
17373  */
17374  /*else*/ {
17375  {
17376  __Pyx_PyThreadState_declare
17377  __Pyx_PyThreadState_assign
17378  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17379  __Pyx_XGOTREF(__pyx_t_6);
17380  __Pyx_XGOTREF(__pyx_t_7);
17381  __Pyx_XGOTREF(__pyx_t_8);
17382  /*try:*/ {
17383 
17384  /* "PyClical.pyx":1797
17385  * else:
17386  * try:
17387  * return math.asinh(obj) # <<<<<<<<<<<<<<
17388  * except:
17389  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17390  */
17391  __Pyx_XDECREF(__pyx_r);
17392  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1797, __pyx_L4_error)
17393  __Pyx_GOTREF(__pyx_t_3);
17394  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asinh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1797, __pyx_L4_error)
17395  __Pyx_GOTREF(__pyx_t_9);
17396  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17397  __pyx_t_3 = NULL;
17398  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17399  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17400  if (likely(__pyx_t_3)) {
17401  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17402  __Pyx_INCREF(__pyx_t_3);
17403  __Pyx_INCREF(function);
17404  __Pyx_DECREF_SET(__pyx_t_9, function);
17405  }
17406  }
17407  __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);
17408  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17409  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1797, __pyx_L4_error)
17410  __Pyx_GOTREF(__pyx_t_5);
17411  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17412  __pyx_r = __pyx_t_5;
17413  __pyx_t_5 = 0;
17414  goto __pyx_L8_try_return;
17415 
17416  /* "PyClical.pyx":1796
17417  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
17418  * else:
17419  * try: # <<<<<<<<<<<<<<
17420  * return math.asinh(obj)
17421  * except:
17422  */
17423  }
17424  __pyx_L4_error:;
17425  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17426  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17427  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17428 
17429  /* "PyClical.pyx":1798
17430  * try:
17431  * return math.asinh(obj)
17432  * except: # <<<<<<<<<<<<<<
17433  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17434  *
17435  */
17436  /*except:*/ {
17437  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17438  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1798, __pyx_L6_except_error)
17439  __Pyx_GOTREF(__pyx_t_5);
17440  __Pyx_GOTREF(__pyx_t_9);
17441  __Pyx_GOTREF(__pyx_t_3);
17442 
17443  /* "PyClical.pyx":1799
17444  * return math.asinh(obj)
17445  * except:
17446  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17447  *
17448  * cpdef inline tan(obj,i = None):
17449  */
17450  __Pyx_XDECREF(__pyx_r);
17451  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1799, __pyx_L6_except_error)
17452  __Pyx_GOTREF(__pyx_t_10);
17453  __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, 1799, __pyx_L6_except_error)
17454  __Pyx_GOTREF(__pyx_t_11);
17455  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17456  __pyx_r = __pyx_t_11;
17457  __pyx_t_11 = 0;
17458  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17459  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17460  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17461  goto __pyx_L7_except_return;
17462  }
17463  __pyx_L6_except_error:;
17464 
17465  /* "PyClical.pyx":1796
17466  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
17467  * else:
17468  * try: # <<<<<<<<<<<<<<
17469  * return math.asinh(obj)
17470  * except:
17471  */
17472  __Pyx_XGIVEREF(__pyx_t_6);
17473  __Pyx_XGIVEREF(__pyx_t_7);
17474  __Pyx_XGIVEREF(__pyx_t_8);
17475  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17476  goto __pyx_L1_error;
17477  __pyx_L8_try_return:;
17478  __Pyx_XGIVEREF(__pyx_t_6);
17479  __Pyx_XGIVEREF(__pyx_t_7);
17480  __Pyx_XGIVEREF(__pyx_t_8);
17481  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17482  goto __pyx_L0;
17483  __pyx_L7_except_return:;
17484  __Pyx_XGIVEREF(__pyx_t_6);
17485  __Pyx_XGIVEREF(__pyx_t_7);
17486  __Pyx_XGIVEREF(__pyx_t_8);
17487  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17488  goto __pyx_L0;
17489  }
17490  }
17491 
17492  /* "PyClical.pyx":1782
17493  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
17494  *
17495  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
17496  * """
17497  * Inverse hyperbolic sine of multivector with optional complexifier.
17498  */
17499 
17500  /* function exit code */
17501  __pyx_L1_error:;
17502  __Pyx_XDECREF(__pyx_t_3);
17503  __Pyx_XDECREF(__pyx_t_5);
17504  __Pyx_XDECREF(__pyx_t_9);
17505  __Pyx_XDECREF(__pyx_t_10);
17506  __Pyx_XDECREF(__pyx_t_11);
17507  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17508  __pyx_r = 0;
17509  __pyx_L0:;
17510  __Pyx_XGIVEREF(__pyx_r);
17511  __Pyx_RefNannyFinishContext();
17512  return __pyx_r;
17513  }
17514 
17515  /* Python wrapper */
17516  static PyObject *__pyx_pw_8PyClical_71asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17517  static char __pyx_doc_8PyClical_70asinh[] = "\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 ";
17518  static PyObject *__pyx_pw_8PyClical_71asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17519  PyObject *__pyx_v_obj = 0;
17520  PyObject *__pyx_v_i = 0;
17521  int __pyx_lineno = 0;
17522  const char *__pyx_filename = NULL;
17523  int __pyx_clineno = 0;
17524  PyObject *__pyx_r = 0;
17525  __Pyx_RefNannyDeclarations
17526  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
17527  {
17528  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17529  PyObject* values[2] = {0,0};
17530  values[1] = ((PyObject *)Py_None);
17531  if (unlikely(__pyx_kwds)) {
17532  Py_ssize_t kw_args;
17533  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17534  switch (pos_args) {
17535  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17536  CYTHON_FALLTHROUGH;
17537  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17538  CYTHON_FALLTHROUGH;
17539  case 0: break;
17540  default: goto __pyx_L5_argtuple_error;
17541  }
17542  kw_args = PyDict_Size(__pyx_kwds);
17543  switch (pos_args) {
17544  case 0:
17545  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17546  else goto __pyx_L5_argtuple_error;
17547  CYTHON_FALLTHROUGH;
17548  case 1:
17549  if (kw_args > 0) {
17550  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17551  if (value) { values[1] = value; kw_args--; }
17552  }
17553  }
17554  if (unlikely(kw_args > 0)) {
17555  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1782, __pyx_L3_error)
17556  }
17557  } else {
17558  switch (PyTuple_GET_SIZE(__pyx_args)) {
17559  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17560  CYTHON_FALLTHROUGH;
17561  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17562  break;
17563  default: goto __pyx_L5_argtuple_error;
17564  }
17565  }
17566  __pyx_v_obj = values[0];
17567  __pyx_v_i = values[1];
17568  }
17569  goto __pyx_L4_argument_unpacking_done;
17570  __pyx_L5_argtuple_error:;
17571  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1782, __pyx_L3_error)
17572  __pyx_L3_error:;
17573  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17574  __Pyx_RefNannyFinishContext();
17575  return NULL;
17576  __pyx_L4_argument_unpacking_done:;
17577  __pyx_r = __pyx_pf_8PyClical_70asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17578 
17579  /* function exit code */
17580  __Pyx_RefNannyFinishContext();
17581  return __pyx_r;
17582  }
17583 
17584  static PyObject *__pyx_pf_8PyClical_70asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17585  PyObject *__pyx_r = NULL;
17586  __Pyx_RefNannyDeclarations
17587  PyObject *__pyx_t_1 = NULL;
17588  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
17589  int __pyx_lineno = 0;
17590  const char *__pyx_filename = NULL;
17591  int __pyx_clineno = 0;
17592  __Pyx_RefNannySetupContext("asinh", 0);
17593  __Pyx_XDECREF(__pyx_r);
17594  __pyx_t_2.__pyx_n = 1;
17595  __pyx_t_2.i = __pyx_v_i;
17596  __pyx_t_1 = __pyx_f_8PyClical_asinh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error)
17597  __Pyx_GOTREF(__pyx_t_1);
17598  __pyx_r = __pyx_t_1;
17599  __pyx_t_1 = 0;
17600  goto __pyx_L0;
17601 
17602  /* function exit code */
17603  __pyx_L1_error:;
17604  __Pyx_XDECREF(__pyx_t_1);
17605  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17606  __pyx_r = NULL;
17607  __pyx_L0:;
17608  __Pyx_XGIVEREF(__pyx_r);
17609  __Pyx_RefNannyFinishContext();
17610  return __pyx_r;
17611  }
17612 
17613  /* "PyClical.pyx":1801
17614  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17615  *
17616  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
17617  * """
17618  * Tangent of multivector with optional complexifier.
17619  */
17620 
17621  static PyObject *__pyx_pw_8PyClical_73tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17622  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) {
17623  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17624  PyObject *__pyx_r = NULL;
17625  __Pyx_RefNannyDeclarations
17626  int __pyx_t_1;
17627  int __pyx_t_2;
17628  PyObject *__pyx_t_3 = NULL;
17629  Clifford __pyx_t_4;
17630  PyObject *__pyx_t_5 = NULL;
17631  PyObject *__pyx_t_6 = NULL;
17632  PyObject *__pyx_t_7 = NULL;
17633  PyObject *__pyx_t_8 = NULL;
17634  PyObject *__pyx_t_9 = NULL;
17635  PyObject *__pyx_t_10 = NULL;
17636  PyObject *__pyx_t_11 = NULL;
17637  int __pyx_lineno = 0;
17638  const char *__pyx_filename = NULL;
17639  int __pyx_clineno = 0;
17640  __Pyx_RefNannySetupContext("tan", 0);
17641  if (__pyx_optional_args) {
17642  if (__pyx_optional_args->__pyx_n > 0) {
17643  __pyx_v_i = __pyx_optional_args->i;
17644  }
17645  }
17646 
17647  /* "PyClical.pyx":1810
17648  * 0.7616{1,2}
17649  * """
17650  * if not (i is None): # <<<<<<<<<<<<<<
17651  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17652  * else:
17653  */
17654  __pyx_t_1 = (__pyx_v_i != Py_None);
17655  __pyx_t_2 = (__pyx_t_1 != 0);
17656  if (__pyx_t_2) {
17657 
17658  /* "PyClical.pyx":1811
17659  * """
17660  * if not (i is None):
17661  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17662  * else:
17663  * try:
17664  */
17665  __Pyx_XDECREF(__pyx_r);
17666  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error)
17667  __Pyx_GOTREF(__pyx_t_3);
17668  try {
17669  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17670  } catch(...) {
17671  __Pyx_CppExn2PyErr();
17672  __PYX_ERR(0, 1811, __pyx_L1_error)
17673  }
17674  __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, 1811, __pyx_L1_error)
17675  __Pyx_GOTREF(__pyx_t_5);
17676  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17677  __pyx_r = __pyx_t_5;
17678  __pyx_t_5 = 0;
17679  goto __pyx_L0;
17680 
17681  /* "PyClical.pyx":1810
17682  * 0.7616{1,2}
17683  * """
17684  * if not (i is None): # <<<<<<<<<<<<<<
17685  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17686  * else:
17687  */
17688  }
17689 
17690  /* "PyClical.pyx":1813
17691  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17692  * else:
17693  * try: # <<<<<<<<<<<<<<
17694  * return math.tan(obj)
17695  * except:
17696  */
17697  /*else*/ {
17698  {
17699  __Pyx_PyThreadState_declare
17700  __Pyx_PyThreadState_assign
17701  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17702  __Pyx_XGOTREF(__pyx_t_6);
17703  __Pyx_XGOTREF(__pyx_t_7);
17704  __Pyx_XGOTREF(__pyx_t_8);
17705  /*try:*/ {
17706 
17707  /* "PyClical.pyx":1814
17708  * else:
17709  * try:
17710  * return math.tan(obj) # <<<<<<<<<<<<<<
17711  * except:
17712  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17713  */
17714  __Pyx_XDECREF(__pyx_r);
17715  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1814, __pyx_L4_error)
17716  __Pyx_GOTREF(__pyx_t_3);
17717  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1814, __pyx_L4_error)
17718  __Pyx_GOTREF(__pyx_t_9);
17719  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17720  __pyx_t_3 = NULL;
17721  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17722  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17723  if (likely(__pyx_t_3)) {
17724  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17725  __Pyx_INCREF(__pyx_t_3);
17726  __Pyx_INCREF(function);
17727  __Pyx_DECREF_SET(__pyx_t_9, function);
17728  }
17729  }
17730  __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);
17731  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17732  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1814, __pyx_L4_error)
17733  __Pyx_GOTREF(__pyx_t_5);
17734  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17735  __pyx_r = __pyx_t_5;
17736  __pyx_t_5 = 0;
17737  goto __pyx_L8_try_return;
17738 
17739  /* "PyClical.pyx":1813
17740  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17741  * else:
17742  * try: # <<<<<<<<<<<<<<
17743  * return math.tan(obj)
17744  * except:
17745  */
17746  }
17747  __pyx_L4_error:;
17748  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17749  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17750  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17751 
17752  /* "PyClical.pyx":1815
17753  * try:
17754  * return math.tan(obj)
17755  * except: # <<<<<<<<<<<<<<
17756  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17757  *
17758  */
17759  /*except:*/ {
17760  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17761  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1815, __pyx_L6_except_error)
17762  __Pyx_GOTREF(__pyx_t_5);
17763  __Pyx_GOTREF(__pyx_t_9);
17764  __Pyx_GOTREF(__pyx_t_3);
17765 
17766  /* "PyClical.pyx":1816
17767  * return math.tan(obj)
17768  * except:
17769  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17770  *
17771  * cpdef inline atan(obj,i = None):
17772  */
17773  __Pyx_XDECREF(__pyx_r);
17774  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1816, __pyx_L6_except_error)
17775  __Pyx_GOTREF(__pyx_t_10);
17776  __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, 1816, __pyx_L6_except_error)
17777  __Pyx_GOTREF(__pyx_t_11);
17778  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17779  __pyx_r = __pyx_t_11;
17780  __pyx_t_11 = 0;
17781  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17782  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17783  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17784  goto __pyx_L7_except_return;
17785  }
17786  __pyx_L6_except_error:;
17787 
17788  /* "PyClical.pyx":1813
17789  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17790  * else:
17791  * try: # <<<<<<<<<<<<<<
17792  * return math.tan(obj)
17793  * except:
17794  */
17795  __Pyx_XGIVEREF(__pyx_t_6);
17796  __Pyx_XGIVEREF(__pyx_t_7);
17797  __Pyx_XGIVEREF(__pyx_t_8);
17798  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17799  goto __pyx_L1_error;
17800  __pyx_L8_try_return:;
17801  __Pyx_XGIVEREF(__pyx_t_6);
17802  __Pyx_XGIVEREF(__pyx_t_7);
17803  __Pyx_XGIVEREF(__pyx_t_8);
17804  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17805  goto __pyx_L0;
17806  __pyx_L7_except_return:;
17807  __Pyx_XGIVEREF(__pyx_t_6);
17808  __Pyx_XGIVEREF(__pyx_t_7);
17809  __Pyx_XGIVEREF(__pyx_t_8);
17810  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17811  goto __pyx_L0;
17812  }
17813  }
17814 
17815  /* "PyClical.pyx":1801
17816  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17817  *
17818  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
17819  * """
17820  * Tangent of multivector with optional complexifier.
17821  */
17822 
17823  /* function exit code */
17824  __pyx_L1_error:;
17825  __Pyx_XDECREF(__pyx_t_3);
17826  __Pyx_XDECREF(__pyx_t_5);
17827  __Pyx_XDECREF(__pyx_t_9);
17828  __Pyx_XDECREF(__pyx_t_10);
17829  __Pyx_XDECREF(__pyx_t_11);
17830  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17831  __pyx_r = 0;
17832  __pyx_L0:;
17833  __Pyx_XGIVEREF(__pyx_r);
17834  __Pyx_RefNannyFinishContext();
17835  return __pyx_r;
17836  }
17837 
17838  /* Python wrapper */
17839  static PyObject *__pyx_pw_8PyClical_73tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17840  static char __pyx_doc_8PyClical_72tan[] = "\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 ";
17841  static PyObject *__pyx_pw_8PyClical_73tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17842  PyObject *__pyx_v_obj = 0;
17843  PyObject *__pyx_v_i = 0;
17844  int __pyx_lineno = 0;
17845  const char *__pyx_filename = NULL;
17846  int __pyx_clineno = 0;
17847  PyObject *__pyx_r = 0;
17848  __Pyx_RefNannyDeclarations
17849  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
17850  {
17851  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17852  PyObject* values[2] = {0,0};
17853  values[1] = ((PyObject *)Py_None);
17854  if (unlikely(__pyx_kwds)) {
17855  Py_ssize_t kw_args;
17856  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17857  switch (pos_args) {
17858  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17859  CYTHON_FALLTHROUGH;
17860  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17861  CYTHON_FALLTHROUGH;
17862  case 0: break;
17863  default: goto __pyx_L5_argtuple_error;
17864  }
17865  kw_args = PyDict_Size(__pyx_kwds);
17866  switch (pos_args) {
17867  case 0:
17868  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17869  else goto __pyx_L5_argtuple_error;
17870  CYTHON_FALLTHROUGH;
17871  case 1:
17872  if (kw_args > 0) {
17873  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17874  if (value) { values[1] = value; kw_args--; }
17875  }
17876  }
17877  if (unlikely(kw_args > 0)) {
17878  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1801, __pyx_L3_error)
17879  }
17880  } else {
17881  switch (PyTuple_GET_SIZE(__pyx_args)) {
17882  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17883  CYTHON_FALLTHROUGH;
17884  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17885  break;
17886  default: goto __pyx_L5_argtuple_error;
17887  }
17888  }
17889  __pyx_v_obj = values[0];
17890  __pyx_v_i = values[1];
17891  }
17892  goto __pyx_L4_argument_unpacking_done;
17893  __pyx_L5_argtuple_error:;
17894  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1801, __pyx_L3_error)
17895  __pyx_L3_error:;
17896  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17897  __Pyx_RefNannyFinishContext();
17898  return NULL;
17899  __pyx_L4_argument_unpacking_done:;
17900  __pyx_r = __pyx_pf_8PyClical_72tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17901 
17902  /* function exit code */
17903  __Pyx_RefNannyFinishContext();
17904  return __pyx_r;
17905  }
17906 
17907  static PyObject *__pyx_pf_8PyClical_72tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17908  PyObject *__pyx_r = NULL;
17909  __Pyx_RefNannyDeclarations
17910  PyObject *__pyx_t_1 = NULL;
17911  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
17912  int __pyx_lineno = 0;
17913  const char *__pyx_filename = NULL;
17914  int __pyx_clineno = 0;
17915  __Pyx_RefNannySetupContext("tan", 0);
17916  __Pyx_XDECREF(__pyx_r);
17917  __pyx_t_2.__pyx_n = 1;
17918  __pyx_t_2.i = __pyx_v_i;
17919  __pyx_t_1 = __pyx_f_8PyClical_tan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1801, __pyx_L1_error)
17920  __Pyx_GOTREF(__pyx_t_1);
17921  __pyx_r = __pyx_t_1;
17922  __pyx_t_1 = 0;
17923  goto __pyx_L0;
17924 
17925  /* function exit code */
17926  __pyx_L1_error:;
17927  __Pyx_XDECREF(__pyx_t_1);
17928  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17929  __pyx_r = NULL;
17930  __pyx_L0:;
17931  __Pyx_XGIVEREF(__pyx_r);
17932  __Pyx_RefNannyFinishContext();
17933  return __pyx_r;
17934  }
17935 
17936  /* "PyClical.pyx":1818
17937  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17938  *
17939  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17940  * """
17941  * Inverse tangent of multivector with optional complexifier.
17942  */
17943 
17944  static PyObject *__pyx_pw_8PyClical_75atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17945  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) {
17946  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17947  PyObject *__pyx_r = NULL;
17948  __Pyx_RefNannyDeclarations
17949  int __pyx_t_1;
17950  int __pyx_t_2;
17951  PyObject *__pyx_t_3 = NULL;
17952  Clifford __pyx_t_4;
17953  PyObject *__pyx_t_5 = NULL;
17954  PyObject *__pyx_t_6 = NULL;
17955  PyObject *__pyx_t_7 = NULL;
17956  PyObject *__pyx_t_8 = NULL;
17957  PyObject *__pyx_t_9 = NULL;
17958  PyObject *__pyx_t_10 = NULL;
17959  PyObject *__pyx_t_11 = NULL;
17960  int __pyx_lineno = 0;
17961  const char *__pyx_filename = NULL;
17962  int __pyx_clineno = 0;
17963  __Pyx_RefNannySetupContext("atan", 0);
17964  if (__pyx_optional_args) {
17965  if (__pyx_optional_args->__pyx_n > 0) {
17966  __pyx_v_i = __pyx_optional_args->i;
17967  }
17968  }
17969 
17970  /* "PyClical.pyx":1827
17971  * {1}
17972  * """
17973  * if not (i is None): # <<<<<<<<<<<<<<
17974  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17975  * else:
17976  */
17977  __pyx_t_1 = (__pyx_v_i != Py_None);
17978  __pyx_t_2 = (__pyx_t_1 != 0);
17979  if (__pyx_t_2) {
17980 
17981  /* "PyClical.pyx":1828
17982  * """
17983  * if not (i is None):
17984  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17985  * else:
17986  * try:
17987  */
17988  __Pyx_XDECREF(__pyx_r);
17989  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1828, __pyx_L1_error)
17990  __Pyx_GOTREF(__pyx_t_3);
17991  try {
17992  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17993  } catch(...) {
17994  __Pyx_CppExn2PyErr();
17995  __PYX_ERR(0, 1828, __pyx_L1_error)
17996  }
17997  __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, 1828, __pyx_L1_error)
17998  __Pyx_GOTREF(__pyx_t_5);
17999  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18000  __pyx_r = __pyx_t_5;
18001  __pyx_t_5 = 0;
18002  goto __pyx_L0;
18003 
18004  /* "PyClical.pyx":1827
18005  * {1}
18006  * """
18007  * if not (i is None): # <<<<<<<<<<<<<<
18008  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
18009  * else:
18010  */
18011  }
18012 
18013  /* "PyClical.pyx":1830
18014  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
18015  * else:
18016  * try: # <<<<<<<<<<<<<<
18017  * return math.atan(obj)
18018  * except:
18019  */
18020  /*else*/ {
18021  {
18022  __Pyx_PyThreadState_declare
18023  __Pyx_PyThreadState_assign
18024  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
18025  __Pyx_XGOTREF(__pyx_t_6);
18026  __Pyx_XGOTREF(__pyx_t_7);
18027  __Pyx_XGOTREF(__pyx_t_8);
18028  /*try:*/ {
18029 
18030  /* "PyClical.pyx":1831
18031  * else:
18032  * try:
18033  * return math.atan(obj) # <<<<<<<<<<<<<<
18034  * except:
18035  * return clifford().wrap( glucat.atan(toClifford(obj)) )
18036  */
18037  __Pyx_XDECREF(__pyx_r);
18038  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __pyx_L4_error)
18039  __Pyx_GOTREF(__pyx_t_3);
18040  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1831, __pyx_L4_error)
18041  __Pyx_GOTREF(__pyx_t_9);
18042  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18043  __pyx_t_3 = NULL;
18044  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
18045  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
18046  if (likely(__pyx_t_3)) {
18047  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
18048  __Pyx_INCREF(__pyx_t_3);
18049  __Pyx_INCREF(function);
18050  __Pyx_DECREF_SET(__pyx_t_9, function);
18051  }
18052  }
18053  __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);
18054  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18055  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1831, __pyx_L4_error)
18056  __Pyx_GOTREF(__pyx_t_5);
18057  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18058  __pyx_r = __pyx_t_5;
18059  __pyx_t_5 = 0;
18060  goto __pyx_L8_try_return;
18061 
18062  /* "PyClical.pyx":1830
18063  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
18064  * else:
18065  * try: # <<<<<<<<<<<<<<
18066  * return math.atan(obj)
18067  * except:
18068  */
18069  }
18070  __pyx_L4_error:;
18071  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18072  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18073  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
18074 
18075  /* "PyClical.pyx":1832
18076  * try:
18077  * return math.atan(obj)
18078  * except: # <<<<<<<<<<<<<<
18079  * return clifford().wrap( glucat.atan(toClifford(obj)) )
18080  *
18081  */
18082  /*except:*/ {
18083  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
18084  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1832, __pyx_L6_except_error)
18085  __Pyx_GOTREF(__pyx_t_5);
18086  __Pyx_GOTREF(__pyx_t_9);
18087  __Pyx_GOTREF(__pyx_t_3);
18088 
18089  /* "PyClical.pyx":1833
18090  * return math.atan(obj)
18091  * except:
18092  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
18093  *
18094  * cpdef inline tanh(obj):
18095  */
18096  __Pyx_XDECREF(__pyx_r);
18097  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1833, __pyx_L6_except_error)
18098  __Pyx_GOTREF(__pyx_t_10);
18099  __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, 1833, __pyx_L6_except_error)
18100  __Pyx_GOTREF(__pyx_t_11);
18101  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18102  __pyx_r = __pyx_t_11;
18103  __pyx_t_11 = 0;
18104  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18105  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18106  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18107  goto __pyx_L7_except_return;
18108  }
18109  __pyx_L6_except_error:;
18110 
18111  /* "PyClical.pyx":1830
18112  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
18113  * else:
18114  * try: # <<<<<<<<<<<<<<
18115  * return math.atan(obj)
18116  * except:
18117  */
18118  __Pyx_XGIVEREF(__pyx_t_6);
18119  __Pyx_XGIVEREF(__pyx_t_7);
18120  __Pyx_XGIVEREF(__pyx_t_8);
18121  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18122  goto __pyx_L1_error;
18123  __pyx_L8_try_return:;
18124  __Pyx_XGIVEREF(__pyx_t_6);
18125  __Pyx_XGIVEREF(__pyx_t_7);
18126  __Pyx_XGIVEREF(__pyx_t_8);
18127  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18128  goto __pyx_L0;
18129  __pyx_L7_except_return:;
18130  __Pyx_XGIVEREF(__pyx_t_6);
18131  __Pyx_XGIVEREF(__pyx_t_7);
18132  __Pyx_XGIVEREF(__pyx_t_8);
18133  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18134  goto __pyx_L0;
18135  }
18136  }
18137 
18138  /* "PyClical.pyx":1818
18139  * return clifford().wrap( glucat.tan(toClifford(obj)) )
18140  *
18141  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
18142  * """
18143  * Inverse tangent of multivector with optional complexifier.
18144  */
18145 
18146  /* function exit code */
18147  __pyx_L1_error:;
18148  __Pyx_XDECREF(__pyx_t_3);
18149  __Pyx_XDECREF(__pyx_t_5);
18150  __Pyx_XDECREF(__pyx_t_9);
18151  __Pyx_XDECREF(__pyx_t_10);
18152  __Pyx_XDECREF(__pyx_t_11);
18153  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
18154  __pyx_r = 0;
18155  __pyx_L0:;
18156  __Pyx_XGIVEREF(__pyx_r);
18157  __Pyx_RefNannyFinishContext();
18158  return __pyx_r;
18159  }
18160 
18161  /* Python wrapper */
18162  static PyObject *__pyx_pw_8PyClical_75atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18163  static char __pyx_doc_8PyClical_74atan[] = "\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 ";
18164  static PyObject *__pyx_pw_8PyClical_75atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18165  PyObject *__pyx_v_obj = 0;
18166  PyObject *__pyx_v_i = 0;
18167  int __pyx_lineno = 0;
18168  const char *__pyx_filename = NULL;
18169  int __pyx_clineno = 0;
18170  PyObject *__pyx_r = 0;
18171  __Pyx_RefNannyDeclarations
18172  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
18173  {
18174  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
18175  PyObject* values[2] = {0,0};
18176  values[1] = ((PyObject *)Py_None);
18177  if (unlikely(__pyx_kwds)) {
18178  Py_ssize_t kw_args;
18179  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18180  switch (pos_args) {
18181  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18182  CYTHON_FALLTHROUGH;
18183  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18184  CYTHON_FALLTHROUGH;
18185  case 0: break;
18186  default: goto __pyx_L5_argtuple_error;
18187  }
18188  kw_args = PyDict_Size(__pyx_kwds);
18189  switch (pos_args) {
18190  case 0:
18191  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
18192  else goto __pyx_L5_argtuple_error;
18193  CYTHON_FALLTHROUGH;
18194  case 1:
18195  if (kw_args > 0) {
18196  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
18197  if (value) { values[1] = value; kw_args--; }
18198  }
18199  }
18200  if (unlikely(kw_args > 0)) {
18201  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1818, __pyx_L3_error)
18202  }
18203  } else {
18204  switch (PyTuple_GET_SIZE(__pyx_args)) {
18205  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18206  CYTHON_FALLTHROUGH;
18207  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18208  break;
18209  default: goto __pyx_L5_argtuple_error;
18210  }
18211  }
18212  __pyx_v_obj = values[0];
18213  __pyx_v_i = values[1];
18214  }
18215  goto __pyx_L4_argument_unpacking_done;
18216  __pyx_L5_argtuple_error:;
18217  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1818, __pyx_L3_error)
18218  __pyx_L3_error:;
18219  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
18220  __Pyx_RefNannyFinishContext();
18221  return NULL;
18222  __pyx_L4_argument_unpacking_done:;
18223  __pyx_r = __pyx_pf_8PyClical_74atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
18224 
18225  /* function exit code */
18226  __Pyx_RefNannyFinishContext();
18227  return __pyx_r;
18228  }
18229 
18230  static PyObject *__pyx_pf_8PyClical_74atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
18231  PyObject *__pyx_r = NULL;
18232  __Pyx_RefNannyDeclarations
18233  PyObject *__pyx_t_1 = NULL;
18234  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
18235  int __pyx_lineno = 0;
18236  const char *__pyx_filename = NULL;
18237  int __pyx_clineno = 0;
18238  __Pyx_RefNannySetupContext("atan", 0);
18239  __Pyx_XDECREF(__pyx_r);
18240  __pyx_t_2.__pyx_n = 1;
18241  __pyx_t_2.i = __pyx_v_i;
18242  __pyx_t_1 = __pyx_f_8PyClical_atan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L1_error)
18243  __Pyx_GOTREF(__pyx_t_1);
18244  __pyx_r = __pyx_t_1;
18245  __pyx_t_1 = 0;
18246  goto __pyx_L0;
18247 
18248  /* function exit code */
18249  __pyx_L1_error:;
18250  __Pyx_XDECREF(__pyx_t_1);
18251  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
18252  __pyx_r = NULL;
18253  __pyx_L0:;
18254  __Pyx_XGIVEREF(__pyx_r);
18255  __Pyx_RefNannyFinishContext();
18256  return __pyx_r;
18257  }
18258 
18259  /* "PyClical.pyx":1835
18260  * return clifford().wrap( glucat.atan(toClifford(obj)) )
18261  *
18262  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
18263  * """
18264  * Hyperbolic tangent of multivector.
18265  */
18266 
18267  static PyObject *__pyx_pw_8PyClical_77tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18268  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18269  PyObject *__pyx_r = NULL;
18270  __Pyx_RefNannyDeclarations
18271  PyObject *__pyx_t_1 = NULL;
18272  PyObject *__pyx_t_2 = NULL;
18273  PyObject *__pyx_t_3 = NULL;
18274  PyObject *__pyx_t_4 = NULL;
18275  PyObject *__pyx_t_5 = NULL;
18276  PyObject *__pyx_t_6 = NULL;
18277  PyObject *__pyx_t_7 = NULL;
18278  PyObject *__pyx_t_8 = NULL;
18279  int __pyx_lineno = 0;
18280  const char *__pyx_filename = NULL;
18281  int __pyx_clineno = 0;
18282  __Pyx_RefNannySetupContext("tanh", 0);
18283 
18284  /* "PyClical.pyx":1842
18285  * {1,2}
18286  * """
18287  * try: # <<<<<<<<<<<<<<
18288  * return math.tanh(obj)
18289  * except:
18290  */
18291  {
18292  __Pyx_PyThreadState_declare
18293  __Pyx_PyThreadState_assign
18294  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
18295  __Pyx_XGOTREF(__pyx_t_1);
18296  __Pyx_XGOTREF(__pyx_t_2);
18297  __Pyx_XGOTREF(__pyx_t_3);
18298  /*try:*/ {
18299 
18300  /* "PyClical.pyx":1843
18301  * """
18302  * try:
18303  * return math.tanh(obj) # <<<<<<<<<<<<<<
18304  * except:
18305  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
18306  */
18307  __Pyx_XDECREF(__pyx_r);
18308  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1843, __pyx_L3_error)
18309  __Pyx_GOTREF(__pyx_t_5);
18310  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tanh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1843, __pyx_L3_error)
18311  __Pyx_GOTREF(__pyx_t_6);
18312  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18313  __pyx_t_5 = NULL;
18314  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
18315  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
18316  if (likely(__pyx_t_5)) {
18317  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
18318  __Pyx_INCREF(__pyx_t_5);
18319  __Pyx_INCREF(function);
18320  __Pyx_DECREF_SET(__pyx_t_6, function);
18321  }
18322  }
18323  __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);
18324  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18325  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1843, __pyx_L3_error)
18326  __Pyx_GOTREF(__pyx_t_4);
18327  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18328  __pyx_r = __pyx_t_4;
18329  __pyx_t_4 = 0;
18330  goto __pyx_L7_try_return;
18331 
18332  /* "PyClical.pyx":1842
18333  * {1,2}
18334  * """
18335  * try: # <<<<<<<<<<<<<<
18336  * return math.tanh(obj)
18337  * except:
18338  */
18339  }
18340  __pyx_L3_error:;
18341  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
18342  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18343  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18344 
18345  /* "PyClical.pyx":1844
18346  * try:
18347  * return math.tanh(obj)
18348  * except: # <<<<<<<<<<<<<<
18349  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
18350  *
18351  */
18352  /*except:*/ {
18353  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18354  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1844, __pyx_L5_except_error)
18355  __Pyx_GOTREF(__pyx_t_4);
18356  __Pyx_GOTREF(__pyx_t_6);
18357  __Pyx_GOTREF(__pyx_t_5);
18358 
18359  /* "PyClical.pyx":1845
18360  * return math.tanh(obj)
18361  * except:
18362  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
18363  *
18364  * cpdef inline atanh(obj,i = None):
18365  */
18366  __Pyx_XDECREF(__pyx_r);
18367  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1845, __pyx_L5_except_error)
18368  __Pyx_GOTREF(__pyx_t_7);
18369  __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, 1845, __pyx_L5_except_error)
18370  __Pyx_GOTREF(__pyx_t_8);
18371  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18372  __pyx_r = __pyx_t_8;
18373  __pyx_t_8 = 0;
18374  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18375  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18376  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18377  goto __pyx_L6_except_return;
18378  }
18379  __pyx_L5_except_error:;
18380 
18381  /* "PyClical.pyx":1842
18382  * {1,2}
18383  * """
18384  * try: # <<<<<<<<<<<<<<
18385  * return math.tanh(obj)
18386  * except:
18387  */
18388  __Pyx_XGIVEREF(__pyx_t_1);
18389  __Pyx_XGIVEREF(__pyx_t_2);
18390  __Pyx_XGIVEREF(__pyx_t_3);
18391  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
18392  goto __pyx_L1_error;
18393  __pyx_L7_try_return:;
18394  __Pyx_XGIVEREF(__pyx_t_1);
18395  __Pyx_XGIVEREF(__pyx_t_2);
18396  __Pyx_XGIVEREF(__pyx_t_3);
18397  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
18398  goto __pyx_L0;
18399  __pyx_L6_except_return:;
18400  __Pyx_XGIVEREF(__pyx_t_1);
18401  __Pyx_XGIVEREF(__pyx_t_2);
18402  __Pyx_XGIVEREF(__pyx_t_3);
18403  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
18404  goto __pyx_L0;
18405  }
18406 
18407  /* "PyClical.pyx":1835
18408  * return clifford().wrap( glucat.atan(toClifford(obj)) )
18409  *
18410  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
18411  * """
18412  * Hyperbolic tangent of multivector.
18413  */
18414 
18415  /* function exit code */
18416  __pyx_L1_error:;
18417  __Pyx_XDECREF(__pyx_t_4);
18418  __Pyx_XDECREF(__pyx_t_5);
18419  __Pyx_XDECREF(__pyx_t_6);
18420  __Pyx_XDECREF(__pyx_t_7);
18421  __Pyx_XDECREF(__pyx_t_8);
18422  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18423  __pyx_r = 0;
18424  __pyx_L0:;
18425  __Pyx_XGIVEREF(__pyx_r);
18426  __Pyx_RefNannyFinishContext();
18427  return __pyx_r;
18428  }
18429 
18430  /* Python wrapper */
18431  static PyObject *__pyx_pw_8PyClical_77tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18432  static char __pyx_doc_8PyClical_76tanh[] = "\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print(tanh(x))\n {1,2}\n ";
18433  static PyObject *__pyx_pw_8PyClical_77tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18434  PyObject *__pyx_r = 0;
18435  __Pyx_RefNannyDeclarations
18436  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
18437  __pyx_r = __pyx_pf_8PyClical_76tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
18438 
18439  /* function exit code */
18440  __Pyx_RefNannyFinishContext();
18441  return __pyx_r;
18442  }
18443 
18444  static PyObject *__pyx_pf_8PyClical_76tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18445  PyObject *__pyx_r = NULL;
18446  __Pyx_RefNannyDeclarations
18447  PyObject *__pyx_t_1 = NULL;
18448  int __pyx_lineno = 0;
18449  const char *__pyx_filename = NULL;
18450  int __pyx_clineno = 0;
18451  __Pyx_RefNannySetupContext("tanh", 0);
18452  __Pyx_XDECREF(__pyx_r);
18453  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L1_error)
18454  __Pyx_GOTREF(__pyx_t_1);
18455  __pyx_r = __pyx_t_1;
18456  __pyx_t_1 = 0;
18457  goto __pyx_L0;
18458 
18459  /* function exit code */
18460  __pyx_L1_error:;
18461  __Pyx_XDECREF(__pyx_t_1);
18462  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18463  __pyx_r = NULL;
18464  __pyx_L0:;
18465  __Pyx_XGIVEREF(__pyx_r);
18466  __Pyx_RefNannyFinishContext();
18467  return __pyx_r;
18468  }
18469 
18470  /* "PyClical.pyx":1847
18471  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
18472  *
18473  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
18474  * """
18475  * Inverse hyperbolic tangent of multivector with optional complexifier.
18476  */
18477 
18478  static PyObject *__pyx_pw_8PyClical_79atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18479  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) {
18480  PyObject *__pyx_v_i = ((PyObject *)Py_None);
18481  PyObject *__pyx_r = NULL;
18482  __Pyx_RefNannyDeclarations
18483  int __pyx_t_1;
18484  int __pyx_t_2;
18485  PyObject *__pyx_t_3 = NULL;
18486  Clifford __pyx_t_4;
18487  PyObject *__pyx_t_5 = NULL;
18488  PyObject *__pyx_t_6 = NULL;
18489  PyObject *__pyx_t_7 = NULL;
18490  PyObject *__pyx_t_8 = NULL;
18491  PyObject *__pyx_t_9 = NULL;
18492  PyObject *__pyx_t_10 = NULL;
18493  PyObject *__pyx_t_11 = NULL;
18494  int __pyx_lineno = 0;
18495  const char *__pyx_filename = NULL;
18496  int __pyx_clineno = 0;
18497  __Pyx_RefNannySetupContext("atanh", 0);
18498  if (__pyx_optional_args) {
18499  if (__pyx_optional_args->__pyx_n > 0) {
18500  __pyx_v_i = __pyx_optional_args->i;
18501  }
18502  }
18503 
18504  /* "PyClical.pyx":1856
18505  * {1,2}
18506  * """
18507  * if not (i is None): # <<<<<<<<<<<<<<
18508  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
18509  * else:
18510  */
18511  __pyx_t_1 = (__pyx_v_i != Py_None);
18512  __pyx_t_2 = (__pyx_t_1 != 0);
18513  if (__pyx_t_2) {
18514 
18515  /* "PyClical.pyx":1857
18516  * """
18517  * if not (i is None):
18518  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
18519  * else:
18520  * try:
18521  */
18522  __Pyx_XDECREF(__pyx_r);
18523  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1857, __pyx_L1_error)
18524  __Pyx_GOTREF(__pyx_t_3);
18525  try {
18526  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
18527  } catch(...) {
18528  __Pyx_CppExn2PyErr();
18529  __PYX_ERR(0, 1857, __pyx_L1_error)
18530  }
18531  __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, 1857, __pyx_L1_error)
18532  __Pyx_GOTREF(__pyx_t_5);
18533  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18534  __pyx_r = __pyx_t_5;
18535  __pyx_t_5 = 0;
18536  goto __pyx_L0;
18537 
18538  /* "PyClical.pyx":1856
18539  * {1,2}
18540  * """
18541  * if not (i is None): # <<<<<<<<<<<<<<
18542  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
18543  * else:
18544  */
18545  }
18546 
18547  /* "PyClical.pyx":1859
18548  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
18549  * else:
18550  * try: # <<<<<<<<<<<<<<
18551  * return math.atanh(obj)
18552  * except:
18553  */
18554  /*else*/ {
18555  {
18556  __Pyx_PyThreadState_declare
18557  __Pyx_PyThreadState_assign
18558  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
18559  __Pyx_XGOTREF(__pyx_t_6);
18560  __Pyx_XGOTREF(__pyx_t_7);
18561  __Pyx_XGOTREF(__pyx_t_8);
18562  /*try:*/ {
18563 
18564  /* "PyClical.pyx":1860
18565  * else:
18566  * try:
18567  * return math.atanh(obj) # <<<<<<<<<<<<<<
18568  * except:
18569  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18570  */
18571  __Pyx_XDECREF(__pyx_r);
18572  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1860, __pyx_L4_error)
18573  __Pyx_GOTREF(__pyx_t_3);
18574  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atanh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1860, __pyx_L4_error)
18575  __Pyx_GOTREF(__pyx_t_9);
18576  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18577  __pyx_t_3 = NULL;
18578  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
18579  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
18580  if (likely(__pyx_t_3)) {
18581  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
18582  __Pyx_INCREF(__pyx_t_3);
18583  __Pyx_INCREF(function);
18584  __Pyx_DECREF_SET(__pyx_t_9, function);
18585  }
18586  }
18587  __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);
18588  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18589  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1860, __pyx_L4_error)
18590  __Pyx_GOTREF(__pyx_t_5);
18591  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18592  __pyx_r = __pyx_t_5;
18593  __pyx_t_5 = 0;
18594  goto __pyx_L8_try_return;
18595 
18596  /* "PyClical.pyx":1859
18597  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
18598  * else:
18599  * try: # <<<<<<<<<<<<<<
18600  * return math.atanh(obj)
18601  * except:
18602  */
18603  }
18604  __pyx_L4_error:;
18605  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18606  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18607  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
18608 
18609  /* "PyClical.pyx":1861
18610  * try:
18611  * return math.atanh(obj)
18612  * except: # <<<<<<<<<<<<<<
18613  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18614  *
18615  */
18616  /*except:*/ {
18617  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18618  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1861, __pyx_L6_except_error)
18619  __Pyx_GOTREF(__pyx_t_5);
18620  __Pyx_GOTREF(__pyx_t_9);
18621  __Pyx_GOTREF(__pyx_t_3);
18622 
18623  /* "PyClical.pyx":1862
18624  * return math.atanh(obj)
18625  * except:
18626  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
18627  *
18628  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
18629  */
18630  __Pyx_XDECREF(__pyx_r);
18631  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1862, __pyx_L6_except_error)
18632  __Pyx_GOTREF(__pyx_t_10);
18633  __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, 1862, __pyx_L6_except_error)
18634  __Pyx_GOTREF(__pyx_t_11);
18635  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
18636  __pyx_r = __pyx_t_11;
18637  __pyx_t_11 = 0;
18638  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18639  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18640  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
18641  goto __pyx_L7_except_return;
18642  }
18643  __pyx_L6_except_error:;
18644 
18645  /* "PyClical.pyx":1859
18646  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
18647  * else:
18648  * try: # <<<<<<<<<<<<<<
18649  * return math.atanh(obj)
18650  * except:
18651  */
18652  __Pyx_XGIVEREF(__pyx_t_6);
18653  __Pyx_XGIVEREF(__pyx_t_7);
18654  __Pyx_XGIVEREF(__pyx_t_8);
18655  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18656  goto __pyx_L1_error;
18657  __pyx_L8_try_return:;
18658  __Pyx_XGIVEREF(__pyx_t_6);
18659  __Pyx_XGIVEREF(__pyx_t_7);
18660  __Pyx_XGIVEREF(__pyx_t_8);
18661  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18662  goto __pyx_L0;
18663  __pyx_L7_except_return:;
18664  __Pyx_XGIVEREF(__pyx_t_6);
18665  __Pyx_XGIVEREF(__pyx_t_7);
18666  __Pyx_XGIVEREF(__pyx_t_8);
18667  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
18668  goto __pyx_L0;
18669  }
18670  }
18671 
18672  /* "PyClical.pyx":1847
18673  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
18674  *
18675  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
18676  * """
18677  * Inverse hyperbolic tangent of multivector with optional complexifier.
18678  */
18679 
18680  /* function exit code */
18681  __pyx_L1_error:;
18682  __Pyx_XDECREF(__pyx_t_3);
18683  __Pyx_XDECREF(__pyx_t_5);
18684  __Pyx_XDECREF(__pyx_t_9);
18685  __Pyx_XDECREF(__pyx_t_10);
18686  __Pyx_XDECREF(__pyx_t_11);
18687  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18688  __pyx_r = 0;
18689  __pyx_L0:;
18690  __Pyx_XGIVEREF(__pyx_r);
18691  __Pyx_RefNannyFinishContext();
18692  return __pyx_r;
18693  }
18694 
18695  /* Python wrapper */
18696  static PyObject *__pyx_pw_8PyClical_79atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18697  static char __pyx_doc_8PyClical_78atanh[] = "\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 ";
18698  static PyObject *__pyx_pw_8PyClical_79atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18699  PyObject *__pyx_v_obj = 0;
18700  PyObject *__pyx_v_i = 0;
18701  int __pyx_lineno = 0;
18702  const char *__pyx_filename = NULL;
18703  int __pyx_clineno = 0;
18704  PyObject *__pyx_r = 0;
18705  __Pyx_RefNannyDeclarations
18706  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
18707  {
18708  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
18709  PyObject* values[2] = {0,0};
18710  values[1] = ((PyObject *)Py_None);
18711  if (unlikely(__pyx_kwds)) {
18712  Py_ssize_t kw_args;
18713  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18714  switch (pos_args) {
18715  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18716  CYTHON_FALLTHROUGH;
18717  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18718  CYTHON_FALLTHROUGH;
18719  case 0: break;
18720  default: goto __pyx_L5_argtuple_error;
18721  }
18722  kw_args = PyDict_Size(__pyx_kwds);
18723  switch (pos_args) {
18724  case 0:
18725  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
18726  else goto __pyx_L5_argtuple_error;
18727  CYTHON_FALLTHROUGH;
18728  case 1:
18729  if (kw_args > 0) {
18730  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
18731  if (value) { values[1] = value; kw_args--; }
18732  }
18733  }
18734  if (unlikely(kw_args > 0)) {
18735  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1847, __pyx_L3_error)
18736  }
18737  } else {
18738  switch (PyTuple_GET_SIZE(__pyx_args)) {
18739  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18740  CYTHON_FALLTHROUGH;
18741  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18742  break;
18743  default: goto __pyx_L5_argtuple_error;
18744  }
18745  }
18746  __pyx_v_obj = values[0];
18747  __pyx_v_i = values[1];
18748  }
18749  goto __pyx_L4_argument_unpacking_done;
18750  __pyx_L5_argtuple_error:;
18751  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1847, __pyx_L3_error)
18752  __pyx_L3_error:;
18753  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18754  __Pyx_RefNannyFinishContext();
18755  return NULL;
18756  __pyx_L4_argument_unpacking_done:;
18757  __pyx_r = __pyx_pf_8PyClical_78atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
18758 
18759  /* function exit code */
18760  __Pyx_RefNannyFinishContext();
18761  return __pyx_r;
18762  }
18763 
18764  static PyObject *__pyx_pf_8PyClical_78atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
18765  PyObject *__pyx_r = NULL;
18766  __Pyx_RefNannyDeclarations
18767  PyObject *__pyx_t_1 = NULL;
18768  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
18769  int __pyx_lineno = 0;
18770  const char *__pyx_filename = NULL;
18771  int __pyx_clineno = 0;
18772  __Pyx_RefNannySetupContext("atanh", 0);
18773  __Pyx_XDECREF(__pyx_r);
18774  __pyx_t_2.__pyx_n = 1;
18775  __pyx_t_2.i = __pyx_v_i;
18776  __pyx_t_1 = __pyx_f_8PyClical_atanh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error)
18777  __Pyx_GOTREF(__pyx_t_1);
18778  __pyx_r = __pyx_t_1;
18779  __pyx_t_1 = 0;
18780  goto __pyx_L0;
18781 
18782  /* function exit code */
18783  __pyx_L1_error:;
18784  __Pyx_XDECREF(__pyx_t_1);
18785  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18786  __pyx_r = NULL;
18787  __pyx_L0:;
18788  __Pyx_XGIVEREF(__pyx_r);
18789  __Pyx_RefNannyFinishContext();
18790  return __pyx_r;
18791  }
18792 
18793  /* "PyClical.pyx":1864
18794  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18795  *
18796  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18797  * """
18798  * Random multivector within a frame.
18799  */
18800 
18801  static PyObject *__pyx_pw_8PyClical_81random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18802  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) {
18803  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
18804  PyObject *__pyx_r = NULL;
18805  __Pyx_RefNannyDeclarations
18806  PyObject *__pyx_t_1 = NULL;
18807  PyObject *__pyx_t_2 = NULL;
18808  scalar_t __pyx_t_3;
18809  PyObject *__pyx_t_4 = NULL;
18810  int __pyx_lineno = 0;
18811  const char *__pyx_filename = NULL;
18812  int __pyx_clineno = 0;
18813  __Pyx_RefNannySetupContext("random_clifford", 0);
18814  if (__pyx_optional_args) {
18815  if (__pyx_optional_args->__pyx_n > 0) {
18816  __pyx_v_fill = __pyx_optional_args->fill;
18817  }
18818  }
18819 
18820  /* "PyClical.pyx":1871
18821  * {-3,-1,2}
18822  * """
18823  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
18824  *
18825  * cpdef inline cga3(obj):
18826  */
18827  __Pyx_XDECREF(__pyx_r);
18828  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error)
18829  __Pyx_GOTREF(__pyx_t_1);
18830  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error)
18831  __Pyx_GOTREF(__pyx_t_2);
18832  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_fill); if (unlikely((__pyx_t_3 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1871, __pyx_L1_error)
18833  __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, 1871, __pyx_L1_error)
18834  __Pyx_GOTREF(__pyx_t_4);
18835  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18836  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18837  __pyx_r = __pyx_t_4;
18838  __pyx_t_4 = 0;
18839  goto __pyx_L0;
18840 
18841  /* "PyClical.pyx":1864
18842  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18843  *
18844  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18845  * """
18846  * Random multivector within a frame.
18847  */
18848 
18849  /* function exit code */
18850  __pyx_L1_error:;
18851  __Pyx_XDECREF(__pyx_t_1);
18852  __Pyx_XDECREF(__pyx_t_2);
18853  __Pyx_XDECREF(__pyx_t_4);
18854  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18855  __pyx_r = 0;
18856  __pyx_L0:;
18857  __Pyx_XGIVEREF(__pyx_r);
18858  __Pyx_RefNannyFinishContext();
18859  return __pyx_r;
18860  }
18861 
18862  /* Python wrapper */
18863  static PyObject *__pyx_pw_8PyClical_81random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18864  static char __pyx_doc_8PyClical_80random_clifford[] = "\n Random multivector within a frame.\n\n >>> print(random_clifford(index_set({-3,-1,2})).frame())\n {-3,-1,2}\n ";
18865  static PyObject *__pyx_pw_8PyClical_81random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18866  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
18867  PyObject *__pyx_v_fill = 0;
18868  int __pyx_lineno = 0;
18869  const char *__pyx_filename = NULL;
18870  int __pyx_clineno = 0;
18871  PyObject *__pyx_r = 0;
18872  __Pyx_RefNannyDeclarations
18873  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
18874  {
18875  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
18876  PyObject* values[2] = {0,0};
18877  values[1] = ((PyObject *)__pyx_float_1_0);
18878  if (unlikely(__pyx_kwds)) {
18879  Py_ssize_t kw_args;
18880  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18881  switch (pos_args) {
18882  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18883  CYTHON_FALLTHROUGH;
18884  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18885  CYTHON_FALLTHROUGH;
18886  case 0: break;
18887  default: goto __pyx_L5_argtuple_error;
18888  }
18889  kw_args = PyDict_Size(__pyx_kwds);
18890  switch (pos_args) {
18891  case 0:
18892  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
18893  else goto __pyx_L5_argtuple_error;
18894  CYTHON_FALLTHROUGH;
18895  case 1:
18896  if (kw_args > 0) {
18897  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
18898  if (value) { values[1] = value; kw_args--; }
18899  }
18900  }
18901  if (unlikely(kw_args > 0)) {
18902  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1864, __pyx_L3_error)
18903  }
18904  } else {
18905  switch (PyTuple_GET_SIZE(__pyx_args)) {
18906  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18907  CYTHON_FALLTHROUGH;
18908  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18909  break;
18910  default: goto __pyx_L5_argtuple_error;
18911  }
18912  }
18913  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
18914  __pyx_v_fill = values[1];
18915  }
18916  goto __pyx_L4_argument_unpacking_done;
18917  __pyx_L5_argtuple_error:;
18918  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1864, __pyx_L3_error)
18919  __pyx_L3_error:;
18920  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18921  __Pyx_RefNannyFinishContext();
18922  return NULL;
18923  __pyx_L4_argument_unpacking_done:;
18924  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1864, __pyx_L1_error)
18925  __pyx_r = __pyx_pf_8PyClical_80random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
18926 
18927  /* function exit code */
18928  goto __pyx_L0;
18929  __pyx_L1_error:;
18930  __pyx_r = NULL;
18931  __pyx_L0:;
18932  __Pyx_RefNannyFinishContext();
18933  return __pyx_r;
18934  }
18935 
18936  static PyObject *__pyx_pf_8PyClical_80random_clifford(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill) {
18937  PyObject *__pyx_r = NULL;
18938  __Pyx_RefNannyDeclarations
18939  PyObject *__pyx_t_1 = NULL;
18940  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
18941  int __pyx_lineno = 0;
18942  const char *__pyx_filename = NULL;
18943  int __pyx_clineno = 0;
18944  __Pyx_RefNannySetupContext("random_clifford", 0);
18945  __Pyx_XDECREF(__pyx_r);
18946  __pyx_t_2.__pyx_n = 1;
18947  __pyx_t_2.fill = __pyx_v_fill;
18948  __pyx_t_1 = __pyx_f_8PyClical_random_clifford(__pyx_v_ixt, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1864, __pyx_L1_error)
18949  __Pyx_GOTREF(__pyx_t_1);
18950  __pyx_r = __pyx_t_1;
18951  __pyx_t_1 = 0;
18952  goto __pyx_L0;
18953 
18954  /* function exit code */
18955  __pyx_L1_error:;
18956  __Pyx_XDECREF(__pyx_t_1);
18957  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18958  __pyx_r = NULL;
18959  __pyx_L0:;
18960  __Pyx_XGIVEREF(__pyx_r);
18961  __Pyx_RefNannyFinishContext();
18962  return __pyx_r;
18963  }
18964 
18965  /* "PyClical.pyx":1873
18966  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18967  *
18968  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18969  * """
18970  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18971  */
18972 
18973  static PyObject *__pyx_pw_8PyClical_83cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18974  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18975  PyObject *__pyx_r = NULL;
18976  __Pyx_RefNannyDeclarations
18977  PyObject *__pyx_t_1 = NULL;
18978  PyObject *__pyx_t_2 = NULL;
18979  int __pyx_lineno = 0;
18980  const char *__pyx_filename = NULL;
18981  int __pyx_clineno = 0;
18982  __Pyx_RefNannySetupContext("cga3", 0);
18983 
18984  /* "PyClical.pyx":1880
18985  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18986  * """
18987  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18988  *
18989  * cpdef inline cga3std(obj):
18990  */
18991  __Pyx_XDECREF(__pyx_r);
18992  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1880, __pyx_L1_error)
18993  __Pyx_GOTREF(__pyx_t_1);
18994  __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, 1880, __pyx_L1_error)
18995  __Pyx_GOTREF(__pyx_t_2);
18996  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18997  __pyx_r = __pyx_t_2;
18998  __pyx_t_2 = 0;
18999  goto __pyx_L0;
19000 
19001  /* "PyClical.pyx":1873
19002  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
19003  *
19004  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
19005  * """
19006  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
19007  */
19008 
19009  /* function exit code */
19010  __pyx_L1_error:;
19011  __Pyx_XDECREF(__pyx_t_1);
19012  __Pyx_XDECREF(__pyx_t_2);
19013  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19014  __pyx_r = 0;
19015  __pyx_L0:;
19016  __Pyx_XGIVEREF(__pyx_r);
19017  __Pyx_RefNannyFinishContext();
19018  return __pyx_r;
19019  }
19020 
19021  /* Python wrapper */
19022  static PyObject *__pyx_pw_8PyClical_83cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
19023  static char __pyx_doc_8PyClical_82cga3[] = "\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 ";
19024  static PyObject *__pyx_pw_8PyClical_83cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19025  PyObject *__pyx_r = 0;
19026  __Pyx_RefNannyDeclarations
19027  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
19028  __pyx_r = __pyx_pf_8PyClical_82cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
19029 
19030  /* function exit code */
19031  __Pyx_RefNannyFinishContext();
19032  return __pyx_r;
19033  }
19034 
19035  static PyObject *__pyx_pf_8PyClical_82cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19036  PyObject *__pyx_r = NULL;
19037  __Pyx_RefNannyDeclarations
19038  PyObject *__pyx_t_1 = NULL;
19039  int __pyx_lineno = 0;
19040  const char *__pyx_filename = NULL;
19041  int __pyx_clineno = 0;
19042  __Pyx_RefNannySetupContext("cga3", 0);
19043  __Pyx_XDECREF(__pyx_r);
19044  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
19045  __Pyx_GOTREF(__pyx_t_1);
19046  __pyx_r = __pyx_t_1;
19047  __pyx_t_1 = 0;
19048  goto __pyx_L0;
19049 
19050  /* function exit code */
19051  __pyx_L1_error:;
19052  __Pyx_XDECREF(__pyx_t_1);
19053  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19054  __pyx_r = NULL;
19055  __pyx_L0:;
19056  __Pyx_XGIVEREF(__pyx_r);
19057  __Pyx_RefNannyFinishContext();
19058  return __pyx_r;
19059  }
19060 
19061  /* "PyClical.pyx":1882
19062  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
19063  *
19064  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
19065  * """
19066  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
19067  */
19068 
19069  static PyObject *__pyx_pw_8PyClical_85cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
19070  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
19071  PyObject *__pyx_r = NULL;
19072  __Pyx_RefNannyDeclarations
19073  PyObject *__pyx_t_1 = NULL;
19074  PyObject *__pyx_t_2 = NULL;
19075  int __pyx_lineno = 0;
19076  const char *__pyx_filename = NULL;
19077  int __pyx_clineno = 0;
19078  __Pyx_RefNannySetupContext("cga3std", 0);
19079 
19080  /* "PyClical.pyx":1891
19081  * 0
19082  * """
19083  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
19084  *
19085  * cpdef inline agc3(obj):
19086  */
19087  __Pyx_XDECREF(__pyx_r);
19088  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error)
19089  __Pyx_GOTREF(__pyx_t_1);
19090  __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, 1891, __pyx_L1_error)
19091  __Pyx_GOTREF(__pyx_t_2);
19092  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19093  __pyx_r = __pyx_t_2;
19094  __pyx_t_2 = 0;
19095  goto __pyx_L0;
19096 
19097  /* "PyClical.pyx":1882
19098  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
19099  *
19100  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
19101  * """
19102  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
19103  */
19104 
19105  /* function exit code */
19106  __pyx_L1_error:;
19107  __Pyx_XDECREF(__pyx_t_1);
19108  __Pyx_XDECREF(__pyx_t_2);
19109  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
19110  __pyx_r = 0;
19111  __pyx_L0:;
19112  __Pyx_XGIVEREF(__pyx_r);
19113  __Pyx_RefNannyFinishContext();
19114  return __pyx_r;
19115  }
19116 
19117  /* Python wrapper */
19118  static PyObject *__pyx_pw_8PyClical_85cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
19119  static char __pyx_doc_8PyClical_84cga3std[] = "\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 ";
19120  static PyObject *__pyx_pw_8PyClical_85cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19121  PyObject *__pyx_r = 0;
19122  __Pyx_RefNannyDeclarations
19123  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
19124  __pyx_r = __pyx_pf_8PyClical_84cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
19125 
19126  /* function exit code */
19127  __Pyx_RefNannyFinishContext();
19128  return __pyx_r;
19129  }
19130 
19131  static PyObject *__pyx_pf_8PyClical_84cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19132  PyObject *__pyx_r = NULL;
19133  __Pyx_RefNannyDeclarations
19134  PyObject *__pyx_t_1 = NULL;
19135  int __pyx_lineno = 0;
19136  const char *__pyx_filename = NULL;
19137  int __pyx_clineno = 0;
19138  __Pyx_RefNannySetupContext("cga3std", 0);
19139  __Pyx_XDECREF(__pyx_r);
19140  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error)
19141  __Pyx_GOTREF(__pyx_t_1);
19142  __pyx_r = __pyx_t_1;
19143  __pyx_t_1 = 0;
19144  goto __pyx_L0;
19145 
19146  /* function exit code */
19147  __pyx_L1_error:;
19148  __Pyx_XDECREF(__pyx_t_1);
19149  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
19150  __pyx_r = NULL;
19151  __pyx_L0:;
19152  __Pyx_XGIVEREF(__pyx_r);
19153  __Pyx_RefNannyFinishContext();
19154  return __pyx_r;
19155  }
19156 
19157  /* "PyClical.pyx":1893
19158  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
19159  *
19160  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
19161  * """
19162  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
19163  */
19164 
19165  static PyObject *__pyx_pw_8PyClical_87agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
19166  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
19167  PyObject *__pyx_r = NULL;
19168  __Pyx_RefNannyDeclarations
19169  PyObject *__pyx_t_1 = NULL;
19170  PyObject *__pyx_t_2 = NULL;
19171  int __pyx_lineno = 0;
19172  const char *__pyx_filename = NULL;
19173  int __pyx_clineno = 0;
19174  __Pyx_RefNannySetupContext("agc3", 0);
19175 
19176  /* "PyClical.pyx":1902
19177  * 0
19178  * """
19179  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
19180  *
19181  * # Some abbreviations.
19182  */
19183  __Pyx_XDECREF(__pyx_r);
19184  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1902, __pyx_L1_error)
19185  __Pyx_GOTREF(__pyx_t_1);
19186  __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, 1902, __pyx_L1_error)
19187  __Pyx_GOTREF(__pyx_t_2);
19188  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19189  __pyx_r = __pyx_t_2;
19190  __pyx_t_2 = 0;
19191  goto __pyx_L0;
19192 
19193  /* "PyClical.pyx":1893
19194  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
19195  *
19196  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
19197  * """
19198  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
19199  */
19200 
19201  /* function exit code */
19202  __pyx_L1_error:;
19203  __Pyx_XDECREF(__pyx_t_1);
19204  __Pyx_XDECREF(__pyx_t_2);
19205  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19206  __pyx_r = 0;
19207  __pyx_L0:;
19208  __Pyx_XGIVEREF(__pyx_r);
19209  __Pyx_RefNannyFinishContext();
19210  return __pyx_r;
19211  }
19212 
19213  /* Python wrapper */
19214  static PyObject *__pyx_pw_8PyClical_87agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
19215  static char __pyx_doc_8PyClical_86agc3[] = "\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 ";
19216  static PyObject *__pyx_pw_8PyClical_87agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19217  PyObject *__pyx_r = 0;
19218  __Pyx_RefNannyDeclarations
19219  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
19220  __pyx_r = __pyx_pf_8PyClical_86agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
19221 
19222  /* function exit code */
19223  __Pyx_RefNannyFinishContext();
19224  return __pyx_r;
19225  }
19226 
19227  static PyObject *__pyx_pf_8PyClical_86agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19228  PyObject *__pyx_r = NULL;
19229  __Pyx_RefNannyDeclarations
19230  PyObject *__pyx_t_1 = NULL;
19231  int __pyx_lineno = 0;
19232  const char *__pyx_filename = NULL;
19233  int __pyx_clineno = 0;
19234  __Pyx_RefNannySetupContext("agc3", 0);
19235  __Pyx_XDECREF(__pyx_r);
19236  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
19237  __Pyx_GOTREF(__pyx_t_1);
19238  __pyx_r = __pyx_t_1;
19239  __pyx_t_1 = 0;
19240  goto __pyx_L0;
19241 
19242  /* function exit code */
19243  __pyx_L1_error:;
19244  __Pyx_XDECREF(__pyx_t_1);
19245  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19246  __pyx_r = NULL;
19247  __pyx_L0:;
19248  __Pyx_XGIVEREF(__pyx_r);
19249  __Pyx_RefNannyFinishContext();
19250  return __pyx_r;
19251  }
19252 
19253  /* "PyClical.pyx":1936
19254  * """
19255  *
19256  * def e(obj): # <<<<<<<<<<<<<<
19257  * """
19258  * Abbreviation for clifford(index_set(obj)).
19259  */
19260 
19261  /* Python wrapper */
19262  static PyObject *__pyx_pw_8PyClical_89e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
19263  static char __pyx_doc_8PyClical_88e[] = "\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 ";
19264  static PyMethodDef __pyx_mdef_8PyClical_89e = {"e", (PyCFunction)__pyx_pw_8PyClical_89e, METH_O, __pyx_doc_8PyClical_88e};
19265  static PyObject *__pyx_pw_8PyClical_89e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19266  PyObject *__pyx_r = 0;
19267  __Pyx_RefNannyDeclarations
19268  __Pyx_RefNannySetupContext("e (wrapper)", 0);
19269  __pyx_r = __pyx_pf_8PyClical_88e(__pyx_self, ((PyObject *)__pyx_v_obj));
19270 
19271  /* function exit code */
19272  __Pyx_RefNannyFinishContext();
19273  return __pyx_r;
19274  }
19275 
19276  static PyObject *__pyx_pf_8PyClical_88e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
19277  PyObject *__pyx_r = NULL;
19278  __Pyx_RefNannyDeclarations
19279  PyObject *__pyx_t_1 = NULL;
19280  PyObject *__pyx_t_2 = NULL;
19281  int __pyx_lineno = 0;
19282  const char *__pyx_filename = NULL;
19283  int __pyx_clineno = 0;
19284  __Pyx_RefNannySetupContext("e", 0);
19285 
19286  /* "PyClical.pyx":1947
19287  * 1
19288  * """
19289  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
19290  *
19291  * def istpq(p, q):
19292  */
19293  __Pyx_XDECREF(__pyx_r);
19294  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error)
19295  __Pyx_GOTREF(__pyx_t_1);
19296  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1947, __pyx_L1_error)
19297  __Pyx_GOTREF(__pyx_t_2);
19298  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19299  __pyx_r = __pyx_t_2;
19300  __pyx_t_2 = 0;
19301  goto __pyx_L0;
19302 
19303  /* "PyClical.pyx":1936
19304  * """
19305  *
19306  * def e(obj): # <<<<<<<<<<<<<<
19307  * """
19308  * Abbreviation for clifford(index_set(obj)).
19309  */
19310 
19311  /* function exit code */
19312  __pyx_L1_error:;
19313  __Pyx_XDECREF(__pyx_t_1);
19314  __Pyx_XDECREF(__pyx_t_2);
19315  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
19316  __pyx_r = NULL;
19317  __pyx_L0:;
19318  __Pyx_XGIVEREF(__pyx_r);
19319  __Pyx_RefNannyFinishContext();
19320  return __pyx_r;
19321  }
19322 
19323  /* "PyClical.pyx":1949
19324  * return clifford(index_set(obj))
19325  *
19326  * def istpq(p, q): # <<<<<<<<<<<<<<
19327  * """
19328  * Abbreviation for index_set({-q,...p}).
19329  */
19330 
19331  /* Python wrapper */
19332  static PyObject *__pyx_pw_8PyClical_91istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19333  static char __pyx_doc_8PyClical_90istpq[] = "\n Abbreviation for index_set({-q,...p}).\n\n >>> print(istpq(2,3))\n {-3,-2,-1,1,2}\n ";
19334  static PyMethodDef __pyx_mdef_8PyClical_91istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_91istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_90istpq};
19335  static PyObject *__pyx_pw_8PyClical_91istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19336  PyObject *__pyx_v_p = 0;
19337  PyObject *__pyx_v_q = 0;
19338  int __pyx_lineno = 0;
19339  const char *__pyx_filename = NULL;
19340  int __pyx_clineno = 0;
19341  PyObject *__pyx_r = 0;
19342  __Pyx_RefNannyDeclarations
19343  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
19344  {
19345  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
19346  PyObject* values[2] = {0,0};
19347  if (unlikely(__pyx_kwds)) {
19348  Py_ssize_t kw_args;
19349  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19350  switch (pos_args) {
19351  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19352  CYTHON_FALLTHROUGH;
19353  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19354  CYTHON_FALLTHROUGH;
19355  case 0: break;
19356  default: goto __pyx_L5_argtuple_error;
19357  }
19358  kw_args = PyDict_Size(__pyx_kwds);
19359  switch (pos_args) {
19360  case 0:
19361  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
19362  else goto __pyx_L5_argtuple_error;
19363  CYTHON_FALLTHROUGH;
19364  case 1:
19365  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
19366  else {
19367  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1949, __pyx_L3_error)
19368  }
19369  }
19370  if (unlikely(kw_args > 0)) {
19371  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1949, __pyx_L3_error)
19372  }
19373  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
19374  goto __pyx_L5_argtuple_error;
19375  } else {
19376  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19377  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19378  }
19379  __pyx_v_p = values[0];
19380  __pyx_v_q = values[1];
19381  }
19382  goto __pyx_L4_argument_unpacking_done;
19383  __pyx_L5_argtuple_error:;
19384  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1949, __pyx_L3_error)
19385  __pyx_L3_error:;
19386  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
19387  __Pyx_RefNannyFinishContext();
19388  return NULL;
19389  __pyx_L4_argument_unpacking_done:;
19390  __pyx_r = __pyx_pf_8PyClical_90istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
19391 
19392  /* function exit code */
19393  __Pyx_RefNannyFinishContext();
19394  return __pyx_r;
19395  }
19396 
19397  static PyObject *__pyx_pf_8PyClical_90istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
19398  PyObject *__pyx_r = NULL;
19399  __Pyx_RefNannyDeclarations
19400  PyObject *__pyx_t_1 = NULL;
19401  PyObject *__pyx_t_2 = NULL;
19402  PyObject *__pyx_t_3 = NULL;
19403  int __pyx_lineno = 0;
19404  const char *__pyx_filename = NULL;
19405  int __pyx_clineno = 0;
19406  __Pyx_RefNannySetupContext("istpq", 0);
19407 
19408  /* "PyClical.pyx":1956
19409  * {-3,-2,-1,1,2}
19410  * """
19411  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
19412  *
19413  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
19414  */
19415  __Pyx_XDECREF(__pyx_r);
19416  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1956, __pyx_L1_error)
19417  __Pyx_GOTREF(__pyx_t_1);
19418  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error)
19419  __Pyx_GOTREF(__pyx_t_2);
19420  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error)
19421  __Pyx_GOTREF(__pyx_t_3);
19422  __Pyx_GIVEREF(__pyx_t_1);
19423  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
19424  __Pyx_GIVEREF(__pyx_t_2);
19425  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
19426  __pyx_t_1 = 0;
19427  __pyx_t_2 = 0;
19428  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error)
19429  __Pyx_GOTREF(__pyx_t_2);
19430  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19431  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1956, __pyx_L1_error)
19432  __Pyx_GOTREF(__pyx_t_3);
19433  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19434  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error)
19435  __Pyx_GOTREF(__pyx_t_2);
19436  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19437  __pyx_r = __pyx_t_2;
19438  __pyx_t_2 = 0;
19439  goto __pyx_L0;
19440 
19441  /* "PyClical.pyx":1949
19442  * return clifford(index_set(obj))
19443  *
19444  * def istpq(p, q): # <<<<<<<<<<<<<<
19445  * """
19446  * Abbreviation for index_set({-q,...p}).
19447  */
19448 
19449  /* function exit code */
19450  __pyx_L1_error:;
19451  __Pyx_XDECREF(__pyx_t_1);
19452  __Pyx_XDECREF(__pyx_t_2);
19453  __Pyx_XDECREF(__pyx_t_3);
19454  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
19455  __pyx_r = NULL;
19456  __pyx_L0:;
19457  __Pyx_XGIVEREF(__pyx_r);
19458  __Pyx_RefNannyFinishContext();
19459  return __pyx_r;
19460  }
19461 
19462  /* "PyClical.pyx":1962
19463  *
19464  * # Doctest interface.
19465  * def _test(): # <<<<<<<<<<<<<<
19466  * import PyClical, doctest
19467  * return doctest.testmod(PyClical)
19468  */
19469 
19470  /* Python wrapper */
19471  static PyObject *__pyx_pw_8PyClical_93_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
19472  static PyMethodDef __pyx_mdef_8PyClical_93_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_93_test, METH_NOARGS, 0};
19473  static PyObject *__pyx_pw_8PyClical_93_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
19474  PyObject *__pyx_r = 0;
19475  __Pyx_RefNannyDeclarations
19476  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
19477  __pyx_r = __pyx_pf_8PyClical_92_test(__pyx_self);
19478 
19479  /* function exit code */
19480  __Pyx_RefNannyFinishContext();
19481  return __pyx_r;
19482  }
19483 
19484  static PyObject *__pyx_pf_8PyClical_92_test(CYTHON_UNUSED PyObject *__pyx_self) {
19485  PyObject *__pyx_v_PyClical = NULL;
19486  PyObject *__pyx_v_doctest = NULL;
19487  PyObject *__pyx_r = NULL;
19488  __Pyx_RefNannyDeclarations
19489  PyObject *__pyx_t_1 = NULL;
19490  PyObject *__pyx_t_2 = NULL;
19491  PyObject *__pyx_t_3 = NULL;
19492  int __pyx_lineno = 0;
19493  const char *__pyx_filename = NULL;
19494  int __pyx_clineno = 0;
19495  __Pyx_RefNannySetupContext("_test", 0);
19496 
19497  /* "PyClical.pyx":1963
19498  * # Doctest interface.
19499  * def _test():
19500  * import PyClical, doctest # <<<<<<<<<<<<<<
19501  * return doctest.testmod(PyClical)
19502  *
19503  */
19504  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1963, __pyx_L1_error)
19505  __Pyx_GOTREF(__pyx_t_1);
19506  __pyx_v_PyClical = __pyx_t_1;
19507  __pyx_t_1 = 0;
19508  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1963, __pyx_L1_error)
19509  __Pyx_GOTREF(__pyx_t_1);
19510  __pyx_v_doctest = __pyx_t_1;
19511  __pyx_t_1 = 0;
19512 
19513  /* "PyClical.pyx":1964
19514  * def _test():
19515  * import PyClical, doctest
19516  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
19517  *
19518  * if __name__ == "__main__":
19519  */
19520  __Pyx_XDECREF(__pyx_r);
19521  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s_testmod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1964, __pyx_L1_error)
19522  __Pyx_GOTREF(__pyx_t_2);
19523  __pyx_t_3 = NULL;
19524  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19525  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
19526  if (likely(__pyx_t_3)) {
19527  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19528  __Pyx_INCREF(__pyx_t_3);
19529  __Pyx_INCREF(function);
19530  __Pyx_DECREF_SET(__pyx_t_2, function);
19531  }
19532  }
19533  __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);
19534  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19535  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1964, __pyx_L1_error)
19536  __Pyx_GOTREF(__pyx_t_1);
19537  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19538  __pyx_r = __pyx_t_1;
19539  __pyx_t_1 = 0;
19540  goto __pyx_L0;
19541 
19542  /* "PyClical.pyx":1962
19543  *
19544  * # Doctest interface.
19545  * def _test(): # <<<<<<<<<<<<<<
19546  * import PyClical, doctest
19547  * return doctest.testmod(PyClical)
19548  */
19549 
19550  /* function exit code */
19551  __pyx_L1_error:;
19552  __Pyx_XDECREF(__pyx_t_1);
19553  __Pyx_XDECREF(__pyx_t_2);
19554  __Pyx_XDECREF(__pyx_t_3);
19555  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
19556  __pyx_r = NULL;
19557  __pyx_L0:;
19558  __Pyx_XDECREF(__pyx_v_PyClical);
19559  __Pyx_XDECREF(__pyx_v_doctest);
19560  __Pyx_XGIVEREF(__pyx_r);
19561  __Pyx_RefNannyFinishContext();
19562  return __pyx_r;
19563  }
19564 
19565  /* "string.to_py":31
19566  *
19567  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
19568  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19569  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
19570  * cdef extern from *:
19571  */
19572 
19573  static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19574  PyObject *__pyx_r = NULL;
19575  __Pyx_RefNannyDeclarations
19576  PyObject *__pyx_t_1 = NULL;
19577  int __pyx_lineno = 0;
19578  const char *__pyx_filename = NULL;
19579  int __pyx_clineno = 0;
19580  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);
19581 
19582  /* "string.to_py":32
19583  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
19584  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
19585  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19586  * cdef extern from *:
19587  * cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
19588  */
19589  __Pyx_XDECREF(__pyx_r);
19590  __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error)
19591  __Pyx_GOTREF(__pyx_t_1);
19592  __pyx_r = __pyx_t_1;
19593  __pyx_t_1 = 0;
19594  goto __pyx_L0;
19595 
19596  /* "string.to_py":31
19597  *
19598  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
19599  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19600  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
19601  * cdef extern from *:
19602  */
19603 
19604  /* function exit code */
19605  __pyx_L1_error:;
19606  __Pyx_XDECREF(__pyx_t_1);
19607  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19608  __pyx_r = 0;
19609  __pyx_L0:;
19610  __Pyx_XGIVEREF(__pyx_r);
19611  __Pyx_RefNannyFinishContext();
19612  return __pyx_r;
19613  }
19614 
19615  /* "string.to_py":37
19616  *
19617  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
19618  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19619  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
19620  * cdef extern from *:
19621  */
19622 
19623  static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19624  PyObject *__pyx_r = NULL;
19625  __Pyx_RefNannyDeclarations
19626  PyObject *__pyx_t_1 = NULL;
19627  int __pyx_lineno = 0;
19628  const char *__pyx_filename = NULL;
19629  int __pyx_clineno = 0;
19630  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);
19631 
19632  /* "string.to_py":38
19633  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
19634  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
19635  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19636  * cdef extern from *:
19637  * cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t)
19638  */
19639  __Pyx_XDECREF(__pyx_r);
19640  __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error)
19641  __Pyx_GOTREF(__pyx_t_1);
19642  __pyx_r = __pyx_t_1;
19643  __pyx_t_1 = 0;
19644  goto __pyx_L0;
19645 
19646  /* "string.to_py":37
19647  *
19648  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
19649  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19650  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
19651  * cdef extern from *:
19652  */
19653 
19654  /* function exit code */
19655  __pyx_L1_error:;
19656  __Pyx_XDECREF(__pyx_t_1);
19657  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19658  __pyx_r = 0;
19659  __pyx_L0:;
19660  __Pyx_XGIVEREF(__pyx_r);
19661  __Pyx_RefNannyFinishContext();
19662  return __pyx_r;
19663  }
19664 
19665  /* "string.to_py":43
19666  *
19667  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19668  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19669  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
19670  * cdef extern from *:
19671  */
19672 
19673  static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19674  PyObject *__pyx_r = NULL;
19675  __Pyx_RefNannyDeclarations
19676  PyObject *__pyx_t_1 = NULL;
19677  int __pyx_lineno = 0;
19678  const char *__pyx_filename = NULL;
19679  int __pyx_clineno = 0;
19680  __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);
19681 
19682  /* "string.to_py":44
19683  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19684  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
19685  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19686  * cdef extern from *:
19687  * cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
19688  */
19689  __Pyx_XDECREF(__pyx_r);
19690  __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error)
19691  __Pyx_GOTREF(__pyx_t_1);
19692  __pyx_r = __pyx_t_1;
19693  __pyx_t_1 = 0;
19694  goto __pyx_L0;
19695 
19696  /* "string.to_py":43
19697  *
19698  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
19699  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19700  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
19701  * cdef extern from *:
19702  */
19703 
19704  /* function exit code */
19705  __pyx_L1_error:;
19706  __Pyx_XDECREF(__pyx_t_1);
19707  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19708  __pyx_r = 0;
19709  __pyx_L0:;
19710  __Pyx_XGIVEREF(__pyx_r);
19711  __Pyx_RefNannyFinishContext();
19712  return __pyx_r;
19713  }
19714 
19715  /* "string.to_py":49
19716  *
19717  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19718  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19719  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
19720  * cdef extern from *:
19721  */
19722 
19723  static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19724  PyObject *__pyx_r = NULL;
19725  __Pyx_RefNannyDeclarations
19726  PyObject *__pyx_t_1 = NULL;
19727  int __pyx_lineno = 0;
19728  const char *__pyx_filename = NULL;
19729  int __pyx_clineno = 0;
19730  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);
19731 
19732  /* "string.to_py":50
19733  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19734  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
19735  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19736  * cdef extern from *:
19737  * cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
19738  */
19739  __Pyx_XDECREF(__pyx_r);
19740  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error)
19741  __Pyx_GOTREF(__pyx_t_1);
19742  __pyx_r = __pyx_t_1;
19743  __pyx_t_1 = 0;
19744  goto __pyx_L0;
19745 
19746  /* "string.to_py":49
19747  *
19748  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
19749  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19750  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
19751  * cdef extern from *:
19752  */
19753 
19754  /* function exit code */
19755  __pyx_L1_error:;
19756  __Pyx_XDECREF(__pyx_t_1);
19757  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19758  __pyx_r = 0;
19759  __pyx_L0:;
19760  __Pyx_XGIVEREF(__pyx_r);
19761  __Pyx_RefNannyFinishContext();
19762  return __pyx_r;
19763  }
19764 
19765  /* "string.to_py":55
19766  *
19767  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19768  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19769  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
19770  *
19771  */
19772 
19773  static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
19774  PyObject *__pyx_r = NULL;
19775  __Pyx_RefNannyDeclarations
19776  PyObject *__pyx_t_1 = NULL;
19777  int __pyx_lineno = 0;
19778  const char *__pyx_filename = NULL;
19779  int __pyx_clineno = 0;
19780  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);
19781 
19782  /* "string.to_py":56
19783  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19784  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
19785  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
19786  *
19787  */
19788  __Pyx_XDECREF(__pyx_r);
19789  __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
19790  __Pyx_GOTREF(__pyx_t_1);
19791  __pyx_r = __pyx_t_1;
19792  __pyx_t_1 = 0;
19793  goto __pyx_L0;
19794 
19795  /* "string.to_py":55
19796  *
19797  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
19798  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
19799  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
19800  *
19801  */
19802 
19803  /* function exit code */
19804  __pyx_L1_error:;
19805  __Pyx_XDECREF(__pyx_t_1);
19806  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
19807  __pyx_r = 0;
19808  __pyx_L0:;
19809  __Pyx_XGIVEREF(__pyx_r);
19810  __Pyx_RefNannyFinishContext();
19811  return __pyx_r;
19812  }
19813  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
19814 
19815  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
19816  struct __pyx_obj_8PyClical_index_set *p;
19817  PyObject *o;
19818  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19819  o = (*t->tp_alloc)(t, 0);
19820  } else {
19821  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19822  }
19823  if (unlikely(!o)) return 0;
19824  p = ((struct __pyx_obj_8PyClical_index_set *)o);
19825  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
19826  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
19827  return o;
19828  bad:
19829  Py_DECREF(o); o = 0;
19830  return NULL;
19831  }
19832 
19833  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
19834  #if CYTHON_USE_TP_FINALIZE
19835  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))) {
19836  if (PyObject_CallFinalizerFromDealloc(o)) return;
19837  }
19838  #endif
19839  {
19840  PyObject *etype, *eval, *etb;
19841  PyErr_Fetch(&etype, &eval, &etb);
19842  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
19843  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
19844  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
19845  PyErr_Restore(etype, eval, etb);
19846  }
19847  (*Py_TYPE(o)->tp_free)(o);
19848  }
19849  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
19850  PyObject *r;
19851  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19852  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19853  Py_DECREF(x);
19854  return r;
19855  }
19856 
19857  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
19858  if (v) {
19859  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
19860  }
19861  else {
19862  PyErr_Format(PyExc_NotImplementedError,
19863  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
19864  return -1;
19865  }
19866  }
19867 
19868  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
19869  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
19870  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
19871  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
19872  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
19873  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
19874  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
19875  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
19876  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
19877  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
19878  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
19879  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
19880  {0, 0, 0, 0}
19881  };
19882 
19883  static PyNumberMethods __pyx_tp_as_number_index_set = {
19884  0, /*nb_add*/
19885  0, /*nb_subtract*/
19886  0, /*nb_multiply*/
19887  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19888  0, /*nb_divide*/
19889  #endif
19890  0, /*nb_remainder*/
19891  0, /*nb_divmod*/
19892  0, /*nb_power*/
19893  0, /*nb_negative*/
19894  0, /*nb_positive*/
19895  0, /*nb_absolute*/
19896  0, /*nb_nonzero*/
19897  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
19898  0, /*nb_lshift*/
19899  0, /*nb_rshift*/
19900  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
19901  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
19902  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
19903  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19904  0, /*nb_coerce*/
19905  #endif
19906  0, /*nb_int*/
19907  #if PY_MAJOR_VERSION < 3
19908  0, /*nb_long*/
19909  #else
19910  0, /*reserved*/
19911  #endif
19912  0, /*nb_float*/
19913  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19914  0, /*nb_oct*/
19915  #endif
19916  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19917  0, /*nb_hex*/
19918  #endif
19919  0, /*nb_inplace_add*/
19920  0, /*nb_inplace_subtract*/
19921  0, /*nb_inplace_multiply*/
19922  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19923  0, /*nb_inplace_divide*/
19924  #endif
19925  0, /*nb_inplace_remainder*/
19926  0, /*nb_inplace_power*/
19927  0, /*nb_inplace_lshift*/
19928  0, /*nb_inplace_rshift*/
19929  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
19930  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
19931  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
19932  0, /*nb_floor_divide*/
19933  0, /*nb_true_divide*/
19934  0, /*nb_inplace_floor_divide*/
19935  0, /*nb_inplace_true_divide*/
19936  0, /*nb_index*/
19937  #if PY_VERSION_HEX >= 0x03050000
19938  0, /*nb_matrix_multiply*/
19939  #endif
19940  #if PY_VERSION_HEX >= 0x03050000
19941  0, /*nb_inplace_matrix_multiply*/
19942  #endif
19943  };
19944 
19945  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
19946  0, /*sq_length*/
19947  0, /*sq_concat*/
19948  0, /*sq_repeat*/
19949  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
19950  0, /*sq_slice*/
19951  0, /*sq_ass_item*/
19952  0, /*sq_ass_slice*/
19953  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
19954  0, /*sq_inplace_concat*/
19955  0, /*sq_inplace_repeat*/
19956  };
19957 
19958  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
19959  0, /*mp_length*/
19960  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
19961  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
19962  };
19963 
19964  static PyTypeObject __pyx_type_8PyClical_index_set = {
19965  PyVarObject_HEAD_INIT(0, 0)
19966  "PyClical.index_set", /*tp_name*/
19967  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
19968  0, /*tp_itemsize*/
19969  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
19970  #if PY_VERSION_HEX < 0x030800b4
19971  0, /*tp_print*/
19972  #endif
19973  #if PY_VERSION_HEX >= 0x030800b4
19974  0, /*tp_vectorcall_offset*/
19975  #endif
19976  0, /*tp_getattr*/
19977  0, /*tp_setattr*/
19978  #if PY_MAJOR_VERSION < 3
19979  0, /*tp_compare*/
19980  #endif
19981  #if PY_MAJOR_VERSION >= 3
19982  0, /*tp_as_async*/
19983  #endif
19984  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
19985  &__pyx_tp_as_number_index_set, /*tp_as_number*/
19986  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
19987  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
19988  0, /*tp_hash*/
19989  0, /*tp_call*/
19990  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
19991  0, /*tp_getattro*/
19992  0, /*tp_setattro*/
19993  0, /*tp_as_buffer*/
19994  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19995  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
19996  0, /*tp_traverse*/
19997  0, /*tp_clear*/
19998  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
19999  0, /*tp_weaklistoffset*/
20000  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
20001  0, /*tp_iternext*/
20002  __pyx_methods_8PyClical_index_set, /*tp_methods*/
20003  0, /*tp_members*/
20004  0, /*tp_getset*/
20005  0, /*tp_base*/
20006  0, /*tp_dict*/
20007  0, /*tp_descr_get*/
20008  0, /*tp_descr_set*/
20009  0, /*tp_dictoffset*/
20010  0, /*tp_init*/
20011  0, /*tp_alloc*/
20012  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
20013  0, /*tp_free*/
20014  0, /*tp_is_gc*/
20015  0, /*tp_bases*/
20016  0, /*tp_mro*/
20017  0, /*tp_cache*/
20018  0, /*tp_subclasses*/
20019  0, /*tp_weaklist*/
20020  0, /*tp_del*/
20021  0, /*tp_version_tag*/
20022  #if PY_VERSION_HEX >= 0x030400a1
20023  0, /*tp_finalize*/
20024  #endif
20025  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20026  0, /*tp_vectorcall*/
20027  #endif
20028  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20029  0, /*tp_print*/
20030  #endif
20031  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
20032  0, /*tp_pypy_flags*/
20033  #endif
20034  };
20035  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
20036 
20037  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
20038  struct __pyx_obj_8PyClical_clifford *p;
20039  PyObject *o;
20040  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20041  o = (*t->tp_alloc)(t, 0);
20042  } else {
20043  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20044  }
20045  if (unlikely(!o)) return 0;
20046  p = ((struct __pyx_obj_8PyClical_clifford *)o);
20047  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
20048  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
20049  return o;
20050  bad:
20051  Py_DECREF(o); o = 0;
20052  return NULL;
20053  }
20054 
20055  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
20056  #if CYTHON_USE_TP_FINALIZE
20057  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))) {
20058  if (PyObject_CallFinalizerFromDealloc(o)) return;
20059  }
20060  #endif
20061  {
20062  PyObject *etype, *eval, *etb;
20063  PyErr_Fetch(&etype, &eval, &etb);
20064  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
20065  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
20066  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
20067  PyErr_Restore(etype, eval, etb);
20068  }
20069  (*Py_TYPE(o)->tp_free)(o);
20070  }
20071  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
20072  PyObject *r;
20073  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
20074  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
20075  Py_DECREF(x);
20076  return r;
20077  }
20078 
20079  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
20080  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
20081  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
20082  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
20083  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
20084  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
20085  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
20086  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
20087  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
20088  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
20089  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
20090  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
20091  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
20092  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
20093  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
20094  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
20095  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
20096  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
20097  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
20098  {"isinf", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isinf, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isinf},
20099  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_91isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90isnan},
20100  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_93frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_92frame},
20101  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__reduce_cython__, METH_NOARGS, 0},
20102  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_101__setstate_cython__, METH_O, 0},
20103  {0, 0, 0, 0}
20104  };
20105 
20106  static PyNumberMethods __pyx_tp_as_number_clifford = {
20107  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
20108  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
20109  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
20110  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20111  0, /*nb_divide*/
20112  #endif
20113  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
20114  0, /*nb_divmod*/
20115  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
20116  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
20117  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
20118  0, /*nb_absolute*/
20119  0, /*nb_nonzero*/
20120  0, /*nb_invert*/
20121  0, /*nb_lshift*/
20122  0, /*nb_rshift*/
20123  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
20124  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
20125  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
20126  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20127  0, /*nb_coerce*/
20128  #endif
20129  0, /*nb_int*/
20130  #if PY_MAJOR_VERSION < 3
20131  0, /*nb_long*/
20132  #else
20133  0, /*reserved*/
20134  #endif
20135  0, /*nb_float*/
20136  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20137  0, /*nb_oct*/
20138  #endif
20139  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20140  0, /*nb_hex*/
20141  #endif
20142  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
20143  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
20144  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
20145  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20146  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
20147  #endif
20148  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
20149  0, /*nb_inplace_power*/
20150  0, /*nb_inplace_lshift*/
20151  0, /*nb_inplace_rshift*/
20152  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
20153  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
20154  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
20155  0, /*nb_floor_divide*/
20156  __pyx_pw_8PyClical_8clifford_45__truediv__, /*nb_true_divide*/
20157  0, /*nb_inplace_floor_divide*/
20158  0, /*nb_inplace_true_divide*/
20159  0, /*nb_index*/
20160  #if PY_VERSION_HEX >= 0x03050000
20161  0, /*nb_matrix_multiply*/
20162  #endif
20163  #if PY_VERSION_HEX >= 0x03050000
20164  0, /*nb_inplace_matrix_multiply*/
20165  #endif
20166  };
20167 
20168  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
20169  0, /*sq_length*/
20170  0, /*sq_concat*/
20171  0, /*sq_repeat*/
20172  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
20173  0, /*sq_slice*/
20174  0, /*sq_ass_item*/
20175  0, /*sq_ass_slice*/
20176  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
20177  0, /*sq_inplace_concat*/
20178  0, /*sq_inplace_repeat*/
20179  };
20180 
20181  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
20182  0, /*mp_length*/
20183  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
20184  0, /*mp_ass_subscript*/
20185  };
20186 
20187  static PyTypeObject __pyx_type_8PyClical_clifford = {
20188  PyVarObject_HEAD_INIT(0, 0)
20189  "PyClical.clifford", /*tp_name*/
20190  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
20191  0, /*tp_itemsize*/
20192  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
20193  #if PY_VERSION_HEX < 0x030800b4
20194  0, /*tp_print*/
20195  #endif
20196  #if PY_VERSION_HEX >= 0x030800b4
20197  0, /*tp_vectorcall_offset*/
20198  #endif
20199  0, /*tp_getattr*/
20200  0, /*tp_setattr*/
20201  #if PY_MAJOR_VERSION < 3
20202  0, /*tp_compare*/
20203  #endif
20204  #if PY_MAJOR_VERSION >= 3
20205  0, /*tp_as_async*/
20206  #endif
20207  __pyx_pw_8PyClical_8clifford_95__repr__, /*tp_repr*/
20208  &__pyx_tp_as_number_clifford, /*tp_as_number*/
20209  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
20210  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
20211  0, /*tp_hash*/
20212  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
20213  __pyx_pw_8PyClical_8clifford_97__str__, /*tp_str*/
20214  0, /*tp_getattro*/
20215  0, /*tp_setattro*/
20216  0, /*tp_as_buffer*/
20217  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
20218  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
20219  0, /*tp_traverse*/
20220  0, /*tp_clear*/
20221  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
20222  0, /*tp_weaklistoffset*/
20223  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
20224  0, /*tp_iternext*/
20225  __pyx_methods_8PyClical_clifford, /*tp_methods*/
20226  0, /*tp_members*/
20227  0, /*tp_getset*/
20228  0, /*tp_base*/
20229  0, /*tp_dict*/
20230  0, /*tp_descr_get*/
20231  0, /*tp_descr_set*/
20232  0, /*tp_dictoffset*/
20233  0, /*tp_init*/
20234  0, /*tp_alloc*/
20235  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
20236  0, /*tp_free*/
20237  0, /*tp_is_gc*/
20238  0, /*tp_bases*/
20239  0, /*tp_mro*/
20240  0, /*tp_cache*/
20241  0, /*tp_subclasses*/
20242  0, /*tp_weaklist*/
20243  0, /*tp_del*/
20244  0, /*tp_version_tag*/
20245  #if PY_VERSION_HEX >= 0x030400a1
20246  0, /*tp_finalize*/
20247  #endif
20248  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20249  0, /*tp_vectorcall*/
20250  #endif
20251  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20252  0, /*tp_print*/
20253  #endif
20254  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
20255  0, /*tp_pypy_flags*/
20256  #endif
20257  };
20258 
20259  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
20260  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
20261 
20262  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
20263  PyObject *o;
20264  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__)))) {
20265  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
20266  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
20267  (void) PyObject_INIT(o, t);
20268  PyObject_GC_Track(o);
20269  } else {
20270  o = (*t->tp_alloc)(t, 0);
20271  if (unlikely(!o)) return 0;
20272  }
20273  return o;
20274  }
20275 
20276  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
20277  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
20278  PyObject_GC_UnTrack(o);
20279  Py_CLEAR(p->__pyx_v_idx);
20280  Py_CLEAR(p->__pyx_v_self);
20281  Py_CLEAR(p->__pyx_t_0);
20282  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__)))) {
20283  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
20284  } else {
20285  (*Py_TYPE(o)->tp_free)(o);
20286  }
20287  }
20288 
20289  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
20290  int e;
20291  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
20292  if (p->__pyx_v_idx) {
20293  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
20294  }
20295  if (p->__pyx_v_self) {
20296  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
20297  }
20298  if (p->__pyx_t_0) {
20299  e = (*v)(p->__pyx_t_0, a); if (e) return e;
20300  }
20301  return 0;
20302  }
20303 
20304  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
20305  PyVarObject_HEAD_INIT(0, 0)
20306  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
20307  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
20308  0, /*tp_itemsize*/
20309  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
20310  #if PY_VERSION_HEX < 0x030800b4
20311  0, /*tp_print*/
20312  #endif
20313  #if PY_VERSION_HEX >= 0x030800b4
20314  0, /*tp_vectorcall_offset*/
20315  #endif
20316  0, /*tp_getattr*/
20317  0, /*tp_setattr*/
20318  #if PY_MAJOR_VERSION < 3
20319  0, /*tp_compare*/
20320  #endif
20321  #if PY_MAJOR_VERSION >= 3
20322  0, /*tp_as_async*/
20323  #endif
20324  0, /*tp_repr*/
20325  0, /*tp_as_number*/
20326  0, /*tp_as_sequence*/
20327  0, /*tp_as_mapping*/
20328  0, /*tp_hash*/
20329  0, /*tp_call*/
20330  0, /*tp_str*/
20331  0, /*tp_getattro*/
20332  0, /*tp_setattro*/
20333  0, /*tp_as_buffer*/
20334  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
20335  0, /*tp_doc*/
20336  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
20337  0, /*tp_clear*/
20338  0, /*tp_richcompare*/
20339  0, /*tp_weaklistoffset*/
20340  0, /*tp_iter*/
20341  0, /*tp_iternext*/
20342  0, /*tp_methods*/
20343  0, /*tp_members*/
20344  0, /*tp_getset*/
20345  0, /*tp_base*/
20346  0, /*tp_dict*/
20347  0, /*tp_descr_get*/
20348  0, /*tp_descr_set*/
20349  0, /*tp_dictoffset*/
20350  0, /*tp_init*/
20351  0, /*tp_alloc*/
20352  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
20353  0, /*tp_free*/
20354  0, /*tp_is_gc*/
20355  0, /*tp_bases*/
20356  0, /*tp_mro*/
20357  0, /*tp_cache*/
20358  0, /*tp_subclasses*/
20359  0, /*tp_weaklist*/
20360  0, /*tp_del*/
20361  0, /*tp_version_tag*/
20362  #if PY_VERSION_HEX >= 0x030400a1
20363  0, /*tp_finalize*/
20364  #endif
20365  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20366  0, /*tp_vectorcall*/
20367  #endif
20368  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20369  0, /*tp_print*/
20370  #endif
20371  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
20372  0, /*tp_pypy_flags*/
20373  #endif
20374  };
20375 
20376  static PyMethodDef __pyx_methods[] = {
20377  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
20378  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
20379  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
20380  {"error_squared_tol", (PyCFunction)__pyx_pw_8PyClical_11error_squared_tol, METH_O, __pyx_doc_8PyClical_10error_squared_tol},
20381  {"error_squared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_13error_squared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_12error_squared},
20382  {"approx_equal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_15approx_equal, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_14approx_equal},
20383  {"inv", (PyCFunction)__pyx_pw_8PyClical_17inv, METH_O, __pyx_doc_8PyClical_16inv},
20384  {"scalar", (PyCFunction)__pyx_pw_8PyClical_19scalar, METH_O, __pyx_doc_8PyClical_18scalar},
20385  {"real", (PyCFunction)__pyx_pw_8PyClical_21real, METH_O, __pyx_doc_8PyClical_20real},
20386  {"imag", (PyCFunction)__pyx_pw_8PyClical_23imag, METH_O, __pyx_doc_8PyClical_22imag},
20387  {"pure", (PyCFunction)__pyx_pw_8PyClical_25pure, METH_O, __pyx_doc_8PyClical_24pure},
20388  {"even", (PyCFunction)__pyx_pw_8PyClical_27even, METH_O, __pyx_doc_8PyClical_26even},
20389  {"odd", (PyCFunction)__pyx_pw_8PyClical_29odd, METH_O, __pyx_doc_8PyClical_28odd},
20390  {"involute", (PyCFunction)__pyx_pw_8PyClical_31involute, METH_O, __pyx_doc_8PyClical_30involute},
20391  {"reverse", (PyCFunction)__pyx_pw_8PyClical_33reverse, METH_O, __pyx_doc_8PyClical_32reverse},
20392  {"conj", (PyCFunction)__pyx_pw_8PyClical_35conj, METH_O, __pyx_doc_8PyClical_34conj},
20393  {"quad", (PyCFunction)__pyx_pw_8PyClical_37quad, METH_O, __pyx_doc_8PyClical_36quad},
20394  {"norm", (PyCFunction)__pyx_pw_8PyClical_39norm, METH_O, __pyx_doc_8PyClical_38norm},
20395  {"abs", (PyCFunction)__pyx_pw_8PyClical_41abs, METH_O, __pyx_doc_8PyClical_40abs},
20396  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_43max_abs, METH_O, __pyx_doc_8PyClical_42max_abs},
20397  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44pow},
20398  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_47outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_46outer_pow},
20399  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_49complexifier, METH_O, __pyx_doc_8PyClical_48complexifier},
20400  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50sqrt},
20401  {"exp", (PyCFunction)__pyx_pw_8PyClical_53exp, METH_O, __pyx_doc_8PyClical_52exp},
20402  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_55log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_54log},
20403  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56cos},
20404  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58acos},
20405  {"cosh", (PyCFunction)__pyx_pw_8PyClical_61cosh, METH_O, __pyx_doc_8PyClical_60cosh},
20406  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_63acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_62acosh},
20407  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64sin},
20408  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66asin},
20409  {"sinh", (PyCFunction)__pyx_pw_8PyClical_69sinh, METH_O, __pyx_doc_8PyClical_68sinh},
20410  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_71asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_70asinh},
20411  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72tan},
20412  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74atan},
20413  {"tanh", (PyCFunction)__pyx_pw_8PyClical_77tanh, METH_O, __pyx_doc_8PyClical_76tanh},
20414  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_79atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_78atanh},
20415  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_81random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_80random_clifford},
20416  {"cga3", (PyCFunction)__pyx_pw_8PyClical_83cga3, METH_O, __pyx_doc_8PyClical_82cga3},
20417  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_85cga3std, METH_O, __pyx_doc_8PyClical_84cga3std},
20418  {"agc3", (PyCFunction)__pyx_pw_8PyClical_87agc3, METH_O, __pyx_doc_8PyClical_86agc3},
20419  {0, 0, 0, 0}
20420  };
20421 
20422  #if PY_MAJOR_VERSION >= 3
20423  #if CYTHON_PEP489_MULTI_PHASE_INIT
20424  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
20425  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
20426  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
20427  {Py_mod_create, (void*)__pyx_pymod_create},
20428  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
20429  {0, NULL}
20430  };
20431  #endif
20432 
20433  static struct PyModuleDef __pyx_moduledef = {
20434  PyModuleDef_HEAD_INIT,
20435  "PyClical",
20436  0, /* m_doc */
20437  #if CYTHON_PEP489_MULTI_PHASE_INIT
20438  0, /* m_size */
20439  #else
20440  -1, /* m_size */
20441  #endif
20442  __pyx_methods /* m_methods */,
20443  #if CYTHON_PEP489_MULTI_PHASE_INIT
20444  __pyx_moduledef_slots, /* m_slots */
20445  #else
20446  NULL, /* m_reload */
20447  #endif
20448  NULL, /* m_traverse */
20449  NULL, /* m_clear */
20450  NULL /* m_free */
20451  };
20452  #endif
20453  #ifndef CYTHON_SMALL_CODE
20454 #if defined(__clang__)
20455  #define CYTHON_SMALL_CODE
20456 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
20457  #define CYTHON_SMALL_CODE __attribute__((cold))
20458 #else
20459  #define CYTHON_SMALL_CODE
20460 #endif
20461 #endif
20462 
20463 static __Pyx_StringTabEntry __pyx_string_tab[] = {
20464  {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
20465  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
20466  {&__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},
20467  {&__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},
20468  {&__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},
20469  {&__pyx_kp_u_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 1, 0, 0},
20470  {&__pyx_kp_u_Cannot_initialize_index_set_obje, __pyx_k_Cannot_initialize_index_set_obje, sizeof(__pyx_k_Cannot_initialize_index_set_obje), 0, 1, 0, 0},
20471  {&__pyx_kp_u_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 1, 0, 0},
20472  {&__pyx_kp_u_Cannot_take_vector_part_of, __pyx_k_Cannot_take_vector_part_of, sizeof(__pyx_k_Cannot_take_vector_part_of), 0, 1, 0, 0},
20473  {&__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},
20474  {&__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},
20475  {&__pyx_kp_u_Check_if_a_multivector_contains_2, __pyx_k_Check_if_a_multivector_contains_2, sizeof(__pyx_k_Check_if_a_multivector_contains_2), 0, 1, 0, 0},
20476  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
20477  {&__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},
20478  {&__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},
20479  {&__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},
20480  {&__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},
20481  {&__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},
20482  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
20483  {&__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},
20484  {&__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},
20485  {&__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},
20486  {&__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},
20487  {&__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},
20488  {&__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},
20489  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
20490  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
20491  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
20492  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
20493  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
20494  {&__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},
20495  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
20496  {&__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},
20497  {&__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},
20498  {&__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},
20499  {&__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},
20500  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
20501  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
20502  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
20503  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
20504  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
20505  {&__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},
20506  {&__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},
20507  {&__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},
20508  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
20509  {&__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},
20510  {&__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},
20511  {&__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},
20512  {&__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},
20513  {&__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},
20514  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
20515  {&__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},
20516  {&__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},
20517  {&__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},
20518  {&__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},
20519  {&__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},
20520  {&__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},
20521  {&__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},
20522  {&__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},
20523  {&__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},
20524  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
20525  {&__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},
20526  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
20527  {&__pyx_kp_u_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 1, 0, 0},
20528  {&__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},
20529  {&__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},
20530  {&__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},
20531  {&__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},
20532  {&__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},
20533  {&__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},
20534  {&__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},
20535  {&__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},
20536  {&__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},
20537  {&__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},
20538  {&__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},
20539  {&__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},
20540  {&__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},
20541  {&__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},
20542  {&__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},
20543  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
20544  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
20545  {&__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},
20546  {&__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},
20547  {&__pyx_kp_u_Quadratic_norm_error_tolerance, __pyx_k_Quadratic_norm_error_tolerance, sizeof(__pyx_k_Quadratic_norm_error_tolerance), 0, 1, 0, 0},
20548  {&__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},
20549  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
20550  {&__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},
20551  {&__pyx_kp_u_Relative_or_absolute_error_usin, __pyx_k_Relative_or_absolute_error_usin, sizeof(__pyx_k_Relative_or_absolute_error_usin), 0, 1, 0, 0},
20552  {&__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},
20553  {&__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},
20554  {&__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},
20555  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
20556  {&__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},
20557  {&__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},
20558  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
20559  {&__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},
20560  {&__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},
20561  {&__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},
20562  {&__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},
20563  {&__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},
20564  {&__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},
20565  {&__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},
20566  {&__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},
20567  {&__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},
20568  {&__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},
20569  {&__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},
20570  {&__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},
20571  {&__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},
20572  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
20573  {&__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},
20574  {&__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},
20575  {&__pyx_kp_u_Test_for_approximate_equality_o, __pyx_k_Test_for_approximate_equality_o, sizeof(__pyx_k_Test_for_approximate_equality_o), 0, 1, 0, 0},
20576  {&__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},
20577  {&__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},
20578  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
20579  {&__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},
20580  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
20581  {&__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},
20582  {&__pyx_kp_u_This_comparison_operator_is_not, __pyx_k_This_comparison_operator_is_not, sizeof(__pyx_k_This_comparison_operator_is_not), 0, 1, 0, 0},
20583  {&__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},
20584  {&__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},
20585  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
20586  {&__pyx_kp_u_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0},
20587  {&__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},
20588  {&__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},
20589  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
20590  {&__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},
20591  {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
20592  {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
20593  {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
20594  {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
20595  {&__pyx_kp_u__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 1, 0, 0},
20596  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
20597  {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
20598  {&__pyx_kp_u_abs_line_1522, __pyx_k_abs_line_1522, sizeof(__pyx_k_abs_line_1522), 0, 1, 0, 0},
20599  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
20600  {&__pyx_kp_u_acos_line_1668, __pyx_k_acos_line_1668, sizeof(__pyx_k_acos_line_1668), 0, 1, 0, 0},
20601  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
20602  {&__pyx_kp_u_acosh_line_1705, __pyx_k_acosh_line_1705, sizeof(__pyx_k_acosh_line_1705), 0, 1, 0, 0},
20603  {&__pyx_kp_u_agc3_line_1893, __pyx_k_agc3_line_1893, sizeof(__pyx_k_agc3_line_1893), 0, 1, 0, 0},
20604  {&__pyx_kp_u_approx_equal_line_1359, __pyx_k_approx_equal_line_1359, sizeof(__pyx_k_approx_equal_line_1359), 0, 1, 0, 0},
20605  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
20606  {&__pyx_kp_u_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 1, 0, 0},
20607  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
20608  {&__pyx_kp_u_asin_line_1747, __pyx_k_asin_line_1747, sizeof(__pyx_k_asin_line_1747), 0, 1, 0, 0},
20609  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
20610  {&__pyx_kp_u_asinh_line_1782, __pyx_k_asinh_line_1782, sizeof(__pyx_k_asinh_line_1782), 0, 1, 0, 0},
20611  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
20612  {&__pyx_kp_u_atan_line_1818, __pyx_k_atan_line_1818, sizeof(__pyx_k_atan_line_1818), 0, 1, 0, 0},
20613  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
20614  {&__pyx_kp_u_atanh_line_1847, __pyx_k_atanh_line_1847, sizeof(__pyx_k_atanh_line_1847), 0, 1, 0, 0},
20615  {&__pyx_kp_u_cga3_line_1873, __pyx_k_cga3_line_1873, sizeof(__pyx_k_cga3_line_1873), 0, 1, 0, 0},
20616  {&__pyx_kp_u_cga3std_line_1882, __pyx_k_cga3std_line_1882, sizeof(__pyx_k_cga3std_line_1882), 0, 1, 0, 0},
20617  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
20618  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
20619  {&__pyx_kp_u_clifford___add___line_740, __pyx_k_clifford___add___line_740, sizeof(__pyx_k_clifford___add___line_740), 0, 1, 0, 0},
20620  {&__pyx_kp_u_clifford___and___line_836, __pyx_k_clifford___and___line_836, sizeof(__pyx_k_clifford___and___line_836), 0, 1, 0, 0},
20621  {&__pyx_kp_u_clifford___call___line_1020, __pyx_k_clifford___call___line_1020, sizeof(__pyx_k_clifford___call___line_1020), 0, 1, 0, 0},
20622  {&__pyx_kp_u_clifford___getitem___line_707, __pyx_k_clifford___getitem___line_707, sizeof(__pyx_k_clifford___getitem___line_707), 0, 1, 0, 0},
20623  {&__pyx_kp_u_clifford___iadd___line_751, __pyx_k_clifford___iadd___line_751, sizeof(__pyx_k_clifford___iadd___line_751), 0, 1, 0, 0},
20624  {&__pyx_kp_u_clifford___iand___line_851, __pyx_k_clifford___iand___line_851, sizeof(__pyx_k_clifford___iand___line_851), 0, 1, 0, 0},
20625  {&__pyx_kp_u_clifford___idiv___line_911, __pyx_k_clifford___idiv___line_911, sizeof(__pyx_k_clifford___idiv___line_911), 0, 1, 0, 0},
20626  {&__pyx_kp_u_clifford___imod___line_821, __pyx_k_clifford___imod___line_821, sizeof(__pyx_k_clifford___imod___line_821), 0, 1, 0, 0},
20627  {&__pyx_kp_u_clifford___imul___line_793, __pyx_k_clifford___imul___line_793, sizeof(__pyx_k_clifford___imul___line_793), 0, 1, 0, 0},
20628  {&__pyx_kp_u_clifford___ior___line_950, __pyx_k_clifford___ior___line_950, sizeof(__pyx_k_clifford___ior___line_950), 0, 1, 0, 0},
20629  {&__pyx_kp_u_clifford___isub___line_771, __pyx_k_clifford___isub___line_771, sizeof(__pyx_k_clifford___isub___line_771), 0, 1, 0, 0},
20630  {&__pyx_kp_u_clifford___iter___line_638, __pyx_k_clifford___iter___line_638, sizeof(__pyx_k_clifford___iter___line_638), 0, 1, 0, 0},
20631  {&__pyx_kp_u_clifford___ixor___line_881, __pyx_k_clifford___ixor___line_881, sizeof(__pyx_k_clifford___ixor___line_881), 0, 1, 0, 0},
20632  {&__pyx_kp_u_clifford___mod___line_806, __pyx_k_clifford___mod___line_806, sizeof(__pyx_k_clifford___mod___line_806), 0, 1, 0, 0},
20633  {&__pyx_kp_u_clifford___mul___line_780, __pyx_k_clifford___mul___line_780, sizeof(__pyx_k_clifford___mul___line_780), 0, 1, 0, 0},
20634  {&__pyx_kp_u_clifford___neg___line_722, __pyx_k_clifford___neg___line_722, sizeof(__pyx_k_clifford___neg___line_722), 0, 1, 0, 0},
20635  {&__pyx_kp_u_clifford___or___line_939, __pyx_k_clifford___or___line_939, sizeof(__pyx_k_clifford___or___line_939), 0, 1, 0, 0},
20636  {&__pyx_kp_u_clifford___pos___line_731, __pyx_k_clifford___pos___line_731, sizeof(__pyx_k_clifford___pos___line_731), 0, 1, 0, 0},
20637  {&__pyx_kp_u_clifford___pow___line_961, __pyx_k_clifford___pow___line_961, sizeof(__pyx_k_clifford___pow___line_961), 0, 1, 0, 0},
20638  {&__pyx_kp_u_clifford___repr___line_1235, __pyx_k_clifford___repr___line_1235, sizeof(__pyx_k_clifford___repr___line_1235), 0, 1, 0, 0},
20639  {&__pyx_kp_u_clifford___str___line_1244, __pyx_k_clifford___str___line_1244, sizeof(__pyx_k_clifford___str___line_1244), 0, 1, 0, 0},
20640  {&__pyx_kp_u_clifford___sub___line_760, __pyx_k_clifford___sub___line_760, sizeof(__pyx_k_clifford___sub___line_760), 0, 1, 0, 0},
20641  {&__pyx_kp_u_clifford___truediv___line_896, __pyx_k_clifford___truediv___line_896, sizeof(__pyx_k_clifford___truediv___line_896), 0, 1, 0, 0},
20642  {&__pyx_kp_u_clifford___xor___line_866, __pyx_k_clifford___xor___line_866, sizeof(__pyx_k_clifford___xor___line_866), 0, 1, 0, 0},
20643  {&__pyx_kp_u_clifford_abs_line_1175, __pyx_k_clifford_abs_line_1175, sizeof(__pyx_k_clifford_abs_line_1175), 0, 1, 0, 0},
20644  {&__pyx_kp_u_clifford_conj_line_1138, __pyx_k_clifford_conj_line_1138, sizeof(__pyx_k_clifford_conj_line_1138), 0, 1, 0, 0},
20645  {&__pyx_kp_u_clifford_copy_line_556, __pyx_k_clifford_copy_line_556, sizeof(__pyx_k_clifford_copy_line_556), 0, 1, 0, 0},
20646  {&__pyx_kp_u_clifford_even_line_1061, __pyx_k_clifford_even_line_1061, sizeof(__pyx_k_clifford_even_line_1061), 0, 1, 0, 0},
20647  {&__pyx_kp_u_clifford_frame_line_1224, __pyx_k_clifford_frame_line_1224, sizeof(__pyx_k_clifford_frame_line_1224), 0, 1, 0, 0},
20648  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
20649  {&__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},
20650  {&__pyx_kp_u_clifford_inv_line_926, __pyx_k_clifford_inv_line_926, sizeof(__pyx_k_clifford_inv_line_926), 0, 1, 0, 0},
20651  {&__pyx_kp_u_clifford_involute_line_1107, __pyx_k_clifford_involute_line_1107, sizeof(__pyx_k_clifford_involute_line_1107), 0, 1, 0, 0},
20652  {&__pyx_kp_u_clifford_isinf_line_1206, __pyx_k_clifford_isinf_line_1206, sizeof(__pyx_k_clifford_isinf_line_1206), 0, 1, 0, 0},
20653  {&__pyx_kp_u_clifford_isnan_line_1215, __pyx_k_clifford_isnan_line_1215, sizeof(__pyx_k_clifford_isnan_line_1215), 0, 1, 0, 0},
20654  {&__pyx_kp_u_clifford_max_abs_line_1184, __pyx_k_clifford_max_abs_line_1184, sizeof(__pyx_k_clifford_max_abs_line_1184), 0, 1, 0, 0},
20655  {&__pyx_kp_u_clifford_norm_line_1164, __pyx_k_clifford_norm_line_1164, sizeof(__pyx_k_clifford_norm_line_1164), 0, 1, 0, 0},
20656  {&__pyx_kp_u_clifford_odd_line_1070, __pyx_k_clifford_odd_line_1070, sizeof(__pyx_k_clifford_odd_line_1070), 0, 1, 0, 0},
20657  {&__pyx_kp_u_clifford_outer_pow_line_1004, __pyx_k_clifford_outer_pow_line_1004, sizeof(__pyx_k_clifford_outer_pow_line_1004), 0, 1, 0, 0},
20658  {&__pyx_kp_u_clifford_pow_line_980, __pyx_k_clifford_pow_line_980, sizeof(__pyx_k_clifford_pow_line_980), 0, 1, 0, 0},
20659  {&__pyx_kp_u_clifford_pure_line_1050, __pyx_k_clifford_pure_line_1050, sizeof(__pyx_k_clifford_pure_line_1050), 0, 1, 0, 0},
20660  {&__pyx_kp_u_clifford_quad_line_1153, __pyx_k_clifford_quad_line_1153, sizeof(__pyx_k_clifford_quad_line_1153), 0, 1, 0, 0},
20661  {&__pyx_kp_u_clifford_reframe_line_649, __pyx_k_clifford_reframe_line_649, sizeof(__pyx_k_clifford_reframe_line_649), 0, 1, 0, 0},
20662  {&__pyx_kp_u_clifford_reverse_line_1123, __pyx_k_clifford_reverse_line_1123, sizeof(__pyx_k_clifford_reverse_line_1123), 0, 1, 0, 0},
20663  {&__pyx_kp_u_clifford_scalar_line_1039, __pyx_k_clifford_scalar_line_1039, sizeof(__pyx_k_clifford_scalar_line_1039), 0, 1, 0, 0},
20664  {&__pyx_kp_u_clifford_truncated_line_1195, __pyx_k_clifford_truncated_line_1195, sizeof(__pyx_k_clifford_truncated_line_1195), 0, 1, 0, 0},
20665  {&__pyx_kp_u_clifford_vector_part_line_1079, __pyx_k_clifford_vector_part_line_1079, sizeof(__pyx_k_clifford_vector_part_line_1079), 0, 1, 0, 0},
20666  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
20667  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
20668  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
20669  {&__pyx_kp_u_compare_line_492, __pyx_k_compare_line_492, sizeof(__pyx_k_compare_line_492), 0, 1, 0, 0},
20670  {&__pyx_kp_u_complexifier_line_1576, __pyx_k_complexifier_line_1576, sizeof(__pyx_k_complexifier_line_1576), 0, 1, 0, 0},
20671  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
20672  {&__pyx_kp_u_conj_line_1485, __pyx_k_conj_line_1485, sizeof(__pyx_k_conj_line_1485), 0, 1, 0, 0},
20673  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
20674  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
20675  {&__pyx_kp_u_cos_line_1651, __pyx_k_cos_line_1651, sizeof(__pyx_k_cos_line_1651), 0, 1, 0, 0},
20676  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
20677  {&__pyx_kp_u_cosh_line_1689, __pyx_k_cosh_line_1689, sizeof(__pyx_k_cosh_line_1689), 0, 1, 0, 0},
20678  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
20679  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
20680  {&__pyx_kp_u_e_line_1936, __pyx_k_e_line_1936, sizeof(__pyx_k_e_line_1936), 0, 1, 0, 0},
20681  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
20682  {&__pyx_kp_u_error_squared_line_1346, __pyx_k_error_squared_line_1346, sizeof(__pyx_k_error_squared_line_1346), 0, 1, 0, 0},
20683  {&__pyx_kp_u_error_squared_tol_line_1337, __pyx_k_error_squared_tol_line_1337, sizeof(__pyx_k_error_squared_tol_line_1337), 0, 1, 0, 0},
20684  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
20685  {&__pyx_kp_u_even_line_1437, __pyx_k_even_line_1437, sizeof(__pyx_k_even_line_1437), 0, 1, 0, 0},
20686  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
20687  {&__pyx_kp_u_exp_line_1614, __pyx_k_exp_line_1614, sizeof(__pyx_k_exp_line_1614), 0, 1, 0, 0},
20688  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
20689  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
20690  {&__pyx_kp_u_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 1, 0, 0},
20691  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
20692  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
20693  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
20694  {&__pyx_kp_u_imag_line_1415, __pyx_k_imag_line_1415, sizeof(__pyx_k_imag_line_1415), 0, 1, 0, 0},
20695  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
20696  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
20697  {&__pyx_kp_u_index_set___and___line_271, __pyx_k_index_set___and___line_271, sizeof(__pyx_k_index_set___and___line_271), 0, 1, 0, 0},
20698  {&__pyx_kp_u_index_set___getitem___line_191, __pyx_k_index_set___getitem___line_191, sizeof(__pyx_k_index_set___getitem___line_191), 0, 1, 0, 0},
20699  {&__pyx_kp_u_index_set___iand___line_282, __pyx_k_index_set___iand___line_282, sizeof(__pyx_k_index_set___iand___line_282), 0, 1, 0, 0},
20700  {&__pyx_kp_u_index_set___invert___line_240, __pyx_k_index_set___invert___line_240, sizeof(__pyx_k_index_set___invert___line_240), 0, 1, 0, 0},
20701  {&__pyx_kp_u_index_set___ior___line_304, __pyx_k_index_set___ior___line_304, sizeof(__pyx_k_index_set___ior___line_304), 0, 1, 0, 0},
20702  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
20703  {&__pyx_kp_u_index_set___iter___line_229, __pyx_k_index_set___iter___line_229, sizeof(__pyx_k_index_set___iter___line_229), 0, 1, 0, 0},
20704  {&__pyx_kp_u_index_set___ixor___line_260, __pyx_k_index_set___ixor___line_260, sizeof(__pyx_k_index_set___ixor___line_260), 0, 1, 0, 0},
20705  {&__pyx_kp_u_index_set___or___line_293, __pyx_k_index_set___or___line_293, sizeof(__pyx_k_index_set___or___line_293), 0, 1, 0, 0},
20706  {&__pyx_kp_u_index_set___repr___line_384, __pyx_k_index_set___repr___line_384, sizeof(__pyx_k_index_set___repr___line_384), 0, 1, 0, 0},
20707  {&__pyx_kp_u_index_set___setitem___line_179, __pyx_k_index_set___setitem___line_179, sizeof(__pyx_k_index_set___setitem___line_179), 0, 1, 0, 0},
20708  {&__pyx_kp_u_index_set___str___line_395, __pyx_k_index_set___str___line_395, sizeof(__pyx_k_index_set___str___line_395), 0, 1, 0, 0},
20709  {&__pyx_kp_u_index_set___xor___line_249, __pyx_k_index_set___xor___line_249, sizeof(__pyx_k_index_set___xor___line_249), 0, 1, 0, 0},
20710  {&__pyx_kp_u_index_set_copy_line_65, __pyx_k_index_set_copy_line_65, sizeof(__pyx_k_index_set_copy_line_65), 0, 1, 0, 0},
20711  {&__pyx_kp_u_index_set_count_line_315, __pyx_k_index_set_count_line_315, sizeof(__pyx_k_index_set_count_line_315), 0, 1, 0, 0},
20712  {&__pyx_kp_u_index_set_count_neg_line_324, __pyx_k_index_set_count_neg_line_324, sizeof(__pyx_k_index_set_count_neg_line_324), 0, 1, 0, 0},
20713  {&__pyx_kp_u_index_set_count_pos_line_333, __pyx_k_index_set_count_pos_line_333, sizeof(__pyx_k_index_set_count_pos_line_333), 0, 1, 0, 0},
20714  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
20715  {&__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},
20716  {&__pyx_kp_u_index_set_max_line_351, __pyx_k_index_set_max_line_351, sizeof(__pyx_k_index_set_max_line_351), 0, 1, 0, 0},
20717  {&__pyx_kp_u_index_set_min_line_342, __pyx_k_index_set_min_line_342, sizeof(__pyx_k_index_set_min_line_342), 0, 1, 0, 0},
20718  {&__pyx_kp_u_index_set_sign_of_mult_line_366, __pyx_k_index_set_sign_of_mult_line_366, sizeof(__pyx_k_index_set_sign_of_mult_line_366), 0, 1, 0, 0},
20719  {&__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},
20720  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
20721  {&__pyx_kp_u_inv_line_1378, __pyx_k_inv_line_1378, sizeof(__pyx_k_inv_line_1378), 0, 1, 0, 0},
20722  {&__pyx_kp_u_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 1, 0, 0},
20723  {&__pyx_kp_u_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 1, 0, 0},
20724  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
20725  {&__pyx_kp_u_involute_line_1455, __pyx_k_involute_line_1455, sizeof(__pyx_k_involute_line_1455), 0, 1, 0, 0},
20726  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
20727  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
20728  {&__pyx_kp_u_istpq_line_1949, __pyx_k_istpq_line_1949, sizeof(__pyx_k_istpq_line_1949), 0, 1, 0, 0},
20729  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
20730  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
20731  {&__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},
20732  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
20733  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
20734  {&__pyx_kp_u_log_line_1628, __pyx_k_log_line_1628, sizeof(__pyx_k_log_line_1628), 0, 1, 0, 0},
20735  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
20736  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
20737  {&__pyx_n_u_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 1, 0, 1},
20738  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
20739  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
20740  {&__pyx_kp_u_max_abs_line_1531, __pyx_k_max_abs_line_1531, sizeof(__pyx_k_max_abs_line_1531), 0, 1, 0, 0},
20741  {&__pyx_kp_u_max_pos_line_513, __pyx_k_max_pos_line_513, sizeof(__pyx_k_max_pos_line_513), 0, 1, 0, 0},
20742  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
20743  {&__pyx_kp_u_min_neg_line_504, __pyx_k_min_neg_line_504, sizeof(__pyx_k_min_neg_line_504), 0, 1, 0, 0},
20744  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
20745  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
20746  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
20747  {&__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},
20748  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
20749  {&__pyx_kp_u_norm_line_1511, __pyx_k_norm_line_1511, sizeof(__pyx_k_norm_line_1511), 0, 1, 0, 0},
20750  {&__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},
20751  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
20752  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
20753  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
20754  {&__pyx_kp_u_odd_line_1446, __pyx_k_odd_line_1446, sizeof(__pyx_k_odd_line_1446), 0, 1, 0, 0},
20755  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
20756  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
20757  {&__pyx_kp_u_outer_pow_line_1567, __pyx_k_outer_pow_line_1567, sizeof(__pyx_k_outer_pow_line_1567), 0, 1, 0, 0},
20758  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
20759  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
20760  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
20761  {&__pyx_kp_u_pow_line_1543, __pyx_k_pow_line_1543, sizeof(__pyx_k_pow_line_1543), 0, 1, 0, 0},
20762  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
20763  {&__pyx_kp_u_pure_line_1426, __pyx_k_pure_line_1426, sizeof(__pyx_k_pure_line_1426), 0, 1, 0, 0},
20764  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
20765  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
20766  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
20767  {&__pyx_kp_u_quad_line_1500, __pyx_k_quad_line_1500, sizeof(__pyx_k_quad_line_1500), 0, 1, 0, 0},
20768  {&__pyx_kp_u_random_clifford_line_1864, __pyx_k_random_clifford_line_1864, sizeof(__pyx_k_random_clifford_line_1864), 0, 1, 0, 0},
20769  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
20770  {&__pyx_kp_u_real_line_1404, __pyx_k_real_line_1404, sizeof(__pyx_k_real_line_1404), 0, 1, 0, 0},
20771  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
20772  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
20773  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
20774  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
20775  {&__pyx_kp_u_reverse_line_1470, __pyx_k_reverse_line_1470, sizeof(__pyx_k_reverse_line_1470), 0, 1, 0, 0},
20776  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
20777  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
20778  {&__pyx_n_s_scalar_epsilon, __pyx_k_scalar_epsilon, sizeof(__pyx_k_scalar_epsilon), 0, 0, 1, 1},
20779  {&__pyx_kp_u_scalar_line_1393, __pyx_k_scalar_line_1393, sizeof(__pyx_k_scalar_line_1393), 0, 1, 0, 0},
20780  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
20781  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
20782  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
20783  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
20784  {&__pyx_kp_u_sin_line_1728, __pyx_k_sin_line_1728, sizeof(__pyx_k_sin_line_1728), 0, 1, 0, 0},
20785  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
20786  {&__pyx_kp_u_sinh_line_1768, __pyx_k_sinh_line_1768, sizeof(__pyx_k_sinh_line_1768), 0, 1, 0, 0},
20787  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
20788  {&__pyx_kp_u_sqrt_line_1591, __pyx_k_sqrt_line_1591, sizeof(__pyx_k_sqrt_line_1591), 0, 1, 0, 0},
20789  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
20790  {&__pyx_kp_u_tan_line_1801, __pyx_k_tan_line_1801, sizeof(__pyx_k_tan_line_1801), 0, 1, 0, 0},
20791  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
20792  {&__pyx_kp_u_tanh_line_1835, __pyx_k_tanh_line_1835, sizeof(__pyx_k_tanh_line_1835), 0, 1, 0, 0},
20793  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
20794  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
20795  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
20796  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
20797  {&__pyx_n_s_threshold, __pyx_k_threshold, sizeof(__pyx_k_threshold), 0, 0, 1, 1},
20798  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
20799  {&__pyx_kp_u_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 1, 0, 0},
20800  {&__pyx_n_s_tol, __pyx_k_tol, sizeof(__pyx_k_tol), 0, 0, 1, 1},
20801  {&__pyx_kp_u_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 1, 0, 0},
20802  {&__pyx_kp_u_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 1, 0, 0},
20803  {&__pyx_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
20804  {&__pyx_kp_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 0},
20805  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
20806  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
20807  {0, 0, 0, 0, 0, 0, 0}
20808 };
20809 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
20810  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 103, __pyx_L1_error)
20811  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 105, __pyx_L1_error)
20812  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 105, __pyx_L1_error)
20813  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 106, __pyx_L1_error)
20814  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 159, __pyx_L1_error)
20815  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 236, __pyx_L1_error)
20816  #if PY_MAJOR_VERSION >= 3
20817  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
20818  #else
20819  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1099, __pyx_L1_error)
20820  #endif
20821  return 0;
20822  __pyx_L1_error:;
20823  return -1;
20824 }
20825 
20826 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
20827  __Pyx_RefNannyDeclarations
20828  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
20829 
20830  /* "(tree fragment)":2
20831  * def __reduce_cython__(self):
20832  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20833  * def __setstate_cython__(self, __pyx_state):
20834  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20835  */
20836  __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)
20837  __Pyx_GOTREF(__pyx_tuple__3);
20838  __Pyx_GIVEREF(__pyx_tuple__3);
20839 
20840  /* "(tree fragment)":4
20841  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20842  * def __setstate_cython__(self, __pyx_state):
20843  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20844  */
20845  __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)
20846  __Pyx_GOTREF(__pyx_tuple__4);
20847  __Pyx_GIVEREF(__pyx_tuple__4);
20848 
20849  /* "PyClical.pyx":636
20850  * TypeError: Not applicable.
20851  * """
20852  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
20853  *
20854  * def __iter__(self):
20855  */
20856  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 636, __pyx_L1_error)
20857  __Pyx_GOTREF(__pyx_tuple__10);
20858  __Pyx_GIVEREF(__pyx_tuple__10);
20859 
20860  /* "(tree fragment)":2
20861  * def __reduce_cython__(self):
20862  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20863  * def __setstate_cython__(self, __pyx_state):
20864  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20865  */
20866  __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)
20867  __Pyx_GOTREF(__pyx_tuple__11);
20868  __Pyx_GIVEREF(__pyx_tuple__11);
20869 
20870  /* "(tree fragment)":4
20871  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
20872  * def __setstate_cython__(self, __pyx_state):
20873  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
20874  */
20875  __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)
20876  __Pyx_GOTREF(__pyx_tuple__12);
20877  __Pyx_GIVEREF(__pyx_tuple__12);
20878 
20879  /* "PyClical.pyx":406
20880  * return index_set_to_str( self.unwrap() ).decode()
20881  *
20882  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20883  * """
20884  * Tests for functions that Doctest cannot see.
20885  */
20886  __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, 406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 406, __pyx_L1_error)
20887 
20888  /* "PyClical.pyx":1253
20889  * return clifford_to_str( self.unwrap() ).decode()
20890  *
20891  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20892  * """
20893  * Tests for functions that Doctest cannot see.
20894  */
20895  __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, 1253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 1253, __pyx_L1_error)
20896 
20897  /* "PyClical.pyx":1907
20898  * scalar_epsilon = epsilon
20899  *
20900  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
20901  * tau = atan(clifford(1.0)) * 8.0
20902  *
20903  */
20904  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1907, __pyx_L1_error)
20905  __Pyx_GOTREF(__pyx_tuple__15);
20906  __Pyx_GIVEREF(__pyx_tuple__15);
20907 
20908  /* "PyClical.pyx":1936
20909  * """
20910  *
20911  * def e(obj): # <<<<<<<<<<<<<<
20912  * """
20913  * Abbreviation for clifford(index_set(obj)).
20914  */
20915  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1936, __pyx_L1_error)
20916  __Pyx_GOTREF(__pyx_tuple__16);
20917  __Pyx_GIVEREF(__pyx_tuple__16);
20918  __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, 1936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 1936, __pyx_L1_error)
20919 
20920  /* "PyClical.pyx":1949
20921  * return clifford(index_set(obj))
20922  *
20923  * def istpq(p, q): # <<<<<<<<<<<<<<
20924  * """
20925  * Abbreviation for index_set({-q,...p}).
20926  */
20927  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1949, __pyx_L1_error)
20928  __Pyx_GOTREF(__pyx_tuple__18);
20929  __Pyx_GIVEREF(__pyx_tuple__18);
20930  __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, 1949, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 1949, __pyx_L1_error)
20931 
20932  /* "PyClical.pyx":1958
20933  * return index_set(set(range(-q,p+1)))
20934  *
20935  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20936  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20937  *
20938  */
20939  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1958, __pyx_L1_error)
20940  __Pyx_GOTREF(__pyx_tuple__20);
20941  __Pyx_GIVEREF(__pyx_tuple__20);
20942  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1958, __pyx_L1_error)
20943  __Pyx_GOTREF(__pyx_tuple__21);
20944  __Pyx_GIVEREF(__pyx_tuple__21);
20945 
20946  /* "PyClical.pyx":1962
20947  *
20948  * # Doctest interface.
20949  * def _test(): # <<<<<<<<<<<<<<
20950  * import PyClical, doctest
20951  * return doctest.testmod(PyClical)
20952  */
20953  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1962, __pyx_L1_error)
20954  __Pyx_GOTREF(__pyx_tuple__22);
20955  __Pyx_GIVEREF(__pyx_tuple__22);
20956  __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, 1962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 1962, __pyx_L1_error)
20957  __Pyx_RefNannyFinishContext();
20958  return 0;
20959  __pyx_L1_error:;
20960  __Pyx_RefNannyFinishContext();
20961  return -1;
20962 }
20963 
20964 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
20965  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20966  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20967  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20968  __pyx_float_4_0 = PyFloat_FromDouble(4.0); if (unlikely(!__pyx_float_4_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20969  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20970  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
20971  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20972  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
20973  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20974  return 0;
20975  __pyx_L1_error:;
20976  return -1;
20977 }
20978 
20979 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
20980 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
20981 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
20982 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
20983 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
20984 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
20985 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
20986 
20987 static int __Pyx_modinit_global_init_code(void) {
20988  __Pyx_RefNannyDeclarations
20989  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
20990  /*--- Global init code ---*/
20991  __Pyx_RefNannyFinishContext();
20992  return 0;
20993 }
20994 
20995 static int __Pyx_modinit_variable_export_code(void) {
20996  __Pyx_RefNannyDeclarations
20997  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
20998  /*--- Variable export code ---*/
20999  __Pyx_RefNannyFinishContext();
21000  return 0;
21001 }
21002 
21003 static int __Pyx_modinit_function_export_code(void) {
21004  __Pyx_RefNannyDeclarations
21005  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
21006  /*--- Function export code ---*/
21007  __Pyx_RefNannyFinishContext();
21008  return 0;
21009 }
21010 
21011 static int __Pyx_modinit_type_init_code(void) {
21012  __Pyx_RefNannyDeclarations
21013  int __pyx_lineno = 0;
21014  const char *__pyx_filename = NULL;
21015  int __pyx_clineno = 0;
21016  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
21017  /*--- Type init code ---*/
21018  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
21019  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
21020  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
21021  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
21022  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
21023  #if PY_VERSION_HEX < 0x030800B1
21024  __pyx_type_8PyClical_index_set.tp_print = 0;
21025  #endif
21026  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)) {
21027  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
21028  }
21029  #if CYTHON_COMPILING_IN_CPYTHON
21030  {
21031  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21032  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21033  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21034  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
21035  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
21036  }
21037  }
21038  #endif
21039  #if CYTHON_COMPILING_IN_CPYTHON
21040  {
21041  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21042  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21043  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21044  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
21045  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
21046  }
21047  }
21048  #endif
21049  #if CYTHON_COMPILING_IN_CPYTHON
21050  {
21051  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21052  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21053  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21054  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
21055  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
21056  }
21057  }
21058  #endif
21059  #if CYTHON_COMPILING_IN_CPYTHON
21060  {
21061  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21062  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21063  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21064  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
21065  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
21066  }
21067  }
21068  #endif
21069  #if CYTHON_COMPILING_IN_CPYTHON
21070  {
21071  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21072  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21073  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21074  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
21075  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
21076  }
21077  }
21078  #endif
21079  #if CYTHON_COMPILING_IN_CPYTHON
21080  {
21081  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21082  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21083  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21084  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
21085  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
21086  }
21087  }
21088  #endif
21089  #if CYTHON_COMPILING_IN_CPYTHON
21090  {
21091  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21092  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21093  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21094  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
21095  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
21096  }
21097  }
21098  #endif
21099  #if CYTHON_COMPILING_IN_CPYTHON
21100  {
21101  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21102  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21103  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21104  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
21105  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
21106  }
21107  }
21108  #endif
21109  #if CYTHON_COMPILING_IN_CPYTHON
21110  {
21111  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21112  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21113  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21114  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
21115  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
21116  }
21117  }
21118  #endif
21119  #if CYTHON_COMPILING_IN_CPYTHON
21120  {
21121  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21122  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21123  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21124  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
21125  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
21126  }
21127  }
21128  #endif
21129  #if CYTHON_COMPILING_IN_CPYTHON
21130  {
21131  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21132  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21133  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21134  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
21135  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
21136  }
21137  }
21138  #endif
21139  #if CYTHON_COMPILING_IN_CPYTHON
21140  {
21141  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21142  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21143  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21144  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
21145  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
21146  }
21147  }
21148  #endif
21149  #if CYTHON_COMPILING_IN_CPYTHON
21150  {
21151  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 46, __pyx_L1_error)
21152  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21153  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21154  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
21155  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
21156  }
21157  }
21158  #endif
21159  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
21160  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
21161  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
21162  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
21163  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
21164  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
21165  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
21166  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
21167  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
21168  #if PY_VERSION_HEX < 0x030800B1
21169  __pyx_type_8PyClical_clifford.tp_print = 0;
21170  #endif
21171  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
21172  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
21173  }
21174  #if CYTHON_COMPILING_IN_CPYTHON
21175  {
21176  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21177  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21178  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21179  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
21180  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
21181  }
21182  }
21183  #endif
21184  #if CYTHON_COMPILING_IN_CPYTHON
21185  {
21186  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21187  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21188  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21189  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
21190  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
21191  }
21192  }
21193  #endif
21194  #if CYTHON_COMPILING_IN_CPYTHON
21195  {
21196  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21197  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21198  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21199  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
21200  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
21201  }
21202  }
21203  #endif
21204  #if CYTHON_COMPILING_IN_CPYTHON
21205  {
21206  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21207  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21208  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21209  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
21210  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
21211  }
21212  }
21213  #endif
21214  #if CYTHON_COMPILING_IN_CPYTHON
21215  {
21216  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21217  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21218  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21219  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
21220  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
21221  }
21222  }
21223  #endif
21224  #if CYTHON_COMPILING_IN_CPYTHON
21225  {
21226  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21227  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21228  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21229  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
21230  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
21231  }
21232  }
21233  #endif
21234  #if CYTHON_COMPILING_IN_CPYTHON
21235  {
21236  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21237  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21238  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21239  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
21240  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
21241  }
21242  }
21243  #endif
21244  #if CYTHON_COMPILING_IN_CPYTHON
21245  {
21246  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21247  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21248  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21249  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
21250  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
21251  }
21252  }
21253  #endif
21254  #if CYTHON_COMPILING_IN_CPYTHON
21255  {
21256  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21257  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21258  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21259  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
21260  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
21261  }
21262  }
21263  #endif
21264  #if CYTHON_COMPILING_IN_CPYTHON
21265  {
21266  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21267  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21268  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21269  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
21270  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
21271  }
21272  }
21273  #endif
21274  #if CYTHON_COMPILING_IN_CPYTHON
21275  {
21276  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21277  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21278  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21279  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
21280  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
21281  }
21282  }
21283  #endif
21284  #if CYTHON_COMPILING_IN_CPYTHON
21285  {
21286  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21287  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21288  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21289  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
21290  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
21291  }
21292  }
21293  #endif
21294  #if CYTHON_COMPILING_IN_CPYTHON
21295  {
21296  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21297  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21298  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21299  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
21300  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
21301  }
21302  }
21303  #endif
21304  #if CYTHON_COMPILING_IN_CPYTHON
21305  {
21306  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21307  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21308  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21309  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
21310  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
21311  }
21312  }
21313  #endif
21314  #if CYTHON_COMPILING_IN_CPYTHON
21315  {
21316  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21317  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21318  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21319  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
21320  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
21321  }
21322  }
21323  #endif
21324  #if CYTHON_COMPILING_IN_CPYTHON
21325  {
21326  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21327  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21328  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21329  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
21330  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
21331  }
21332  }
21333  #endif
21334  #if CYTHON_COMPILING_IN_CPYTHON
21335  {
21336  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21337  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21338  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21339  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
21340  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
21341  }
21342  }
21343  #endif
21344  #if CYTHON_COMPILING_IN_CPYTHON
21345  {
21346  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__truediv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21347  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21348  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21349  __pyx_wrapperbase_8PyClical_8clifford_44__truediv__.doc = __pyx_doc_8PyClical_8clifford_44__truediv__;
21350  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__truediv__;
21351  }
21352  }
21353  #endif
21354  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
21355  #if CYTHON_COMPILING_IN_CPYTHON
21356  {
21357  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21358  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21359  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21360  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
21361  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
21362  }
21363  }
21364  #endif
21365  #endif
21366  #if CYTHON_COMPILING_IN_CPYTHON
21367  {
21368  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21369  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21370  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21371  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
21372  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
21373  }
21374  }
21375  #endif
21376  #if CYTHON_COMPILING_IN_CPYTHON
21377  {
21378  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21379  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21380  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21381  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
21382  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
21383  }
21384  }
21385  #endif
21386  #if CYTHON_COMPILING_IN_CPYTHON
21387  {
21388  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21389  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21390  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21391  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
21392  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
21393  }
21394  }
21395  #endif
21396  #if CYTHON_COMPILING_IN_CPYTHON
21397  {
21398  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21399  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21400  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21401  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
21402  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
21403  }
21404  }
21405  #endif
21406  #if CYTHON_COMPILING_IN_CPYTHON
21407  {
21408  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21409  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21410  __pyx_wrapperbase_8PyClical_8clifford_94__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21411  __pyx_wrapperbase_8PyClical_8clifford_94__repr__.doc = __pyx_doc_8PyClical_8clifford_94__repr__;
21412  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__repr__;
21413  }
21414  }
21415  #endif
21416  #if CYTHON_COMPILING_IN_CPYTHON
21417  {
21418  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 537, __pyx_L1_error)
21419  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
21420  __pyx_wrapperbase_8PyClical_8clifford_96__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
21421  __pyx_wrapperbase_8PyClical_8clifford_96__str__.doc = __pyx_doc_8PyClical_8clifford_96__str__;
21422  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_96__str__;
21423  }
21424  }
21425  #endif
21426  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
21427  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
21428  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
21429  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
21430  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 229, __pyx_L1_error)
21431  #if PY_VERSION_HEX < 0x030800B1
21432  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
21433  #endif
21434  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)) {
21435  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
21436  }
21437  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
21438  __Pyx_RefNannyFinishContext();
21439  return 0;
21440  __pyx_L1_error:;
21441  __Pyx_RefNannyFinishContext();
21442  return -1;
21443 }
21444 
21445 static int __Pyx_modinit_type_import_code(void) {
21446  __Pyx_RefNannyDeclarations
21447  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
21448  /*--- Type import code ---*/
21449  __Pyx_RefNannyFinishContext();
21450  return 0;
21451 }
21452 
21453 static int __Pyx_modinit_variable_import_code(void) {
21454  __Pyx_RefNannyDeclarations
21455  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
21456  /*--- Variable import code ---*/
21457  __Pyx_RefNannyFinishContext();
21458  return 0;
21459 }
21460 
21461 static int __Pyx_modinit_function_import_code(void) {
21462  __Pyx_RefNannyDeclarations
21463  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
21464  /*--- Function import code ---*/
21465  __Pyx_RefNannyFinishContext();
21466  return 0;
21467 }
21468 
21469 
21470 #ifndef CYTHON_NO_PYINIT_EXPORT
21471 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
21472 #elif PY_MAJOR_VERSION < 3
21473 #ifdef __cplusplus
21474 #define __Pyx_PyMODINIT_FUNC extern "C" void
21475 #else
21476 #define __Pyx_PyMODINIT_FUNC void
21477 #endif
21478 #else
21479 #ifdef __cplusplus
21480 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
21481 #else
21482 #define __Pyx_PyMODINIT_FUNC PyObject *
21483 #endif
21484 #endif
21485 
21486 
21487 #if PY_MAJOR_VERSION < 3
21488 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
21489 __Pyx_PyMODINIT_FUNC initPyClical(void)
21490 #else
21491 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
21492 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
21493 #if CYTHON_PEP489_MULTI_PHASE_INIT
21494 {
21495  return PyModuleDef_Init(&__pyx_moduledef);
21496 }
21497 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
21498  #if PY_VERSION_HEX >= 0x030700A1
21499  static PY_INT64_T main_interpreter_id = -1;
21500  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
21501  if (main_interpreter_id == -1) {
21502  main_interpreter_id = current_id;
21503  return (unlikely(current_id == -1)) ? -1 : 0;
21504  } else if (unlikely(main_interpreter_id != current_id))
21505  #else
21506  static PyInterpreterState *main_interpreter = NULL;
21507  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
21508  if (!main_interpreter) {
21509  main_interpreter = current_interpreter;
21510  } else if (unlikely(main_interpreter != current_interpreter))
21511  #endif
21512  {
21513  PyErr_SetString(
21514  PyExc_ImportError,
21515  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
21516  return -1;
21517  }
21518  return 0;
21519 }
21520 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) {
21521  PyObject *value = PyObject_GetAttrString(spec, from_name);
21522  int result = 0;
21523  if (likely(value)) {
21524  if (allow_none || value != Py_None) {
21525  result = PyDict_SetItemString(moddict, to_name, value);
21526  }
21527  Py_DECREF(value);
21528  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
21529  PyErr_Clear();
21530  } else {
21531  result = -1;
21532  }
21533  return result;
21534 }
21535 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
21536  PyObject *module = NULL, *moddict, *modname;
21537  if (__Pyx_check_single_interpreter())
21538  return NULL;
21539  if (__pyx_m)
21540  return __Pyx_NewRef(__pyx_m);
21541  modname = PyObject_GetAttrString(spec, "name");
21542  if (unlikely(!modname)) goto bad;
21543  module = PyModule_NewObject(modname);
21544  Py_DECREF(modname);
21545  if (unlikely(!module)) goto bad;
21546  moddict = PyModule_GetDict(module);
21547  if (unlikely(!moddict)) goto bad;
21548  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
21549  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
21550  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
21551  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
21552  return module;
21553 bad:
21554  Py_XDECREF(module);
21555  return NULL;
21556 }
21557 
21558 
21559 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
21560 #endif
21561 #endif
21562 {
21563  PyObject *__pyx_t_1 = NULL;
21564  PyObject *__pyx_t_2 = NULL;
21565  PyObject *__pyx_t_3 = NULL;
21566  int __pyx_t_4;
21567  int __pyx_lineno = 0;
21568  const char *__pyx_filename = NULL;
21569  int __pyx_clineno = 0;
21570  __Pyx_RefNannyDeclarations
21571  #if CYTHON_PEP489_MULTI_PHASE_INIT
21572  if (__pyx_m) {
21573  if (__pyx_m == __pyx_pyinit_module) return 0;
21574  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
21575  return -1;
21576  }
21577  #elif PY_MAJOR_VERSION >= 3
21578  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
21579  #endif
21580  #if CYTHON_REFNANNY
21581 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
21582 if (!__Pyx_RefNanny) {
21583  PyErr_Clear();
21584  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
21585  if (!__Pyx_RefNanny)
21586  Py_FatalError("failed to import 'refnanny' module");
21587 }
21588 #endif
21589  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
21590  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21591  #ifdef __Pxy_PyFrame_Initialize_Offsets
21592  __Pxy_PyFrame_Initialize_Offsets();
21593  #endif
21594  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
21595  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
21596  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
21597  #ifdef __Pyx_CyFunction_USED
21598  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21599  #endif
21600  #ifdef __Pyx_FusedFunction_USED
21601  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21602  #endif
21603  #ifdef __Pyx_Coroutine_USED
21604  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21605  #endif
21606  #ifdef __Pyx_Generator_USED
21607  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21608  #endif
21609  #ifdef __Pyx_AsyncGen_USED
21610  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21611  #endif
21612  #ifdef __Pyx_StopAsyncIteration_USED
21613  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21614  #endif
21615  /*--- Library function declarations ---*/
21616  /*--- Threads initialization code ---*/
21617  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
21618  PyEval_InitThreads();
21619  #endif
21620  /*--- Module creation code ---*/
21621  #if CYTHON_PEP489_MULTI_PHASE_INIT
21622  __pyx_m = __pyx_pyinit_module;
21623  Py_INCREF(__pyx_m);
21624  #else
21625  #if PY_MAJOR_VERSION < 3
21626  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
21627  #else
21628  __pyx_m = PyModule_Create(&__pyx_moduledef);
21629  #endif
21630  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
21631  #endif
21632  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
21633  Py_INCREF(__pyx_d);
21634  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
21635  Py_INCREF(__pyx_b);
21636  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
21637  Py_INCREF(__pyx_cython_runtime);
21638  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
21639  /*--- Initialize various global constants etc. ---*/
21640  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21641  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
21642  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21643  #endif
21644  if (__pyx_module_is_main_PyClical) {
21645  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21646  }
21647  #if PY_MAJOR_VERSION >= 3
21648  {
21649  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
21650  if (!PyDict_GetItemString(modules, "PyClical")) {
21651  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
21652  }
21653  }
21654  #endif
21655  /*--- Builtin init code ---*/
21656  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21657  /*--- Constants init code ---*/
21658  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21659  /*--- Global type/function init code ---*/
21660  (void)__Pyx_modinit_global_init_code();
21661  (void)__Pyx_modinit_variable_export_code();
21662  (void)__Pyx_modinit_function_export_code();
21663  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
21664  (void)__Pyx_modinit_type_import_code();
21665  (void)__Pyx_modinit_variable_import_code();
21666  (void)__Pyx_modinit_function_import_code();
21667  /*--- Execution code ---*/
21668  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
21669  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21670  #endif
21671 
21672  /* "PyClical.pyx":29
21673  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
21674  *
21675  * import math # <<<<<<<<<<<<<<
21676  * import numbers
21677  * import collections
21678  */
21679  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
21680  __Pyx_GOTREF(__pyx_t_1);
21681  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
21682  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21683 
21684  /* "PyClical.pyx":30
21685  *
21686  * import math
21687  * import numbers # <<<<<<<<<<<<<<
21688  * import collections
21689  *
21690  */
21691  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
21692  __Pyx_GOTREF(__pyx_t_1);
21693  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
21694  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21695 
21696  /* "PyClical.pyx":31
21697  * import math
21698  * import numbers
21699  * import collections # <<<<<<<<<<<<<<
21700  *
21701  * from PyClical cimport *
21702  */
21703  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
21704  __Pyx_GOTREF(__pyx_t_1);
21705  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
21706  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21707 
21708  /* "PyClical.pyx":35
21709  * from PyClical cimport *
21710  *
21711  * __version__ = str(glucat_package_version,'utf-8') # <<<<<<<<<<<<<<
21712  *
21713  * # Forward reference
21714  */
21715  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(glucat_package_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
21716  __Pyx_GOTREF(__pyx_t_1);
21717  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
21718  __Pyx_GOTREF(__pyx_t_2);
21719  __Pyx_GIVEREF(__pyx_t_1);
21720  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
21721  __Pyx_INCREF(__pyx_kp_u_utf_8);
21722  __Pyx_GIVEREF(__pyx_kp_u_utf_8);
21723  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_u_utf_8);
21724  __pyx_t_1 = 0;
21725  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyUnicode_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
21726  __Pyx_GOTREF(__pyx_t_1);
21727  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21728  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
21729  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21730 
21731  /* "PyClical.pyx":406
21732  * return index_set_to_str( self.unwrap() ).decode()
21733  *
21734  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
21735  * """
21736  * Tests for functions that Doctest cannot see.
21737  */
21738  __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, 406, __pyx_L1_error)
21739  __Pyx_GOTREF(__pyx_t_1);
21740  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 406, __pyx_L1_error)
21741  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21742 
21743  /* "PyClical.pyx":1253
21744  * return clifford_to_str( self.unwrap() ).decode()
21745  *
21746  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
21747  * """
21748  * Tests for functions that Doctest cannot see.
21749  */
21750  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_9clifford_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1253, __pyx_L1_error)
21751  __Pyx_GOTREF(__pyx_t_1);
21752  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1253, __pyx_L1_error)
21753  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21754 
21755  /* "PyClical.pyx":1905
21756  *
21757  * # Some abbreviations.
21758  * scalar_epsilon = epsilon # <<<<<<<<<<<<<<
21759  *
21760  * pi = atan(clifford(1.0)) * 4.0
21761  */
21762  __pyx_t_1 = PyFloat_FromDouble(epsilon); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error)
21763  __Pyx_GOTREF(__pyx_t_1);
21764  if (PyDict_SetItem(__pyx_d, __pyx_n_s_scalar_epsilon, __pyx_t_1) < 0) __PYX_ERR(0, 1905, __pyx_L1_error)
21765  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21766 
21767  /* "PyClical.pyx":1907
21768  * scalar_epsilon = epsilon
21769  *
21770  * pi = atan(clifford(1.0)) * 4.0 # <<<<<<<<<<<<<<
21771  * tau = atan(clifford(1.0)) * 8.0
21772  *
21773  */
21774  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
21775  __Pyx_GOTREF(__pyx_t_1);
21776  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
21777  __Pyx_GOTREF(__pyx_t_2);
21778  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21779  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_4_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
21780  __Pyx_GOTREF(__pyx_t_1);
21781  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21782  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_1) < 0) __PYX_ERR(0, 1907, __pyx_L1_error)
21783  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21784 
21785  /* "PyClical.pyx":1908
21786  *
21787  * pi = atan(clifford(1.0)) * 4.0
21788  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
21789  *
21790  * cl = clifford
21791  */
21792  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21793  __Pyx_GOTREF(__pyx_t_1);
21794  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1908, __pyx_L1_error)
21795  __Pyx_GOTREF(__pyx_t_2);
21796  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21797  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L1_error)
21798  __Pyx_GOTREF(__pyx_t_1);
21799  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21800  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1908, __pyx_L1_error)
21801  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21802 
21803  /* "PyClical.pyx":1910
21804  * tau = atan(clifford(1.0)) * 8.0
21805  *
21806  * cl = clifford # <<<<<<<<<<<<<<
21807  * """
21808  * Abbreviation for clifford.
21809  */
21810  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
21811 
21812  /* "PyClical.pyx":1928
21813  * """
21814  *
21815  * ist = index_set # <<<<<<<<<<<<<<
21816  * """
21817  * Abbreviation for index_set.
21818  */
21819  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1928, __pyx_L1_error)
21820 
21821  /* "PyClical.pyx":1936
21822  * """
21823  *
21824  * def e(obj): # <<<<<<<<<<<<<<
21825  * """
21826  * Abbreviation for clifford(index_set(obj)).
21827  */
21828  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_89e, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __pyx_L1_error)
21829  __Pyx_GOTREF(__pyx_t_1);
21830  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_1) < 0) __PYX_ERR(0, 1936, __pyx_L1_error)
21831  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21832 
21833  /* "PyClical.pyx":1949
21834  * return clifford(index_set(obj))
21835  *
21836  * def istpq(p, q): # <<<<<<<<<<<<<<
21837  * """
21838  * Abbreviation for index_set({-q,...p}).
21839  */
21840  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_91istpq, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1949, __pyx_L1_error)
21841  __Pyx_GOTREF(__pyx_t_1);
21842  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_1) < 0) __PYX_ERR(0, 1949, __pyx_L1_error)
21843  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21844 
21845  /* "PyClical.pyx":1958
21846  * return index_set(set(range(-q,p+1)))
21847  *
21848  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
21849  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
21850  *
21851  */
21852  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
21853  __Pyx_GOTREF(__pyx_t_1);
21854  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
21855  __Pyx_GOTREF(__pyx_t_2);
21856  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21857  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
21858  __Pyx_GOTREF(__pyx_t_1);
21859  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
21860  __Pyx_GOTREF(__pyx_t_3);
21861  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21862  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
21863  __Pyx_GOTREF(__pyx_t_1);
21864  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21865  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21866  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_1) < 0) __PYX_ERR(0, 1958, __pyx_L1_error)
21867  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21868 
21869  /* "PyClical.pyx":1959
21870  *
21871  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
21872  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
21873  *
21874  * # Doctest interface.
21875  */
21876  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1959, __pyx_L1_error)
21877  __Pyx_GOTREF(__pyx_t_1);
21878  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
21879  __Pyx_GOTREF(__pyx_t_3);
21880  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21881  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1959, __pyx_L1_error)
21882  __Pyx_GOTREF(__pyx_t_1);
21883  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1959, __pyx_L1_error)
21884  __Pyx_GOTREF(__pyx_t_2);
21885  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21886  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1959, __pyx_L1_error)
21887  __Pyx_GOTREF(__pyx_t_1);
21888  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21889  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21890  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_1) < 0) __PYX_ERR(0, 1959, __pyx_L1_error)
21891  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21892 
21893  /* "PyClical.pyx":1962
21894  *
21895  * # Doctest interface.
21896  * def _test(): # <<<<<<<<<<<<<<
21897  * import PyClical, doctest
21898  * return doctest.testmod(PyClical)
21899  */
21900  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_93_test, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1962, __pyx_L1_error)
21901  __Pyx_GOTREF(__pyx_t_1);
21902  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1962, __pyx_L1_error)
21903  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21904 
21905  /* "PyClical.pyx":1966
21906  * return doctest.testmod(PyClical)
21907  *
21908  * if __name__ == "__main__": # <<<<<<<<<<<<<<
21909  * _test()
21910  */
21911  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1966, __pyx_L1_error)
21912  __Pyx_GOTREF(__pyx_t_1);
21913  __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_main, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1966, __pyx_L1_error)
21914  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21915  if (__pyx_t_4) {
21916 
21917  /* "PyClical.pyx":1967
21918  *
21919  * if __name__ == "__main__":
21920  * _test() # <<<<<<<<<<<<<<
21921  */
21922  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1967, __pyx_L1_error)
21923  __Pyx_GOTREF(__pyx_t_1);
21924  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
21925  __Pyx_GOTREF(__pyx_t_2);
21926  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21927  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21928 
21929  /* "PyClical.pyx":1966
21930  * return doctest.testmod(PyClical)
21931  *
21932  * if __name__ == "__main__": # <<<<<<<<<<<<<<
21933  * _test()
21934  */
21935  }
21936 
21937  /* "PyClical.pyx":1
21938  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
21939  * # cython: language_level=3
21940  * # distutils: language = c++
21941  */
21942  __pyx_t_2 = __Pyx_PyDict_NewPresized(111); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
21943  __Pyx_GOTREF(__pyx_t_2);
21944  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_copy_line_65, __pyx_kp_u_Copy_this_index_set_object_s_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21945  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___setitem___line_179, __pyx_kp_u_Set_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21946  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___getitem___line_191, __pyx_kp_u_Get_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21947  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iter___line_229, __pyx_kp_u_Iterate_over_the_indices_of_an) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21948  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___invert___line_240, __pyx_kp_u_Set_complement_not_print_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21949  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___xor___line_249, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21950  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ixor___line_260, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21951  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___and___line_271, __pyx_kp_u_Set_intersection_and_print_inde) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21952  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iand___line_282, __pyx_kp_u_Set_intersection_and_x_index_se) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21953  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___or___line_293, __pyx_kp_u_Set_union_or_print_index_set_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21954  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ior___line_304, __pyx_kp_u_Set_union_or_x_index_set_1_x_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21955  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_line_315, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21956  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_neg_line_324, __pyx_kp_u_Number_of_negative_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21957  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_pos_line_333, __pyx_kp_u_Number_of_positive_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21958  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_min_line_342, __pyx_kp_u_Minimum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21959  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_max_line_351, __pyx_kp_u_Maximum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21960  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_mult_line_366, __pyx_kp_u_Sign_of_geometric_product_of_tw) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21961  if (PyDict_SetItem(__pyx_t_2, __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)
21962  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___repr___line_384, __pyx_kp_u_The_official_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21963  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___str___line_395, __pyx_kp_u_The_informal_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21964  if (PyDict_SetItem(__pyx_t_2, __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)
21965  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_compare_line_492, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21966  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_min_neg_line_504, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21967  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_pos_line_513, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21968  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_copy_line_556, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21969  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iter___line_638, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21970  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reframe_line_649, __pyx_kp_u_Put_self_into_a_larger_frame_co) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21971  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___getitem___line_707, __pyx_kp_u_Subscripting_map_from_index_set) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21972  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___neg___line_722, __pyx_kp_u_Unary_print_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21973  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pos___line_731, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21974  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___add___line_740, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21975  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iadd___line_751, __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21976  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___sub___line_760, __pyx_kp_u_Geometric_difference_print_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21977  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___isub___line_771, __pyx_kp_u_Geometric_difference_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21978  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mul___line_780, __pyx_kp_u_Geometric_product_print_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21979  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imul___line_793, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21980  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mod___line_806, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21981  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imod___line_821, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21982  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___and___line_836, __pyx_kp_u_Inner_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21983  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iand___line_851, __pyx_kp_u_Inner_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21984  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___xor___line_866, __pyx_kp_u_Outer_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21985  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ixor___line_881, __pyx_kp_u_Outer_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21986  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___truediv___line_896, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21987  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___idiv___line_911, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21988  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_inv_line_926, __pyx_kp_u_Geometric_multiplicative_invers) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21989  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___or___line_939, __pyx_kp_u_Transform_left_hand_side_using) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21990  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ior___line_950, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21991  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pow___line_961, __pyx_kp_u_Power_self_to_the_m_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21992  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pow_line_980, __pyx_kp_u_Power_self_to_the_m_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21993  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_outer_pow_line_1004, __pyx_kp_u_Outer_product_power_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21994  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___call___line_1020, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21995  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_scalar_line_1039, __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21996  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pure_line_1050, __pyx_kp_u_Pure_part_print_clifford_1_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21997  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_even_line_1061, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21998  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_odd_line_1070, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21999  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_vector_part_line_1079, __pyx_kp_u_Vector_part_of_multivector_as_a) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22000  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_involute_line_1107, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22001  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reverse_line_1123, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22002  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_conj_line_1138, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22003  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_quad_line_1153, __pyx_kp_u_Quadratic_form_rev_x_x_0_print) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22004  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_norm_line_1164, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22005  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_abs_line_1175, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22006  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_max_abs_line_1184, __pyx_kp_u_Maximum_of_absolute_values_of_c) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22007  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_truncated_line_1195, __pyx_kp_u_Remove_all_terms_of_self_with_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22008  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_isinf_line_1206, __pyx_kp_u_Check_if_a_multivector_contains) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22009  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_isnan_line_1215, __pyx_kp_u_Check_if_a_multivector_contains_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22010  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_frame_line_1224, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22011  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___repr___line_1235, __pyx_kp_u_The_official_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22012  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___str___line_1244, __pyx_kp_u_The_informal_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22013  if (PyDict_SetItem(__pyx_t_2, __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)
22014  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_error_squared_tol_line_1337, __pyx_kp_u_Quadratic_norm_error_tolerance) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22015  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_error_squared_line_1346, __pyx_kp_u_Relative_or_absolute_error_usin) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22016  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_approx_equal_line_1359, __pyx_kp_u_Test_for_approximate_equality_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22017  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_inv_line_1378, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22018  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_scalar_line_1393, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22019  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_real_line_1404, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22020  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_imag_line_1415, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22021  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pure_line_1426, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22022  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_even_line_1437, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22023  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_odd_line_1446, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22024  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_involute_line_1455, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22025  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_reverse_line_1470, __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22026  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_conj_line_1485, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22027  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_quad_line_1500, __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22028  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_norm_line_1511, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22029  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_abs_line_1522, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22030  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_abs_line_1531, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22031  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pow_line_1543, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22032  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_outer_pow_line_1567, __pyx_kp_u_Outer_product_power_of_multivec) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22033  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_complexifier_line_1576, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22034  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sqrt_line_1591, __pyx_kp_u_Square_root_of_multivector_with) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22035  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_exp_line_1614, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22036  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_log_line_1628, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22037  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cos_line_1651, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22038  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acos_line_1668, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22039  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cosh_line_1689, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22040  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acosh_line_1705, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22041  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sin_line_1728, __pyx_kp_u_Sine_of_multivector_with_option) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22042  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asin_line_1747, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22043  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sinh_line_1768, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22044  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asinh_line_1782, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22045  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tan_line_1801, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22046  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atan_line_1818, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22047  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tanh_line_1835, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22048  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atanh_line_1847, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22049  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_random_clifford_line_1864, __pyx_kp_u_Random_multivector_within_a_fra) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22050  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3_line_1873, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22051  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3std_line_1882, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22052  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_agc3_line_1893, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22053  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_e_line_1936, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22054  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_istpq_line_1949, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22055  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22056  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22057 
22058  /* "string.to_py":55
22059  *
22060  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
22061  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
22062  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
22063  *
22064  */
22065 
22066  /*--- Wrapped vars code ---*/
22067 
22068  goto __pyx_L0;
22069  __pyx_L1_error:;
22070  __Pyx_XDECREF(__pyx_t_1);
22071  __Pyx_XDECREF(__pyx_t_2);
22072  __Pyx_XDECREF(__pyx_t_3);
22073  if (__pyx_m) {
22074  if (__pyx_d) {
22075  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
22076  }
22077  Py_CLEAR(__pyx_m);
22078  } else if (!PyErr_Occurred()) {
22079  PyErr_SetString(PyExc_ImportError, "init PyClical");
22080  }
22081  __pyx_L0:;
22082  __Pyx_RefNannyFinishContext();
22083  #if CYTHON_PEP489_MULTI_PHASE_INIT
22084  return (__pyx_m != NULL) ? 0 : -1;
22085  #elif PY_MAJOR_VERSION >= 3
22086  return __pyx_m;
22087  #else
22088  return;
22089  #endif
22090 }
22091 
22092 /* --- Runtime support code --- */
22093 /* Refnanny */
22094 #if CYTHON_REFNANNY
22095 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
22096  PyObject *m = NULL, *p = NULL;
22097  void *r = NULL;
22098  m = PyImport_ImportModule(modname);
22099  if (!m) goto end;
22100  p = PyObject_GetAttrString(m, "RefNannyAPI");
22101  if (!p) goto end;
22102  r = PyLong_AsVoidPtr(p);
22103 end:
22104  Py_XDECREF(p);
22105  Py_XDECREF(m);
22106  return (__Pyx_RefNannyAPIStruct *)r;
22107 }
22108 #endif
22109 
22110 /* PyObjectGetAttrStr */
22111 #if CYTHON_USE_TYPE_SLOTS
22112 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
22113  PyTypeObject* tp = Py_TYPE(obj);
22114  if (likely(tp->tp_getattro))
22115  return tp->tp_getattro(obj, attr_name);
22116 #if PY_MAJOR_VERSION < 3
22117  if (likely(tp->tp_getattr))
22118  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
22119 #endif
22120  return PyObject_GetAttr(obj, attr_name);
22121 }
22122 #endif
22123 
22124 /* GetBuiltinName */
22125 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
22126  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
22127  if (unlikely(!result)) {
22128  PyErr_Format(PyExc_NameError,
22129 #if PY_MAJOR_VERSION >= 3
22130  "name '%U' is not defined", name);
22131 #else
22132  "name '%.200s' is not defined", PyString_AS_STRING(name));
22133 #endif
22134  }
22135  return result;
22136 }
22137 
22138 /* PyCFunctionFastCall */
22139 #if CYTHON_FAST_PYCCALL
22140 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
22141  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
22142  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
22143  PyObject *self = PyCFunction_GET_SELF(func);
22144  int flags = PyCFunction_GET_FLAGS(func);
22145  assert(PyCFunction_Check(func));
22146  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
22147  assert(nargs >= 0);
22148  assert(nargs == 0 || args != NULL);
22149  /* _PyCFunction_FastCallDict() must not be called with an exception set,
22150  because it may clear it (directly or indirectly) and so the
22151  caller loses its exception */
22152  assert(!PyErr_Occurred());
22153  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
22154  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
22155  } else {
22156  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
22157  }
22158 }
22159 #endif
22160 
22161 /* PyFunctionFastCall */
22162 #if CYTHON_FAST_PYCALL
22163 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
22164  PyObject *globals) {
22165  PyFrameObject *f;
22166  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22167  PyObject **fastlocals;
22168  Py_ssize_t i;
22169  PyObject *result;
22170  assert(globals != NULL);
22171  /* XXX Perhaps we should create a specialized
22172  PyFrame_New() that doesn't take locals, but does
22173  take builtins without sanity checking them.
22174  */
22175  assert(tstate != NULL);
22176  f = PyFrame_New(tstate, co, globals, NULL);
22177  if (f == NULL) {
22178  return NULL;
22179  }
22180  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
22181  for (i = 0; i < na; i++) {
22182  Py_INCREF(*args);
22183  fastlocals[i] = *args++;
22184  }
22185  result = PyEval_EvalFrameEx(f,0);
22186  ++tstate->recursion_depth;
22187  Py_DECREF(f);
22188  --tstate->recursion_depth;
22189  return result;
22190 }
22191 #if 1 || PY_VERSION_HEX < 0x030600B1
22192 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
22193  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
22194  PyObject *globals = PyFunction_GET_GLOBALS(func);
22195  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
22196  PyObject *closure;
22197 #if PY_MAJOR_VERSION >= 3
22198  PyObject *kwdefs;
22199 #endif
22200  PyObject *kwtuple, **k;
22201  PyObject **d;
22202  Py_ssize_t nd;
22203  Py_ssize_t nk;
22204  PyObject *result;
22205  assert(kwargs == NULL || PyDict_Check(kwargs));
22206  nk = kwargs ? PyDict_Size(kwargs) : 0;
22207  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
22208  return NULL;
22209  }
22210  if (
22211 #if PY_MAJOR_VERSION >= 3
22212  co->co_kwonlyargcount == 0 &&
22213 #endif
22214  likely(kwargs == NULL || nk == 0) &&
22215  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
22216  if (argdefs == NULL && co->co_argcount == nargs) {
22217  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
22218  goto done;
22219  }
22220  else if (nargs == 0 && argdefs != NULL
22221  && co->co_argcount == Py_SIZE(argdefs)) {
22222  /* function called with no arguments, but all parameters have
22223  a default value: use default values as arguments .*/
22224  args = &PyTuple_GET_ITEM(argdefs, 0);
22225  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
22226  goto done;
22227  }
22228  }
22229  if (kwargs != NULL) {
22230  Py_ssize_t pos, i;
22231  kwtuple = PyTuple_New(2 * nk);
22232  if (kwtuple == NULL) {
22233  result = NULL;
22234  goto done;
22235  }
22236  k = &PyTuple_GET_ITEM(kwtuple, 0);
22237  pos = i = 0;
22238  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
22239  Py_INCREF(k[i]);
22240  Py_INCREF(k[i+1]);
22241  i += 2;
22242  }
22243  nk = i / 2;
22244  }
22245  else {
22246  kwtuple = NULL;
22247  k = NULL;
22248  }
22249  closure = PyFunction_GET_CLOSURE(func);
22250 #if PY_MAJOR_VERSION >= 3
22251  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
22252 #endif
22253  if (argdefs != NULL) {
22254  d = &PyTuple_GET_ITEM(argdefs, 0);
22255  nd = Py_SIZE(argdefs);
22256  }
22257  else {
22258  d = NULL;
22259  nd = 0;
22260  }
22261 #if PY_MAJOR_VERSION >= 3
22262  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
22263  args, (int)nargs,
22264  k, (int)nk,
22265  d, (int)nd, kwdefs, closure);
22266 #else
22267  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
22268  args, (int)nargs,
22269  k, (int)nk,
22270  d, (int)nd, closure);
22271 #endif
22272  Py_XDECREF(kwtuple);
22273 done:
22274  Py_LeaveRecursiveCall();
22275  return result;
22276 }
22277 #endif
22278 #endif
22279 
22280 /* PyObjectCall */
22281 #if CYTHON_COMPILING_IN_CPYTHON
22282 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
22283  PyObject *result;
22284  ternaryfunc call = Py_TYPE(func)->tp_call;
22285  if (unlikely(!call))
22286  return PyObject_Call(func, arg, kw);
22287  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
22288  return NULL;
22289  result = (*call)(func, arg, kw);
22290  Py_LeaveRecursiveCall();
22291  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
22292  PyErr_SetString(
22293  PyExc_SystemError,
22294  "NULL result without error in PyObject_Call");
22295  }
22296  return result;
22297 }
22298 #endif
22299 
22300 /* PyObjectCallMethO */
22301 #if CYTHON_COMPILING_IN_CPYTHON
22302 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
22303  PyObject *self, *result;
22304  PyCFunction cfunc;
22305  cfunc = PyCFunction_GET_FUNCTION(func);
22306  self = PyCFunction_GET_SELF(func);
22307  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
22308  return NULL;
22309  result = cfunc(self, arg);
22310  Py_LeaveRecursiveCall();
22311  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
22312  PyErr_SetString(
22313  PyExc_SystemError,
22314  "NULL result without error in PyObject_Call");
22315  }
22316  return result;
22317 }
22318 #endif
22319 
22320 /* PyObjectCallOneArg */
22321 #if CYTHON_COMPILING_IN_CPYTHON
22322 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
22323  PyObject *result;
22324  PyObject *args = PyTuple_New(1);
22325  if (unlikely(!args)) return NULL;
22326  Py_INCREF(arg);
22327  PyTuple_SET_ITEM(args, 0, arg);
22328  result = __Pyx_PyObject_Call(func, args, NULL);
22329  Py_DECREF(args);
22330  return result;
22331 }
22332 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
22333 #if CYTHON_FAST_PYCALL
22334  if (PyFunction_Check(func)) {
22335  return __Pyx_PyFunction_FastCall(func, &arg, 1);
22336  }
22337 #endif
22338  if (likely(PyCFunction_Check(func))) {
22339  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
22340  return __Pyx_PyObject_CallMethO(func, arg);
22341 #if CYTHON_FAST_PYCCALL
22342  } else if (__Pyx_PyFastCFunction_Check(func)) {
22343  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
22344 #endif
22345  }
22346  }
22347  return __Pyx__PyObject_CallOneArg(func, arg);
22348 }
22349 #else
22350 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
22351  PyObject *result;
22352  PyObject *args = PyTuple_Pack(1, arg);
22353  if (unlikely(!args)) return NULL;
22354  result = __Pyx_PyObject_Call(func, args, NULL);
22355  Py_DECREF(args);
22356  return result;
22357 }
22358 #endif
22359 
22360 /* PyErrFetchRestore */
22361 #if CYTHON_FAST_THREAD_STATE
22362 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
22363  PyObject *tmp_type, *tmp_value, *tmp_tb;
22364  tmp_type = tstate->curexc_type;
22365  tmp_value = tstate->curexc_value;
22366  tmp_tb = tstate->curexc_traceback;
22367  tstate->curexc_type = type;
22368  tstate->curexc_value = value;
22369  tstate->curexc_traceback = tb;
22370  Py_XDECREF(tmp_type);
22371  Py_XDECREF(tmp_value);
22372  Py_XDECREF(tmp_tb);
22373 }
22374 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22375  *type = tstate->curexc_type;
22376  *value = tstate->curexc_value;
22377  *tb = tstate->curexc_traceback;
22378  tstate->curexc_type = 0;
22379  tstate->curexc_value = 0;
22380  tstate->curexc_traceback = 0;
22381 }
22382 #endif
22383 
22384 /* WriteUnraisableException */
22385 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
22386  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
22387  int full_traceback, CYTHON_UNUSED int nogil) {
22388  PyObject *old_exc, *old_val, *old_tb;
22389  PyObject *ctx;
22390  __Pyx_PyThreadState_declare
22391 #ifdef WITH_THREAD
22392  PyGILState_STATE state;
22393  if (nogil)
22394  state = PyGILState_Ensure();
22395 #ifdef _MSC_VER
22396  else state = (PyGILState_STATE)-1;
22397 #endif
22398 #endif
22399  __Pyx_PyThreadState_assign
22400  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
22401  if (full_traceback) {
22402  Py_XINCREF(old_exc);
22403  Py_XINCREF(old_val);
22404  Py_XINCREF(old_tb);
22405  __Pyx_ErrRestore(old_exc, old_val, old_tb);
22406  PyErr_PrintEx(1);
22407  }
22408  #if PY_MAJOR_VERSION < 3
22409  ctx = PyString_FromString(name);
22410  #else
22411  ctx = PyUnicode_FromString(name);
22412  #endif
22413  __Pyx_ErrRestore(old_exc, old_val, old_tb);
22414  if (!ctx) {
22415  PyErr_WriteUnraisable(Py_None);
22416  } else {
22417  PyErr_WriteUnraisable(ctx);
22418  Py_DECREF(ctx);
22419  }
22420 #ifdef WITH_THREAD
22421  if (nogil)
22422  PyGILState_Release(state);
22423 #endif
22424 }
22425 
22426 /* PyDictVersioning */
22427 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
22428 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
22429  PyObject *dict = Py_TYPE(obj)->tp_dict;
22430  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
22431 }
22432 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
22433  PyObject **dictptr = NULL;
22434  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
22435  if (offset) {
22436 #if CYTHON_COMPILING_IN_CPYTHON
22437  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
22438 #else
22439  dictptr = _PyObject_GetDictPtr(obj);
22440 #endif
22441  }
22442  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
22443 }
22444 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
22445  PyObject *dict = Py_TYPE(obj)->tp_dict;
22446  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
22447  return 0;
22448  return obj_dict_version == __Pyx_get_object_dict_version(obj);
22449 }
22450 #endif
22451 
22452 /* PyObjectCallNoArg */
22453 #if CYTHON_COMPILING_IN_CPYTHON
22454 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
22455 #if CYTHON_FAST_PYCALL
22456  if (PyFunction_Check(func)) {
22457  return __Pyx_PyFunction_FastCall(func, NULL, 0);
22458  }
22459 #endif
22460 #ifdef __Pyx_CyFunction_USED
22461  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
22462 #else
22463  if (likely(PyCFunction_Check(func)))
22464 #endif
22465  {
22466  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
22467  return __Pyx_PyObject_CallMethO(func, NULL);
22468  }
22469  }
22470  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
22471 }
22472 #endif
22473 
22474 /* RaiseDoubleKeywords */
22475 static void __Pyx_RaiseDoubleKeywordsError(
22476  const char* func_name,
22477  PyObject* kw_name)
22478 {
22479  PyErr_Format(PyExc_TypeError,
22480  #if PY_MAJOR_VERSION >= 3
22481  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
22482  #else
22483  "%s() got multiple values for keyword argument '%s'", func_name,
22484  PyString_AsString(kw_name));
22485  #endif
22486 }
22487 
22488 /* ParseKeywords */
22489 static int __Pyx_ParseOptionalKeywords(
22490  PyObject *kwds,
22491  PyObject **argnames[],
22492  PyObject *kwds2,
22493  PyObject *values[],
22494  Py_ssize_t num_pos_args,
22495  const char* function_name)
22496 {
22497  PyObject *key = 0, *value = 0;
22498  Py_ssize_t pos = 0;
22499  PyObject*** name;
22500  PyObject*** first_kw_arg = argnames + num_pos_args;
22501  while (PyDict_Next(kwds, &pos, &key, &value)) {
22502  name = first_kw_arg;
22503  while (*name && (**name != key)) name++;
22504  if (*name) {
22505  values[name-argnames] = value;
22506  continue;
22507  }
22508  name = first_kw_arg;
22509  #if PY_MAJOR_VERSION < 3
22510  if (likely(PyString_Check(key))) {
22511  while (*name) {
22512  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
22513  && _PyString_Eq(**name, key)) {
22514  values[name-argnames] = value;
22515  break;
22516  }
22517  name++;
22518  }
22519  if (*name) continue;
22520  else {
22521  PyObject*** argname = argnames;
22522  while (argname != first_kw_arg) {
22523  if ((**argname == key) || (
22524  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
22525  && _PyString_Eq(**argname, key))) {
22526  goto arg_passed_twice;
22527  }
22528  argname++;
22529  }
22530  }
22531  } else
22532  #endif
22533  if (likely(PyUnicode_Check(key))) {
22534  while (*name) {
22535  int cmp = (**name == key) ? 0 :
22536  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
22537  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
22538  #endif
22539  PyUnicode_Compare(**name, key);
22540  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
22541  if (cmp == 0) {
22542  values[name-argnames] = value;
22543  break;
22544  }
22545  name++;
22546  }
22547  if (*name) continue;
22548  else {
22549  PyObject*** argname = argnames;
22550  while (argname != first_kw_arg) {
22551  int cmp = (**argname == key) ? 0 :
22552  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
22553  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
22554  #endif
22555  PyUnicode_Compare(**argname, key);
22556  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
22557  if (cmp == 0) goto arg_passed_twice;
22558  argname++;
22559  }
22560  }
22561  } else
22562  goto invalid_keyword_type;
22563  if (kwds2) {
22564  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
22565  } else {
22566  goto invalid_keyword;
22567  }
22568  }
22569  return 0;
22570 arg_passed_twice:
22571  __Pyx_RaiseDoubleKeywordsError(function_name, key);
22572  goto bad;
22573 invalid_keyword_type:
22574  PyErr_Format(PyExc_TypeError,
22575  "%.200s() keywords must be strings", function_name);
22576  goto bad;
22577 invalid_keyword:
22578  PyErr_Format(PyExc_TypeError,
22579  #if PY_MAJOR_VERSION < 3
22580  "%.200s() got an unexpected keyword argument '%.200s'",
22581  function_name, PyString_AsString(key));
22582  #else
22583  "%s() got an unexpected keyword argument '%U'",
22584  function_name, key);
22585  #endif
22586 bad:
22587  return -1;
22588 }
22589 
22590 /* RaiseArgTupleInvalid */
22591 static void __Pyx_RaiseArgtupleInvalid(
22592  const char* func_name,
22593  int exact,
22594  Py_ssize_t num_min,
22595  Py_ssize_t num_max,
22596  Py_ssize_t num_found)
22597 {
22598  Py_ssize_t num_expected;
22599  const char *more_or_less;
22600  if (num_found < num_min) {
22601  num_expected = num_min;
22602  more_or_less = "at least";
22603  } else {
22604  num_expected = num_max;
22605  more_or_less = "at most";
22606  }
22607  if (exact) {
22608  more_or_less = "exactly";
22609  }
22610  PyErr_Format(PyExc_TypeError,
22611  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
22612  func_name, more_or_less, num_expected,
22613  (num_expected == 1) ? "" : "s", num_found);
22614 }
22615 
22616 /* GetModuleGlobalName */
22617 #if CYTHON_USE_DICT_VERSIONS
22618 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
22619 #else
22620 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
22621 #endif
22622 {
22623  PyObject *result;
22624 #if !CYTHON_AVOID_BORROWED_REFS
22625 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
22626  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
22627  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
22628  if (likely(result)) {
22629  return __Pyx_NewRef(result);
22630  } else if (unlikely(PyErr_Occurred())) {
22631  return NULL;
22632  }
22633 #else
22634  result = PyDict_GetItem(__pyx_d, name);
22635  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
22636  if (likely(result)) {
22637  return __Pyx_NewRef(result);
22638  }
22639 #endif
22640 #else
22641  result = PyObject_GetItem(__pyx_d, name);
22642  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
22643  if (likely(result)) {
22644  return __Pyx_NewRef(result);
22645  }
22646  PyErr_Clear();
22647 #endif
22648  return __Pyx_GetBuiltinName(name);
22649 }
22650 
22651 /* GetTopmostException */
22652 #if CYTHON_USE_EXC_INFO_STACK
22653 static _PyErr_StackItem *
22654 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
22655 {
22656  _PyErr_StackItem *exc_info = tstate->exc_info;
22657  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
22658  exc_info->previous_item != NULL)
22659  {
22660  exc_info = exc_info->previous_item;
22661  }
22662  return exc_info;
22663 }
22664 #endif
22665 
22666 /* SaveResetException */
22667 #if CYTHON_FAST_THREAD_STATE
22668 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22669  #if CYTHON_USE_EXC_INFO_STACK
22670  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
22671  *type = exc_info->exc_type;
22672  *value = exc_info->exc_value;
22673  *tb = exc_info->exc_traceback;
22674  #else
22675  *type = tstate->exc_type;
22676  *value = tstate->exc_value;
22677  *tb = tstate->exc_traceback;
22678  #endif
22679  Py_XINCREF(*type);
22680  Py_XINCREF(*value);
22681  Py_XINCREF(*tb);
22682 }
22683 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
22684  PyObject *tmp_type, *tmp_value, *tmp_tb;
22685  #if CYTHON_USE_EXC_INFO_STACK
22686  _PyErr_StackItem *exc_info = tstate->exc_info;
22687  tmp_type = exc_info->exc_type;
22688  tmp_value = exc_info->exc_value;
22689  tmp_tb = exc_info->exc_traceback;
22690  exc_info->exc_type = type;
22691  exc_info->exc_value = value;
22692  exc_info->exc_traceback = tb;
22693  #else
22694  tmp_type = tstate->exc_type;
22695  tmp_value = tstate->exc_value;
22696  tmp_tb = tstate->exc_traceback;
22697  tstate->exc_type = type;
22698  tstate->exc_value = value;
22699  tstate->exc_traceback = tb;
22700  #endif
22701  Py_XDECREF(tmp_type);
22702  Py_XDECREF(tmp_value);
22703  Py_XDECREF(tmp_tb);
22704 }
22705 #endif
22706 
22707 /* PyErrExceptionMatches */
22708 #if CYTHON_FAST_THREAD_STATE
22709 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22710  Py_ssize_t i, n;
22711  n = PyTuple_GET_SIZE(tuple);
22712 #if PY_MAJOR_VERSION >= 3
22713  for (i=0; i<n; i++) {
22714  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22715  }
22716 #endif
22717  for (i=0; i<n; i++) {
22718  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
22719  }
22720  return 0;
22721 }
22722 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
22723  PyObject *exc_type = tstate->curexc_type;
22724  if (exc_type == err) return 1;
22725  if (unlikely(!exc_type)) return 0;
22726  if (unlikely(PyTuple_Check(err)))
22727  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
22728  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
22729 }
22730 #endif
22731 
22732 /* GetException */
22733 #if CYTHON_FAST_THREAD_STATE
22734 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
22735 #else
22736 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
22737 #endif
22738 {
22739  PyObject *local_type, *local_value, *local_tb;
22740 #if CYTHON_FAST_THREAD_STATE
22741  PyObject *tmp_type, *tmp_value, *tmp_tb;
22742  local_type = tstate->curexc_type;
22743  local_value = tstate->curexc_value;
22744  local_tb = tstate->curexc_traceback;
22745  tstate->curexc_type = 0;
22746  tstate->curexc_value = 0;
22747  tstate->curexc_traceback = 0;
22748 #else
22749  PyErr_Fetch(&local_type, &local_value, &local_tb);
22750 #endif
22751  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
22752 #if CYTHON_FAST_THREAD_STATE
22753  if (unlikely(tstate->curexc_type))
22754 #else
22755  if (unlikely(PyErr_Occurred()))
22756 #endif
22757  goto bad;
22758  #if PY_MAJOR_VERSION >= 3
22759  if (local_tb) {
22760  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
22761  goto bad;
22762  }
22763  #endif
22764  Py_XINCREF(local_tb);
22765  Py_XINCREF(local_type);
22766  Py_XINCREF(local_value);
22767  *type = local_type;
22768  *value = local_value;
22769  *tb = local_tb;
22770 #if CYTHON_FAST_THREAD_STATE
22771  #if CYTHON_USE_EXC_INFO_STACK
22772  {
22773  _PyErr_StackItem *exc_info = tstate->exc_info;
22774  tmp_type = exc_info->exc_type;
22775  tmp_value = exc_info->exc_value;
22776  tmp_tb = exc_info->exc_traceback;
22777  exc_info->exc_type = local_type;
22778  exc_info->exc_value = local_value;
22779  exc_info->exc_traceback = local_tb;
22780  }
22781  #else
22782  tmp_type = tstate->exc_type;
22783  tmp_value = tstate->exc_value;
22784  tmp_tb = tstate->exc_traceback;
22785  tstate->exc_type = local_type;
22786  tstate->exc_value = local_value;
22787  tstate->exc_traceback = local_tb;
22788  #endif
22789  Py_XDECREF(tmp_type);
22790  Py_XDECREF(tmp_value);
22791  Py_XDECREF(tmp_tb);
22792 #else
22793  PyErr_SetExcInfo(local_type, local_value, local_tb);
22794 #endif
22795  return 0;
22796 bad:
22797  *type = 0;
22798  *value = 0;
22799  *tb = 0;
22800  Py_XDECREF(local_type);
22801  Py_XDECREF(local_value);
22802  Py_XDECREF(local_tb);
22803  return -1;
22804 }
22805 
22806 /* RaiseException */
22807 #if PY_MAJOR_VERSION < 3
22808 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
22809  CYTHON_UNUSED PyObject *cause) {
22810  __Pyx_PyThreadState_declare
22811  Py_XINCREF(type);
22812  if (!value || value == Py_None)
22813  value = NULL;
22814  else
22815  Py_INCREF(value);
22816  if (!tb || tb == Py_None)
22817  tb = NULL;
22818  else {
22819  Py_INCREF(tb);
22820  if (!PyTraceBack_Check(tb)) {
22821  PyErr_SetString(PyExc_TypeError,
22822  "raise: arg 3 must be a traceback or None");
22823  goto raise_error;
22824  }
22825  }
22826  if (PyType_Check(type)) {
22827 #if CYTHON_COMPILING_IN_PYPY
22828  if (!value) {
22829  Py_INCREF(Py_None);
22830  value = Py_None;
22831  }
22832 #endif
22833  PyErr_NormalizeException(&type, &value, &tb);
22834  } else {
22835  if (value) {
22836  PyErr_SetString(PyExc_TypeError,
22837  "instance exception may not have a separate value");
22838  goto raise_error;
22839  }
22840  value = type;
22841  type = (PyObject*) Py_TYPE(type);
22842  Py_INCREF(type);
22843  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
22844  PyErr_SetString(PyExc_TypeError,
22845  "raise: exception class must be a subclass of BaseException");
22846  goto raise_error;
22847  }
22848  }
22849  __Pyx_PyThreadState_assign
22850  __Pyx_ErrRestore(type, value, tb);
22851  return;
22852 raise_error:
22853  Py_XDECREF(value);
22854  Py_XDECREF(type);
22855  Py_XDECREF(tb);
22856  return;
22857 }
22858 #else
22859 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
22860  PyObject* owned_instance = NULL;
22861  if (tb == Py_None) {
22862  tb = 0;
22863  } else if (tb && !PyTraceBack_Check(tb)) {
22864  PyErr_SetString(PyExc_TypeError,
22865  "raise: arg 3 must be a traceback or None");
22866  goto bad;
22867  }
22868  if (value == Py_None)
22869  value = 0;
22870  if (PyExceptionInstance_Check(type)) {
22871  if (value) {
22872  PyErr_SetString(PyExc_TypeError,
22873  "instance exception may not have a separate value");
22874  goto bad;
22875  }
22876  value = type;
22877  type = (PyObject*) Py_TYPE(value);
22878  } else if (PyExceptionClass_Check(type)) {
22879  PyObject *instance_class = NULL;
22880  if (value && PyExceptionInstance_Check(value)) {
22881  instance_class = (PyObject*) Py_TYPE(value);
22882  if (instance_class != type) {
22883  int is_subclass = PyObject_IsSubclass(instance_class, type);
22884  if (!is_subclass) {
22885  instance_class = NULL;
22886  } else if (unlikely(is_subclass == -1)) {
22887  goto bad;
22888  } else {
22889  type = instance_class;
22890  }
22891  }
22892  }
22893  if (!instance_class) {
22894  PyObject *args;
22895  if (!value)
22896  args = PyTuple_New(0);
22897  else if (PyTuple_Check(value)) {
22898  Py_INCREF(value);
22899  args = value;
22900  } else
22901  args = PyTuple_Pack(1, value);
22902  if (!args)
22903  goto bad;
22904  owned_instance = PyObject_Call(type, args, NULL);
22905  Py_DECREF(args);
22906  if (!owned_instance)
22907  goto bad;
22908  value = owned_instance;
22909  if (!PyExceptionInstance_Check(value)) {
22910  PyErr_Format(PyExc_TypeError,
22911  "calling %R should have returned an instance of "
22912  "BaseException, not %R",
22913  type, Py_TYPE(value));
22914  goto bad;
22915  }
22916  }
22917  } else {
22918  PyErr_SetString(PyExc_TypeError,
22919  "raise: exception class must be a subclass of BaseException");
22920  goto bad;
22921  }
22922  if (cause) {
22923  PyObject *fixed_cause;
22924  if (cause == Py_None) {
22925  fixed_cause = NULL;
22926  } else if (PyExceptionClass_Check(cause)) {
22927  fixed_cause = PyObject_CallObject(cause, NULL);
22928  if (fixed_cause == NULL)
22929  goto bad;
22930  } else if (PyExceptionInstance_Check(cause)) {
22931  fixed_cause = cause;
22932  Py_INCREF(fixed_cause);
22933  } else {
22934  PyErr_SetString(PyExc_TypeError,
22935  "exception causes must derive from "
22936  "BaseException");
22937  goto bad;
22938  }
22939  PyException_SetCause(value, fixed_cause);
22940  }
22941  PyErr_SetObject(type, value);
22942  if (tb) {
22943 #if CYTHON_COMPILING_IN_PYPY
22944  PyObject *tmp_type, *tmp_value, *tmp_tb;
22945  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
22946  Py_INCREF(tb);
22947  PyErr_Restore(tmp_type, tmp_value, tb);
22948  Py_XDECREF(tmp_tb);
22949 #else
22950  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22951  PyObject* tmp_tb = tstate->curexc_traceback;
22952  if (tb != tmp_tb) {
22953  Py_INCREF(tb);
22954  tstate->curexc_traceback = tb;
22955  Py_XDECREF(tmp_tb);
22956  }
22957 #endif
22958  }
22959 bad:
22960  Py_XDECREF(owned_instance);
22961  return;
22962 }
22963 #endif
22964 
22965 /* PyObjectCall2Args */
22966 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
22967  PyObject *args, *result = NULL;
22968  #if CYTHON_FAST_PYCALL
22969  if (PyFunction_Check(function)) {
22970  PyObject *args[2] = {arg1, arg2};
22971  return __Pyx_PyFunction_FastCall(function, args, 2);
22972  }
22973  #endif
22974  #if CYTHON_FAST_PYCCALL
22975  if (__Pyx_PyFastCFunction_Check(function)) {
22976  PyObject *args[2] = {arg1, arg2};
22977  return __Pyx_PyCFunction_FastCall(function, args, 2);
22978  }
22979  #endif
22980  args = PyTuple_New(2);
22981  if (unlikely(!args)) goto done;
22982  Py_INCREF(arg1);
22983  PyTuple_SET_ITEM(args, 0, arg1);
22984  Py_INCREF(arg2);
22985  PyTuple_SET_ITEM(args, 1, arg2);
22986  Py_INCREF(function);
22987  result = __Pyx_PyObject_Call(function, args, NULL);
22988  Py_DECREF(args);
22989  Py_DECREF(function);
22990 done:
22991  return result;
22992 }
22993 
22994 /* PyIntBinop */
22995 #if !CYTHON_COMPILING_IN_PYPY
22996 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
22997  (void)inplace;
22998  (void)zerodivision_check;
22999  #if PY_MAJOR_VERSION < 3
23000  if (likely(PyInt_CheckExact(op1))) {
23001  const long b = intval;
23002  long x;
23003  long a = PyInt_AS_LONG(op1);
23004  x = (long)((unsigned long)a + b);
23005  if (likely((x^a) >= 0 || (x^b) >= 0))
23006  return PyInt_FromLong(x);
23007  return PyLong_Type.tp_as_number->nb_add(op1, op2);
23008  }
23009  #endif
23010  #if CYTHON_USE_PYLONG_INTERNALS
23011  if (likely(PyLong_CheckExact(op1))) {
23012  const long b = intval;
23013  long a, x;
23014 #ifdef HAVE_LONG_LONG
23015  const PY_LONG_LONG llb = intval;
23016  PY_LONG_LONG lla, llx;
23017 #endif
23018  const digit* digits = ((PyLongObject*)op1)->ob_digit;
23019  const Py_ssize_t size = Py_SIZE(op1);
23020  if (likely(__Pyx_sst_abs(size) <= 1)) {
23021  a = likely(size) ? digits[0] : 0;
23022  if (size == -1) a = -a;
23023  } else {
23024  switch (size) {
23025  case -2:
23026  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23027  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
23028  break;
23029 #ifdef HAVE_LONG_LONG
23030  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
23031  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
23032  goto long_long;
23033 #endif
23034  }
23035  CYTHON_FALLTHROUGH;
23036  case 2:
23037  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
23038  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
23039  break;
23040 #ifdef HAVE_LONG_LONG
23041  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
23042  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
23043  goto long_long;
23044 #endif
23045  }
23046  CYTHON_FALLTHROUGH;
23047  case -3:
23048  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23049  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
23050  break;
23051 #ifdef HAVE_LONG_LONG
23052  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
23053  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]));
23054  goto long_long;
23055 #endif
23056  }
23057  CYTHON_FALLTHROUGH;
23058  case 3:
23059  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
23060  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
23061  break;
23062 #ifdef HAVE_LONG_LONG
23063  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
23064  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]));
23065  goto long_long;
23066 #endif
23067  }
23068  CYTHON_FALLTHROUGH;
23069  case -4:
23070  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
23071  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
23072  break;
23073 #ifdef HAVE_LONG_LONG
23074  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
23075  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]));
23076  goto long_long;
23077 #endif
23078  }
23079  CYTHON_FALLTHROUGH;
23080  case 4:
23081  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
23082  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
23083  break;
23084 #ifdef HAVE_LONG_LONG
23085  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
23086  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]));
23087  goto long_long;
23088 #endif
23089  }
23090  CYTHON_FALLTHROUGH;
23091  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
23092  }
23093  }
23094  x = a + b;
23095  return PyLong_FromLong(x);
23096 #ifdef HAVE_LONG_LONG
23097  long_long:
23098  llx = lla + llb;
23099  return PyLong_FromLongLong(llx);
23100 #endif
23101 
23102 
23103  }
23104  #endif
23105  if (PyFloat_CheckExact(op1)) {
23106  const long b = intval;
23107  double a = PyFloat_AS_DOUBLE(op1);
23108  double result;
23109  PyFPE_START_PROTECT("add", return NULL)
23110  result = ((double)a) + (double)b;
23111  PyFPE_END_PROTECT(result)
23112  return PyFloat_FromDouble(result);
23113  }
23114  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
23115 }
23116 #endif
23117 
23118 /* decode_c_bytes */
23119 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
23120  const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
23121  const char* encoding, const char* errors,
23122  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
23123  if (unlikely((start < 0) | (stop < 0))) {
23124  if (start < 0) {
23125  start += length;
23126  if (start < 0)
23127  start = 0;
23128  }
23129  if (stop < 0)
23130  stop += length;
23131  }
23132  if (stop > length)
23133  stop = length;
23134  if (unlikely(stop <= start))
23135  return __Pyx_NewRef(__pyx_empty_unicode);
23136  length = stop - start;
23137  cstring += start;
23138  if (decode_func) {
23139  return decode_func(cstring, length, errors);
23140  } else {
23141  return PyUnicode_Decode(cstring, length, encoding, errors);
23142  }
23143 }
23144 
23145 /* SwapException */
23146 #if CYTHON_FAST_THREAD_STATE
23147 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
23148  PyObject *tmp_type, *tmp_value, *tmp_tb;
23149  #if CYTHON_USE_EXC_INFO_STACK
23150  _PyErr_StackItem *exc_info = tstate->exc_info;
23151  tmp_type = exc_info->exc_type;
23152  tmp_value = exc_info->exc_value;
23153  tmp_tb = exc_info->exc_traceback;
23154  exc_info->exc_type = *type;
23155  exc_info->exc_value = *value;
23156  exc_info->exc_traceback = *tb;
23157  #else
23158  tmp_type = tstate->exc_type;
23159  tmp_value = tstate->exc_value;
23160  tmp_tb = tstate->exc_traceback;
23161  tstate->exc_type = *type;
23162  tstate->exc_value = *value;
23163  tstate->exc_traceback = *tb;
23164  #endif
23165  *type = tmp_type;
23166  *value = tmp_value;
23167  *tb = tmp_tb;
23168 }
23169 #else
23170 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
23171  PyObject *tmp_type, *tmp_value, *tmp_tb;
23172  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
23173  PyErr_SetExcInfo(*type, *value, *tb);
23174  *type = tmp_type;
23175  *value = tmp_value;
23176  *tb = tmp_tb;
23177 }
23178 #endif
23179 
23180 /* SetItemInt */
23181 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
23182  int r;
23183  if (!j) return -1;
23184  r = PyObject_SetItem(o, j, v);
23185  Py_DECREF(j);
23186  return r;
23187 }
23188 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
23189  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
23190 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
23191  if (is_list || PyList_CheckExact(o)) {
23192  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
23193  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
23194  PyObject* old = PyList_GET_ITEM(o, n);
23195  Py_INCREF(v);
23196  PyList_SET_ITEM(o, n, v);
23197  Py_DECREF(old);
23198  return 1;
23199  }
23200  } else {
23201  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
23202  if (likely(m && m->sq_ass_item)) {
23203  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
23204  Py_ssize_t l = m->sq_length(o);
23205  if (likely(l >= 0)) {
23206  i += l;
23207  } else {
23208  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
23209  return -1;
23210  PyErr_Clear();
23211  }
23212  }
23213  return m->sq_ass_item(o, i, v);
23214  }
23215  }
23216 #else
23217 #if CYTHON_COMPILING_IN_PYPY
23218  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
23219 #else
23220  if (is_list || PySequence_Check(o))
23221 #endif
23222  {
23223  return PySequence_SetItem(o, i, v);
23224  }
23225 #endif
23226  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
23227 }
23228 
23229 /* ArgTypeTest */
23230 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
23231 {
23232  if (unlikely(!type)) {
23233  PyErr_SetString(PyExc_SystemError, "Missing type object");
23234  return 0;
23235  }
23236  else if (exact) {
23237  #if PY_MAJOR_VERSION == 2
23238  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
23239  #endif
23240  }
23241  else {
23242  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
23243  }
23244  PyErr_Format(PyExc_TypeError,
23245  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
23246  name, type->tp_name, Py_TYPE(obj)->tp_name);
23247  return 0;
23248 }
23249 
23250 /* Import */
23251 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
23252  PyObject *empty_list = 0;
23253  PyObject *module = 0;
23254  PyObject *global_dict = 0;
23255  PyObject *empty_dict = 0;
23256  PyObject *list;
23257  #if PY_MAJOR_VERSION < 3
23258  PyObject *py_import;
23259  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
23260  if (!py_import)
23261  goto bad;
23262  #endif
23263  if (from_list)
23264  list = from_list;
23265  else {
23266  empty_list = PyList_New(0);
23267  if (!empty_list)
23268  goto bad;
23269  list = empty_list;
23270  }
23271  global_dict = PyModule_GetDict(__pyx_m);
23272  if (!global_dict)
23273  goto bad;
23274  empty_dict = PyDict_New();
23275  if (!empty_dict)
23276  goto bad;
23277  {
23278  #if PY_MAJOR_VERSION >= 3
23279  if (level == -1) {
23280  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
23281  module = PyImport_ImportModuleLevelObject(
23282  name, global_dict, empty_dict, list, 1);
23283  if (!module) {
23284  if (!PyErr_ExceptionMatches(PyExc_ImportError))
23285  goto bad;
23286  PyErr_Clear();
23287  }
23288  }
23289  level = 0;
23290  }
23291  #endif
23292  if (!module) {
23293  #if PY_MAJOR_VERSION < 3
23294  PyObject *py_level = PyInt_FromLong(level);
23295  if (!py_level)
23296  goto bad;
23297  module = PyObject_CallFunctionObjArgs(py_import,
23298  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
23299  Py_DECREF(py_level);
23300  #else
23301  module = PyImport_ImportModuleLevelObject(
23302  name, global_dict, empty_dict, list, level);
23303  #endif
23304  }
23305  }
23306 bad:
23307  #if PY_MAJOR_VERSION < 3
23308  Py_XDECREF(py_import);
23309  #endif
23310  Py_XDECREF(empty_list);
23311  Py_XDECREF(empty_dict);
23312  return module;
23313 }
23314 
23315 /* PyObject_GenericGetAttrNoDict */
23316 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
23317 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
23318  PyErr_Format(PyExc_AttributeError,
23319 #if PY_MAJOR_VERSION >= 3
23320  "'%.50s' object has no attribute '%U'",
23321  tp->tp_name, attr_name);
23322 #else
23323  "'%.50s' object has no attribute '%.400s'",
23324  tp->tp_name, PyString_AS_STRING(attr_name));
23325 #endif
23326  return NULL;
23327 }
23328 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
23329  PyObject *descr;
23330  PyTypeObject *tp = Py_TYPE(obj);
23331  if (unlikely(!PyString_Check(attr_name))) {
23332  return PyObject_GenericGetAttr(obj, attr_name);
23333  }
23334  assert(!tp->tp_dictoffset);
23335  descr = _PyType_Lookup(tp, attr_name);
23336  if (unlikely(!descr)) {
23337  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
23338  }
23339  Py_INCREF(descr);
23340  #if PY_MAJOR_VERSION < 3
23341  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
23342  #endif
23343  {
23344  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
23345  if (unlikely(f)) {
23346  PyObject *res = f(descr, obj, (PyObject *)tp);
23347  Py_DECREF(descr);
23348  return res;
23349  }
23350  }
23351  return descr;
23352 }
23353 #endif
23354 
23355 /* PyObject_GenericGetAttr */
23356 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
23357 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
23358  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
23359  return PyObject_GenericGetAttr(obj, attr_name);
23360  }
23361  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
23362 }
23363 #endif
23364 
23365 /* SetVTable */
23366 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
23367 #if PY_VERSION_HEX >= 0x02070000
23368  PyObject *ob = PyCapsule_New(vtable, 0, 0);
23369 #else
23370  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
23371 #endif
23372  if (!ob)
23373  goto bad;
23374  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
23375  goto bad;
23376  Py_DECREF(ob);
23377  return 0;
23378 bad:
23379  Py_XDECREF(ob);
23380  return -1;
23381 }
23382 
23383 /* PyObjectGetAttrStrNoError */
23384 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
23385  __Pyx_PyThreadState_declare
23386  __Pyx_PyThreadState_assign
23387  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
23388  __Pyx_PyErr_Clear();
23389 }
23390 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
23391  PyObject *result;
23392 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
23393  PyTypeObject* tp = Py_TYPE(obj);
23394  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
23395  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
23396  }
23397 #endif
23398  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
23399  if (unlikely(!result)) {
23400  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
23401  }
23402  return result;
23403 }
23404 
23405 /* SetupReduce */
23406 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
23407  int ret;
23408  PyObject *name_attr;
23409  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
23410  if (likely(name_attr)) {
23411  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
23412  } else {
23413  ret = -1;
23414  }
23415  if (unlikely(ret < 0)) {
23416  PyErr_Clear();
23417  ret = 0;
23418  }
23419  Py_XDECREF(name_attr);
23420  return ret;
23421 }
23422 static int __Pyx_setup_reduce(PyObject* type_obj) {
23423  int ret = 0;
23424  PyObject *object_reduce = NULL;
23425  PyObject *object_reduce_ex = NULL;
23426  PyObject *reduce = NULL;
23427  PyObject *reduce_ex = NULL;
23428  PyObject *reduce_cython = NULL;
23429  PyObject *setstate = NULL;
23430  PyObject *setstate_cython = NULL;
23431 #if CYTHON_USE_PYTYPE_LOOKUP
23432  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
23433 #else
23434  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
23435 #endif
23436 #if CYTHON_USE_PYTYPE_LOOKUP
23437  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
23438 #else
23439  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
23440 #endif
23441  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
23442  if (reduce_ex == object_reduce_ex) {
23443 #if CYTHON_USE_PYTYPE_LOOKUP
23444  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
23445 #else
23446  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
23447 #endif
23448  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
23449  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
23450  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
23451  if (likely(reduce_cython)) {
23452  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
23453  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
23454  } else if (reduce == object_reduce || PyErr_Occurred()) {
23455  goto __PYX_BAD;
23456  }
23457  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
23458  if (!setstate) PyErr_Clear();
23459  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
23460  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
23461  if (likely(setstate_cython)) {
23462  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
23463  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
23464  } else if (!setstate || PyErr_Occurred()) {
23465  goto __PYX_BAD;
23466  }
23467  }
23468  PyType_Modified((PyTypeObject*)type_obj);
23469  }
23470  }
23471  goto __PYX_GOOD;
23472 __PYX_BAD:
23473  if (!PyErr_Occurred())
23474  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
23475  ret = -1;
23476 __PYX_GOOD:
23477 #if !CYTHON_USE_PYTYPE_LOOKUP
23478  Py_XDECREF(object_reduce);
23479  Py_XDECREF(object_reduce_ex);
23480 #endif
23481  Py_XDECREF(reduce);
23482  Py_XDECREF(reduce_ex);
23483  Py_XDECREF(reduce_cython);
23484  Py_XDECREF(setstate);
23485  Py_XDECREF(setstate_cython);
23486  return ret;
23487 }
23488 
23489 /* BytesEquals */
23490 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
23491 #if CYTHON_COMPILING_IN_PYPY
23492  return PyObject_RichCompareBool(s1, s2, equals);
23493 #else
23494  if (s1 == s2) {
23495  return (equals == Py_EQ);
23496  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
23497  const char *ps1, *ps2;
23498  Py_ssize_t length = PyBytes_GET_SIZE(s1);
23499  if (length != PyBytes_GET_SIZE(s2))
23500  return (equals == Py_NE);
23501  ps1 = PyBytes_AS_STRING(s1);
23502  ps2 = PyBytes_AS_STRING(s2);
23503  if (ps1[0] != ps2[0]) {
23504  return (equals == Py_NE);
23505  } else if (length == 1) {
23506  return (equals == Py_EQ);
23507  } else {
23508  int result;
23509 #if CYTHON_USE_UNICODE_INTERNALS
23510  Py_hash_t hash1, hash2;
23511  hash1 = ((PyBytesObject*)s1)->ob_shash;
23512  hash2 = ((PyBytesObject*)s2)->ob_shash;
23513  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
23514  return (equals == Py_NE);
23515  }
23516 #endif
23517  result = memcmp(ps1, ps2, (size_t)length);
23518  return (equals == Py_EQ) ? (result == 0) : (result != 0);
23519  }
23520  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
23521  return (equals == Py_NE);
23522  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
23523  return (equals == Py_NE);
23524  } else {
23525  int result;
23526  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
23527  if (!py_result)
23528  return -1;
23529  result = __Pyx_PyObject_IsTrue(py_result);
23530  Py_DECREF(py_result);
23531  return result;
23532  }
23533 #endif
23534 }
23535 
23536 /* UnicodeEquals */
23537 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
23538 #if CYTHON_COMPILING_IN_PYPY
23539  return PyObject_RichCompareBool(s1, s2, equals);
23540 #else
23541 #if PY_MAJOR_VERSION < 3
23542  PyObject* owned_ref = NULL;
23543 #endif
23544  int s1_is_unicode, s2_is_unicode;
23545  if (s1 == s2) {
23546  goto return_eq;
23547  }
23548  s1_is_unicode = PyUnicode_CheckExact(s1);
23549  s2_is_unicode = PyUnicode_CheckExact(s2);
23550 #if PY_MAJOR_VERSION < 3
23551  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
23552  owned_ref = PyUnicode_FromObject(s2);
23553  if (unlikely(!owned_ref))
23554  return -1;
23555  s2 = owned_ref;
23556  s2_is_unicode = 1;
23557  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
23558  owned_ref = PyUnicode_FromObject(s1);
23559  if (unlikely(!owned_ref))
23560  return -1;
23561  s1 = owned_ref;
23562  s1_is_unicode = 1;
23563  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
23564  return __Pyx_PyBytes_Equals(s1, s2, equals);
23565  }
23566 #endif
23567  if (s1_is_unicode & s2_is_unicode) {
23568  Py_ssize_t length;
23569  int kind;
23570  void *data1, *data2;
23571  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
23572  return -1;
23573  length = __Pyx_PyUnicode_GET_LENGTH(s1);
23574  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
23575  goto return_ne;
23576  }
23577 #if CYTHON_USE_UNICODE_INTERNALS
23578  {
23579  Py_hash_t hash1, hash2;
23580  #if CYTHON_PEP393_ENABLED
23581  hash1 = ((PyASCIIObject*)s1)->hash;
23582  hash2 = ((PyASCIIObject*)s2)->hash;
23583  #else
23584  hash1 = ((PyUnicodeObject*)s1)->hash;
23585  hash2 = ((PyUnicodeObject*)s2)->hash;
23586  #endif
23587  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
23588  goto return_ne;
23589  }
23590  }
23591 #endif
23592  kind = __Pyx_PyUnicode_KIND(s1);
23593  if (kind != __Pyx_PyUnicode_KIND(s2)) {
23594  goto return_ne;
23595  }
23596  data1 = __Pyx_PyUnicode_DATA(s1);
23597  data2 = __Pyx_PyUnicode_DATA(s2);
23598  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
23599  goto return_ne;
23600  } else if (length == 1) {
23601  goto return_eq;
23602  } else {
23603  int result = memcmp(data1, data2, (size_t)(length * kind));
23604  #if PY_MAJOR_VERSION < 3
23605  Py_XDECREF(owned_ref);
23606  #endif
23607  return (equals == Py_EQ) ? (result == 0) : (result != 0);
23608  }
23609  } else if ((s1 == Py_None) & s2_is_unicode) {
23610  goto return_ne;
23611  } else if ((s2 == Py_None) & s1_is_unicode) {
23612  goto return_ne;
23613  } else {
23614  int result;
23615  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
23616  #if PY_MAJOR_VERSION < 3
23617  Py_XDECREF(owned_ref);
23618  #endif
23619  if (!py_result)
23620  return -1;
23621  result = __Pyx_PyObject_IsTrue(py_result);
23622  Py_DECREF(py_result);
23623  return result;
23624  }
23625 return_eq:
23626  #if PY_MAJOR_VERSION < 3
23627  Py_XDECREF(owned_ref);
23628  #endif
23629  return (equals == Py_EQ);
23630 return_ne:
23631  #if PY_MAJOR_VERSION < 3
23632  Py_XDECREF(owned_ref);
23633  #endif
23634  return (equals == Py_NE);
23635 #endif
23636 }
23637 
23638 /* CLineInTraceback */
23639 #ifndef CYTHON_CLINE_IN_TRACEBACK
23640 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
23641  PyObject *use_cline;
23642  PyObject *ptype, *pvalue, *ptraceback;
23643 #if CYTHON_COMPILING_IN_CPYTHON
23644  PyObject **cython_runtime_dict;
23645 #endif
23646  if (unlikely(!__pyx_cython_runtime)) {
23647  return c_line;
23648  }
23649  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
23650 #if CYTHON_COMPILING_IN_CPYTHON
23651  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
23652  if (likely(cython_runtime_dict)) {
23653  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
23654  use_cline, *cython_runtime_dict,
23655  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
23656  } else
23657 #endif
23658  {
23659  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
23660  if (use_cline_obj) {
23661  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
23662  Py_DECREF(use_cline_obj);
23663  } else {
23664  PyErr_Clear();
23665  use_cline = NULL;
23666  }
23667  }
23668  if (!use_cline) {
23669  c_line = 0;
23670  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
23671  }
23672  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
23673  c_line = 0;
23674  }
23675  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
23676  return c_line;
23677 }
23678 #endif
23679 
23680 /* CodeObjectCache */
23681 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
23682  int start = 0, mid = 0, end = count - 1;
23683  if (end >= 0 && code_line > entries[end].code_line) {
23684  return count;
23685  }
23686  while (start < end) {
23687  mid = start + (end - start) / 2;
23688  if (code_line < entries[mid].code_line) {
23689  end = mid;
23690  } else if (code_line > entries[mid].code_line) {
23691  start = mid + 1;
23692  } else {
23693  return mid;
23694  }
23695  }
23696  if (code_line <= entries[mid].code_line) {
23697  return mid;
23698  } else {
23699  return mid + 1;
23700  }
23701 }
23702 static PyCodeObject *__pyx_find_code_object(int code_line) {
23703  PyCodeObject* code_object;
23704  int pos;
23705  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
23706  return NULL;
23707  }
23708  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23709  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
23710  return NULL;
23711  }
23712  code_object = __pyx_code_cache.entries[pos].code_object;
23713  Py_INCREF(code_object);
23714  return code_object;
23715 }
23716 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
23717  int pos, i;
23718  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
23719  if (unlikely(!code_line)) {
23720  return;
23721  }
23722  if (unlikely(!entries)) {
23723  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
23724  if (likely(entries)) {
23725  __pyx_code_cache.entries = entries;
23726  __pyx_code_cache.max_count = 64;
23727  __pyx_code_cache.count = 1;
23728  entries[0].code_line = code_line;
23729  entries[0].code_object = code_object;
23730  Py_INCREF(code_object);
23731  }
23732  return;
23733  }
23734  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
23735  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
23736  PyCodeObject* tmp = entries[pos].code_object;
23737  entries[pos].code_object = code_object;
23738  Py_DECREF(tmp);
23739  return;
23740  }
23741  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
23742  int new_max = __pyx_code_cache.max_count + 64;
23743  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
23744  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
23745  if (unlikely(!entries)) {
23746  return;
23747  }
23748  __pyx_code_cache.entries = entries;
23749  __pyx_code_cache.max_count = new_max;
23750  }
23751  for (i=__pyx_code_cache.count; i>pos; i--) {
23752  entries[i] = entries[i-1];
23753  }
23754  entries[pos].code_line = code_line;
23755  entries[pos].code_object = code_object;
23756  __pyx_code_cache.count++;
23757  Py_INCREF(code_object);
23758 }
23759 
23760 /* AddTraceback */
23761 #include "compile.h"
23762 #include "frameobject.h"
23763 #include "traceback.h"
23764 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
23765  const char *funcname, int c_line,
23766  int py_line, const char *filename) {
23767  PyCodeObject *py_code = NULL;
23768  PyObject *py_funcname = NULL;
23769  #if PY_MAJOR_VERSION < 3
23770  PyObject *py_srcfile = NULL;
23771  py_srcfile = PyString_FromString(filename);
23772  if (!py_srcfile) goto bad;
23773  #endif
23774  if (c_line) {
23775  #if PY_MAJOR_VERSION < 3
23776  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23777  if (!py_funcname) goto bad;
23778  #else
23779  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
23780  if (!py_funcname) goto bad;
23781  funcname = PyUnicode_AsUTF8(py_funcname);
23782  if (!funcname) goto bad;
23783  #endif
23784  }
23785  else {
23786  #if PY_MAJOR_VERSION < 3
23787  py_funcname = PyString_FromString(funcname);
23788  if (!py_funcname) goto bad;
23789  #endif
23790  }
23791  #if PY_MAJOR_VERSION < 3
23792  py_code = __Pyx_PyCode_New(
23793  0,
23794  0,
23795  0,
23796  0,
23797  0,
23798  __pyx_empty_bytes, /*PyObject *code,*/
23799  __pyx_empty_tuple, /*PyObject *consts,*/
23800  __pyx_empty_tuple, /*PyObject *names,*/
23801  __pyx_empty_tuple, /*PyObject *varnames,*/
23802  __pyx_empty_tuple, /*PyObject *freevars,*/
23803  __pyx_empty_tuple, /*PyObject *cellvars,*/
23804  py_srcfile, /*PyObject *filename,*/
23805  py_funcname, /*PyObject *name,*/
23806  py_line,
23807  __pyx_empty_bytes /*PyObject *lnotab*/
23808  );
23809  Py_DECREF(py_srcfile);
23810  #else
23811  py_code = PyCode_NewEmpty(filename, funcname, py_line);
23812  #endif
23813  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
23814  return py_code;
23815 bad:
23816  Py_XDECREF(py_funcname);
23817  #if PY_MAJOR_VERSION < 3
23818  Py_XDECREF(py_srcfile);
23819  #endif
23820  return NULL;
23821 }
23822 static void __Pyx_AddTraceback(const char *funcname, int c_line,
23823  int py_line, const char *filename) {
23824  PyCodeObject *py_code = 0;
23825  PyFrameObject *py_frame = 0;
23826  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23827  if (c_line) {
23828  c_line = __Pyx_CLineForTraceback(tstate, c_line);
23829  }
23830  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
23831  if (!py_code) {
23832  py_code = __Pyx_CreateCodeObjectForTraceback(
23833  funcname, c_line, py_line, filename);
23834  if (!py_code) goto bad;
23835  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
23836  }
23837  py_frame = PyFrame_New(
23838  tstate, /*PyThreadState *tstate,*/
23839  py_code, /*PyCodeObject *code,*/
23840  __pyx_d, /*PyObject *globals,*/
23841  0 /*PyObject *locals*/
23842  );
23843  if (!py_frame) goto bad;
23844  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
23845  PyTraceBack_Here(py_frame);
23846 bad:
23847  Py_XDECREF(py_code);
23848  Py_XDECREF(py_frame);
23849 }
23850 
23851 /* CIntFromPyVerify */
23852 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
23853  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
23854 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
23855  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
23856 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
23857  {\
23858  func_type value = func_value;\
23859  if (sizeof(target_type) < sizeof(func_type)) {\
23860  if (unlikely(value != (func_type) (target_type) value)) {\
23861  func_type zero = 0;\
23862  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
23863  return (target_type) -1;\
23864  if (is_unsigned && unlikely(value < zero))\
23865  goto raise_neg_overflow;\
23866  else\
23867  goto raise_overflow;\
23868  }\
23869  }\
23870  return (target_type) value;\
23871  }
23872 
23873 /* CIntFromPy */
23874 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
23875 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
23876 #pragma GCC diagnostic push
23877 #pragma GCC diagnostic ignored "-Wconversion"
23878 #endif
23879  const int neg_one = (int) -1, const_zero = (int) 0;
23880 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
23881 #pragma GCC diagnostic pop
23882 #endif
23883  const int is_unsigned = neg_one > const_zero;
23884 #if PY_MAJOR_VERSION < 3
23885  if (likely(PyInt_Check(x))) {
23886  if (sizeof(int) < sizeof(long)) {
23887  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
23888  } else {
23889  long val = PyInt_AS_LONG(x);
23890  if (is_unsigned && unlikely(val < 0)) {
23891  goto raise_neg_overflow;
23892  }
23893  return (int) val;
23894  }
23895  } else
23896 #endif
23897  if (likely(PyLong_Check(x))) {
23898  if (is_unsigned) {
23899 #if CYTHON_USE_PYLONG_INTERNALS
23900  const digit* digits = ((PyLongObject*)x)->ob_digit;
23901  switch (Py_SIZE(x)) {
23902  case 0: return (int) 0;
23903  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
23904  case 2:
23905  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23906  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23907  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23908  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
23909  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23910  }
23911  }
23912  break;
23913  case 3:
23914  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23915  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23916  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23917  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
23918  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23919  }
23920  }
23921  break;
23922  case 4:
23923  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
23924  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23925  __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])))
23926  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
23927  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
23928  }
23929  }
23930  break;
23931  }
23932 #endif
23933 #if CYTHON_COMPILING_IN_CPYTHON
23934  if (unlikely(Py_SIZE(x) < 0)) {
23935  goto raise_neg_overflow;
23936  }
23937 #else
23938  {
23939  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
23940  if (unlikely(result < 0))
23941  return (int) -1;
23942  if (unlikely(result == 1))
23943  goto raise_neg_overflow;
23944  }
23945 #endif
23946  if (sizeof(int) <= sizeof(unsigned long)) {
23947  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
23948 #ifdef HAVE_LONG_LONG
23949  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
23950  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
23951 #endif
23952  }
23953  } else {
23954 #if CYTHON_USE_PYLONG_INTERNALS
23955  const digit* digits = ((PyLongObject*)x)->ob_digit;
23956  switch (Py_SIZE(x)) {
23957  case 0: return (int) 0;
23958  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
23959  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
23960  case -2:
23961  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
23962  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23963  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23964  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23965  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23966  }
23967  }
23968  break;
23969  case 2:
23970  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
23971  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
23972  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23973  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23974  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23975  }
23976  }
23977  break;
23978  case -3:
23979  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
23980  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23981  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23982  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23983  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23984  }
23985  }
23986  break;
23987  case 3:
23988  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
23989  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
23990  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
23991  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23992  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
23993  }
23994  }
23995  break;
23996  case -4:
23997  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
23998  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
23999  __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])))
24000  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
24001  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
24002  }
24003  }
24004  break;
24005  case 4:
24006  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
24007  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24008  __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])))
24009  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
24010  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
24011  }
24012  }
24013  break;
24014  }
24015 #endif
24016  if (sizeof(int) <= sizeof(long)) {
24017  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
24018 #ifdef HAVE_LONG_LONG
24019  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
24020  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
24021 #endif
24022  }
24023  }
24024  {
24025 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
24026  PyErr_SetString(PyExc_RuntimeError,
24027  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
24028 #else
24029  int val;
24030  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
24031  #if PY_MAJOR_VERSION < 3
24032  if (likely(v) && !PyLong_Check(v)) {
24033  PyObject *tmp = v;
24034  v = PyNumber_Long(tmp);
24035  Py_DECREF(tmp);
24036  }
24037  #endif
24038  if (likely(v)) {
24039  int one = 1; int is_little = (int)*(unsigned char *)&one;
24040  unsigned char *bytes = (unsigned char *)&val;
24041  int ret = _PyLong_AsByteArray((PyLongObject *)v,
24042  bytes, sizeof(val),
24043  is_little, !is_unsigned);
24044  Py_DECREF(v);
24045  if (likely(!ret))
24046  return val;
24047  }
24048 #endif
24049  return (int) -1;
24050  }
24051  } else {
24052  int val;
24053  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
24054  if (!tmp) return (int) -1;
24055  val = __Pyx_PyInt_As_int(tmp);
24056  Py_DECREF(tmp);
24057  return val;
24058  }
24059 raise_overflow:
24060  PyErr_SetString(PyExc_OverflowError,
24061  "value too large to convert to int");
24062  return (int) -1;
24063 raise_neg_overflow:
24064  PyErr_SetString(PyExc_OverflowError,
24065  "can't convert negative value to int");
24066  return (int) -1;
24067 }
24068 
24069 /* CIntToPy */
24070 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
24071 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24072 #pragma GCC diagnostic push
24073 #pragma GCC diagnostic ignored "-Wconversion"
24074 #endif
24075  const int neg_one = (int) -1, const_zero = (int) 0;
24076 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24077 #pragma GCC diagnostic pop
24078 #endif
24079  const int is_unsigned = neg_one > const_zero;
24080  if (is_unsigned) {
24081  if (sizeof(int) < sizeof(long)) {
24082  return PyInt_FromLong((long) value);
24083  } else if (sizeof(int) <= sizeof(unsigned long)) {
24084  return PyLong_FromUnsignedLong((unsigned long) value);
24085 #ifdef HAVE_LONG_LONG
24086  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
24087  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
24088 #endif
24089  }
24090  } else {
24091  if (sizeof(int) <= sizeof(long)) {
24092  return PyInt_FromLong((long) value);
24093 #ifdef HAVE_LONG_LONG
24094  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
24095  return PyLong_FromLongLong((PY_LONG_LONG) value);
24096 #endif
24097  }
24098  }
24099  {
24100  int one = 1; int little = (int)*(unsigned char *)&one;
24101  unsigned char *bytes = (unsigned char *)&value;
24102  return _PyLong_FromByteArray(bytes, sizeof(int),
24103  little, !is_unsigned);
24104  }
24105 }
24106 
24107 /* CIntToPy */
24108 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
24109 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24110 #pragma GCC diagnostic push
24111 #pragma GCC diagnostic ignored "-Wconversion"
24112 #endif
24113  const long neg_one = (long) -1, const_zero = (long) 0;
24114 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24115 #pragma GCC diagnostic pop
24116 #endif
24117  const int is_unsigned = neg_one > const_zero;
24118  if (is_unsigned) {
24119  if (sizeof(long) < sizeof(long)) {
24120  return PyInt_FromLong((long) value);
24121  } else if (sizeof(long) <= sizeof(unsigned long)) {
24122  return PyLong_FromUnsignedLong((unsigned long) value);
24123 #ifdef HAVE_LONG_LONG
24124  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
24125  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
24126 #endif
24127  }
24128  } else {
24129  if (sizeof(long) <= sizeof(long)) {
24130  return PyInt_FromLong((long) value);
24131 #ifdef HAVE_LONG_LONG
24132  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
24133  return PyLong_FromLongLong((PY_LONG_LONG) value);
24134 #endif
24135  }
24136  }
24137  {
24138  int one = 1; int little = (int)*(unsigned char *)&one;
24139  unsigned char *bytes = (unsigned char *)&value;
24140  return _PyLong_FromByteArray(bytes, sizeof(long),
24141  little, !is_unsigned);
24142  }
24143 }
24144 
24145 /* CIntFromPy */
24146 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
24147 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24148 #pragma GCC diagnostic push
24149 #pragma GCC diagnostic ignored "-Wconversion"
24150 #endif
24151  const long neg_one = (long) -1, const_zero = (long) 0;
24152 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
24153 #pragma GCC diagnostic pop
24154 #endif
24155  const int is_unsigned = neg_one > const_zero;
24156 #if PY_MAJOR_VERSION < 3
24157  if (likely(PyInt_Check(x))) {
24158  if (sizeof(long) < sizeof(long)) {
24159  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
24160  } else {
24161  long val = PyInt_AS_LONG(x);
24162  if (is_unsigned && unlikely(val < 0)) {
24163  goto raise_neg_overflow;
24164  }
24165  return (long) val;
24166  }
24167  } else
24168 #endif
24169  if (likely(PyLong_Check(x))) {
24170  if (is_unsigned) {
24171 #if CYTHON_USE_PYLONG_INTERNALS
24172  const digit* digits = ((PyLongObject*)x)->ob_digit;
24173  switch (Py_SIZE(x)) {
24174  case 0: return (long) 0;
24175  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
24176  case 2:
24177  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
24178  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24179  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24180  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
24181  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
24182  }
24183  }
24184  break;
24185  case 3:
24186  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
24187  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24188  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24189  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
24190  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
24191  }
24192  }
24193  break;
24194  case 4:
24195  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
24196  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24197  __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])))
24198  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
24199  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
24200  }
24201  }
24202  break;
24203  }
24204 #endif
24205 #if CYTHON_COMPILING_IN_CPYTHON
24206  if (unlikely(Py_SIZE(x) < 0)) {
24207  goto raise_neg_overflow;
24208  }
24209 #else
24210  {
24211  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
24212  if (unlikely(result < 0))
24213  return (long) -1;
24214  if (unlikely(result == 1))
24215  goto raise_neg_overflow;
24216  }
24217 #endif
24218  if (sizeof(long) <= sizeof(unsigned long)) {
24219  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
24220 #ifdef HAVE_LONG_LONG
24221  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
24222  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
24223 #endif
24224  }
24225  } else {
24226 #if CYTHON_USE_PYLONG_INTERNALS
24227  const digit* digits = ((PyLongObject*)x)->ob_digit;
24228  switch (Py_SIZE(x)) {
24229  case 0: return (long) 0;
24230  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
24231  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
24232  case -2:
24233  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
24234  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24235  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24236  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24237  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24238  }
24239  }
24240  break;
24241  case 2:
24242  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
24243  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
24244  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24245  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24246  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24247  }
24248  }
24249  break;
24250  case -3:
24251  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24252  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24253  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24254  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24255  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24256  }
24257  }
24258  break;
24259  case 3:
24260  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
24261  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
24262  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
24263  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24264  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24265  }
24266  }
24267  break;
24268  case -4:
24269  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24270  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24271  __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])))
24272  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24273  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24274  }
24275  }
24276  break;
24277  case 4:
24278  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
24279  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
24280  __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])))
24281  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24282  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
24283  }
24284  }
24285  break;
24286  }
24287 #endif
24288  if (sizeof(long) <= sizeof(long)) {
24289  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
24290 #ifdef HAVE_LONG_LONG
24291  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
24292  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
24293 #endif
24294  }
24295  }
24296  {
24297 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
24298  PyErr_SetString(PyExc_RuntimeError,
24299  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
24300 #else
24301  long val;
24302  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
24303  #if PY_MAJOR_VERSION < 3
24304  if (likely(v) && !PyLong_Check(v)) {
24305  PyObject *tmp = v;
24306  v = PyNumber_Long(tmp);
24307  Py_DECREF(tmp);
24308  }
24309  #endif
24310  if (likely(v)) {
24311  int one = 1; int is_little = (int)*(unsigned char *)&one;
24312  unsigned char *bytes = (unsigned char *)&val;
24313  int ret = _PyLong_AsByteArray((PyLongObject *)v,
24314  bytes, sizeof(val),
24315  is_little, !is_unsigned);
24316  Py_DECREF(v);
24317  if (likely(!ret))
24318  return val;
24319  }
24320 #endif
24321  return (long) -1;
24322  }
24323  } else {
24324  long val;
24325  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
24326  if (!tmp) return (long) -1;
24327  val = __Pyx_PyInt_As_long(tmp);
24328  Py_DECREF(tmp);
24329  return val;
24330  }
24331 raise_overflow:
24332  PyErr_SetString(PyExc_OverflowError,
24333  "value too large to convert to long");
24334  return (long) -1;
24335 raise_neg_overflow:
24336  PyErr_SetString(PyExc_OverflowError,
24337  "can't convert negative value to long");
24338  return (long) -1;
24339 }
24340 
24341 /* FastTypeChecks */
24342 #if CYTHON_COMPILING_IN_CPYTHON
24343 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
24344  while (a) {
24345  a = a->tp_base;
24346  if (a == b)
24347  return 1;
24348  }
24349  return b == &PyBaseObject_Type;
24350 }
24351 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
24352  PyObject *mro;
24353  if (a == b) return 1;
24354  mro = a->tp_mro;
24355  if (likely(mro)) {
24356  Py_ssize_t i, n;
24357  n = PyTuple_GET_SIZE(mro);
24358  for (i = 0; i < n; i++) {
24359  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
24360  return 1;
24361  }
24362  return 0;
24363  }
24364  return __Pyx_InBases(a, b);
24365 }
24366 #if PY_MAJOR_VERSION == 2
24367 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
24368  PyObject *exception, *value, *tb;
24369  int res;
24370  __Pyx_PyThreadState_declare
24371  __Pyx_PyThreadState_assign
24372  __Pyx_ErrFetch(&exception, &value, &tb);
24373  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
24374  if (unlikely(res == -1)) {
24375  PyErr_WriteUnraisable(err);
24376  res = 0;
24377  }
24378  if (!res) {
24379  res = PyObject_IsSubclass(err, exc_type2);
24380  if (unlikely(res == -1)) {
24381  PyErr_WriteUnraisable(err);
24382  res = 0;
24383  }
24384  }
24385  __Pyx_ErrRestore(exception, value, tb);
24386  return res;
24387 }
24388 #else
24389 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
24390  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
24391  if (!res) {
24392  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
24393  }
24394  return res;
24395 }
24396 #endif
24397 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
24398  Py_ssize_t i, n;
24399  assert(PyExceptionClass_Check(exc_type));
24400  n = PyTuple_GET_SIZE(tuple);
24401 #if PY_MAJOR_VERSION >= 3
24402  for (i=0; i<n; i++) {
24403  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
24404  }
24405 #endif
24406  for (i=0; i<n; i++) {
24407  PyObject *t = PyTuple_GET_ITEM(tuple, i);
24408  #if PY_MAJOR_VERSION < 3
24409  if (likely(exc_type == t)) return 1;
24410  #endif
24411  if (likely(PyExceptionClass_Check(t))) {
24412  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
24413  } else {
24414  }
24415  }
24416  return 0;
24417 }
24418 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
24419  if (likely(err == exc_type)) return 1;
24420  if (likely(PyExceptionClass_Check(err))) {
24421  if (likely(PyExceptionClass_Check(exc_type))) {
24422  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
24423  } else if (likely(PyTuple_Check(exc_type))) {
24424  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
24425  } else {
24426  }
24427  }
24428  return PyErr_GivenExceptionMatches(err, exc_type);
24429 }
24430 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
24431  assert(PyExceptionClass_Check(exc_type1));
24432  assert(PyExceptionClass_Check(exc_type2));
24433  if (likely(err == exc_type1 || err == exc_type2)) return 1;
24434  if (likely(PyExceptionClass_Check(err))) {
24435  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
24436  }
24437  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
24438 }
24439 #endif
24440 
24441 /* FetchCommonType */
24442 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
24443  PyObject* fake_module;
24444  PyTypeObject* cached_type = NULL;
24445  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
24446  if (!fake_module) return NULL;
24447  Py_INCREF(fake_module);
24448  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
24449  if (cached_type) {
24450  if (!PyType_Check((PyObject*)cached_type)) {
24451  PyErr_Format(PyExc_TypeError,
24452  "Shared Cython type %.200s is not a type object",
24453  type->tp_name);
24454  goto bad;
24455  }
24456  if (cached_type->tp_basicsize != type->tp_basicsize) {
24457  PyErr_Format(PyExc_TypeError,
24458  "Shared Cython type %.200s has the wrong size, try recompiling",
24459  type->tp_name);
24460  goto bad;
24461  }
24462  } else {
24463  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
24464  PyErr_Clear();
24465  if (PyType_Ready(type) < 0) goto bad;
24466  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
24467  goto bad;
24468  Py_INCREF(type);
24469  cached_type = type;
24470  }
24471 done:
24472  Py_DECREF(fake_module);
24473  return cached_type;
24474 bad:
24475  Py_XDECREF(cached_type);
24476  cached_type = NULL;
24477  goto done;
24478 }
24479 
24480 /* PyObjectGetMethod */
24481 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
24482  PyObject *attr;
24483 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
24484  PyTypeObject *tp = Py_TYPE(obj);
24485  PyObject *descr;
24486  descrgetfunc f = NULL;
24487  PyObject **dictptr, *dict;
24488  int meth_found = 0;
24489  assert (*method == NULL);
24490  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
24491  attr = __Pyx_PyObject_GetAttrStr(obj, name);
24492  goto try_unpack;
24493  }
24494  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
24495  return 0;
24496  }
24497  descr = _PyType_Lookup(tp, name);
24498  if (likely(descr != NULL)) {
24499  Py_INCREF(descr);
24500 #if PY_MAJOR_VERSION >= 3
24501  #ifdef __Pyx_CyFunction_USED
24502  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
24503  #else
24504  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
24505  #endif
24506 #else
24507  #ifdef __Pyx_CyFunction_USED
24508  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
24509  #else
24510  if (likely(PyFunction_Check(descr)))
24511  #endif
24512 #endif
24513  {
24514  meth_found = 1;
24515  } else {
24516  f = Py_TYPE(descr)->tp_descr_get;
24517  if (f != NULL && PyDescr_IsData(descr)) {
24518  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
24519  Py_DECREF(descr);
24520  goto try_unpack;
24521  }
24522  }
24523  }
24524  dictptr = _PyObject_GetDictPtr(obj);
24525  if (dictptr != NULL && (dict = *dictptr) != NULL) {
24526  Py_INCREF(dict);
24527  attr = __Pyx_PyDict_GetItemStr(dict, name);
24528  if (attr != NULL) {
24529  Py_INCREF(attr);
24530  Py_DECREF(dict);
24531  Py_XDECREF(descr);
24532  goto try_unpack;
24533  }
24534  Py_DECREF(dict);
24535  }
24536  if (meth_found) {
24537  *method = descr;
24538  return 1;
24539  }
24540  if (f != NULL) {
24541  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
24542  Py_DECREF(descr);
24543  goto try_unpack;
24544  }
24545  if (descr != NULL) {
24546  *method = descr;
24547  return 0;
24548  }
24549  PyErr_Format(PyExc_AttributeError,
24550 #if PY_MAJOR_VERSION >= 3
24551  "'%.50s' object has no attribute '%U'",
24552  tp->tp_name, name);
24553 #else
24554  "'%.50s' object has no attribute '%.400s'",
24555  tp->tp_name, PyString_AS_STRING(name));
24556 #endif
24557  return 0;
24558 #else
24559  attr = __Pyx_PyObject_GetAttrStr(obj, name);
24560  goto try_unpack;
24561 #endif
24562 try_unpack:
24563 #if CYTHON_UNPACK_METHODS
24564  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
24565  PyObject *function = PyMethod_GET_FUNCTION(attr);
24566  Py_INCREF(function);
24567  Py_DECREF(attr);
24568  *method = function;
24569  return 1;
24570  }
24571 #endif
24572  *method = attr;
24573  return 0;
24574 }
24575 
24576 /* PyObjectCallMethod1 */
24577 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
24578  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
24579  Py_DECREF(method);
24580  return result;
24581 }
24582 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
24583  PyObject *method = NULL, *result;
24584  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
24585  if (likely(is_method)) {
24586  result = __Pyx_PyObject_Call2Args(method, obj, arg);
24587  Py_DECREF(method);
24588  return result;
24589  }
24590  if (unlikely(!method)) return NULL;
24591  return __Pyx__PyObject_CallMethod1(method, arg);
24592 }
24593 
24594 /* CoroutineBase */
24595 #include <structmember.h>
24596 #include <frameobject.h>
24597 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
24598 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
24599  PyObject *et, *ev, *tb;
24600  PyObject *value = NULL;
24601  __Pyx_ErrFetch(&et, &ev, &tb);
24602  if (!et) {
24603  Py_XDECREF(tb);
24604  Py_XDECREF(ev);
24605  Py_INCREF(Py_None);
24606  *pvalue = Py_None;
24607  return 0;
24608  }
24609  if (likely(et == PyExc_StopIteration)) {
24610  if (!ev) {
24611  Py_INCREF(Py_None);
24612  value = Py_None;
24613  }
24614 #if PY_VERSION_HEX >= 0x030300A0
24615  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
24616  value = ((PyStopIterationObject *)ev)->value;
24617  Py_INCREF(value);
24618  Py_DECREF(ev);
24619  }
24620 #endif
24621  else if (unlikely(PyTuple_Check(ev))) {
24622  if (PyTuple_GET_SIZE(ev) >= 1) {
24623 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24624  value = PyTuple_GET_ITEM(ev, 0);
24625  Py_INCREF(value);
24626 #else
24627  value = PySequence_ITEM(ev, 0);
24628 #endif
24629  } else {
24630  Py_INCREF(Py_None);
24631  value = Py_None;
24632  }
24633  Py_DECREF(ev);
24634  }
24635  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
24636  value = ev;
24637  }
24638  if (likely(value)) {
24639  Py_XDECREF(tb);
24640  Py_DECREF(et);
24641  *pvalue = value;
24642  return 0;
24643  }
24644  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
24645  __Pyx_ErrRestore(et, ev, tb);
24646  return -1;
24647  }
24648  PyErr_NormalizeException(&et, &ev, &tb);
24649  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
24650  __Pyx_ErrRestore(et, ev, tb);
24651  return -1;
24652  }
24653  Py_XDECREF(tb);
24654  Py_DECREF(et);
24655 #if PY_VERSION_HEX >= 0x030300A0
24656  value = ((PyStopIterationObject *)ev)->value;
24657  Py_INCREF(value);
24658  Py_DECREF(ev);
24659 #else
24660  {
24661  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
24662  Py_DECREF(ev);
24663  if (likely(args)) {
24664  value = PySequence_GetItem(args, 0);
24665  Py_DECREF(args);
24666  }
24667  if (unlikely(!value)) {
24668  __Pyx_ErrRestore(NULL, NULL, NULL);
24669  Py_INCREF(Py_None);
24670  value = Py_None;
24671  }
24672  }
24673 #endif
24674  *pvalue = value;
24675  return 0;
24676 }
24677 static CYTHON_INLINE
24678 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
24679  PyObject *t, *v, *tb;
24680  t = exc_state->exc_type;
24681  v = exc_state->exc_value;
24682  tb = exc_state->exc_traceback;
24683  exc_state->exc_type = NULL;
24684  exc_state->exc_value = NULL;
24685  exc_state->exc_traceback = NULL;
24686  Py_XDECREF(t);
24687  Py_XDECREF(v);
24688  Py_XDECREF(tb);
24689 }
24690 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
24691 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
24692  const char *msg;
24693  if ((0)) {
24694  #ifdef __Pyx_Coroutine_USED
24695  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
24696  msg = "coroutine already executing";
24697  #endif
24698  #ifdef __Pyx_AsyncGen_USED
24699  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
24700  msg = "async generator already executing";
24701  #endif
24702  } else {
24703  msg = "generator already executing";
24704  }
24705  PyErr_SetString(PyExc_ValueError, msg);
24706 }
24707 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
24708 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
24709  const char *msg;
24710  if ((0)) {
24711  #ifdef __Pyx_Coroutine_USED
24712  } else if (__Pyx_Coroutine_Check(gen)) {
24713  msg = "can't send non-None value to a just-started coroutine";
24714  #endif
24715  #ifdef __Pyx_AsyncGen_USED
24716  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
24717  msg = "can't send non-None value to a just-started async generator";
24718  #endif
24719  } else {
24720  msg = "can't send non-None value to a just-started generator";
24721  }
24722  PyErr_SetString(PyExc_TypeError, msg);
24723 }
24724 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
24725 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
24726  #ifdef __Pyx_Coroutine_USED
24727  if (!closing && __Pyx_Coroutine_Check(gen)) {
24728  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
24729  } else
24730  #endif
24731  if (value) {
24732  #ifdef __Pyx_AsyncGen_USED
24733  if (__Pyx_AsyncGen_CheckExact(gen))
24734  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
24735  else
24736  #endif
24737  PyErr_SetNone(PyExc_StopIteration);
24738  }
24739 }
24740 static
24741 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
24742  __Pyx_PyThreadState_declare
24743  PyThreadState *tstate;
24744  __Pyx_ExcInfoStruct *exc_state;
24745  PyObject *retval;
24746  assert(!self->is_running);
24747  if (unlikely(self->resume_label == 0)) {
24748  if (unlikely(value && value != Py_None)) {
24749  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
24750  }
24751  }
24752  if (unlikely(self->resume_label == -1)) {
24753  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
24754  }
24755 #if CYTHON_FAST_THREAD_STATE
24756  __Pyx_PyThreadState_assign
24757  tstate = __pyx_tstate;
24758 #else
24759  tstate = __Pyx_PyThreadState_Current;
24760 #endif
24761  exc_state = &self->gi_exc_state;
24762  if (exc_state->exc_type) {
24763  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
24764  #else
24765  if (exc_state->exc_traceback) {
24766  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
24767  PyFrameObject *f = tb->tb_frame;
24768  assert(f->f_back == NULL);
24769  #if PY_VERSION_HEX >= 0x030B00A1
24770  f->f_back = PyThreadState_GetFrame(tstate);
24771  #else
24772  Py_XINCREF(tstate->frame);
24773  f->f_back = tstate->frame;
24774  #endif
24775  }
24776  #endif
24777  }
24778 #if CYTHON_USE_EXC_INFO_STACK
24779  exc_state->previous_item = tstate->exc_info;
24780  tstate->exc_info = exc_state;
24781 #else
24782  if (exc_state->exc_type) {
24783  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
24784  } else {
24785  __Pyx_Coroutine_ExceptionClear(exc_state);
24786  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
24787  }
24788 #endif
24789  self->is_running = 1;
24790  retval = self->body((PyObject *) self, tstate, value);
24791  self->is_running = 0;
24792 #if CYTHON_USE_EXC_INFO_STACK
24793  exc_state = &self->gi_exc_state;
24794  tstate->exc_info = exc_state->previous_item;
24795  exc_state->previous_item = NULL;
24796  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
24797 #endif
24798  return retval;
24799 }
24800 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
24801  PyObject *exc_tb = exc_state->exc_traceback;
24802  if (likely(exc_tb)) {
24803 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
24804 #else
24805  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
24806  PyFrameObject *f = tb->tb_frame;
24807  Py_CLEAR(f->f_back);
24808 #endif
24809  }
24810 }
24811 static CYTHON_INLINE
24812 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
24813  if (unlikely(!retval)) {
24814  __Pyx_PyThreadState_declare
24815  __Pyx_PyThreadState_assign
24816  if (!__Pyx_PyErr_Occurred()) {
24817  PyObject *exc = PyExc_StopIteration;
24818  #ifdef __Pyx_AsyncGen_USED
24819  if (__Pyx_AsyncGen_CheckExact(gen))
24820  exc = __Pyx_PyExc_StopAsyncIteration;
24821  #endif
24822  __Pyx_PyErr_SetNone(exc);
24823  }
24824  }
24825  return retval;
24826 }
24827 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24828 static CYTHON_INLINE
24829 PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
24830 #if PY_VERSION_HEX <= 0x030A00A1
24831  return _PyGen_Send(gen, arg);
24832 #else
24833  PyObject *result;
24834  if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
24835  if (PyAsyncGen_CheckExact(gen)) {
24836  assert(result == Py_None);
24837  PyErr_SetNone(PyExc_StopAsyncIteration);
24838  }
24839  else if (result == Py_None) {
24840  PyErr_SetNone(PyExc_StopIteration);
24841  }
24842  else {
24843  _PyGen_SetStopIterationValue(result);
24844  }
24845  Py_CLEAR(result);
24846  }
24847  return result;
24848 #endif
24849 }
24850 #endif
24851 static CYTHON_INLINE
24852 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
24853  PyObject *ret;
24854  PyObject *val = NULL;
24855  __Pyx_Coroutine_Undelegate(gen);
24856  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
24857  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
24858  Py_XDECREF(val);
24859  return ret;
24860 }
24861 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
24862  PyObject *retval;
24863  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
24864  PyObject *yf = gen->yieldfrom;
24865  if (unlikely(gen->is_running))
24866  return __Pyx_Coroutine_AlreadyRunningError(gen);
24867  if (yf) {
24868  PyObject *ret;
24869  gen->is_running = 1;
24870  #ifdef __Pyx_Generator_USED
24871  if (__Pyx_Generator_CheckExact(yf)) {
24872  ret = __Pyx_Coroutine_Send(yf, value);
24873  } else
24874  #endif
24875  #ifdef __Pyx_Coroutine_USED
24876  if (__Pyx_Coroutine_Check(yf)) {
24877  ret = __Pyx_Coroutine_Send(yf, value);
24878  } else
24879  #endif
24880  #ifdef __Pyx_AsyncGen_USED
24881  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
24882  ret = __Pyx_async_gen_asend_send(yf, value);
24883  } else
24884  #endif
24885  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24886  if (PyGen_CheckExact(yf)) {
24887  ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
24888  } else
24889  #endif
24890  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24891  if (PyCoro_CheckExact(yf)) {
24892  ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
24893  } else
24894  #endif
24895  {
24896  if (value == Py_None)
24897  ret = Py_TYPE(yf)->tp_iternext(yf);
24898  else
24899  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
24900  }
24901  gen->is_running = 0;
24902  if (likely(ret)) {
24903  return ret;
24904  }
24905  retval = __Pyx_Coroutine_FinishDelegation(gen);
24906  } else {
24907  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
24908  }
24909  return __Pyx_Coroutine_MethodReturn(self, retval);
24910 }
24911 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
24912  PyObject *retval = NULL;
24913  int err = 0;
24914  #ifdef __Pyx_Generator_USED
24915  if (__Pyx_Generator_CheckExact(yf)) {
24916  retval = __Pyx_Coroutine_Close(yf);
24917  if (!retval)
24918  return -1;
24919  } else
24920  #endif
24921  #ifdef __Pyx_Coroutine_USED
24922  if (__Pyx_Coroutine_Check(yf)) {
24923  retval = __Pyx_Coroutine_Close(yf);
24924  if (!retval)
24925  return -1;
24926  } else
24927  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
24928  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
24929  if (!retval)
24930  return -1;
24931  } else
24932  #endif
24933  #ifdef __Pyx_AsyncGen_USED
24934  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
24935  retval = __Pyx_async_gen_asend_close(yf, NULL);
24936  } else
24937  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
24938  retval = __Pyx_async_gen_athrow_close(yf, NULL);
24939  } else
24940  #endif
24941  {
24942  PyObject *meth;
24943  gen->is_running = 1;
24944  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
24945  if (unlikely(!meth)) {
24946  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
24947  PyErr_WriteUnraisable(yf);
24948  }
24949  PyErr_Clear();
24950  } else {
24951  retval = PyObject_CallFunction(meth, NULL);
24952  Py_DECREF(meth);
24953  if (!retval)
24954  err = -1;
24955  }
24956  gen->is_running = 0;
24957  }
24958  Py_XDECREF(retval);
24959  return err;
24960 }
24961 static PyObject *__Pyx_Generator_Next(PyObject *self) {
24962  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
24963  PyObject *yf = gen->yieldfrom;
24964  if (unlikely(gen->is_running))
24965  return __Pyx_Coroutine_AlreadyRunningError(gen);
24966  if (yf) {
24967  PyObject *ret;
24968  gen->is_running = 1;
24969  #ifdef __Pyx_Generator_USED
24970  if (__Pyx_Generator_CheckExact(yf)) {
24971  ret = __Pyx_Generator_Next(yf);
24972  } else
24973  #endif
24974  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
24975  if (PyGen_CheckExact(yf)) {
24976  ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
24977  } else
24978  #endif
24979  #ifdef __Pyx_Coroutine_USED
24980  if (__Pyx_Coroutine_Check(yf)) {
24981  ret = __Pyx_Coroutine_Send(yf, Py_None);
24982  } else
24983  #endif
24984  ret = Py_TYPE(yf)->tp_iternext(yf);
24985  gen->is_running = 0;
24986  if (likely(ret)) {
24987  return ret;
24988  }
24989  return __Pyx_Coroutine_FinishDelegation(gen);
24990  }
24991  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
24992 }
24993 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
24994  return __Pyx_Coroutine_Close(self);
24995 }
24996 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
24997  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
24998  PyObject *retval, *raised_exception;
24999  PyObject *yf = gen->yieldfrom;
25000  int err = 0;
25001  if (unlikely(gen->is_running))
25002  return __Pyx_Coroutine_AlreadyRunningError(gen);
25003  if (yf) {
25004  Py_INCREF(yf);
25005  err = __Pyx_Coroutine_CloseIter(gen, yf);
25006  __Pyx_Coroutine_Undelegate(gen);
25007  Py_DECREF(yf);
25008  }
25009  if (err == 0)
25010  PyErr_SetNone(PyExc_GeneratorExit);
25011  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
25012  if (unlikely(retval)) {
25013  const char *msg;
25014  Py_DECREF(retval);
25015  if ((0)) {
25016  #ifdef __Pyx_Coroutine_USED
25017  } else if (__Pyx_Coroutine_Check(self)) {
25018  msg = "coroutine ignored GeneratorExit";
25019  #endif
25020  #ifdef __Pyx_AsyncGen_USED
25021  } else if (__Pyx_AsyncGen_CheckExact(self)) {
25022 #if PY_VERSION_HEX < 0x03060000
25023  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
25024 #else
25025  msg = "async generator ignored GeneratorExit";
25026 #endif
25027  #endif
25028  } else {
25029  msg = "generator ignored GeneratorExit";
25030  }
25031  PyErr_SetString(PyExc_RuntimeError, msg);
25032  return NULL;
25033  }
25034  raised_exception = PyErr_Occurred();
25035  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
25036  if (raised_exception) PyErr_Clear();
25037  Py_INCREF(Py_None);
25038  return Py_None;
25039  }
25040  return NULL;
25041 }
25042 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
25043  PyObject *args, int close_on_genexit) {
25044  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
25045  PyObject *yf = gen->yieldfrom;
25046  if (unlikely(gen->is_running))
25047  return __Pyx_Coroutine_AlreadyRunningError(gen);
25048  if (yf) {
25049  PyObject *ret;
25050  Py_INCREF(yf);
25051  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
25052  int err = __Pyx_Coroutine_CloseIter(gen, yf);
25053  Py_DECREF(yf);
25054  __Pyx_Coroutine_Undelegate(gen);
25055  if (err < 0)
25056  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
25057  goto throw_here;
25058  }
25059  gen->is_running = 1;
25060  if (0
25061  #ifdef __Pyx_Generator_USED
25062  || __Pyx_Generator_CheckExact(yf)
25063  #endif
25064  #ifdef __Pyx_Coroutine_USED
25065  || __Pyx_Coroutine_Check(yf)
25066  #endif
25067  ) {
25068  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
25069  #ifdef __Pyx_Coroutine_USED
25070  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
25071  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
25072  #endif
25073  } else {
25074  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
25075  if (unlikely(!meth)) {
25076  Py_DECREF(yf);
25077  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
25078  gen->is_running = 0;
25079  return NULL;
25080  }
25081  PyErr_Clear();
25082  __Pyx_Coroutine_Undelegate(gen);
25083  gen->is_running = 0;
25084  goto throw_here;
25085  }
25086  if (likely(args)) {
25087  ret = PyObject_CallObject(meth, args);
25088  } else {
25089  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
25090  }
25091  Py_DECREF(meth);
25092  }
25093  gen->is_running = 0;
25094  Py_DECREF(yf);
25095  if (!ret) {
25096  ret = __Pyx_Coroutine_FinishDelegation(gen);
25097  }
25098  return __Pyx_Coroutine_MethodReturn(self, ret);
25099  }
25100 throw_here:
25101  __Pyx_Raise(typ, val, tb, NULL);
25102  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
25103 }
25104 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
25105  PyObject *typ;
25106  PyObject *val = NULL;
25107  PyObject *tb = NULL;
25108  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
25109  return NULL;
25110  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
25111 }
25112 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
25113  Py_VISIT(exc_state->exc_type);
25114  Py_VISIT(exc_state->exc_value);
25115  Py_VISIT(exc_state->exc_traceback);
25116  return 0;
25117 }
25118 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
25119  Py_VISIT(gen->closure);
25120  Py_VISIT(gen->classobj);
25121  Py_VISIT(gen->yieldfrom);
25122  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
25123 }
25124 static int __Pyx_Coroutine_clear(PyObject *self) {
25125  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
25126  Py_CLEAR(gen->closure);
25127  Py_CLEAR(gen->classobj);
25128  Py_CLEAR(gen->yieldfrom);
25129  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
25130 #ifdef __Pyx_AsyncGen_USED
25131  if (__Pyx_AsyncGen_CheckExact(self)) {
25132  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
25133  }
25134 #endif
25135  Py_CLEAR(gen->gi_code);
25136  Py_CLEAR(gen->gi_frame);
25137  Py_CLEAR(gen->gi_name);
25138  Py_CLEAR(gen->gi_qualname);
25139  Py_CLEAR(gen->gi_modulename);
25140  return 0;
25141 }
25142 static void __Pyx_Coroutine_dealloc(PyObject *self) {
25143  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
25144  PyObject_GC_UnTrack(gen);
25145  if (gen->gi_weakreflist != NULL)
25146  PyObject_ClearWeakRefs(self);
25147  if (gen->resume_label >= 0) {
25148  PyObject_GC_Track(self);
25149 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
25150  if (PyObject_CallFinalizerFromDealloc(self))
25151 #else
25152  Py_TYPE(gen)->tp_del(self);
25153  if (Py_REFCNT(self) > 0)
25154 #endif
25155  {
25156  return;
25157  }
25158  PyObject_GC_UnTrack(self);
25159  }
25160 #ifdef __Pyx_AsyncGen_USED
25161  if (__Pyx_AsyncGen_CheckExact(self)) {
25162  /* We have to handle this case for asynchronous generators
25163  right here, because this code has to be between UNTRACK
25164  and GC_Del. */
25165  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
25166  }
25167 #endif
25168  __Pyx_Coroutine_clear(self);
25169  PyObject_GC_Del(gen);
25170 }
25171 static void __Pyx_Coroutine_del(PyObject *self) {
25172  PyObject *error_type, *error_value, *error_traceback;
25173  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
25174  __Pyx_PyThreadState_declare
25175  if (gen->resume_label < 0) {
25176  return;
25177  }
25178 #if !CYTHON_USE_TP_FINALIZE
25179  assert(self->ob_refcnt == 0);
25180  __Pyx_SET_REFCNT(self, 1);
25181 #endif
25182  __Pyx_PyThreadState_assign
25183  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
25184 #ifdef __Pyx_AsyncGen_USED
25185  if (__Pyx_AsyncGen_CheckExact(self)) {
25186  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
25187  PyObject *finalizer = agen->ag_finalizer;
25188  if (finalizer && !agen->ag_closed) {
25189  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
25190  if (unlikely(!res)) {
25191  PyErr_WriteUnraisable(self);
25192  } else {
25193  Py_DECREF(res);
25194  }
25195  __Pyx_ErrRestore(error_type, error_value, error_traceback);
25196  return;
25197  }
25198  }
25199 #endif
25200  if (unlikely(gen->resume_label == 0 && !error_value)) {
25201 #ifdef __Pyx_Coroutine_USED
25202 #ifdef __Pyx_Generator_USED
25203  if (!__Pyx_Generator_CheckExact(self))
25204 #endif
25205  {
25206  PyObject_GC_UnTrack(self);
25207 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
25208  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
25209  PyErr_WriteUnraisable(self);
25210 #else
25211  {PyObject *msg;
25212  char *cmsg;
25213  #if CYTHON_COMPILING_IN_PYPY
25214  msg = NULL;
25215  cmsg = (char*) "coroutine was never awaited";
25216  #else
25217  char *cname;
25218  PyObject *qualname;
25219  qualname = gen->gi_qualname;
25220  cname = PyString_AS_STRING(qualname);
25221  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
25222  if (unlikely(!msg)) {
25223  PyErr_Clear();
25224  cmsg = (char*) "coroutine was never awaited";
25225  } else {
25226  cmsg = PyString_AS_STRING(msg);
25227  }
25228  #endif
25229  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
25230  PyErr_WriteUnraisable(self);
25231  Py_XDECREF(msg);}
25232 #endif
25233  PyObject_GC_Track(self);
25234  }
25235 #endif
25236  } else {
25237  PyObject *res = __Pyx_Coroutine_Close(self);
25238  if (unlikely(!res)) {
25239  if (PyErr_Occurred())
25240  PyErr_WriteUnraisable(self);
25241  } else {
25242  Py_DECREF(res);
25243  }
25244  }
25245  __Pyx_ErrRestore(error_type, error_value, error_traceback);
25246 #if !CYTHON_USE_TP_FINALIZE
25247  assert(Py_REFCNT(self) > 0);
25248  if (--self->ob_refcnt == 0) {
25249  return;
25250  }
25251  {
25252  Py_ssize_t refcnt = Py_REFCNT(self);
25253  _Py_NewReference(self);
25254  __Pyx_SET_REFCNT(self, refcnt);
25255  }
25256 #if CYTHON_COMPILING_IN_CPYTHON
25257  assert(PyType_IS_GC(Py_TYPE(self)) &&
25258  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
25259  _Py_DEC_REFTOTAL;
25260 #endif
25261 #ifdef COUNT_ALLOCS
25262  --Py_TYPE(self)->tp_frees;
25263  --Py_TYPE(self)->tp_allocs;
25264 #endif
25265 #endif
25266 }
25267 static PyObject *
25268 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
25269 {
25270  PyObject *name = self->gi_name;
25271  if (unlikely(!name)) name = Py_None;
25272  Py_INCREF(name);
25273  return name;
25274 }
25275 static int
25276 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
25277 {
25278  PyObject *tmp;
25279 #if PY_MAJOR_VERSION >= 3
25280  if (unlikely(value == NULL || !PyUnicode_Check(value)))
25281 #else
25282  if (unlikely(value == NULL || !PyString_Check(value)))
25283 #endif
25284  {
25285  PyErr_SetString(PyExc_TypeError,
25286  "__name__ must be set to a string object");
25287  return -1;
25288  }
25289  tmp = self->gi_name;
25290  Py_INCREF(value);
25291  self->gi_name = value;
25292  Py_XDECREF(tmp);
25293  return 0;
25294 }
25295 static PyObject *
25296 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
25297 {
25298  PyObject *name = self->gi_qualname;
25299  if (unlikely(!name)) name = Py_None;
25300  Py_INCREF(name);
25301  return name;
25302 }
25303 static int
25304 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
25305 {
25306  PyObject *tmp;
25307 #if PY_MAJOR_VERSION >= 3
25308  if (unlikely(value == NULL || !PyUnicode_Check(value)))
25309 #else
25310  if (unlikely(value == NULL || !PyString_Check(value)))
25311 #endif
25312  {
25313  PyErr_SetString(PyExc_TypeError,
25314  "__qualname__ must be set to a string object");
25315  return -1;
25316  }
25317  tmp = self->gi_qualname;
25318  Py_INCREF(value);
25319  self->gi_qualname = value;
25320  Py_XDECREF(tmp);
25321  return 0;
25322 }
25323 static PyObject *
25324 __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
25325 {
25326  PyObject *frame = self->gi_frame;
25327  if (!frame) {
25328  if (unlikely(!self->gi_code)) {
25329  Py_RETURN_NONE;
25330  }
25331  frame = (PyObject *) PyFrame_New(
25332  PyThreadState_Get(), /*PyThreadState *tstate,*/
25333  (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/
25334  __pyx_d, /*PyObject *globals,*/
25335  0 /*PyObject *locals*/
25336  );
25337  if (unlikely(!frame))
25338  return NULL;
25339  self->gi_frame = frame;
25340  }
25341  Py_INCREF(frame);
25342  return frame;
25343 }
25344 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
25345  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
25346  PyObject *name, PyObject *qualname, PyObject *module_name) {
25347  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
25348  if (unlikely(!gen))
25349  return NULL;
25350  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
25351 }
25352 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
25353  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
25354  PyObject *name, PyObject *qualname, PyObject *module_name) {
25355  gen->body = body;
25356  gen->closure = closure;
25357  Py_XINCREF(closure);
25358  gen->is_running = 0;
25359  gen->resume_label = 0;
25360  gen->classobj = NULL;
25361  gen->yieldfrom = NULL;
25362  gen->gi_exc_state.exc_type = NULL;
25363  gen->gi_exc_state.exc_value = NULL;
25364  gen->gi_exc_state.exc_traceback = NULL;
25365 #if CYTHON_USE_EXC_INFO_STACK
25366  gen->gi_exc_state.previous_item = NULL;
25367 #endif
25368  gen->gi_weakreflist = NULL;
25369  Py_XINCREF(qualname);
25370  gen->gi_qualname = qualname;
25371  Py_XINCREF(name);
25372  gen->gi_name = name;
25373  Py_XINCREF(module_name);
25374  gen->gi_modulename = module_name;
25375  Py_XINCREF(code);
25376  gen->gi_code = code;
25377  gen->gi_frame = NULL;
25378  PyObject_GC_Track(gen);
25379  return gen;
25380 }
25381 
25382 /* PatchModuleWithCoroutine */
25383 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
25384 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
25385  int result;
25386  PyObject *globals, *result_obj;
25387  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
25388  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
25389  #ifdef __Pyx_Coroutine_USED
25390  (PyObject*)__pyx_CoroutineType);
25391  #else
25392  Py_None);
25393  #endif
25394  if (unlikely(result < 0)) goto ignore;
25395  result = PyDict_SetItemString(globals, "_cython_generator_type",
25396  #ifdef __Pyx_Generator_USED
25397  (PyObject*)__pyx_GeneratorType);
25398  #else
25399  Py_None);
25400  #endif
25401  if (unlikely(result < 0)) goto ignore;
25402  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
25403  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
25404  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
25405  if (unlikely(!result_obj)) goto ignore;
25406  Py_DECREF(result_obj);
25407  Py_DECREF(globals);
25408  return module;
25409 ignore:
25410  Py_XDECREF(globals);
25411  PyErr_WriteUnraisable(module);
25412  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
25413  Py_DECREF(module);
25414  module = NULL;
25415  }
25416 #else
25417  py_code++;
25418 #endif
25419  return module;
25420 }
25421 
25422 /* PatchGeneratorABC */
25423 #ifndef CYTHON_REGISTER_ABCS
25424 #define CYTHON_REGISTER_ABCS 1
25425 #endif
25426 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
25427 static PyObject* __Pyx_patch_abc_module(PyObject *module);
25428 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
25429  module = __Pyx_Coroutine_patch_module(
25430  module, ""
25431 "if _cython_generator_type is not None:\n"
25432 " try: Generator = _module.Generator\n"
25433 " except AttributeError: pass\n"
25434 " else: Generator.register(_cython_generator_type)\n"
25435 "if _cython_coroutine_type is not None:\n"
25436 " try: Coroutine = _module.Coroutine\n"
25437 " except AttributeError: pass\n"
25438 " else: Coroutine.register(_cython_coroutine_type)\n"
25439  );
25440  return module;
25441 }
25442 #endif
25443 static int __Pyx_patch_abc(void) {
25444 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
25445  static int abc_patched = 0;
25446  if (CYTHON_REGISTER_ABCS && !abc_patched) {
25447  PyObject *module;
25448  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
25449  if (!module) {
25450  PyErr_WriteUnraisable(NULL);
25451  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
25452  ((PY_MAJOR_VERSION >= 3) ?
25453  "Cython module failed to register with collections.abc module" :
25454  "Cython module failed to register with collections module"), 1) < 0)) {
25455  return -1;
25456  }
25457  } else {
25458  module = __Pyx_patch_abc_module(module);
25459  abc_patched = 1;
25460  if (unlikely(!module))
25461  return -1;
25462  Py_DECREF(module);
25463  }
25464  module = PyImport_ImportModule("backports_abc");
25465  if (module) {
25466  module = __Pyx_patch_abc_module(module);
25467  Py_XDECREF(module);
25468  }
25469  if (!module) {
25470  PyErr_Clear();
25471  }
25472  }
25473 #else
25474  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
25475 #endif
25476  return 0;
25477 }
25478 
25479 /* Generator */
25480 static PyMethodDef __pyx_Generator_methods[] = {
25481  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
25482  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
25483  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
25484  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
25485  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
25486  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
25487  {0, 0, 0, 0}
25488 };
25489 static PyMemberDef __pyx_Generator_memberlist[] = {
25490  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
25491  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
25492  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
25493  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
25494  {0, 0, 0, 0, 0}
25495 };
25496 static PyGetSetDef __pyx_Generator_getsets[] = {
25497  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
25498  (char*) PyDoc_STR("name of the generator"), 0},
25499  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
25500  (char*) PyDoc_STR("qualified name of the generator"), 0},
25501  {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
25502  (char*) PyDoc_STR("Frame of the generator"), 0},
25503  {0, 0, 0, 0, 0}
25504 };
25505 static PyTypeObject __pyx_GeneratorType_type = {
25506  PyVarObject_HEAD_INIT(0, 0)
25507  "generator",
25508  sizeof(__pyx_CoroutineObject),
25509  0,
25510  (destructor) __Pyx_Coroutine_dealloc,
25511  0,
25512  0,
25513  0,
25514  0,
25515  0,
25516  0,
25517  0,
25518  0,
25519  0,
25520  0,
25521  0,
25522  0,
25523  0,
25524  0,
25525  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
25526  0,
25527  (traverseproc) __Pyx_Coroutine_traverse,
25528  0,
25529  0,
25530  offsetof(__pyx_CoroutineObject, gi_weakreflist),
25531  0,
25532  (iternextfunc) __Pyx_Generator_Next,
25533  __pyx_Generator_methods,
25534  __pyx_Generator_memberlist,
25535  __pyx_Generator_getsets,
25536  0,
25537  0,
25538  0,
25539  0,
25540  0,
25541  0,
25542  0,
25543  0,
25544  0,
25545  0,
25546  0,
25547  0,
25548  0,
25549  0,
25550  0,
25551 #if CYTHON_USE_TP_FINALIZE
25552  0,
25553 #else
25554  __Pyx_Coroutine_del,
25555 #endif
25556  0,
25557 #if CYTHON_USE_TP_FINALIZE
25558  __Pyx_Coroutine_del,
25559 #elif PY_VERSION_HEX >= 0x030400a1
25560  0,
25561 #endif
25562 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
25563  0,
25564 #endif
25565 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
25566  0,
25567 #endif
25568 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
25569  0,
25570 #endif
25571 };
25572 static int __pyx_Generator_init(void) {
25573  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
25574  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
25575  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
25576  if (unlikely(!__pyx_GeneratorType)) {
25577  return -1;
25578  }
25579  return 0;
25580 }
25581 
25582 /* CheckBinaryVersion */
25583 static int __Pyx_check_binary_version(void) {
25584  char ctversion[4], rtversion[4];
25585  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
25586  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
25587  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
25588  char message[200];
25589  PyOS_snprintf(message, sizeof(message),
25590  "compiletime version %s of module '%.100s' "
25591  "does not match runtime version %s",
25592  ctversion, __Pyx_MODULE_NAME, rtversion);
25593  return PyErr_WarnEx(NULL, message, 1);
25594  }
25595  return 0;
25596 }
25597 
25598 /* InitStrings */
25599 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
25600  while (t->p) {
25601  #if PY_MAJOR_VERSION < 3
25602  if (t->is_unicode) {
25603  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
25604  } else if (t->intern) {
25605  *t->p = PyString_InternFromString(t->s);
25606  } else {
25607  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
25608  }
25609  #else
25610  if (t->is_unicode | t->is_str) {
25611  if (t->intern) {
25612  *t->p = PyUnicode_InternFromString(t->s);
25613  } else if (t->encoding) {
25614  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
25615  } else {
25616  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
25617  }
25618  } else {
25619  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
25620  }
25621  #endif
25622  if (!*t->p)
25623  return -1;
25624  if (PyObject_Hash(*t->p) == -1)
25625  return -1;
25626  ++t;
25627  }
25628  return 0;
25629 }
25630 
25631 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
25632  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
25633 }
25634 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
25635  Py_ssize_t ignore;
25636  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
25637 }
25638 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
25639 #if !CYTHON_PEP393_ENABLED
25640 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
25641  char* defenc_c;
25642  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
25643  if (!defenc) return NULL;
25644  defenc_c = PyBytes_AS_STRING(defenc);
25645 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
25646  {
25647  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
25648  char* c;
25649  for (c = defenc_c; c < end; c++) {
25650  if ((unsigned char) (*c) >= 128) {
25651  PyUnicode_AsASCIIString(o);
25652  return NULL;
25653  }
25654  }
25655  }
25656 #endif
25657  *length = PyBytes_GET_SIZE(defenc);
25658  return defenc_c;
25659 }
25660 #else
25661 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
25662  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
25663 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
25664  if (likely(PyUnicode_IS_ASCII(o))) {
25665  *length = PyUnicode_GET_LENGTH(o);
25666  return PyUnicode_AsUTF8(o);
25667  } else {
25668  PyUnicode_AsASCIIString(o);
25669  return NULL;
25670  }
25671 #else
25672  return PyUnicode_AsUTF8AndSize(o, length);
25673 #endif
25674 }
25675 #endif
25676 #endif
25677 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
25678 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
25679  if (
25680 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
25681  __Pyx_sys_getdefaultencoding_not_ascii &&
25682 #endif
25683  PyUnicode_Check(o)) {
25684  return __Pyx_PyUnicode_AsStringAndSize(o, length);
25685  } else
25686 #endif
25687 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
25688  if (PyByteArray_Check(o)) {
25689  *length = PyByteArray_GET_SIZE(o);
25690  return PyByteArray_AS_STRING(o);
25691  } else
25692 #endif
25693  {
25694  char* result;
25695  int r = PyBytes_AsStringAndSize(o, &result, length);
25696  if (unlikely(r < 0)) {
25697  return NULL;
25698  } else {
25699  return result;
25700  }
25701  }
25702 }
25703 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
25704  int is_true = x == Py_True;
25705  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
25706  else return PyObject_IsTrue(x);
25707 }
25708 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
25709  int retval;
25710  if (unlikely(!x)) return -1;
25711  retval = __Pyx_PyObject_IsTrue(x);
25712  Py_DECREF(x);
25713  return retval;
25714 }
25715 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
25716 #if PY_MAJOR_VERSION >= 3
25717  if (PyLong_Check(result)) {
25718  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
25719  "__int__ returned non-int (type %.200s). "
25720  "The ability to return an instance of a strict subclass of int "
25721  "is deprecated, and may be removed in a future version of Python.",
25722  Py_TYPE(result)->tp_name)) {
25723  Py_DECREF(result);
25724  return NULL;
25725  }
25726  return result;
25727  }
25728 #endif
25729  PyErr_Format(PyExc_TypeError,
25730  "__%.4s__ returned non-%.4s (type %.200s)",
25731  type_name, type_name, Py_TYPE(result)->tp_name);
25732  Py_DECREF(result);
25733  return NULL;
25734 }
25735 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
25736 #if CYTHON_USE_TYPE_SLOTS
25737  PyNumberMethods *m;
25738 #endif
25739  const char *name = NULL;
25740  PyObject *res = NULL;
25741 #if PY_MAJOR_VERSION < 3
25742  if (likely(PyInt_Check(x) || PyLong_Check(x)))
25743 #else
25744  if (likely(PyLong_Check(x)))
25745 #endif
25746  return __Pyx_NewRef(x);
25747 #if CYTHON_USE_TYPE_SLOTS
25748  m = Py_TYPE(x)->tp_as_number;
25749  #if PY_MAJOR_VERSION < 3
25750  if (m && m->nb_int) {
25751  name = "int";
25752  res = m->nb_int(x);
25753  }
25754  else if (m && m->nb_long) {
25755  name = "long";
25756  res = m->nb_long(x);
25757  }
25758  #else
25759  if (likely(m && m->nb_int)) {
25760  name = "int";
25761  res = m->nb_int(x);
25762  }
25763  #endif
25764 #else
25765  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
25766  res = PyNumber_Int(x);
25767  }
25768 #endif
25769  if (likely(res)) {
25770 #if PY_MAJOR_VERSION < 3
25771  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
25772 #else
25773  if (unlikely(!PyLong_CheckExact(res))) {
25774 #endif
25775  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
25776  }
25777  }
25778  else if (!PyErr_Occurred()) {
25779  PyErr_SetString(PyExc_TypeError,
25780  "an integer is required");
25781  }
25782  return res;
25783 }
25784 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
25785  Py_ssize_t ival;
25786  PyObject *x;
25787 #if PY_MAJOR_VERSION < 3
25788  if (likely(PyInt_CheckExact(b))) {
25789  if (sizeof(Py_ssize_t) >= sizeof(long))
25790  return PyInt_AS_LONG(b);
25791  else
25792  return PyInt_AsSsize_t(b);
25793  }
25794 #endif
25795  if (likely(PyLong_CheckExact(b))) {
25796  #if CYTHON_USE_PYLONG_INTERNALS
25797  const digit* digits = ((PyLongObject*)b)->ob_digit;
25798  const Py_ssize_t size = Py_SIZE(b);
25799  if (likely(__Pyx_sst_abs(size) <= 1)) {
25800  ival = likely(size) ? digits[0] : 0;
25801  if (size == -1) ival = -ival;
25802  return ival;
25803  } else {
25804  switch (size) {
25805  case 2:
25806  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
25807  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25808  }
25809  break;
25810  case -2:
25811  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
25812  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25813  }
25814  break;
25815  case 3:
25816  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
25817  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25818  }
25819  break;
25820  case -3:
25821  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
25822  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
25823  }
25824  break;
25825  case 4:
25826  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
25827  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]));
25828  }
25829  break;
25830  case -4:
25831  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
25832  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]));
25833  }
25834  break;
25835  }
25836  }
25837  #endif
25838  return PyLong_AsSsize_t(b);
25839  }
25840  x = PyNumber_Index(b);
25841  if (!x) return -1;
25842  ival = PyInt_AsSsize_t(x);
25843  Py_DECREF(x);
25844  return ival;
25845 }
25846 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
25847  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
25848  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
25849 #if PY_MAJOR_VERSION < 3
25850  } else if (likely(PyInt_CheckExact(o))) {
25851  return PyInt_AS_LONG(o);
25852 #endif
25853  } else {
25854  Py_ssize_t ival;
25855  PyObject *x;
25856  x = PyNumber_Index(o);
25857  if (!x) return -1;
25858  ival = PyInt_AsLong(x);
25859  Py_DECREF(x);
25860  return ival;
25861  }
25862 }
25863 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
25864  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
25865 }
25866 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
25867  return PyInt_FromSize_t(ival);
25868 }
25869 
25870 
25871 #endif /* Py_PYTHON_H */
auto atanh(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse hyperbolic tangent of multivector with specified complexifier.
String glucat_package_version
Definition: PyClical.h:53
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
Definition: PyClical.h:86
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
Definition: PyClical.h:57
auto exp(const framed_multi< Scalar_T, LO, HI, Tune_P > &val) -> const framed_multi< Scalar_T, LO, HI, Tune_P >
Exponential of multivector.
auto operator!=(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs) -> bool
Test for inequality of multivectors.
auto max_pos(const index_set< LO, HI > &ist) -> index_t
Maximum positive index, or 0 if none.
double scalar_t
Definition: PyClical.h:147
auto min_neg(const index_set< LO, HI > &ist) -> index_t
Minimum negative index, or 0 if none.
auto asinh(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse hyperbolic sine of multivector with specified complexifier.
auto error_squared(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs, const Scalar_T threshold) -> Scalar_T
Relative or absolute error using the quadratic norm.
auto log(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Natural logarithm of multivector with specified complexifier.
auto complexifier(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Square root of -1 which commutes with all members of the frame of the given multivector.
const scalar_t epsilon
Definition: PyClical.h:150
auto sinh(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Hyperbolic sine of multivector.
auto approx_equal(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs, const Scalar_T threshold, const Scalar_T tolerance) -> bool
Test for approximate equality of multivectors.
A matrix_multi<Scalar_T,LO,HI,Tune_P> is a matrix approximation to a multivector. ...
Definition: framed_multi.h:59
String clifford_to_repr(const Multivector_T &mv)
The “official” string representation of Multivector_T mv.
Definition: PyClical.h:75
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
Definition: PyClical.h:103
auto asin(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse sine of multivector with specified complexifier.
auto tanh(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Hyperbolic tangent of multivector.
auto error_squared_tol(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> Scalar_T
Quadratic norm error tolerance relative to a specific multivector.
auto abs(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> Scalar_T
Absolute value == sqrt(norm)
auto compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b) -> int
"lexicographic compare" eg. {3,4,5} is less than {3,7,8}
auto operator &(const Multivector< Scalar_T, LO, HI, Tune_P > &lhs, const RHS< Scalar_T, LO, HI, Tune_P > &rhs) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inner product.
index_set< lo_ndx, hi_ndx > IndexSet
Definition: PyClical.h:145
auto tan(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Tangent of multivector with specified complexifier.
auto acosh(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse hyperbolic cosine of multivector with specified complexifier.
auto cos(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Cosine of multivector with specified complexifier.
auto atan(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse tangent of multivector with specified complexifier.
PyObject * PyFloat_FromDouble(Scalar_T v)
Definition: PyClical.h:45
auto sqrt(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Square root of multivector with specified complexifier.
Index set class based on std::bitset<> in Gnu standard C++ library.
Definition: index_set.h:45
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
Definition: PyClical.h:66
auto sin(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Sine of multivector with specified complexifier.
auto cosh(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Hyperbolic cosine of multivector.
auto max_abs(const Multivector< Scalar_T, LO, HI, Tune_P > &val) -> Scalar_T
Maximum of absolute values of components of multivector: multivector infinity norm.
matrix_multi< scalar_t, lo_ndx, hi_ndx, tuning_promoted > Clifford
Definition: PyClical.h:148
def e(obj)
Definition: PyClical.pyx:1936
auto acos(const Multivector< Scalar_T, LO, HI, Tune_P > &val, const Multivector< Scalar_T, LO, HI, Tune_P > &i, const bool prechecked=false) -> const Multivector< Scalar_T, LO, HI, Tune_P >
Inverse cosine of multivector with specified complexifier.
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10.52)].
Definition: PyClical.h:114
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].
Definition: PyClical.h:126