glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.21 */
2 
3 #define PY_SSIZE_T_CLEAN
4 #ifndef CYTHON_USE_PYLONG_INTERNALS
5 #ifdef PYLONG_BITS_IN_DIGIT
6 #define CYTHON_USE_PYLONG_INTERNALS 0
7 #else
8 #include "pyconfig.h"
9 #ifdef PYLONG_BITS_IN_DIGIT
10 #define CYTHON_USE_PYLONG_INTERNALS 1
11 #else
12 #define CYTHON_USE_PYLONG_INTERNALS 0
13 #endif
14 #endif
15 #endif
16 #include "Python.h"
17 #ifndef Py_PYTHON_H
18  #error Python headers needed to compile C extensions, please install development version of Python.
19 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
20  #error Cython requires Python 2.6+ or Python 3.2+.
21 #else
22 #define CYTHON_ABI "0_21"
23 #include <stddef.h>
24 #ifndef offsetof
25 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
26 #endif
27 #if !defined(WIN32) && !defined(MS_WINDOWS)
28  #ifndef __stdcall
29  #define __stdcall
30  #endif
31  #ifndef __cdecl
32  #define __cdecl
33  #endif
34  #ifndef __fastcall
35  #define __fastcall
36  #endif
37 #endif
38 #ifndef DL_IMPORT
39  #define DL_IMPORT(t) t
40 #endif
41 #ifndef DL_EXPORT
42  #define DL_EXPORT(t) t
43 #endif
44 #ifndef PY_LONG_LONG
45  #define PY_LONG_LONG LONG_LONG
46 #endif
47 #ifndef Py_HUGE_VAL
48  #define Py_HUGE_VAL HUGE_VAL
49 #endif
50 #ifdef PYPY_VERSION
51 #define CYTHON_COMPILING_IN_PYPY 1
52 #define CYTHON_COMPILING_IN_CPYTHON 0
53 #else
54 #define CYTHON_COMPILING_IN_PYPY 0
55 #define CYTHON_COMPILING_IN_CPYTHON 1
56 #endif
57 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
58 #define Py_OptimizeFlag 0
59 #endif
60 #define __PYX_BUILD_PY_SSIZE_T "n"
61 #define CYTHON_FORMAT_SSIZE_T "z"
62 #if PY_MAJOR_VERSION < 3
63  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
64  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
65  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
66  #define __Pyx_DefaultClassType PyClass_Type
67 #else
68  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
69  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
70  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
71  #define __Pyx_DefaultClassType PyType_Type
72 #endif
73 #if PY_MAJOR_VERSION >= 3
74  #define Py_TPFLAGS_CHECKTYPES 0
75  #define Py_TPFLAGS_HAVE_INDEX 0
76 #endif
77 #if PY_MAJOR_VERSION >= 3
78  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
79 #endif
80 #if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
81  #define Py_TPFLAGS_HAVE_FINALIZE 0
82 #endif
83 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
84  #define CYTHON_PEP393_ENABLED 1
85  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \
86  0 : _PyUnicode_Ready((PyObject *)(op)))
87  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
88  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
89  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
90  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
91  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
92 #else
93  #define CYTHON_PEP393_ENABLED 0
94  #define __Pyx_PyUnicode_READY(op) (0)
95  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
96  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
97  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
98  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
99  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
100 #endif
101 #if CYTHON_COMPILING_IN_PYPY
102  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
103  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
104 #else
105  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
106  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
107  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
108 #endif
109 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
110 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
111 #if PY_MAJOR_VERSION >= 3
112  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
113 #else
114  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
115 #endif
116 #if PY_MAJOR_VERSION >= 3
117  #define PyBaseString_Type PyUnicode_Type
118  #define PyStringObject PyUnicodeObject
119  #define PyString_Type PyUnicode_Type
120  #define PyString_Check PyUnicode_Check
121  #define PyString_CheckExact PyUnicode_CheckExact
122 #endif
123 #if PY_MAJOR_VERSION >= 3
124  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
125  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
126 #else
127  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
128  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
129 #endif
130 #ifndef PySet_CheckExact
131  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
132 #endif
133 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
134 #if PY_MAJOR_VERSION >= 3
135  #define PyIntObject PyLongObject
136  #define PyInt_Type PyLong_Type
137  #define PyInt_Check(op) PyLong_Check(op)
138  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
139  #define PyInt_FromString PyLong_FromString
140  #define PyInt_FromUnicode PyLong_FromUnicode
141  #define PyInt_FromLong PyLong_FromLong
142  #define PyInt_FromSize_t PyLong_FromSize_t
143  #define PyInt_FromSsize_t PyLong_FromSsize_t
144  #define PyInt_AsLong PyLong_AsLong
145  #define PyInt_AS_LONG PyLong_AS_LONG
146  #define PyInt_AsSsize_t PyLong_AsSsize_t
147  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
148  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
149  #define PyNumber_Int PyNumber_Long
150 #endif
151 #if PY_MAJOR_VERSION >= 3
152  #define PyBoolObject PyLongObject
153 #endif
154 #if PY_VERSION_HEX < 0x030200A4
155  typedef long Py_hash_t;
156  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
157  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
158 #else
159  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
160  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
161 #endif
162 #if PY_MAJOR_VERSION >= 3
163  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
164 #endif
165 #ifndef CYTHON_INLINE
166  #if defined(__GNUC__)
167  #define CYTHON_INLINE __inline__
168  #elif defined(_MSC_VER)
169  #define CYTHON_INLINE __inline
170  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
171  #define CYTHON_INLINE inline
172  #else
173  #define CYTHON_INLINE
174  #endif
175 #endif
176 #ifndef CYTHON_RESTRICT
177  #if defined(__GNUC__)
178  #define CYTHON_RESTRICT __restrict__
179  #elif defined(_MSC_VER) && _MSC_VER >= 1400
180  #define CYTHON_RESTRICT __restrict
181  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
182  #define CYTHON_RESTRICT restrict
183  #else
184  #define CYTHON_RESTRICT
185  #endif
186 #endif
187 #ifdef NAN
188 #define __PYX_NAN() ((float) NAN)
189 #else
190 static CYTHON_INLINE float __PYX_NAN() {
191  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
192  a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
193  a quiet NaN. */
194  float value;
195  memset(&value, 0xFF, sizeof(value));
196  return value;
197 }
198 #endif
199 #ifdef __cplusplus
200 template<typename T>
201 void __Pyx_call_destructor(T* x) {
202  x->~T();
203 }
204 #endif
205 
206 
207 #if PY_MAJOR_VERSION >= 3
208  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
209  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
210 #else
211  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
212  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
213 #endif
214 
215 #ifndef __PYX_EXTERN_C
216  #ifdef __cplusplus
217  #define __PYX_EXTERN_C extern "C"
218  #else
219  #define __PYX_EXTERN_C extern
220  #endif
221 #endif
222 
223 #if defined(WIN32) || defined(MS_WINDOWS)
224 #define _USE_MATH_DEFINES
225 #endif
226 #include <math.h>
227 #define __PYX_HAVE__PyClical
228 #define __PYX_HAVE_API__PyClical
229 #include <vector>
230 #include "ios"
231 #include "new"
232 #include "stdexcept"
233 #include "typeinfo"
234 #include "PyClical.h"
235 #ifdef _OPENMP
236 #include <omp.h>
237 #endif /* _OPENMP */
238 
239 #ifdef PYREX_WITHOUT_ASSERTIONS
240 #define CYTHON_WITHOUT_ASSERTIONS
241 #endif
242 
243 #ifndef CYTHON_UNUSED
244 # if defined(__GNUC__)
245 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
246 # define CYTHON_UNUSED __attribute__ ((__unused__))
247 # else
248 # define CYTHON_UNUSED
249 # endif
250 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
251 # define CYTHON_UNUSED __attribute__ ((__unused__))
252 # else
253 # define CYTHON_UNUSED
254 # endif
255 #endif
256 typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
257  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
258 
259 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
260 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
261 #define __PYX_DEFAULT_STRING_ENCODING ""
262 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
263 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
264 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \
265  (sizeof(type) < sizeof(Py_ssize_t)) || \
266  (sizeof(type) > sizeof(Py_ssize_t) && \
267  likely(v < (type)PY_SSIZE_T_MAX || \
268  v == (type)PY_SSIZE_T_MAX) && \
269  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \
270  v == (type)PY_SSIZE_T_MIN))) || \
271  (sizeof(type) == sizeof(Py_ssize_t) && \
272  (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \
273  v == (type)PY_SSIZE_T_MAX))) )
274 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
275 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
276 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
277 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
278 #define __Pyx_PyBytes_FromString PyBytes_FromString
279 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
280 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
281 #if PY_MAJOR_VERSION < 3
282  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
283  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
284 #else
285  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
286  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
287 #endif
288 #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
289 #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
290 #define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((const char*)s)
291 #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((const char*)s)
292 #define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((const char*)s)
293 #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((const char*)s)
294 #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
295 #if PY_MAJOR_VERSION < 3
296 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
297 {
298  const Py_UNICODE *u_end = u;
299  while (*u_end++) ;
300  return (size_t)(u_end - u - 1);
301 }
302 #else
303 #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
304 #endif
305 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
306 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
307 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
308 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
309 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
310 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
311 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
312 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
313 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
314 #if CYTHON_COMPILING_IN_CPYTHON
315 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
316 #else
317 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
318 #endif
319 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
320 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
321 static int __Pyx_sys_getdefaultencoding_not_ascii;
322 static int __Pyx_init_sys_getdefaultencoding_params(void) {
323  PyObject* sys;
324  PyObject* default_encoding = NULL;
325  PyObject* ascii_chars_u = NULL;
326  PyObject* ascii_chars_b = NULL;
327  const char* default_encoding_c;
328  sys = PyImport_ImportModule("sys");
329  if (!sys) goto bad;
330  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
331  Py_DECREF(sys);
332  if (!default_encoding) goto bad;
333  default_encoding_c = PyBytes_AsString(default_encoding);
334  if (!default_encoding_c) goto bad;
335  if (strcmp(default_encoding_c, "ascii") == 0) {
336  __Pyx_sys_getdefaultencoding_not_ascii = 0;
337  } else {
338  char ascii_chars[128];
339  int c;
340  for (c = 0; c < 128; c++) {
341  ascii_chars[c] = c;
342  }
343  __Pyx_sys_getdefaultencoding_not_ascii = 1;
344  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
345  if (!ascii_chars_u) goto bad;
346  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
347  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
348  PyErr_Format(
349  PyExc_ValueError,
350  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
351  default_encoding_c);
352  goto bad;
353  }
354  Py_DECREF(ascii_chars_u);
355  Py_DECREF(ascii_chars_b);
356  }
357  Py_DECREF(default_encoding);
358  return 0;
359 bad:
360  Py_XDECREF(default_encoding);
361  Py_XDECREF(ascii_chars_u);
362  Py_XDECREF(ascii_chars_b);
363  return -1;
364 }
365 #endif
366 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
367 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
368 #else
369 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
370 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
371 static char* __PYX_DEFAULT_STRING_ENCODING;
372 static int __Pyx_init_sys_getdefaultencoding_params(void) {
373  PyObject* sys;
374  PyObject* default_encoding = NULL;
375  char* default_encoding_c;
376  sys = PyImport_ImportModule("sys");
377  if (!sys) goto bad;
378  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
379  Py_DECREF(sys);
380  if (!default_encoding) goto bad;
381  default_encoding_c = PyBytes_AsString(default_encoding);
382  if (!default_encoding_c) goto bad;
383  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
384  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
385  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
386  Py_DECREF(default_encoding);
387  return 0;
388 bad:
389  Py_XDECREF(default_encoding);
390  return -1;
391 }
392 #endif
393 #endif
394 
395 
396 /* Test for GCC > 2.95 */
397 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
398  #define likely(x) __builtin_expect(!!(x), 1)
399  #define unlikely(x) __builtin_expect(!!(x), 0)
400 #else /* !__GNUC__ or GCC < 2.95 */
401  #define likely(x) (x)
402  #define unlikely(x) (x)
403 #endif /* __GNUC__ */
404 
405 static PyObject *__pyx_m;
406 static PyObject *__pyx_d;
407 static PyObject *__pyx_b;
408 static PyObject *__pyx_empty_tuple;
409 static PyObject *__pyx_empty_bytes;
410 static int __pyx_lineno;
411 static int __pyx_clineno = 0;
412 static const char * __pyx_cfilenm= __FILE__;
413 static const char *__pyx_filename;
414 
415 
416 static const char *__pyx_f[] = {
417  "PyClical.pyx",
418 };
419 
420 /*--- Type declarations ---*/
421 struct __pyx_obj_8PyClical_index_set;
422 struct __pyx_obj_8PyClical_clifford;
423 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
424 struct __pyx_opt_args_8PyClical_sqrt;
425 struct __pyx_opt_args_8PyClical_log;
426 struct __pyx_opt_args_8PyClical_cos;
427 struct __pyx_opt_args_8PyClical_acos;
428 struct __pyx_opt_args_8PyClical_acosh;
429 struct __pyx_opt_args_8PyClical_sin;
430 struct __pyx_opt_args_8PyClical_asin;
431 struct __pyx_opt_args_8PyClical_asinh;
432 struct __pyx_opt_args_8PyClical_tan;
433 struct __pyx_opt_args_8PyClical_atan;
434 struct __pyx_opt_args_8PyClical_atanh;
435 struct __pyx_opt_args_8PyClical_random_clifford;
436 
437 /* "PyClical.pyx":1542
438  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
439  *
440  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
441  * """
442  * Square root of multivector with optional complexifier.
443  */
444 struct __pyx_opt_args_8PyClical_sqrt {
445  int __pyx_n;
446  PyObject *i;
447 };
448 
449 /* "PyClical.pyx":1579
450  * return clifford().wrap( glucat.exp(toClifford(obj)) )
451  *
452  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
453  * """
454  * Natural logarithm of multivector with optional complexifier.
455  */
456 struct __pyx_opt_args_8PyClical_log {
457  int __pyx_n;
458  PyObject *i;
459 };
460 
461 /* "PyClical.pyx":1602
462  * return clifford().wrap( glucat.log(toClifford(obj)) )
463  *
464  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
465  * """
466  * Cosine of multivector with optional complexifier.
467  */
468 struct __pyx_opt_args_8PyClical_cos {
469  int __pyx_n;
470  PyObject *i;
471 };
472 
473 /* "PyClical.pyx":1619
474  * return clifford().wrap( glucat.cos(toClifford(obj)) )
475  *
476  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
477  * """
478  * Inverse cosine of multivector with optional complexifier.
479  */
480 struct __pyx_opt_args_8PyClical_acos {
481  int __pyx_n;
482  PyObject *i;
483 };
484 
485 /* "PyClical.pyx":1656
486  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
487  *
488  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
489  * """
490  * Inverse hyperbolic cosine of multivector with optional complexifier.
491  */
492 struct __pyx_opt_args_8PyClical_acosh {
493  int __pyx_n;
494  PyObject *i;
495 };
496 
497 /* "PyClical.pyx":1679
498  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
499  *
500  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
501  * """
502  * Sine of multivector with optional complexifier.
503  */
504 struct __pyx_opt_args_8PyClical_sin {
505  int __pyx_n;
506  PyObject *i;
507 };
508 
509 /* "PyClical.pyx":1698
510  * return clifford().wrap( glucat.sin(toClifford(obj)) )
511  *
512  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
513  * """
514  * Inverse sine of multivector with optional complexifier.
515  */
516 struct __pyx_opt_args_8PyClical_asin {
517  int __pyx_n;
518  PyObject *i;
519 };
520 
521 /* "PyClical.pyx":1733
522  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
523  *
524  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
525  * """
526  * Inverse hyperbolic sine of multivector with optional complexifier.
527  */
528 struct __pyx_opt_args_8PyClical_asinh {
529  int __pyx_n;
530  PyObject *i;
531 };
532 
533 /* "PyClical.pyx":1752
534  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
535  *
536  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
537  * """
538  * Tangent of multivector with optional complexifier.
539  */
540 struct __pyx_opt_args_8PyClical_tan {
541  int __pyx_n;
542  PyObject *i;
543 };
544 
545 /* "PyClical.pyx":1769
546  * return clifford().wrap( glucat.tan(toClifford(obj)) )
547  *
548  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
549  * """
550  * Inverse tangent of multivector with optional complexifier.
551  */
552 struct __pyx_opt_args_8PyClical_atan {
553  int __pyx_n;
554  PyObject *i;
555 };
556 
557 /* "PyClical.pyx":1798
558  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
559  *
560  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
561  * """
562  * Inverse hyperbolic tangent of multivector with optional complexifier.
563  */
564 struct __pyx_opt_args_8PyClical_atanh {
565  int __pyx_n;
566  PyObject *i;
567 };
568 
569 /* "PyClical.pyx":1815
570  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
571  *
572  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
573  * """
574  * Random multivector within a frame.
575  */
576 struct __pyx_opt_args_8PyClical_random_clifford {
577  int __pyx_n;
578  PyObject *fill;
579 };
580 
581 /* "PyClical.pyx":37
582  *
583  * # Forward reference
584  * cdef class index_set # <<<<<<<<<<<<<<
585  *
586  * cdef inline IndexSet toIndexSet(obj):
587  */
588 struct __pyx_obj_8PyClical_index_set {
589  PyObject_HEAD
590  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
591  IndexSet *instance;
592 };
593 
594 
595 /* "PyClical.pyx":530
596  *
597  * # Forward reference.
598  * cdef class clifford # <<<<<<<<<<<<<<
599  *
600  * cdef inline Clifford toClifford(obj):
601  */
602 struct __pyx_obj_8PyClical_clifford {
603  PyObject_HEAD
604  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
605  Clifford *instance;
606 };
607 
608 
609 /* "PyClical.pyx":227
610  * return self.instance.getitem(idx)
611  *
612  * def __iter__(self): # <<<<<<<<<<<<<<
613  * """
614  * Iterate over the indices of an index_set.
615  */
616 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
617  PyObject_HEAD
618  PyObject *__pyx_v_idx;
619  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
620  PyObject *__pyx_t_0;
621  Py_ssize_t __pyx_t_1;
622  PyObject *(*__pyx_t_2)(PyObject *);
623 };
624 
625 
626 
627 /* "PyClical.pyx":45
628  * return index_set(obj).instance[0]
629  *
630  * cdef class index_set: # <<<<<<<<<<<<<<
631  * """
632  * Python class index_set wraps C++ class IndexSet.
633  */
634 
635 struct __pyx_vtabstruct_8PyClical_index_set {
636  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
637  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
638  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
639 };
640 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
641 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
642 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
643 
644 
645 /* "PyClical.pyx":535
646  * return clifford(obj).instance[0]
647  *
648  * cdef class clifford: # <<<<<<<<<<<<<<
649  * """
650  * Python class clifford wraps C++ class Clifford.
651  */
652 
653 struct __pyx_vtabstruct_8PyClical_clifford {
654  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
655  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
656  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
657 };
658 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
659 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
660 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
661 #ifndef CYTHON_REFNANNY
662  #define CYTHON_REFNANNY 0
663 #endif
664 #if CYTHON_REFNANNY
665  typedef struct {
666  void (*INCREF)(void*, PyObject*, int);
667  void (*DECREF)(void*, PyObject*, int);
668  void (*GOTREF)(void*, PyObject*, int);
669  void (*GIVEREF)(void*, PyObject*, int);
670  void* (*SetupContext)(const char*, int, const char*);
671  void (*FinishContext)(void**);
672  } __Pyx_RefNannyAPIStruct;
673  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
674  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
675  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
676 #ifdef WITH_THREAD
677  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
678  if (acquire_gil) { \
679  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
680  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
681  PyGILState_Release(__pyx_gilstate_save); \
682  } else { \
683  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
684  }
685 #else
686  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
687  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
688 #endif
689  #define __Pyx_RefNannyFinishContext() \
690  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
691  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
692  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
693  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
694  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
695  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
696  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
697  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
698  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
699 #else
700  #define __Pyx_RefNannyDeclarations
701  #define __Pyx_RefNannySetupContext(name, acquire_gil)
702  #define __Pyx_RefNannyFinishContext()
703  #define __Pyx_INCREF(r) Py_INCREF(r)
704  #define __Pyx_DECREF(r) Py_DECREF(r)
705  #define __Pyx_GOTREF(r)
706  #define __Pyx_GIVEREF(r)
707  #define __Pyx_XINCREF(r) Py_XINCREF(r)
708  #define __Pyx_XDECREF(r) Py_XDECREF(r)
709  #define __Pyx_XGOTREF(r)
710  #define __Pyx_XGIVEREF(r)
711 #endif
712 #define __Pyx_XDECREF_SET(r, v) do { \
713  PyObject *tmp = (PyObject *) r; \
714  r = v; __Pyx_XDECREF(tmp); \
715  } while (0)
716 #define __Pyx_DECREF_SET(r, v) do { \
717  PyObject *tmp = (PyObject *) r; \
718  r = v; __Pyx_DECREF(tmp); \
719  } while (0)
720 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
721 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
722 
723 #if CYTHON_COMPILING_IN_CPYTHON
724 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
725  PyTypeObject* tp = Py_TYPE(obj);
726  if (likely(tp->tp_getattro))
727  return tp->tp_getattro(obj, attr_name);
728 #if PY_MAJOR_VERSION < 3
729  if (likely(tp->tp_getattr))
730  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
731 #endif
732  return PyObject_GetAttr(obj, attr_name);
733 }
734 #else
735 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
736 #endif
737 
738 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
739 
740 #if CYTHON_COMPILING_IN_CPYTHON
741 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
742 #else
743 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
744 #endif
745 
746 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
747 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
748 
749 static void __Pyx_WriteUnraisable(const char *name, int clineno,
750  int lineno, const char *filename,
751  int full_traceback);
752 
753 #if CYTHON_COMPILING_IN_CPYTHON
754 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
755 #endif
756 
757 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
758 
759 #if CYTHON_COMPILING_IN_CPYTHON
760 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
761 #else
762 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
763 #endif
764 
765 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
766 
767 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
768  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
769  const char* function_name);
770 
771 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
772  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
773 
774 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
775 
776 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
777 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
778 
779 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
780 
781 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
782 
783 static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
784  int result = PySequence_Contains(seq, item);
785  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
786 }
787 
788 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
789  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
790  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
791  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
792  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
793 static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
794 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
795  int is_list, int wraparound, int boundscheck);
796 
797 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
798  const char *name, int exact);
799 
800 #include <string.h>
801 
802 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
803 
804 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
805 
806 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
807 
808 #if PY_MAJOR_VERSION >= 3
809 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
810 #else
811 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
812 #endif
813 
814 typedef struct {
815  int code_line;
816  PyCodeObject* code_object;
817 } __Pyx_CodeObjectCacheEntry;
818 struct __Pyx_CodeObjectCache {
819  int count;
820  int max_count;
821  __Pyx_CodeObjectCacheEntry* entries;
822 };
823 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
824 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
825 static PyCodeObject *__pyx_find_code_object(int code_line);
826 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
827 
828 static void __Pyx_AddTraceback(const char *funcname, int c_line,
829  int py_line, const char *filename);
830 
831 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
832 
833 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
834 
835 #ifndef __Pyx_CppExn2PyErr
836 #include <new>
837 #include <typeinfo>
838 #include <stdexcept>
839 #include <ios>
840 static void __Pyx_CppExn2PyErr() {
841  try {
842  if (PyErr_Occurred())
843  ; // let the latest Python exn pass through and ignore the current one
844  else
845  throw;
846  } catch (const std::bad_alloc& exn) {
847  PyErr_SetString(PyExc_MemoryError, exn.what());
848  } catch (const std::bad_cast& exn) {
849  PyErr_SetString(PyExc_TypeError, exn.what());
850  } catch (const std::domain_error& exn) {
851  PyErr_SetString(PyExc_ValueError, exn.what());
852  } catch (const std::invalid_argument& exn) {
853  PyErr_SetString(PyExc_ValueError, exn.what());
854  } catch (const std::ios_base::failure& exn) {
855  PyErr_SetString(PyExc_IOError, exn.what());
856  } catch (const std::out_of_range& exn) {
857  PyErr_SetString(PyExc_IndexError, exn.what());
858  } catch (const std::overflow_error& exn) {
859  PyErr_SetString(PyExc_OverflowError, exn.what());
860  } catch (const std::range_error& exn) {
861  PyErr_SetString(PyExc_ArithmeticError, exn.what());
862  } catch (const std::underflow_error& exn) {
863  PyErr_SetString(PyExc_ArithmeticError, exn.what());
864  } catch (const std::exception& exn) {
865  PyErr_SetString(PyExc_RuntimeError, exn.what());
866  }
867  catch (...)
868  {
869  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
870  }
871 }
872 #endif
873 
874 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
875 
876 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
877 
878 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
879 
880 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
881 
882 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
883 
884 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
885 
886 #define __Pyx_Generator_USED
887 #include <structmember.h>
888 #include <frameobject.h>
889 typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
890 typedef struct {
891  PyObject_HEAD
892  __pyx_generator_body_t body;
893  PyObject *closure;
894  PyObject *exc_type;
895  PyObject *exc_value;
896  PyObject *exc_traceback;
897  PyObject *gi_weakreflist;
898  PyObject *classobj;
899  PyObject *yieldfrom;
900  PyObject *gi_name;
901  PyObject *gi_qualname;
902  int resume_label;
903  char is_running;
904 } __pyx_GeneratorObject;
905 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
906  PyObject *closure, PyObject *name, PyObject *qualname);
907 static int __pyx_Generator_init(void);
908 static int __Pyx_Generator_clear(PyObject* self);
909 #if 1 || PY_VERSION_HEX < 0x030300B0
910 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
911 #else
912 #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
913 #endif
914 
915 static int __Pyx_check_binary_version(void);
916 
917 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
918 
919 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
920 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
921 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
922 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
923 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
924 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
925 
926 /* Module declarations from 'libcpp.vector' */
927 
928 /* Module declarations from 'glucat' */
929 
930 /* Module declarations from 'PyClical' */
931 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
932 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
933 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
934 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
935 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
936 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
937 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
938 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
939 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
940 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
941 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
942 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
943 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
944 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
945 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
946 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
947 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
948 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
949 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
950 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
951 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
952 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
953 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
954 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
955 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
956 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
957 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
958 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
959 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
960 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
961 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
962 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
963 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
964 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
965 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
966 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
967 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
968 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
969 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
970 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
971 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
972 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*/
973 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
974 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
975 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
976 #define __Pyx_MODULE_NAME "PyClical"
977 int __pyx_module_is_main_PyClical = 0;
978 
979 /* Implementation of 'PyClical' */
980 static PyObject *__pyx_builtin_IndexError;
981 static PyObject *__pyx_builtin_RuntimeError;
982 static PyObject *__pyx_builtin_TypeError;
983 static PyObject *__pyx_builtin_ValueError;
984 static PyObject *__pyx_builtin_NotImplemented;
985 static PyObject *__pyx_builtin_range;
986 static PyObject *__pyx_builtin_xrange;
987 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
988 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
989 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
990 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
991 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 */
992 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
993 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
994 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
995 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
996 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
997 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
998 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
999 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1000 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1001 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1002 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1003 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1004 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1005 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1006 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1007 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1008 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1009 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1010 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1011 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
1012 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1013 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1014 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1015 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1016 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1017 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 */
1018 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1019 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 */
1020 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1021 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
1022 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
1023 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
1024 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1025 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1026 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1027 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1028 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1029 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1030 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1031 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1032 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1033 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1034 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1035 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1036 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1037 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1038 #if PY_MAJOR_VERSION < 3
1039 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1040 #endif
1041 #if PY_MAJOR_VERSION < 3
1042 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1043 #endif
1044 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1045 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
1046 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
1047 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
1048 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
1049 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
1050 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
1051 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1052 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1053 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1054 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1055 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
1056 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1057 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1058 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1059 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1060 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1061 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1062 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1063 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
1064 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1065 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1066 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1067 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
1068 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1069 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1070 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1071 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1072 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1073 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1074 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1075 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1076 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1077 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1078 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1079 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1080 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1081 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1082 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1083 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
1084 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
1085 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1086 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1087 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1088 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1089 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1090 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1091 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1092 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1093 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1094 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1095 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1096 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1097 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1098 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1099 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1100 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
1101 static PyObject *__pyx_pf_8PyClical_74random_clifford(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill); /* proto */
1102 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1103 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1104 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1105 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
1106 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
1107 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
1108 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1109 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1110 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
1111 static char __pyx_k_[] = ".";
1112 static char __pyx_k_e[] = "e";
1113 static char __pyx_k_i[] = "i";
1114 static char __pyx_k_m[] = "m";
1115 static char __pyx_k_p[] = "p";
1116 static char __pyx_k_q[] = "q";
1117 static char __pyx_k__2[] = " ";
1118 static char __pyx_k__3[] = ":";
1119 static char __pyx_k__4[] = "\n\t";
1120 static char __pyx_k__5[] = " (";
1121 static char __pyx_k__6[] = ", ";
1122 static char __pyx_k__7[] = ").";
1123 static char __pyx_k_cl[] = "cl";
1124 static char __pyx_k_pi[] = "pi";
1125 static char __pyx_k_cos[] = "cos";
1126 static char __pyx_k_exp[] = "exp";
1127 static char __pyx_k_frm[] = "frm";
1128 static char __pyx_k_inv[] = "inv";
1129 static char __pyx_k_ist[] = "ist";
1130 static char __pyx_k_ixt[] = "ixt";
1131 static char __pyx_k_lhs[] = "lhs";
1132 static char __pyx_k_log[] = "log";
1133 static char __pyx_k_max[] = "max";
1134 static char __pyx_k_min[] = "min";
1135 static char __pyx_k_obj[] = "obj";
1136 static char __pyx_k_odd[] = "odd";
1137 static char __pyx_k_pow[] = "pow";
1138 static char __pyx_k_rhs[] = "rhs";
1139 static char __pyx_k_sin[] = "sin";
1140 static char __pyx_k_tan[] = "tan";
1141 static char __pyx_k_tau[] = "tau";
1142 static char __pyx_k_Real[] = "Real";
1143 static char __pyx_k_acos[] = "acos";
1144 static char __pyx_k_args[] = "args";
1145 static char __pyx_k_asin[] = "asin";
1146 static char __pyx_k_atan[] = "atan";
1147 static char __pyx_k_conj[] = "conj";
1148 static char __pyx_k_copy[] = "copy";
1149 static char __pyx_k_cosh[] = "cosh";
1150 static char __pyx_k_even[] = "even";
1151 static char __pyx_k_fill[] = "fill";
1152 static char __pyx_k_from[] = " from ";
1153 static char __pyx_k_iter[] = "__iter__";
1154 static char __pyx_k_main[] = "__main__";
1155 static char __pyx_k_math[] = "math";
1156 static char __pyx_k_name[] = "__name__";
1157 static char __pyx_k_norm[] = "norm";
1158 static char __pyx_k_pure[] = "pure";
1159 static char __pyx_k_quad[] = "quad";
1160 static char __pyx_k_send[] = "send";
1161 static char __pyx_k_sinh[] = "sinh";
1162 static char __pyx_k_sqrt[] = "sqrt";
1163 static char __pyx_k_tanh[] = "tanh";
1164 static char __pyx_k_test[] = "_test";
1165 static char __pyx_k_0_8_2[] = "0.8.2";
1166 static char __pyx_k_acosh[] = "acosh";
1167 static char __pyx_k_asinh[] = "asinh";
1168 static char __pyx_k_atanh[] = "atanh";
1169 static char __pyx_k_close[] = "close";
1170 static char __pyx_k_grade[] = "grade";
1171 static char __pyx_k_istpq[] = "istpq";
1172 static char __pyx_k_nbar3[] = "nbar3";
1173 static char __pyx_k_ninf3[] = "ninf3";
1174 static char __pyx_k_other[] = "other";
1175 static char __pyx_k_range[] = "range";
1176 static char __pyx_k_throw[] = "throw";
1177 static char __pyx_k_using[] = " using (";
1178 static char __pyx_k_value[] = " value ";
1179 static char __pyx_k_import[] = "__import__";
1180 static char __pyx_k_scalar[] = "scalar";
1181 static char __pyx_k_test_2[] = "__test__";
1182 static char __pyx_k_xrange[] = "xrange";
1183 static char __pyx_k_doctest[] = "doctest";
1184 static char __pyx_k_invalid[] = " invalid ";
1185 static char __pyx_k_numbers[] = "numbers";
1186 static char __pyx_k_reverse[] = "reverse";
1187 static char __pyx_k_testmod[] = "testmod";
1188 static char __pyx_k_version[] = "__version__";
1189 static char __pyx_k_Integral[] = "Integral";
1190 static char __pyx_k_PyClical[] = "PyClical";
1191 static char __pyx_k_Sequence[] = "Sequence";
1192 static char __pyx_k_as_frame[] = " as frame:\n\t";
1193 static char __pyx_k_involute[] = "involute";
1194 static char __pyx_k_to_frame[] = " to frame ";
1195 static char __pyx_k_TypeError[] = "TypeError";
1196 static char __pyx_k_outer_pow[] = "outer_pow";
1197 static char __pyx_k_IndexError[] = "IndexError";
1198 static char __pyx_k_ValueError[] = "ValueError";
1199 static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1200 static char __pyx_k_collections[] = "collections";
1201 static char __pyx_k_e_line_1887[] = "e (line 1887)";
1202 static char __pyx_k_RuntimeError[] = "RuntimeError";
1203 static char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1204 static char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1205 static char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1206 static char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1207 static char __pyx_k_log_line_1579[] = "log (line 1579)";
1208 static char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1209 static char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1210 static char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1211 static char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1212 static char __pyx_k_using_invalid[] = " using invalid ";
1213 static char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1214 static char __pyx_k_NotImplemented[] = "NotImplemented";
1215 static char __pyx_k_Not_applicable[] = "Not applicable.";
1216 static char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1217 static char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1218 static char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1219 static char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1220 static char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1221 static char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1222 static char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1223 static char __pyx_k_even_line_1388[] = "even (line 1388)";
1224 static char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1225 static char __pyx_k_invalid_string[] = " invalid string ";
1226 static char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1227 static char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1228 static char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1229 static char __pyx_k_real_line_1355[] = "real (line 1355)";
1230 static char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1231 static char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1232 static char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1233 static char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1234 static char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1235 static char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1236 static char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1237 static char __pyx_k_compare_line_490[] = "compare (line 490)";
1238 static char __pyx_k_index_set___iter[] = "index_set.__iter__";
1239 static char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1240 static char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1241 static char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1242 static char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1243 static char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1244 static char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1245 static char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1246 static char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1247 static char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1248 static char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1249 static char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1250 static char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1251 static char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1252 static char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1253 static char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1254 static char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1255 static char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1256 static char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1257 static char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1258 static char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1259 static char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1260 static char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1261 static char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1262 static char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1263 static char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1264 static char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1265 static char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1266 static char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1267 static char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1268 static char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1269 static char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1270 static char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1271 static char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1272 static char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1273 static char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1274 static char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1275 static char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1276 static char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1277 static char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1278 static char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1279 static char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1280 static char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1281 static char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1282 static char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1283 static char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1284 static char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1285 static char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1286 static char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1287 static char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1288 static char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1289 static char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1290 static char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1291 static char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1292 static char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1293 static char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1294 static char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1295 static char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1296 static char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1297 static char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1298 static char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1299 static char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1300 static char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1301 static char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1302 static char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1303 static char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1304 static char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1305 static char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1306 static char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1307 static char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1308 static char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1309 static char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1310 static char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1311 static char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1312 static char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1313 static 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 ";
1314 static 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 ";
1315 static 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 ";
1316 static 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 ";
1317 static 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 ";
1318 static 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 ";
1319 static 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 ";
1320 static char __pyx_k_Iterate_over_the_indices_of_an[] = "\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}): print i,\n -3 4 7\n ";
1321 static char __pyx_k_Maximum_member_index_set_1_1_2[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
1322 static 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 ";
1323 static char __pyx_k_Minimum_member_index_set_1_1_2[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
1324 static 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 ";
1325 static 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 ";
1326 static 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 ";
1327 static 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 ";
1328 static 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 ";
1329 static 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 ";
1330 static 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 ";
1331 static 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 ";
1332 static 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 ";
1333 static 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 ";
1334 static char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1335 static char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1336 static char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1337 static 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 ";
1338 static 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 ";
1339 static 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 ";
1340 static 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 ";
1341 static 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 ";
1342 static char __pyx_k_Check_if_a_multivector_contains[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
1343 static 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 ";
1344 static 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 ";
1345 static 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 ";
1346 static 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 ";
1347 static 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 ";
1348 static 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 ";
1349 static 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 ";
1350 static 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 ";
1351 static 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 ";
1352 static 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 ";
1353 static 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 ";
1354 static char __pyx_k_Geometric_difference_x_clifford[] = "\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print x\n 1-{2}\n ";
1355 static 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 ";
1356 static 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 ";
1357 static 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 ";
1358 static 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 ";
1359 static 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 ";
1360 static 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 ";
1361 static 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 ";
1362 static 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 ";
1363 static 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 ";
1364 static 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 ";
1365 static 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 ";
1366 static 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 ";
1367 static 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 ";
1368 static 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 ";
1369 static 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 ";
1370 static 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 ";
1371 static 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 ";
1372 static 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 ";
1373 static 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 ";
1374 static 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 ";
1375 static 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 ";
1376 static char __pyx_k_Not_applicable_for_a_in_cliffor[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})): print a,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
1377 static 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 ";
1378 static 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 ";
1379 static 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 ";
1380 static 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 ";
1381 static 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 ";
1382 static 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 ";
1383 static 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 ";
1384 static 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 ";
1385 static 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 ";
1386 static 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 ";
1387 static 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 ";
1388 static 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 ";
1389 static 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 ";
1390 static 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 ";
1391 static 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 ";
1392 static 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 ";
1393 static 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 ";
1394 static 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 ";
1395 static 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 ";
1396 static 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 ";
1397 static 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 ";
1398 static 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 ";
1399 static 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 ";
1400 static char __pyx_k_Subalgebra_generated_by_all_gen[] = "\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame()\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <type 'PyClical.index_set'>\n ";
1401 static 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 ";
1402 static 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 ";
1403 static 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 ";
1404 static char __pyx_k_Tests_for_functions_that_Doctes[] = "\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print index_set(1)\n {1}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set(index_set({1,2}))\n {1,2}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set(\"\")\n {}\n >>> print index_set(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print index_set(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print index_set(\"{1,2,100}\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print index_set({1,2,100})\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> index_se""t({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ";
1405  static 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 ";
1406  static 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 ";
1407  static char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
1408  static 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 ";
1409  static char __pyx_k_home_abuild_rpmbuild_BUILD_gluc[] = "/home/abuild/rpmbuild/BUILD/glucat-0.8.2/pyclical/PyClical.pyx";
1410  static char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
1411  static 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 ";
1412  static char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
1413  static char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
1414  static 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 ";
1415  static 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 ";
1416  static 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 ";
1417  static 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 ";
1418  static 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 ";
1419  static char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
1420  static char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
1421  static char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
1422  static 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 ";
1423  static 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 ";
1424  static 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 ";
1425  static 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 ";
1426  static char __pyx_k_Tests_for_functions_that_Doctes_2[] = "\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print clifford(2)\n 2\n >>> print clifford(2L)\n 2\n >>> print clifford(2.0)\n 2\n >>> print clifford(1.0e-1)\n 0.1\n >>> print clifford(\"2\")\n 2\n >>> print clifford(\"2{1,2,3}\")\n 2{1,2,3}\n >>> print clifford(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print clifford(\"-{1}\")\n -{1}\n >>> print clifford(2,index_set({1,2}))\n 2{1,2}\n >>> print clifford([2,3],index_set({1,2}))\n 2{1}+3{2}\n >>> print clifford([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type 'list'>).\n >>> print clifford(\"\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print clifford(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print clifford(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print clifford(\"+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print clifford(\"-\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford"" object from invalid string '-'.\n >>> print clifford(\"{1}+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ";
1427  static 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 ";
1428  static 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 ";
1429  static PyObject *__pyx_kp_s_;
1430  static PyObject *__pyx_kp_s_0_8_2;
1431  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1432  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1433  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1434  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1435  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1436  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1437  static PyObject *__pyx_kp_s_Cannot_reframe;
1438  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1439  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1440  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1441  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1442  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1443  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1444  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1445  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1446  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1447  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1448  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1449  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1450  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1451  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1452  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1453  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1454  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1455  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1456  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1457  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1458  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1459  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1460  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1461  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1462  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1463  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1464  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1465  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1466  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1467  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1468  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1469  static PyObject *__pyx_n_s_IndexError;
1470  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1471  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1472  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1473  static PyObject *__pyx_n_s_Integral;
1474  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1475  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1476  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1477  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1478  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1479  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1480  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1481  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1482  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1483  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1484  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1485  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1486  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1487  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1488  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1489  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1490  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1491  static PyObject *__pyx_n_s_NotImplemented;
1492  static PyObject *__pyx_kp_s_Not_applicable;
1493  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1494  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
1495  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
1496  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
1497  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
1498  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
1499  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
1500  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
1501  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
1502  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
1503  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
1504  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
1505  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
1506  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
1507  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
1508  static PyObject *__pyx_n_s_PyClical;
1509  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
1510  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
1511  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
1512  static PyObject *__pyx_n_s_Real;
1513  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
1514  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
1515  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
1516  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
1517  static PyObject *__pyx_n_s_RuntimeError;
1518  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
1519  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
1520  static PyObject *__pyx_n_s_Sequence;
1521  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
1522  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
1523  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
1524  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
1525  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
1526  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
1527  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
1528  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
1529  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
1530  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
1531  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
1532  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
1533  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
1534  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
1535  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
1536  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
1537  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
1538  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
1539  static PyObject *__pyx_kp_u_The_informal_string_representat;
1540  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
1541  static PyObject *__pyx_kp_u_The_official_string_representat;
1542  static PyObject *__pyx_kp_u_The_official_string_representat_2;
1543  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
1544  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
1545  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
1546  static PyObject *__pyx_n_s_TypeError;
1547  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
1548  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
1549  static PyObject *__pyx_n_s_ValueError;
1550  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
1551  static PyObject *__pyx_kp_s__2;
1552  static PyObject *__pyx_kp_s__3;
1553  static PyObject *__pyx_kp_s__4;
1554  static PyObject *__pyx_kp_s__5;
1555  static PyObject *__pyx_kp_s__6;
1556  static PyObject *__pyx_kp_s__7;
1557  static PyObject *__pyx_kp_u_abs_line_1473;
1558  static PyObject *__pyx_n_s_acos;
1559  static PyObject *__pyx_kp_u_acos_line_1619;
1560  static PyObject *__pyx_n_s_acosh;
1561  static PyObject *__pyx_kp_u_acosh_line_1656;
1562  static PyObject *__pyx_kp_u_agc3_line_1844;
1563  static PyObject *__pyx_n_s_args;
1564  static PyObject *__pyx_kp_s_as_frame;
1565  static PyObject *__pyx_n_s_asin;
1566  static PyObject *__pyx_kp_u_asin_line_1698;
1567  static PyObject *__pyx_n_s_asinh;
1568  static PyObject *__pyx_kp_u_asinh_line_1733;
1569  static PyObject *__pyx_n_s_atan;
1570  static PyObject *__pyx_kp_u_atan_line_1769;
1571  static PyObject *__pyx_n_s_atanh;
1572  static PyObject *__pyx_kp_u_atanh_line_1798;
1573  static PyObject *__pyx_kp_u_cga3_line_1824;
1574  static PyObject *__pyx_kp_u_cga3std_line_1833;
1575  static PyObject *__pyx_n_s_cl;
1576  static PyObject *__pyx_kp_u_clifford___add___line_739;
1577  static PyObject *__pyx_kp_u_clifford___and___line_835;
1578  static PyObject *__pyx_kp_u_clifford___call___line_1019;
1579  static PyObject *__pyx_kp_u_clifford___div___line_895;
1580  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
1581  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
1582  static PyObject *__pyx_kp_u_clifford___iand___line_850;
1583  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
1584  static PyObject *__pyx_kp_u_clifford___imod___line_820;
1585  static PyObject *__pyx_kp_u_clifford___imul___line_792;
1586  static PyObject *__pyx_kp_u_clifford___ior___line_949;
1587  static PyObject *__pyx_kp_u_clifford___isub___line_770;
1588  static PyObject *__pyx_kp_u_clifford___iter___line_637;
1589  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
1590  static PyObject *__pyx_kp_u_clifford___mod___line_805;
1591  static PyObject *__pyx_kp_u_clifford___mul___line_779;
1592  static PyObject *__pyx_kp_u_clifford___neg___line_721;
1593  static PyObject *__pyx_kp_u_clifford___or___line_938;
1594  static PyObject *__pyx_kp_u_clifford___pos___line_730;
1595  static PyObject *__pyx_kp_u_clifford___pow___line_960;
1596  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
1597  static PyObject *__pyx_kp_u_clifford___str___line_1234;
1598  static PyObject *__pyx_kp_u_clifford___sub___line_759;
1599  static PyObject *__pyx_kp_u_clifford___xor___line_865;
1600  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
1601  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
1602  static PyObject *__pyx_kp_u_clifford_copy_line_554;
1603  static PyObject *__pyx_kp_u_clifford_even_line_1060;
1604  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
1605  static PyObject *__pyx_n_s_clifford_hidden_doctests;
1606  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
1607  static PyObject *__pyx_kp_u_clifford_inv_line_925;
1608  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
1609  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
1610  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
1611  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
1612  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
1613  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
1614  static PyObject *__pyx_kp_u_clifford_pow_line_979;
1615  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
1616  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
1617  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
1618  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
1619  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
1620  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
1621  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
1622  static PyObject *__pyx_n_s_close;
1623  static PyObject *__pyx_n_s_collections;
1624  static PyObject *__pyx_kp_u_compare_line_490;
1625  static PyObject *__pyx_kp_u_complexifier_line_1527;
1626  static PyObject *__pyx_n_s_conj;
1627  static PyObject *__pyx_kp_u_conj_line_1436;
1628  static PyObject *__pyx_n_s_copy;
1629  static PyObject *__pyx_n_s_cos;
1630  static PyObject *__pyx_kp_u_cos_line_1602;
1631  static PyObject *__pyx_n_s_cosh;
1632  static PyObject *__pyx_kp_u_cosh_line_1640;
1633  static PyObject *__pyx_n_s_doctest;
1634  static PyObject *__pyx_n_s_e;
1635  static PyObject *__pyx_kp_u_e_line_1887;
1636  static PyObject *__pyx_n_s_even;
1637  static PyObject *__pyx_kp_u_even_line_1388;
1638  static PyObject *__pyx_n_s_exp;
1639  static PyObject *__pyx_kp_u_exp_line_1565;
1640  static PyObject *__pyx_n_s_fill;
1641  static PyObject *__pyx_n_s_frm;
1642  static PyObject *__pyx_kp_s_from;
1643  static PyObject *__pyx_n_s_grade;
1644  static PyObject *__pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc;
1645  static PyObject *__pyx_n_s_i;
1646  static PyObject *__pyx_kp_u_imag_line_1366;
1647  static PyObject *__pyx_n_s_import;
1648  static PyObject *__pyx_kp_u_index_set___and___line_269;
1649  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
1650  static PyObject *__pyx_kp_u_index_set___iand___line_280;
1651  static PyObject *__pyx_kp_u_index_set___invert___line_238;
1652  static PyObject *__pyx_kp_u_index_set___ior___line_302;
1653  static PyObject *__pyx_n_s_index_set___iter;
1654  static PyObject *__pyx_kp_u_index_set___iter___line_227;
1655  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
1656  static PyObject *__pyx_kp_u_index_set___or___line_291;
1657  static PyObject *__pyx_kp_u_index_set___repr___line_382;
1658  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
1659  static PyObject *__pyx_kp_u_index_set___str___line_393;
1660  static PyObject *__pyx_kp_u_index_set___xor___line_247;
1661  static PyObject *__pyx_kp_u_index_set_copy_line_64;
1662  static PyObject *__pyx_kp_u_index_set_count_line_313;
1663  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
1664  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
1665  static PyObject *__pyx_n_s_index_set_hidden_doctests;
1666  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
1667  static PyObject *__pyx_kp_u_index_set_max_line_349;
1668  static PyObject *__pyx_kp_u_index_set_min_line_340;
1669  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
1670  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
1671  static PyObject *__pyx_n_s_inv;
1672  static PyObject *__pyx_kp_u_inv_line_1329;
1673  static PyObject *__pyx_kp_s_invalid;
1674  static PyObject *__pyx_kp_s_invalid_string;
1675  static PyObject *__pyx_n_s_involute;
1676  static PyObject *__pyx_kp_u_involute_line_1406;
1677  static PyObject *__pyx_n_s_ist;
1678  static PyObject *__pyx_n_s_istpq;
1679  static PyObject *__pyx_kp_u_istpq_line_1900;
1680  static PyObject *__pyx_n_s_iter;
1681  static PyObject *__pyx_n_s_ixt;
1682  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
1683  static PyObject *__pyx_n_s_lhs;
1684  static PyObject *__pyx_n_s_log;
1685  static PyObject *__pyx_kp_u_log_line_1579;
1686  static PyObject *__pyx_n_s_m;
1687  static PyObject *__pyx_n_s_main;
1688  static PyObject *__pyx_n_s_math;
1689  static PyObject *__pyx_n_s_max;
1690  static PyObject *__pyx_kp_u_max_abs_line_1482;
1691  static PyObject *__pyx_kp_u_max_pos_line_511;
1692  static PyObject *__pyx_n_s_min;
1693  static PyObject *__pyx_kp_u_min_neg_line_502;
1694  static PyObject *__pyx_n_s_name;
1695  static PyObject *__pyx_n_s_nbar3;
1696  static PyObject *__pyx_n_s_ninf3;
1697  static PyObject *__pyx_n_s_norm;
1698  static PyObject *__pyx_kp_u_norm_line_1462;
1699  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
1700  static PyObject *__pyx_n_s_numbers;
1701  static PyObject *__pyx_n_s_obj;
1702  static PyObject *__pyx_n_s_odd;
1703  static PyObject *__pyx_kp_u_odd_line_1397;
1704  static PyObject *__pyx_n_s_other;
1705  static PyObject *__pyx_n_s_outer_pow;
1706  static PyObject *__pyx_kp_u_outer_pow_line_1518;
1707  static PyObject *__pyx_n_s_p;
1708  static PyObject *__pyx_n_s_pi;
1709  static PyObject *__pyx_n_s_pow;
1710  static PyObject *__pyx_kp_u_pow_line_1494;
1711  static PyObject *__pyx_n_s_pure;
1712  static PyObject *__pyx_kp_u_pure_line_1377;
1713  static PyObject *__pyx_n_s_pyx_vtable;
1714  static PyObject *__pyx_n_s_q;
1715  static PyObject *__pyx_n_s_quad;
1716  static PyObject *__pyx_kp_u_quad_line_1451;
1717  static PyObject *__pyx_kp_u_random_clifford_line_1815;
1718  static PyObject *__pyx_n_s_range;
1719  static PyObject *__pyx_kp_u_real_line_1355;
1720  static PyObject *__pyx_n_s_reverse;
1721  static PyObject *__pyx_kp_u_reverse_line_1421;
1722  static PyObject *__pyx_n_s_rhs;
1723  static PyObject *__pyx_n_s_scalar;
1724  static PyObject *__pyx_kp_u_scalar_line_1344;
1725  static PyObject *__pyx_n_s_send;
1726  static PyObject *__pyx_n_s_sin;
1727  static PyObject *__pyx_kp_u_sin_line_1679;
1728  static PyObject *__pyx_n_s_sinh;
1729  static PyObject *__pyx_kp_u_sinh_line_1719;
1730  static PyObject *__pyx_n_s_sqrt;
1731  static PyObject *__pyx_kp_u_sqrt_line_1542;
1732  static PyObject *__pyx_n_s_tan;
1733  static PyObject *__pyx_kp_u_tan_line_1752;
1734  static PyObject *__pyx_n_s_tanh;
1735  static PyObject *__pyx_kp_u_tanh_line_1786;
1736  static PyObject *__pyx_n_s_tau;
1737  static PyObject *__pyx_n_s_test;
1738  static PyObject *__pyx_n_s_test_2;
1739  static PyObject *__pyx_n_s_testmod;
1740  static PyObject *__pyx_n_s_throw;
1741  static PyObject *__pyx_kp_s_to_frame;
1742  static PyObject *__pyx_kp_s_using;
1743  static PyObject *__pyx_kp_s_using_invalid;
1744  static PyObject *__pyx_kp_s_value;
1745  static PyObject *__pyx_n_s_version;
1746  static PyObject *__pyx_n_s_xrange;
1747  static PyObject *__pyx_float_0_0;
1748  static PyObject *__pyx_float_1_0;
1749  static PyObject *__pyx_float_2_0;
1750  static PyObject *__pyx_float_8_0;
1751  static PyObject *__pyx_int_0;
1752  static PyObject *__pyx_int_1;
1753  static PyObject *__pyx_int_4;
1754  static PyObject *__pyx_int_neg_1;
1755  static PyObject *__pyx_tuple__8;
1756  static PyObject *__pyx_tuple__9;
1757  static PyObject *__pyx_tuple__12;
1758  static PyObject *__pyx_tuple__13;
1759  static PyObject *__pyx_tuple__15;
1760  static PyObject *__pyx_tuple__17;
1761  static PyObject *__pyx_tuple__18;
1762  static PyObject *__pyx_tuple__19;
1763  static PyObject *__pyx_tuple__20;
1764  static PyObject *__pyx_tuple__21;
1765  static PyObject *__pyx_codeobj__10;
1766  static PyObject *__pyx_codeobj__11;
1767  static PyObject *__pyx_codeobj__14;
1768  static PyObject *__pyx_codeobj__16;
1769  static PyObject *__pyx_codeobj__22;
1770 
1771 /* "PyClical.pyx":39
1772  * cdef class index_set
1773  *
1774  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
1775  * """
1776  * Return the C++ IndexSet instance wrapped by index_set(obj).
1777  */
1778 
1779 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
1780  IndexSet __pyx_r;
1781  __Pyx_RefNannyDeclarations
1782  PyObject *__pyx_t_1 = NULL;
1783  PyObject *__pyx_t_2 = NULL;
1784  int __pyx_lineno = 0;
1785  const char *__pyx_filename = NULL;
1786  int __pyx_clineno = 0;
1787  __Pyx_RefNannySetupContext("toIndexSet", 0);
1788 
1789  /* "PyClical.pyx":43
1790  * Return the C++ IndexSet instance wrapped by index_set(obj).
1791  * """
1792  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
1793  *
1794  * cdef class index_set:
1795  */
1796  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1797  __Pyx_GOTREF(__pyx_t_1);
1798  __Pyx_INCREF(__pyx_v_obj);
1799  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
1800  __Pyx_GIVEREF(__pyx_v_obj);
1801  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1802  __Pyx_GOTREF(__pyx_t_2);
1803  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1804  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
1805  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1806  goto __pyx_L0;
1807 
1808  /* "PyClical.pyx":39
1809  * cdef class index_set
1810  *
1811  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
1812  * """
1813  * Return the C++ IndexSet instance wrapped by index_set(obj).
1814  */
1815 
1816  /* function exit code */
1817  __pyx_L1_error:;
1818  __Pyx_XDECREF(__pyx_t_1);
1819  __Pyx_XDECREF(__pyx_t_2);
1820  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
1821  __pyx_L0:;
1822  __Pyx_RefNannyFinishContext();
1823  return __pyx_r;
1824 }
1825 
1826 /* "PyClical.pyx":51
1827  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
1828  *
1829  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
1830  * """
1831  * Wrap an instance of the C++ class IndexSet.
1832  */
1833 
1834 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
1835  PyObject *__pyx_r = NULL;
1836  __Pyx_RefNannyDeclarations
1837  __Pyx_RefNannySetupContext("wrap", 0);
1838 
1839  /* "PyClical.pyx":55
1840  * Wrap an instance of the C++ class IndexSet.
1841  * """
1842  * self.instance[0] = other # <<<<<<<<<<<<<<
1843  * return self
1844  *
1845  */
1846  (__pyx_v_self->instance[0]) = __pyx_v_other;
1847 
1848  /* "PyClical.pyx":56
1849  * """
1850  * self.instance[0] = other
1851  * return self # <<<<<<<<<<<<<<
1852  *
1853  * cdef inline IndexSet unwrap(index_set self):
1854  */
1855  __Pyx_XDECREF(__pyx_r);
1856  __Pyx_INCREF(((PyObject *)__pyx_v_self));
1857  __pyx_r = ((PyObject *)__pyx_v_self);
1858  goto __pyx_L0;
1859 
1860  /* "PyClical.pyx":51
1861  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
1862  *
1863  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
1864  * """
1865  * Wrap an instance of the C++ class IndexSet.
1866  */
1867 
1868  /* function exit code */
1869  __pyx_L0:;
1870  __Pyx_XGIVEREF(__pyx_r);
1871  __Pyx_RefNannyFinishContext();
1872  return __pyx_r;
1873 }
1874 
1875 /* "PyClical.pyx":58
1876  * return self
1877  *
1878  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
1879  * """
1880  * Return the wrapped C++ IndexSet instance.
1881  */
1882 
1883 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
1884  IndexSet __pyx_r;
1885  __Pyx_RefNannyDeclarations
1886  __Pyx_RefNannySetupContext("unwrap", 0);
1887 
1888  /* "PyClical.pyx":62
1889  * Return the wrapped C++ IndexSet instance.
1890  * """
1891  * return self.instance[0] # <<<<<<<<<<<<<<
1892  *
1893  * cpdef copy(index_set self):
1894  */
1895  __pyx_r = (__pyx_v_self->instance[0]);
1896  goto __pyx_L0;
1897 
1898  /* "PyClical.pyx":58
1899  * return self
1900  *
1901  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
1902  * """
1903  * Return the wrapped C++ IndexSet instance.
1904  */
1905 
1906  /* function exit code */
1907  __pyx_L0:;
1908  __Pyx_RefNannyFinishContext();
1909  return __pyx_r;
1910 }
1911 
1912 /* "PyClical.pyx":64
1913  * return self.instance[0]
1914  *
1915  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
1916  * """
1917  * Copy this index_set object.
1918  */
1919 
1920 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
1921 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
1922  PyObject *__pyx_r = NULL;
1923  __Pyx_RefNannyDeclarations
1924  PyObject *__pyx_t_1 = NULL;
1925  PyObject *__pyx_t_2 = NULL;
1926  PyObject *__pyx_t_3 = NULL;
1927  PyObject *__pyx_t_4 = NULL;
1928  int __pyx_lineno = 0;
1929  const char *__pyx_filename = NULL;
1930  int __pyx_clineno = 0;
1931  __Pyx_RefNannySetupContext("copy", 0);
1932  /* Check if called by wrapper */
1933  if (unlikely(__pyx_skip_dispatch)) ;
1934  /* Check if overridden in Python */
1935  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
1936  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1937  __Pyx_GOTREF(__pyx_t_1);
1938  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
1939  __Pyx_XDECREF(__pyx_r);
1940  __Pyx_INCREF(__pyx_t_1);
1941  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
1942  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
1943  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
1944  if (likely(__pyx_t_4)) {
1945  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
1946  __Pyx_INCREF(__pyx_t_4);
1947  __Pyx_INCREF(function);
1948  __Pyx_DECREF_SET(__pyx_t_3, function);
1949  }
1950  }
1951  if (__pyx_t_4) {
1952  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1953  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1954  } else {
1955  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1956  }
1957  __Pyx_GOTREF(__pyx_t_2);
1958  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1959  __pyx_r = __pyx_t_2;
1960  __pyx_t_2 = 0;
1961  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1962  goto __pyx_L0;
1963  }
1964  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1965  }
1966 
1967  /* "PyClical.pyx":71
1968  * {1}
1969  * """
1970  * return index_set(self) # <<<<<<<<<<<<<<
1971  *
1972  * def __cinit__(self, other = 0):
1973  */
1974  __Pyx_XDECREF(__pyx_r);
1975  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1976  __Pyx_GOTREF(__pyx_t_1);
1977  __Pyx_INCREF(((PyObject *)__pyx_v_self));
1978  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
1979  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
1980  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1981  __Pyx_GOTREF(__pyx_t_2);
1982  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1983  __pyx_r = __pyx_t_2;
1984  __pyx_t_2 = 0;
1985  goto __pyx_L0;
1986 
1987  /* "PyClical.pyx":64
1988  * return self.instance[0]
1989  *
1990  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
1991  * """
1992  * Copy this index_set object.
1993  */
1994 
1995  /* function exit code */
1996  __pyx_L1_error:;
1997  __Pyx_XDECREF(__pyx_t_1);
1998  __Pyx_XDECREF(__pyx_t_2);
1999  __Pyx_XDECREF(__pyx_t_3);
2000  __Pyx_XDECREF(__pyx_t_4);
2001  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2002  __pyx_r = 0;
2003  __pyx_L0:;
2004  __Pyx_XGIVEREF(__pyx_r);
2005  __Pyx_RefNannyFinishContext();
2006  return __pyx_r;
2007 }
2008 
2009 /* Python wrapper */
2010 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2011 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 ";
2012 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2013  PyObject *__pyx_r = 0;
2014  __Pyx_RefNannyDeclarations
2015  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2016  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2017 
2018  /* function exit code */
2019  __Pyx_RefNannyFinishContext();
2020  return __pyx_r;
2021 }
2022 
2023 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2024  PyObject *__pyx_r = NULL;
2025  __Pyx_RefNannyDeclarations
2026  PyObject *__pyx_t_1 = NULL;
2027  int __pyx_lineno = 0;
2028  const char *__pyx_filename = NULL;
2029  int __pyx_clineno = 0;
2030  __Pyx_RefNannySetupContext("copy", 0);
2031  __Pyx_XDECREF(__pyx_r);
2032  __pyx_t_1 = __pyx_f_8PyClical_9index_set_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2033  __Pyx_GOTREF(__pyx_t_1);
2034  __pyx_r = __pyx_t_1;
2035  __pyx_t_1 = 0;
2036  goto __pyx_L0;
2037 
2038  /* function exit code */
2039  __pyx_L1_error:;
2040  __Pyx_XDECREF(__pyx_t_1);
2041  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2042  __pyx_r = NULL;
2043  __pyx_L0:;
2044  __Pyx_XGIVEREF(__pyx_r);
2045  __Pyx_RefNannyFinishContext();
2046  return __pyx_r;
2047 }
2048 
2049 /* "PyClical.pyx":73
2050  * return index_set(self)
2051  *
2052  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2053  * """
2054  * Construct an object of type index_set.
2055  */
2056 
2057 /* Python wrapper */
2058 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2059 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2060  PyObject *__pyx_v_other = 0;
2061  int __pyx_lineno = 0;
2062  const char *__pyx_filename = NULL;
2063  int __pyx_clineno = 0;
2064  int __pyx_r;
2065  __Pyx_RefNannyDeclarations
2066  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2067  {
2068  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2069  PyObject* values[1] = {0};
2070  values[0] = ((PyObject *)__pyx_int_0);
2071  if (unlikely(__pyx_kwds)) {
2072  Py_ssize_t kw_args;
2073  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2074  switch (pos_args) {
2075  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2076  case 0: break;
2077  default: goto __pyx_L5_argtuple_error;
2078  }
2079  kw_args = PyDict_Size(__pyx_kwds);
2080  switch (pos_args) {
2081  case 0:
2082  if (kw_args > 0) {
2083  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
2084  if (value) { values[0] = value; kw_args--; }
2085  }
2086  }
2087  if (unlikely(kw_args > 0)) {
2088  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2089  }
2090  } else {
2091  switch (PyTuple_GET_SIZE(__pyx_args)) {
2092  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2093  case 0: break;
2094  default: goto __pyx_L5_argtuple_error;
2095  }
2096  }
2097  __pyx_v_other = values[0];
2098  }
2099  goto __pyx_L4_argument_unpacking_done;
2100  __pyx_L5_argtuple_error:;
2101  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2102  __pyx_L3_error:;
2103  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2104  __Pyx_RefNannyFinishContext();
2105  return -1;
2106  __pyx_L4_argument_unpacking_done:;
2107  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2108 
2109  /* function exit code */
2110  __Pyx_RefNannyFinishContext();
2111  return __pyx_r;
2112 }
2113 
2114 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2115  PyObject *__pyx_v_error_msg_prefix = NULL;
2116  PyObject *__pyx_v_idx = NULL;
2117  int __pyx_r;
2118  __Pyx_RefNannyDeclarations
2119  int __pyx_t_1;
2120  int __pyx_t_2;
2121  IndexSet *__pyx_t_3;
2122  PyObject *__pyx_t_4 = NULL;
2123  PyObject *__pyx_t_5 = NULL;
2124  int __pyx_t_6;
2125  int __pyx_t_7;
2126  PyObject *__pyx_t_8 = NULL;
2127  PyObject *__pyx_t_9 = NULL;
2128  PyObject *__pyx_t_10 = NULL;
2129  Py_ssize_t __pyx_t_11;
2130  PyObject *(*__pyx_t_12)(PyObject *);
2131  PyObject *__pyx_t_13 = NULL;
2132  PyObject *__pyx_t_14 = NULL;
2133  PyObject *__pyx_t_15 = NULL;
2134  PyObject *__pyx_t_16 = NULL;
2135  char *__pyx_t_17;
2136  int __pyx_lineno = 0;
2137  const char *__pyx_filename = NULL;
2138  int __pyx_clineno = 0;
2139  __Pyx_RefNannySetupContext("__cinit__", 0);
2140 
2141  /* "PyClical.pyx":92
2142  * {}
2143  * """
2144  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2145  * if isinstance(other, index_set):
2146  * self.instance = new IndexSet((<index_set>other).unwrap())
2147  */
2148  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2149  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2150 
2151  /* "PyClical.pyx":93
2152  * """
2153  * error_msg_prefix = "Cannot initialize index_set object from"
2154  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2155  * self.instance = new IndexSet((<index_set>other).unwrap())
2156  * elif isinstance(other, numbers.Integral):
2157  */
2158  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
2159  __pyx_t_2 = (__pyx_t_1 != 0);
2160  if (__pyx_t_2) {
2161 
2162  /* "PyClical.pyx":94
2163  * error_msg_prefix = "Cannot initialize index_set object from"
2164  * if isinstance(other, index_set):
2165  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2166  * elif isinstance(other, numbers.Integral):
2167  * self.instance = new IndexSet(<int>other)
2168  */
2169  try {
2170  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2171  } catch(...) {
2172  __Pyx_CppExn2PyErr();
2173  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2174  }
2175  __pyx_v_self->instance = __pyx_t_3;
2176  goto __pyx_L3;
2177  }
2178 
2179  /* "PyClical.pyx":95
2180  * if isinstance(other, index_set):
2181  * self.instance = new IndexSet((<index_set>other).unwrap())
2182  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2183  * self.instance = new IndexSet(<int>other)
2184  * elif isinstance(other, (set, frozenset)):
2185  */
2186  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2187  __Pyx_GOTREF(__pyx_t_4);
2188  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integral); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2189  __Pyx_GOTREF(__pyx_t_5);
2190  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2191  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2192  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2193  __pyx_t_1 = (__pyx_t_2 != 0);
2194  if (__pyx_t_1) {
2195 
2196  /* "PyClical.pyx":96
2197  * self.instance = new IndexSet((<index_set>other).unwrap())
2198  * elif isinstance(other, numbers.Integral):
2199  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2200  * elif isinstance(other, (set, frozenset)):
2201  * try:
2202  */
2203  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_other); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2204  try {
2205  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2206  } catch(...) {
2207  __Pyx_CppExn2PyErr();
2208  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2209  }
2210  __pyx_v_self->instance = __pyx_t_3;
2211  goto __pyx_L3;
2212  }
2213 
2214  /* "PyClical.pyx":97
2215  * elif isinstance(other, numbers.Integral):
2216  * self.instance = new IndexSet(<int>other)
2217  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2218  * try:
2219  * self.instance = new IndexSet()
2220  */
2221  __pyx_t_2 = PySet_Check(__pyx_v_other);
2222  __pyx_t_7 = (__pyx_t_2 != 0);
2223  if (!__pyx_t_7) {
2224  goto __pyx_L5_next_or;
2225  } else {
2226  __pyx_t_1 = __pyx_t_7;
2227  goto __pyx_L4_bool_binop_done;
2228  }
2229  __pyx_L5_next_or:;
2230  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2231  __pyx_t_2 = (__pyx_t_7 != 0);
2232  __pyx_t_1 = __pyx_t_2;
2233  __pyx_L4_bool_binop_done:;
2234  __pyx_t_2 = (__pyx_t_1 != 0);
2235  if (__pyx_t_2) {
2236 
2237  /* "PyClical.pyx":98
2238  * self.instance = new IndexSet(<int>other)
2239  * elif isinstance(other, (set, frozenset)):
2240  * try: # <<<<<<<<<<<<<<
2241  * self.instance = new IndexSet()
2242  * for idx in other:
2243  */
2244  {
2245  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2246  __Pyx_XGOTREF(__pyx_t_8);
2247  __Pyx_XGOTREF(__pyx_t_9);
2248  __Pyx_XGOTREF(__pyx_t_10);
2249  /*try:*/ {
2250 
2251  /* "PyClical.pyx":99
2252  * elif isinstance(other, (set, frozenset)):
2253  * try:
2254  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
2255  * for idx in other:
2256  * self[idx] = True
2257  */
2258  __pyx_v_self->instance = new IndexSet();
2259 
2260  /* "PyClical.pyx":100
2261  * try:
2262  * self.instance = new IndexSet()
2263  * for idx in other: # <<<<<<<<<<<<<<
2264  * self[idx] = True
2265  * except IndexError:
2266  */
2267  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2268  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2269  __pyx_t_12 = NULL;
2270  } else {
2271  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2272  __Pyx_GOTREF(__pyx_t_5);
2273  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2274  }
2275  for (;;) {
2276  if (likely(!__pyx_t_12)) {
2277  if (likely(PyList_CheckExact(__pyx_t_5))) {
2278  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
2279  #if CYTHON_COMPILING_IN_CPYTHON
2280  __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2281  #else
2282  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2283  #endif
2284  } else {
2285  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2286  #if CYTHON_COMPILING_IN_CPYTHON
2287  __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2288  #else
2289  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2290  #endif
2291  }
2292  } else {
2293  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2294  if (unlikely(!__pyx_t_4)) {
2295  PyObject* exc_type = PyErr_Occurred();
2296  if (exc_type) {
2297  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2298  else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2299  }
2300  break;
2301  }
2302  __Pyx_GOTREF(__pyx_t_4);
2303  }
2304  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2305  __pyx_t_4 = 0;
2306 
2307  /* "PyClical.pyx":101
2308  * self.instance = new IndexSet()
2309  * for idx in other:
2310  * self[idx] = True # <<<<<<<<<<<<<<
2311  * except IndexError:
2312  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2313  */
2314  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
2315 
2316  /* "PyClical.pyx":100
2317  * try:
2318  * self.instance = new IndexSet()
2319  * for idx in other: # <<<<<<<<<<<<<<
2320  * self[idx] = True
2321  * except IndexError:
2322  */
2323  }
2324  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2325  }
2326  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2327  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2328  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2329  goto __pyx_L13_try_end;
2330  __pyx_L6_error:;
2331  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2332  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2333 
2334  /* "PyClical.pyx":102
2335  * for idx in other:
2336  * self[idx] = True
2337  * except IndexError: # <<<<<<<<<<<<<<
2338  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2339  * except (RuntimeError, TypeError):
2340  */
2341  __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2342  if (__pyx_t_6) {
2343  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2344  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2345  __Pyx_GOTREF(__pyx_t_5);
2346  __Pyx_GOTREF(__pyx_t_4);
2347  __Pyx_GOTREF(__pyx_t_13);
2348 
2349  /* "PyClical.pyx":103
2350  * self[idx] = True
2351  * except IndexError:
2352  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
2353  * except (RuntimeError, TypeError):
2354  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2355  */
2356  __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2357  __Pyx_GOTREF(__pyx_t_14);
2358  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2359  __Pyx_GOTREF(__pyx_t_15);
2360  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2361  __Pyx_GOTREF(__pyx_t_16);
2362  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2363  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2364  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2365  __Pyx_GOTREF(__pyx_t_15);
2366  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2367  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2368  __Pyx_GOTREF(__pyx_t_16);
2369  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2370  __Pyx_GIVEREF(__pyx_t_15);
2371  __pyx_t_15 = 0;
2372  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2373  __Pyx_GOTREF(__pyx_t_15);
2374  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2375  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2376  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2377  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2378  }
2379 
2380  /* "PyClical.pyx":104
2381  * except IndexError:
2382  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2383  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
2384  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2385  * elif isinstance(other, str):
2386  */
2387  __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError);
2388  if (__pyx_t_6) {
2389  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2390  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2391  __Pyx_GOTREF(__pyx_t_13);
2392  __Pyx_GOTREF(__pyx_t_4);
2393  __Pyx_GOTREF(__pyx_t_5);
2394 
2395  /* "PyClical.pyx":105
2396  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2397  * except (RuntimeError, TypeError):
2398  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
2399  * elif isinstance(other, str):
2400  * try:
2401  */
2402  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2403  __Pyx_GOTREF(__pyx_t_15);
2404  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2405  __Pyx_GOTREF(__pyx_t_16);
2406  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2407  __Pyx_GOTREF(__pyx_t_14);
2408  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2409  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2410  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2411  __Pyx_GOTREF(__pyx_t_16);
2412  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2413  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2414  __Pyx_GOTREF(__pyx_t_14);
2415  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
2416  __Pyx_GIVEREF(__pyx_t_16);
2417  __pyx_t_16 = 0;
2418  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2419  __Pyx_GOTREF(__pyx_t_16);
2420  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2421  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
2422  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2423  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
2424  }
2425  goto __pyx_L8_except_error;
2426  __pyx_L8_except_error:;
2427  __Pyx_XGIVEREF(__pyx_t_8);
2428  __Pyx_XGIVEREF(__pyx_t_9);
2429  __Pyx_XGIVEREF(__pyx_t_10);
2430  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
2431  goto __pyx_L1_error;
2432  __pyx_L13_try_end:;
2433  }
2434  goto __pyx_L3;
2435  }
2436 
2437  /* "PyClical.pyx":106
2438  * except (RuntimeError, TypeError):
2439  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2440  * elif isinstance(other, str): # <<<<<<<<<<<<<<
2441  * try:
2442  * self.instance = new IndexSet(<char *>other)
2443  */
2444  __pyx_t_2 = PyString_Check(__pyx_v_other);
2445  __pyx_t_1 = (__pyx_t_2 != 0);
2446  if (__pyx_t_1) {
2447 
2448  /* "PyClical.pyx":107
2449  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2450  * elif isinstance(other, str):
2451  * try: # <<<<<<<<<<<<<<
2452  * self.instance = new IndexSet(<char *>other)
2453  * except RuntimeError:
2454  */
2455  {
2456  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
2457  __Pyx_XGOTREF(__pyx_t_10);
2458  __Pyx_XGOTREF(__pyx_t_9);
2459  __Pyx_XGOTREF(__pyx_t_8);
2460  /*try:*/ {
2461 
2462  /* "PyClical.pyx":108
2463  * elif isinstance(other, str):
2464  * try:
2465  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
2466  * except RuntimeError:
2467  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
2468  */
2469  __pyx_t_17 = __Pyx_PyObject_AsString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
2470  try {
2471  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
2472  } catch(...) {
2473  __Pyx_CppExn2PyErr();
2474  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
2475  }
2476  __pyx_v_self->instance = __pyx_t_3;
2477  }
2478  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2479  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2480  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2481  goto __pyx_L27_try_end;
2482  __pyx_L20_error:;
2483  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
2484  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
2485  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
2486  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
2487  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2488  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2489 
2490  /* "PyClical.pyx":109
2491  * try:
2492  * self.instance = new IndexSet(<char *>other)
2493  * except RuntimeError: # <<<<<<<<<<<<<<
2494  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
2495  * else:
2496  */
2497  __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
2498  if (__pyx_t_6) {
2499  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2500  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2501  __Pyx_GOTREF(__pyx_t_5);
2502  __Pyx_GOTREF(__pyx_t_4);
2503  __Pyx_GOTREF(__pyx_t_13);
2504 
2505  /* "PyClical.pyx":110
2506  * self.instance = new IndexSet(<char *>other)
2507  * except RuntimeError:
2508  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
2509  * else:
2510  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
2511  */
2512  __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2513  __Pyx_GOTREF(__pyx_t_16);
2514  __pyx_t_14 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2515  __Pyx_GOTREF(__pyx_t_14);
2516  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2517  __Pyx_GOTREF(__pyx_t_15);
2518  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2519  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2520  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_s_); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2521  __Pyx_GOTREF(__pyx_t_14);
2522  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2523  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2524  __Pyx_GOTREF(__pyx_t_15);
2525  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
2526  __Pyx_GIVEREF(__pyx_t_14);
2527  __pyx_t_14 = 0;
2528  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2529  __Pyx_GOTREF(__pyx_t_14);
2530  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2531  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
2532  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2533  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_except_error;}
2534  }
2535  goto __pyx_L22_except_error;
2536  __pyx_L22_except_error:;
2537  __Pyx_XGIVEREF(__pyx_t_10);
2538  __Pyx_XGIVEREF(__pyx_t_9);
2539  __Pyx_XGIVEREF(__pyx_t_8);
2540  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
2541  goto __pyx_L1_error;
2542  __pyx_L27_try_end:;
2543  }
2544  goto __pyx_L3;
2545  }
2546  /*else*/ {
2547 
2548  /* "PyClical.pyx":112
2549  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
2550  * else:
2551  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
2552  *
2553  * def __dealloc__(self):
2554  */
2555  __pyx_t_13 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2556  __Pyx_GOTREF(__pyx_t_13);
2557  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2558  __Pyx_GOTREF(__pyx_t_4);
2559  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2560  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
2561  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
2562  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2563  __Pyx_GOTREF(__pyx_t_5);
2564  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2565  __pyx_t_4 = PyNumber_Add(__pyx_t_13, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2566  __Pyx_GOTREF(__pyx_t_4);
2567  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
2568  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2569  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2570  __Pyx_GOTREF(__pyx_t_5);
2571  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2572  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2573  __Pyx_GOTREF(__pyx_t_4);
2574  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
2575  __Pyx_GIVEREF(__pyx_t_5);
2576  __pyx_t_5 = 0;
2577  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2578  __Pyx_GOTREF(__pyx_t_5);
2579  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2580  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
2581  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2582  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2583  }
2584  __pyx_L3:;
2585 
2586  /* "PyClical.pyx":73
2587  * return index_set(self)
2588  *
2589  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2590  * """
2591  * Construct an object of type index_set.
2592  */
2593 
2594  /* function exit code */
2595  __pyx_r = 0;
2596  goto __pyx_L0;
2597  __pyx_L1_error:;
2598  __Pyx_XDECREF(__pyx_t_4);
2599  __Pyx_XDECREF(__pyx_t_5);
2600  __Pyx_XDECREF(__pyx_t_13);
2601  __Pyx_XDECREF(__pyx_t_14);
2602  __Pyx_XDECREF(__pyx_t_15);
2603  __Pyx_XDECREF(__pyx_t_16);
2604  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2605  __pyx_r = -1;
2606  __pyx_L0:;
2607  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
2608  __Pyx_XDECREF(__pyx_v_idx);
2609  __Pyx_RefNannyFinishContext();
2610  return __pyx_r;
2611 }
2612 
2613 /* "PyClical.pyx":114
2614  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
2615  *
2616  * def __dealloc__(self): # <<<<<<<<<<<<<<
2617  * """
2618  * Clean up by deallocating the instance of C++ class IndexSet.
2619  */
2620 
2621 /* Python wrapper */
2622 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
2623 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
2624  __Pyx_RefNannyDeclarations
2625  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
2626  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2627 
2628  /* function exit code */
2629  __Pyx_RefNannyFinishContext();
2630 }
2631 
2632 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2633  __Pyx_RefNannyDeclarations
2634  __Pyx_RefNannySetupContext("__dealloc__", 0);
2635 
2636  /* "PyClical.pyx":118
2637  * Clean up by deallocating the instance of C++ class IndexSet.
2638  * """
2639  * del self.instance # <<<<<<<<<<<<<<
2640  *
2641  * def __richcmp__(lhs, rhs, int op):
2642  */
2643  delete __pyx_v_self->instance;
2644 
2645  /* "PyClical.pyx":114
2646  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
2647  *
2648  * def __dealloc__(self): # <<<<<<<<<<<<<<
2649  * """
2650  * Clean up by deallocating the instance of C++ class IndexSet.
2651  */
2652 
2653  /* function exit code */
2654  __Pyx_RefNannyFinishContext();
2655 }
2656 
2657 /* "PyClical.pyx":120
2658  * del self.instance
2659  *
2660  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
2661  * """
2662  * Compare two objects of class index_set.
2663  */
2664 
2665 /* Python wrapper */
2666 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
2667 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
2668  PyObject *__pyx_r = 0;
2669  __Pyx_RefNannyDeclarations
2670  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
2671  __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
2672 
2673  /* function exit code */
2674  __Pyx_RefNannyFinishContext();
2675  return __pyx_r;
2676 }
2677 
2678 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
2679  PyObject *__pyx_v_eq = NULL;
2680  PyObject *__pyx_v_lt = NULL;
2681  PyObject *__pyx_r = NULL;
2682  __Pyx_RefNannyDeclarations
2683  int __pyx_t_1;
2684  int __pyx_t_2;
2685  int __pyx_t_3;
2686  PyObject *__pyx_t_4 = NULL;
2687  int __pyx_lineno = 0;
2688  const char *__pyx_filename = NULL;
2689  int __pyx_clineno = 0;
2690  __Pyx_RefNannySetupContext("__richcmp__", 0);
2691 
2692  /* "PyClical.pyx":141
2693  * False
2694  * """
2695  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
2696  * eq = bool(lhs is rhs)
2697  * if op == 2: # ==
2698  */
2699  __pyx_t_2 = (__pyx_v_lhs == Py_None);
2700  __pyx_t_3 = (__pyx_t_2 != 0);
2701  if (!__pyx_t_3) {
2702  goto __pyx_L5_next_or;
2703  } else {
2704  __pyx_t_1 = __pyx_t_3;
2705  goto __pyx_L4_bool_binop_done;
2706  }
2707  __pyx_L5_next_or:;
2708  __pyx_t_3 = (__pyx_v_rhs == Py_None);
2709  __pyx_t_2 = (__pyx_t_3 != 0);
2710  __pyx_t_1 = __pyx_t_2;
2711  __pyx_L4_bool_binop_done:;
2712  if (__pyx_t_1) {
2713 
2714  /* "PyClical.pyx":142
2715  * """
2716  * if (lhs is None) or (rhs is None):
2717  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
2718  * if op == 2: # ==
2719  * return eq
2720  */
2721  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
2722  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2723  __Pyx_GOTREF(__pyx_t_4);
2724  __pyx_v_eq = __pyx_t_4;
2725  __pyx_t_4 = 0;
2726 
2727  /* "PyClical.pyx":145
2728  * if op == 2: # ==
2729  * return eq
2730  * elif op == 3: # != # <<<<<<<<<<<<<<
2731  * return not eq
2732  * else:
2733  */
2734  switch (__pyx_v_op) {
2735 
2736  /* "PyClical.pyx":143
2737  * if (lhs is None) or (rhs is None):
2738  * eq = bool(lhs is rhs)
2739  * if op == 2: # == # <<<<<<<<<<<<<<
2740  * return eq
2741  * elif op == 3: # !=
2742  */
2743  case 2:
2744 
2745  /* "PyClical.pyx":144
2746  * eq = bool(lhs is rhs)
2747  * if op == 2: # ==
2748  * return eq # <<<<<<<<<<<<<<
2749  * elif op == 3: # !=
2750  * return not eq
2751  */
2752  __Pyx_XDECREF(__pyx_r);
2753  __Pyx_INCREF(__pyx_v_eq);
2754  __pyx_r = __pyx_v_eq;
2755  goto __pyx_L0;
2756  break;
2757 
2758  /* "PyClical.pyx":145
2759  * if op == 2: # ==
2760  * return eq
2761  * elif op == 3: # != # <<<<<<<<<<<<<<
2762  * return not eq
2763  * else:
2764  */
2765  case 3:
2766 
2767  /* "PyClical.pyx":146
2768  * return eq
2769  * elif op == 3: # !=
2770  * return not eq # <<<<<<<<<<<<<<
2771  * else:
2772  * if op == 0: # <
2773  */
2774  __Pyx_XDECREF(__pyx_r);
2775  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2776  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2777  __Pyx_GOTREF(__pyx_t_4);
2778  __pyx_r = __pyx_t_4;
2779  __pyx_t_4 = 0;
2780  goto __pyx_L0;
2781  break;
2782  default:
2783 
2784  /* "PyClical.pyx":148
2785  * return not eq
2786  * else:
2787  * if op == 0: # < # <<<<<<<<<<<<<<
2788  * return False
2789  * elif op == 1: # <=
2790  */
2791  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
2792  if (__pyx_t_1) {
2793 
2794  /* "PyClical.pyx":149
2795  * else:
2796  * if op == 0: # <
2797  * return False # <<<<<<<<<<<<<<
2798  * elif op == 1: # <=
2799  * return eq
2800  */
2801  __Pyx_XDECREF(__pyx_r);
2802  __Pyx_INCREF(Py_False);
2803  __pyx_r = Py_False;
2804  goto __pyx_L0;
2805  }
2806 
2807  /* "PyClical.pyx":150
2808  * if op == 0: # <
2809  * return False
2810  * elif op == 1: # <= # <<<<<<<<<<<<<<
2811  * return eq
2812  * elif op == 4: # >
2813  */
2814  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
2815  if (__pyx_t_1) {
2816 
2817  /* "PyClical.pyx":151
2818  * return False
2819  * elif op == 1: # <=
2820  * return eq # <<<<<<<<<<<<<<
2821  * elif op == 4: # >
2822  * return False
2823  */
2824  __Pyx_XDECREF(__pyx_r);
2825  __Pyx_INCREF(__pyx_v_eq);
2826  __pyx_r = __pyx_v_eq;
2827  goto __pyx_L0;
2828  }
2829 
2830  /* "PyClical.pyx":152
2831  * elif op == 1: # <=
2832  * return eq
2833  * elif op == 4: # > # <<<<<<<<<<<<<<
2834  * return False
2835  * elif op == 5: # >=
2836  */
2837  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
2838  if (__pyx_t_1) {
2839 
2840  /* "PyClical.pyx":153
2841  * return eq
2842  * elif op == 4: # >
2843  * return False # <<<<<<<<<<<<<<
2844  * elif op == 5: # >=
2845  * return eq
2846  */
2847  __Pyx_XDECREF(__pyx_r);
2848  __Pyx_INCREF(Py_False);
2849  __pyx_r = Py_False;
2850  goto __pyx_L0;
2851  }
2852 
2853  /* "PyClical.pyx":154
2854  * elif op == 4: # >
2855  * return False
2856  * elif op == 5: # >= # <<<<<<<<<<<<<<
2857  * return eq
2858  * else:
2859  */
2860  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
2861  if (__pyx_t_1) {
2862 
2863  /* "PyClical.pyx":155
2864  * return False
2865  * elif op == 5: # >=
2866  * return eq # <<<<<<<<<<<<<<
2867  * else:
2868  * return NotImplemented
2869  */
2870  __Pyx_XDECREF(__pyx_r);
2871  __Pyx_INCREF(__pyx_v_eq);
2872  __pyx_r = __pyx_v_eq;
2873  goto __pyx_L0;
2874  }
2875  /*else*/ {
2876 
2877  /* "PyClical.pyx":157
2878  * return eq
2879  * else:
2880  * return NotImplemented # <<<<<<<<<<<<<<
2881  * else:
2882  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
2883  */
2884  __Pyx_XDECREF(__pyx_r);
2885  __Pyx_INCREF(__pyx_builtin_NotImplemented);
2886  __pyx_r = __pyx_builtin_NotImplemented;
2887  goto __pyx_L0;
2888  }
2889  break;
2890  }
2891  }
2892  /*else*/ {
2893 
2894  /* "PyClical.pyx":159
2895  * return NotImplemented
2896  * else:
2897  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
2898  * if op == 2: # ==
2899  * return eq
2900  */
2901  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
2902  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2903  __Pyx_GOTREF(__pyx_t_4);
2904  __pyx_v_eq = __pyx_t_4;
2905  __pyx_t_4 = 0;
2906 
2907  /* "PyClical.pyx":162
2908  * if op == 2: # ==
2909  * return eq
2910  * elif op == 3: # != # <<<<<<<<<<<<<<
2911  * return not eq
2912  * else:
2913  */
2914  switch (__pyx_v_op) {
2915 
2916  /* "PyClical.pyx":160
2917  * else:
2918  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
2919  * if op == 2: # == # <<<<<<<<<<<<<<
2920  * return eq
2921  * elif op == 3: # !=
2922  */
2923  case 2:
2924 
2925  /* "PyClical.pyx":161
2926  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
2927  * if op == 2: # ==
2928  * return eq # <<<<<<<<<<<<<<
2929  * elif op == 3: # !=
2930  * return not eq
2931  */
2932  __Pyx_XDECREF(__pyx_r);
2933  __Pyx_INCREF(__pyx_v_eq);
2934  __pyx_r = __pyx_v_eq;
2935  goto __pyx_L0;
2936  break;
2937 
2938  /* "PyClical.pyx":162
2939  * if op == 2: # ==
2940  * return eq
2941  * elif op == 3: # != # <<<<<<<<<<<<<<
2942  * return not eq
2943  * else:
2944  */
2945  case 3:
2946 
2947  /* "PyClical.pyx":163
2948  * return eq
2949  * elif op == 3: # !=
2950  * return not eq # <<<<<<<<<<<<<<
2951  * else:
2952  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
2953  */
2954  __Pyx_XDECREF(__pyx_r);
2955  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2956  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2957  __Pyx_GOTREF(__pyx_t_4);
2958  __pyx_r = __pyx_t_4;
2959  __pyx_t_4 = 0;
2960  goto __pyx_L0;
2961  break;
2962  default:
2963 
2964  /* "PyClical.pyx":165
2965  * return not eq
2966  * else:
2967  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
2968  * if op == 0: # <
2969  * return lt
2970  */
2971  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
2972  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2973  __Pyx_GOTREF(__pyx_t_4);
2974  __pyx_v_lt = __pyx_t_4;
2975  __pyx_t_4 = 0;
2976 
2977  /* "PyClical.pyx":166
2978  * else:
2979  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
2980  * if op == 0: # < # <<<<<<<<<<<<<<
2981  * return lt
2982  * elif op == 1: # <=
2983  */
2984  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
2985  if (__pyx_t_1) {
2986 
2987  /* "PyClical.pyx":167
2988  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
2989  * if op == 0: # <
2990  * return lt # <<<<<<<<<<<<<<
2991  * elif op == 1: # <=
2992  * return lt or eq
2993  */
2994  __Pyx_XDECREF(__pyx_r);
2995  __Pyx_INCREF(__pyx_v_lt);
2996  __pyx_r = __pyx_v_lt;
2997  goto __pyx_L0;
2998  }
2999 
3000  /* "PyClical.pyx":168
3001  * if op == 0: # <
3002  * return lt
3003  * elif op == 1: # <= # <<<<<<<<<<<<<<
3004  * return lt or eq
3005  * elif op == 4: # >
3006  */
3007  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3008  if (__pyx_t_1) {
3009 
3010  /* "PyClical.pyx":169
3011  * return lt
3012  * elif op == 1: # <=
3013  * return lt or eq # <<<<<<<<<<<<<<
3014  * elif op == 4: # >
3015  * return not (lt or eq)
3016  */
3017  __Pyx_XDECREF(__pyx_r);
3018  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3019  if (!__pyx_t_1) {
3020  goto __pyx_L9_next_or;
3021  } else {
3022  __Pyx_INCREF(__pyx_v_lt);
3023  __pyx_t_4 = __pyx_v_lt;
3024  goto __pyx_L8_bool_binop_done;
3025  }
3026  __pyx_L9_next_or:;
3027  __Pyx_INCREF(__pyx_v_eq);
3028  __pyx_t_4 = __pyx_v_eq;
3029  __pyx_L8_bool_binop_done:;
3030  __pyx_r = __pyx_t_4;
3031  __pyx_t_4 = 0;
3032  goto __pyx_L0;
3033  }
3034 
3035  /* "PyClical.pyx":170
3036  * elif op == 1: # <=
3037  * return lt or eq
3038  * elif op == 4: # > # <<<<<<<<<<<<<<
3039  * return not (lt or eq)
3040  * elif op == 5: # >=
3041  */
3042  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3043  if (__pyx_t_1) {
3044 
3045  /* "PyClical.pyx":171
3046  * return lt or eq
3047  * elif op == 4: # >
3048  * return not (lt or eq) # <<<<<<<<<<<<<<
3049  * elif op == 5: # >=
3050  * return not lt
3051  */
3052  __Pyx_XDECREF(__pyx_r);
3053  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3054  if (!__pyx_t_2) {
3055  goto __pyx_L11_next_or;
3056  } else {
3057  __pyx_t_1 = __pyx_t_2;
3058  goto __pyx_L10_bool_binop_done;
3059  }
3060  __pyx_L11_next_or:;
3061  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3062  __pyx_t_1 = __pyx_t_2;
3063  __pyx_L10_bool_binop_done:;
3064  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3065  __Pyx_GOTREF(__pyx_t_4);
3066  __pyx_r = __pyx_t_4;
3067  __pyx_t_4 = 0;
3068  goto __pyx_L0;
3069  }
3070 
3071  /* "PyClical.pyx":172
3072  * elif op == 4: # >
3073  * return not (lt or eq)
3074  * elif op == 5: # >= # <<<<<<<<<<<<<<
3075  * return not lt
3076  * else:
3077  */
3078  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3079  if (__pyx_t_1) {
3080 
3081  /* "PyClical.pyx":173
3082  * return not (lt or eq)
3083  * elif op == 5: # >=
3084  * return not lt # <<<<<<<<<<<<<<
3085  * else:
3086  * return NotImplemented
3087  */
3088  __Pyx_XDECREF(__pyx_r);
3089  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3090  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3091  __Pyx_GOTREF(__pyx_t_4);
3092  __pyx_r = __pyx_t_4;
3093  __pyx_t_4 = 0;
3094  goto __pyx_L0;
3095  }
3096  /*else*/ {
3097 
3098  /* "PyClical.pyx":175
3099  * return not lt
3100  * else:
3101  * return NotImplemented # <<<<<<<<<<<<<<
3102  *
3103  * def __setitem__(self, idx, val):
3104  */
3105  __Pyx_XDECREF(__pyx_r);
3106  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3107  __pyx_r = __pyx_builtin_NotImplemented;
3108  goto __pyx_L0;
3109  }
3110  break;
3111  }
3112  }
3113 
3114  /* "PyClical.pyx":120
3115  * del self.instance
3116  *
3117  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3118  * """
3119  * Compare two objects of class index_set.
3120  */
3121 
3122  /* function exit code */
3123  __pyx_L1_error:;
3124  __Pyx_XDECREF(__pyx_t_4);
3125  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3126  __pyx_r = NULL;
3127  __pyx_L0:;
3128  __Pyx_XDECREF(__pyx_v_eq);
3129  __Pyx_XDECREF(__pyx_v_lt);
3130  __Pyx_XGIVEREF(__pyx_r);
3131  __Pyx_RefNannyFinishContext();
3132  return __pyx_r;
3133 }
3134 
3135 /* "PyClical.pyx":177
3136  * return NotImplemented
3137  *
3138  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3139  * """
3140  * Set the value of an index_set object at index idx to value val.
3141  */
3142 
3143 /* Python wrapper */
3144 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3145 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 ";
3146 #if CYTHON_COMPILING_IN_CPYTHON
3147 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3148 #endif
3149 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3150  int __pyx_r;
3151  __Pyx_RefNannyDeclarations
3152  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3153  __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));
3154 
3155  /* function exit code */
3156  __Pyx_RefNannyFinishContext();
3157  return __pyx_r;
3158 }
3159 
3160 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) {
3161  int __pyx_r;
3162  __Pyx_RefNannyDeclarations
3163  int __pyx_t_1;
3164  int __pyx_t_2;
3165  IndexSet __pyx_t_3;
3166  int __pyx_lineno = 0;
3167  const char *__pyx_filename = NULL;
3168  int __pyx_clineno = 0;
3169  __Pyx_RefNannySetupContext("__setitem__", 0);
3170 
3171  /* "PyClical.pyx":186
3172  * {2}
3173  * """
3174  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3175  * return
3176  *
3177  */
3178  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3179  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3180  try {
3181  __pyx_t_3 = __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3182  } catch(...) {
3183  __Pyx_CppExn2PyErr();
3184  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3185  }
3186 
3187  /* "PyClical.pyx":187
3188  * """
3189  * self.instance.set(idx, val)
3190  * return # <<<<<<<<<<<<<<
3191  *
3192  * def __getitem__(self, idx):
3193  */
3194  __pyx_r = 0;
3195  goto __pyx_L0;
3196 
3197  /* "PyClical.pyx":177
3198  * return NotImplemented
3199  *
3200  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3201  * """
3202  * Set the value of an index_set object at index idx to value val.
3203  */
3204 
3205  /* function exit code */
3206  __pyx_L1_error:;
3207  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3208  __pyx_r = -1;
3209  __pyx_L0:;
3210  __Pyx_RefNannyFinishContext();
3211  return __pyx_r;
3212 }
3213 
3214 /* "PyClical.pyx":189
3215  * return
3216  *
3217  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3218  * """
3219  * Get the value of an index_set object at an index.
3220  */
3221 
3222 /* Python wrapper */
3223 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
3224 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 ";
3225 #if CYTHON_COMPILING_IN_CPYTHON
3226 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3227 #endif
3228 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3229  PyObject *__pyx_r = 0;
3230  __Pyx_RefNannyDeclarations
3231  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
3232  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3233 
3234  /* function exit code */
3235  __Pyx_RefNannyFinishContext();
3236  return __pyx_r;
3237 }
3238 
3239 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3240  PyObject *__pyx_r = NULL;
3241  __Pyx_RefNannyDeclarations
3242  int __pyx_t_1;
3243  PyObject *__pyx_t_2 = NULL;
3244  int __pyx_lineno = 0;
3245  const char *__pyx_filename = NULL;
3246  int __pyx_clineno = 0;
3247  __Pyx_RefNannySetupContext("__getitem__", 0);
3248 
3249  /* "PyClical.pyx":206
3250  * False
3251  * """
3252  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3253  *
3254  * def __contains__(self, idx):
3255  */
3256  __Pyx_XDECREF(__pyx_r);
3257  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3258  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->operator[](__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3259  __Pyx_GOTREF(__pyx_t_2);
3260  __pyx_r = __pyx_t_2;
3261  __pyx_t_2 = 0;
3262  goto __pyx_L0;
3263 
3264  /* "PyClical.pyx":189
3265  * return
3266  *
3267  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3268  * """
3269  * Get the value of an index_set object at an index.
3270  */
3271 
3272  /* function exit code */
3273  __pyx_L1_error:;
3274  __Pyx_XDECREF(__pyx_t_2);
3275  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3276  __pyx_r = NULL;
3277  __pyx_L0:;
3278  __Pyx_XGIVEREF(__pyx_r);
3279  __Pyx_RefNannyFinishContext();
3280  return __pyx_r;
3281 }
3282 
3283 /* "PyClical.pyx":208
3284  * return self.instance.getitem(idx)
3285  *
3286  * def __contains__(self, idx): # <<<<<<<<<<<<<<
3287  * """
3288  * Check that an index_set object contains the index idx: idx in self.
3289  */
3290 
3291 /* Python wrapper */
3292 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
3293 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 ";
3294 #if CYTHON_COMPILING_IN_CPYTHON
3295 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
3296 #endif
3297 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3298  int __pyx_r;
3299  __Pyx_RefNannyDeclarations
3300  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
3301  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3302 
3303  /* function exit code */
3304  __Pyx_RefNannyFinishContext();
3305  return __pyx_r;
3306 }
3307 
3308 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3309  int __pyx_r;
3310  __Pyx_RefNannyDeclarations
3311  int __pyx_t_1;
3312  int __pyx_lineno = 0;
3313  const char *__pyx_filename = NULL;
3314  int __pyx_clineno = 0;
3315  __Pyx_RefNannySetupContext("__contains__", 0);
3316 
3317  /* "PyClical.pyx":225
3318  * False
3319  * """
3320  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3321  *
3322  * def __iter__(self):
3323  */
3324  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3325  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
3326  goto __pyx_L0;
3327 
3328  /* "PyClical.pyx":208
3329  * return self.instance.getitem(idx)
3330  *
3331  * def __contains__(self, idx): # <<<<<<<<<<<<<<
3332  * """
3333  * Check that an index_set object contains the index idx: idx in self.
3334  */
3335 
3336  /* function exit code */
3337  __pyx_L1_error:;
3338  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3339  __pyx_r = -1;
3340  __pyx_L0:;
3341  __Pyx_RefNannyFinishContext();
3342  return __pyx_r;
3343 }
3344 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
3345 
3346 /* "PyClical.pyx":227
3347  * return self.instance.getitem(idx)
3348  *
3349  * def __iter__(self): # <<<<<<<<<<<<<<
3350  * """
3351  * Iterate over the indices of an index_set.
3352  */
3353 
3354 /* Python wrapper */
3355 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
3356 static char __pyx_doc_8PyClical_9index_set_14__iter__[] = "\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}): print i,\n -3 4 7\n ";
3357 #if CYTHON_COMPILING_IN_CPYTHON
3358 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
3359 #endif
3360 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
3361  PyObject *__pyx_r = 0;
3362  __Pyx_RefNannyDeclarations
3363  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
3364  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3365 
3366  /* function exit code */
3367  __Pyx_RefNannyFinishContext();
3368  return __pyx_r;
3369 }
3370 
3371 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3372  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
3373  PyObject *__pyx_r = NULL;
3374  __Pyx_RefNannyDeclarations
3375  int __pyx_lineno = 0;
3376  const char *__pyx_filename = NULL;
3377  int __pyx_clineno = 0;
3378  __Pyx_RefNannySetupContext("__iter__", 0);
3379  __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);
3380  if (unlikely(!__pyx_cur_scope)) {
3381  __Pyx_RefNannyFinishContext();
3382  return NULL;
3383  }
3384  __Pyx_GOTREF(__pyx_cur_scope);
3385  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
3386  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3387  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
3388  {
3389  __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_8PyClical_9index_set_16generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_index_set___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3390  __Pyx_DECREF(__pyx_cur_scope);
3391  __Pyx_RefNannyFinishContext();
3392  return (PyObject *) gen;
3393  }
3394 
3395  /* function exit code */
3396  __pyx_L1_error:;
3397  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3398  __pyx_r = NULL;
3399  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
3400  __Pyx_XGIVEREF(__pyx_r);
3401  __Pyx_RefNannyFinishContext();
3402  return __pyx_r;
3403 }
3404 
3405 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
3406 {
3407  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
3408  PyObject *__pyx_r = NULL;
3409  PyObject *__pyx_t_1 = NULL;
3410  PyObject *__pyx_t_2 = NULL;
3411  PyObject *__pyx_t_3 = NULL;
3412  PyObject *__pyx_t_4 = NULL;
3413  Py_ssize_t __pyx_t_5;
3414  PyObject *(*__pyx_t_6)(PyObject *);
3415  int __pyx_t_7;
3416  int __pyx_t_8;
3417  int __pyx_lineno = 0;
3418  const char *__pyx_filename = NULL;
3419  int __pyx_clineno = 0;
3420  __Pyx_RefNannyDeclarations
3421  __Pyx_RefNannySetupContext("None", 0);
3422  switch (__pyx_generator->resume_label) {
3423  case 0: goto __pyx_L3_first_run;
3424  case 1: goto __pyx_L7_resume_from_yield;
3425  default: /* CPython raises the right error here */
3426  __Pyx_RefNannyFinishContext();
3427  return NULL;
3428  }
3429  __pyx_L3_first_run:;
3430  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3431 
3432  /* "PyClical.pyx":234
3433  * -3 4 7
3434  * """
3435  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
3436  * if idx in self:
3437  * yield idx
3438  */
3439  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_min); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3440  __Pyx_GOTREF(__pyx_t_2);
3441  __pyx_t_3 = NULL;
3442  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
3443  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3444  if (likely(__pyx_t_3)) {
3445  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3446  __Pyx_INCREF(__pyx_t_3);
3447  __Pyx_INCREF(function);
3448  __Pyx_DECREF_SET(__pyx_t_2, function);
3449  }
3450  }
3451  if (__pyx_t_3) {
3452  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3453  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3454  } else {
3455  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3456  }
3457  __Pyx_GOTREF(__pyx_t_1);
3458  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3459  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_max); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3460  __Pyx_GOTREF(__pyx_t_3);
3461  __pyx_t_4 = NULL;
3462  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
3463  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3464  if (likely(__pyx_t_4)) {
3465  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3466  __Pyx_INCREF(__pyx_t_4);
3467  __Pyx_INCREF(function);
3468  __Pyx_DECREF_SET(__pyx_t_3, function);
3469  }
3470  }
3471  if (__pyx_t_4) {
3472  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3473  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3474  } else {
3475  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3476  }
3477  __Pyx_GOTREF(__pyx_t_2);
3478  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3479  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3480  __Pyx_GOTREF(__pyx_t_3);
3481  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3482  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3483  __Pyx_GOTREF(__pyx_t_2);
3484  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
3485  __Pyx_GIVEREF(__pyx_t_1);
3486  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
3487  __Pyx_GIVEREF(__pyx_t_3);
3488  __pyx_t_1 = 0;
3489  __pyx_t_3 = 0;
3490  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3491  __Pyx_GOTREF(__pyx_t_3);
3492  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3493  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
3494  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
3495  __pyx_t_6 = NULL;
3496  } else {
3497  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3498  __Pyx_GOTREF(__pyx_t_2);
3499  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3500  }
3501  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3502  for (;;) {
3503  if (likely(!__pyx_t_6)) {
3504  if (likely(PyList_CheckExact(__pyx_t_2))) {
3505  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
3506  #if CYTHON_COMPILING_IN_CPYTHON
3507  __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_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3508  #else
3509  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3510  #endif
3511  } else {
3512  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
3513  #if CYTHON_COMPILING_IN_CPYTHON
3514  __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_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3515  #else
3516  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3517  #endif
3518  }
3519  } else {
3520  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
3521  if (unlikely(!__pyx_t_3)) {
3522  PyObject* exc_type = PyErr_Occurred();
3523  if (exc_type) {
3524  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3525  else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3526  }
3527  break;
3528  }
3529  __Pyx_GOTREF(__pyx_t_3);
3530  }
3531  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
3532  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
3533  __Pyx_GIVEREF(__pyx_t_3);
3534  __pyx_t_3 = 0;
3535 
3536  /* "PyClical.pyx":235
3537  * """
3538  * for idx in range(self.min(), self.max()+1):
3539  * if idx in self: # <<<<<<<<<<<<<<
3540  * yield idx
3541  *
3542  */
3543  __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_idx, ((PyObject *)__pyx_cur_scope->__pyx_v_self), Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3544  __pyx_t_8 = (__pyx_t_7 != 0);
3545  if (__pyx_t_8) {
3546 
3547  /* "PyClical.pyx":236
3548  * for idx in range(self.min(), self.max()+1):
3549  * if idx in self:
3550  * yield idx # <<<<<<<<<<<<<<
3551  *
3552  * def __invert__(self):
3553  */
3554  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
3555  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
3556  __Pyx_XGIVEREF(__pyx_t_2);
3557  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
3558  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
3559  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
3560  __Pyx_XGIVEREF(__pyx_r);
3561  __Pyx_RefNannyFinishContext();
3562  /* return from generator, yielding value */
3563  __pyx_generator->resume_label = 1;
3564  return __pyx_r;
3565  __pyx_L7_resume_from_yield:;
3566  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
3567  __pyx_cur_scope->__pyx_t_0 = 0;
3568  __Pyx_XGOTREF(__pyx_t_2);
3569  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
3570  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
3571  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3572  goto __pyx_L6;
3573  }
3574  __pyx_L6:;
3575 
3576  /* "PyClical.pyx":234
3577  * -3 4 7
3578  * """
3579  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
3580  * if idx in self:
3581  * yield idx
3582  */
3583  }
3584  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3585 
3586  /* "PyClical.pyx":227
3587  * return self.instance.getitem(idx)
3588  *
3589  * def __iter__(self): # <<<<<<<<<<<<<<
3590  * """
3591  * Iterate over the indices of an index_set.
3592  */
3593 
3594  /* function exit code */
3595  PyErr_SetNone(PyExc_StopIteration);
3596  goto __pyx_L0;
3597  __pyx_L1_error:;
3598  __Pyx_XDECREF(__pyx_t_1);
3599  __Pyx_XDECREF(__pyx_t_2);
3600  __Pyx_XDECREF(__pyx_t_3);
3601  __Pyx_XDECREF(__pyx_t_4);
3602  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3603  __pyx_L0:;
3604  __Pyx_XDECREF(__pyx_r);
3605  __pyx_generator->resume_label = -1;
3606  __Pyx_Generator_clear((PyObject*)__pyx_generator);
3607  __Pyx_RefNannyFinishContext();
3608  return NULL;
3609 }
3610 
3611 /* "PyClical.pyx":238
3612  * yield idx
3613  *
3614  * def __invert__(self): # <<<<<<<<<<<<<<
3615  * """
3616  * Set complement: not.
3617  */
3618 
3619 /* Python wrapper */
3620 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
3621 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 ";
3622 #if CYTHON_COMPILING_IN_CPYTHON
3623 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
3624 #endif
3625 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
3626  PyObject *__pyx_r = 0;
3627  __Pyx_RefNannyDeclarations
3628  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
3629  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3630 
3631  /* function exit code */
3632  __Pyx_RefNannyFinishContext();
3633  return __pyx_r;
3634 }
3635 
3636 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3637  PyObject *__pyx_r = NULL;
3638  __Pyx_RefNannyDeclarations
3639  PyObject *__pyx_t_1 = NULL;
3640  PyObject *__pyx_t_2 = NULL;
3641  int __pyx_lineno = 0;
3642  const char *__pyx_filename = NULL;
3643  int __pyx_clineno = 0;
3644  __Pyx_RefNannySetupContext("__invert__", 0);
3645 
3646  /* "PyClical.pyx":245
3647  * {-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}
3648  * """
3649  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
3650  *
3651  * def __xor__(lhs, rhs):
3652  */
3653  __Pyx_XDECREF(__pyx_r);
3654  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3655  __Pyx_GOTREF(__pyx_t_1);
3656  __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_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3657  __Pyx_GOTREF(__pyx_t_2);
3658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3659  __pyx_r = __pyx_t_2;
3660  __pyx_t_2 = 0;
3661  goto __pyx_L0;
3662 
3663  /* "PyClical.pyx":238
3664  * yield idx
3665  *
3666  * def __invert__(self): # <<<<<<<<<<<<<<
3667  * """
3668  * Set complement: not.
3669  */
3670 
3671  /* function exit code */
3672  __pyx_L1_error:;
3673  __Pyx_XDECREF(__pyx_t_1);
3674  __Pyx_XDECREF(__pyx_t_2);
3675  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3676  __pyx_r = NULL;
3677  __pyx_L0:;
3678  __Pyx_XGIVEREF(__pyx_r);
3679  __Pyx_RefNannyFinishContext();
3680  return __pyx_r;
3681 }
3682 
3683 /* "PyClical.pyx":247
3684  * return index_set().wrap( self.instance.invert() )
3685  *
3686  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
3687  * """
3688  * Symmetric set difference: exclusive or.
3689  */
3690 
3691 /* Python wrapper */
3692 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
3693 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 ";
3694 #if CYTHON_COMPILING_IN_CPYTHON
3695 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
3696 #endif
3697 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3698  PyObject *__pyx_r = 0;
3699  __Pyx_RefNannyDeclarations
3700  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
3701  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3702 
3703  /* function exit code */
3704  __Pyx_RefNannyFinishContext();
3705  return __pyx_r;
3706 }
3707 
3708 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3709  PyObject *__pyx_r = NULL;
3710  __Pyx_RefNannyDeclarations
3711  PyObject *__pyx_t_1 = NULL;
3712  PyObject *__pyx_t_2 = NULL;
3713  int __pyx_lineno = 0;
3714  const char *__pyx_filename = NULL;
3715  int __pyx_clineno = 0;
3716  __Pyx_RefNannySetupContext("__xor__", 0);
3717 
3718  /* "PyClical.pyx":256
3719  * {1}
3720  * """
3721  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3722  *
3723  * def __ixor__(self, rhs):
3724  */
3725  __Pyx_XDECREF(__pyx_r);
3726  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3727  __Pyx_GOTREF(__pyx_t_1);
3728  __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_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3729  __Pyx_GOTREF(__pyx_t_2);
3730  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3731  __pyx_r = __pyx_t_2;
3732  __pyx_t_2 = 0;
3733  goto __pyx_L0;
3734 
3735  /* "PyClical.pyx":247
3736  * return index_set().wrap( self.instance.invert() )
3737  *
3738  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
3739  * """
3740  * Symmetric set difference: exclusive or.
3741  */
3742 
3743  /* function exit code */
3744  __pyx_L1_error:;
3745  __Pyx_XDECREF(__pyx_t_1);
3746  __Pyx_XDECREF(__pyx_t_2);
3747  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3748  __pyx_r = NULL;
3749  __pyx_L0:;
3750  __Pyx_XGIVEREF(__pyx_r);
3751  __Pyx_RefNannyFinishContext();
3752  return __pyx_r;
3753 }
3754 
3755 /* "PyClical.pyx":258
3756  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
3757  *
3758  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
3759  * """
3760  * Symmetric set difference: exclusive or.
3761  */
3762 
3763 /* Python wrapper */
3764 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
3765 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 ";
3766 #if CYTHON_COMPILING_IN_CPYTHON
3767 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
3768 #endif
3769 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
3770  PyObject *__pyx_r = 0;
3771  __Pyx_RefNannyDeclarations
3772  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
3773  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
3774 
3775  /* function exit code */
3776  __Pyx_RefNannyFinishContext();
3777  return __pyx_r;
3778 }
3779 
3780 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
3781  PyObject *__pyx_r = NULL;
3782  __Pyx_RefNannyDeclarations
3783  PyObject *__pyx_t_1 = NULL;
3784  int __pyx_lineno = 0;
3785  const char *__pyx_filename = NULL;
3786  int __pyx_clineno = 0;
3787  __Pyx_RefNannySetupContext("__ixor__", 0);
3788 
3789  /* "PyClical.pyx":267
3790  * {1}
3791  * """
3792  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3793  *
3794  * def __and__(lhs, rhs):
3795  */
3796  __Pyx_XDECREF(__pyx_r);
3797  __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_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3798  __Pyx_GOTREF(__pyx_t_1);
3799  __pyx_r = __pyx_t_1;
3800  __pyx_t_1 = 0;
3801  goto __pyx_L0;
3802 
3803  /* "PyClical.pyx":258
3804  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
3805  *
3806  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
3807  * """
3808  * Symmetric set difference: exclusive or.
3809  */
3810 
3811  /* function exit code */
3812  __pyx_L1_error:;
3813  __Pyx_XDECREF(__pyx_t_1);
3814  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3815  __pyx_r = NULL;
3816  __pyx_L0:;
3817  __Pyx_XGIVEREF(__pyx_r);
3818  __Pyx_RefNannyFinishContext();
3819  return __pyx_r;
3820 }
3821 
3822 /* "PyClical.pyx":269
3823  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
3824  *
3825  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
3826  * """
3827  * Set intersection: and.
3828  */
3829 
3830 /* Python wrapper */
3831 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
3832 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 ";
3833 #if CYTHON_COMPILING_IN_CPYTHON
3834 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
3835 #endif
3836 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3837  PyObject *__pyx_r = 0;
3838  __Pyx_RefNannyDeclarations
3839  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
3840  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3841 
3842  /* function exit code */
3843  __Pyx_RefNannyFinishContext();
3844  return __pyx_r;
3845 }
3846 
3847 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3848  PyObject *__pyx_r = NULL;
3849  __Pyx_RefNannyDeclarations
3850  PyObject *__pyx_t_1 = NULL;
3851  PyObject *__pyx_t_2 = NULL;
3852  int __pyx_lineno = 0;
3853  const char *__pyx_filename = NULL;
3854  int __pyx_clineno = 0;
3855  __Pyx_RefNannySetupContext("__and__", 0);
3856 
3857  /* "PyClical.pyx":278
3858  * {2}
3859  * """
3860  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3861  *
3862  * def __iand__(self, rhs):
3863  */
3864  __Pyx_XDECREF(__pyx_r);
3865  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3866  __Pyx_GOTREF(__pyx_t_1);
3867  __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_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3868  __Pyx_GOTREF(__pyx_t_2);
3869  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3870  __pyx_r = __pyx_t_2;
3871  __pyx_t_2 = 0;
3872  goto __pyx_L0;
3873 
3874  /* "PyClical.pyx":269
3875  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
3876  *
3877  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
3878  * """
3879  * Set intersection: and.
3880  */
3881 
3882  /* function exit code */
3883  __pyx_L1_error:;
3884  __Pyx_XDECREF(__pyx_t_1);
3885  __Pyx_XDECREF(__pyx_t_2);
3886  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3887  __pyx_r = NULL;
3888  __pyx_L0:;
3889  __Pyx_XGIVEREF(__pyx_r);
3890  __Pyx_RefNannyFinishContext();
3891  return __pyx_r;
3892 }
3893 
3894 /* "PyClical.pyx":280
3895  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
3896  *
3897  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
3898  * """
3899  * Set intersection: and.
3900  */
3901 
3902 /* Python wrapper */
3903 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
3904 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 ";
3905 #if CYTHON_COMPILING_IN_CPYTHON
3906 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
3907 #endif
3908 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
3909  PyObject *__pyx_r = 0;
3910  __Pyx_RefNannyDeclarations
3911  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
3912  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
3913 
3914  /* function exit code */
3915  __Pyx_RefNannyFinishContext();
3916  return __pyx_r;
3917 }
3918 
3919 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
3920  PyObject *__pyx_r = NULL;
3921  __Pyx_RefNannyDeclarations
3922  PyObject *__pyx_t_1 = NULL;
3923  int __pyx_lineno = 0;
3924  const char *__pyx_filename = NULL;
3925  int __pyx_clineno = 0;
3926  __Pyx_RefNannySetupContext("__iand__", 0);
3927 
3928  /* "PyClical.pyx":289
3929  * {2}
3930  * """
3931  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3932  *
3933  * def __or__(lhs, rhs):
3934  */
3935  __Pyx_XDECREF(__pyx_r);
3936  __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_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3937  __Pyx_GOTREF(__pyx_t_1);
3938  __pyx_r = __pyx_t_1;
3939  __pyx_t_1 = 0;
3940  goto __pyx_L0;
3941 
3942  /* "PyClical.pyx":280
3943  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
3944  *
3945  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
3946  * """
3947  * Set intersection: and.
3948  */
3949 
3950  /* function exit code */
3951  __pyx_L1_error:;
3952  __Pyx_XDECREF(__pyx_t_1);
3953  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3954  __pyx_r = NULL;
3955  __pyx_L0:;
3956  __Pyx_XGIVEREF(__pyx_r);
3957  __Pyx_RefNannyFinishContext();
3958  return __pyx_r;
3959 }
3960 
3961 /* "PyClical.pyx":291
3962  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
3963  *
3964  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
3965  * """
3966  * Set union: or.
3967  */
3968 
3969 /* Python wrapper */
3970 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
3971 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 ";
3972 #if CYTHON_COMPILING_IN_CPYTHON
3973 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
3974 #endif
3975 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3976  PyObject *__pyx_r = 0;
3977  __Pyx_RefNannyDeclarations
3978  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
3979  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
3980 
3981  /* function exit code */
3982  __Pyx_RefNannyFinishContext();
3983  return __pyx_r;
3984 }
3985 
3986 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
3987  PyObject *__pyx_r = NULL;
3988  __Pyx_RefNannyDeclarations
3989  PyObject *__pyx_t_1 = NULL;
3990  PyObject *__pyx_t_2 = NULL;
3991  int __pyx_lineno = 0;
3992  const char *__pyx_filename = NULL;
3993  int __pyx_clineno = 0;
3994  __Pyx_RefNannySetupContext("__or__", 0);
3995 
3996  /* "PyClical.pyx":300
3997  * {1,2}
3998  * """
3999  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4000  *
4001  * def __ior__(self, rhs):
4002  */
4003  __Pyx_XDECREF(__pyx_r);
4004  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4005  __Pyx_GOTREF(__pyx_t_1);
4006  __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_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4007  __Pyx_GOTREF(__pyx_t_2);
4008  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4009  __pyx_r = __pyx_t_2;
4010  __pyx_t_2 = 0;
4011  goto __pyx_L0;
4012 
4013  /* "PyClical.pyx":291
4014  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4015  *
4016  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4017  * """
4018  * Set union: or.
4019  */
4020 
4021  /* function exit code */
4022  __pyx_L1_error:;
4023  __Pyx_XDECREF(__pyx_t_1);
4024  __Pyx_XDECREF(__pyx_t_2);
4025  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4026  __pyx_r = NULL;
4027  __pyx_L0:;
4028  __Pyx_XGIVEREF(__pyx_r);
4029  __Pyx_RefNannyFinishContext();
4030  return __pyx_r;
4031 }
4032 
4033 /* "PyClical.pyx":302
4034  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4035  *
4036  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4037  * """
4038  * Set union: or.
4039  */
4040 
4041 /* Python wrapper */
4042 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4043 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 ";
4044 #if CYTHON_COMPILING_IN_CPYTHON
4045 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4046 #endif
4047 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4048  PyObject *__pyx_r = 0;
4049  __Pyx_RefNannyDeclarations
4050  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4051  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4052 
4053  /* function exit code */
4054  __Pyx_RefNannyFinishContext();
4055  return __pyx_r;
4056 }
4057 
4058 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4059  PyObject *__pyx_r = NULL;
4060  __Pyx_RefNannyDeclarations
4061  PyObject *__pyx_t_1 = NULL;
4062  int __pyx_lineno = 0;
4063  const char *__pyx_filename = NULL;
4064  int __pyx_clineno = 0;
4065  __Pyx_RefNannySetupContext("__ior__", 0);
4066 
4067  /* "PyClical.pyx":311
4068  * {1,2}
4069  * """
4070  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4071  *
4072  * def count(self):
4073  */
4074  __Pyx_XDECREF(__pyx_r);
4075  __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_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4076  __Pyx_GOTREF(__pyx_t_1);
4077  __pyx_r = __pyx_t_1;
4078  __pyx_t_1 = 0;
4079  goto __pyx_L0;
4080 
4081  /* "PyClical.pyx":302
4082  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4083  *
4084  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4085  * """
4086  * Set union: or.
4087  */
4088 
4089  /* function exit code */
4090  __pyx_L1_error:;
4091  __Pyx_XDECREF(__pyx_t_1);
4092  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4093  __pyx_r = NULL;
4094  __pyx_L0:;
4095  __Pyx_XGIVEREF(__pyx_r);
4096  __Pyx_RefNannyFinishContext();
4097  return __pyx_r;
4098 }
4099 
4100 /* "PyClical.pyx":313
4101  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4102  *
4103  * def count(self): # <<<<<<<<<<<<<<
4104  * """
4105  * Cardinality: Number of indices included in set.
4106  */
4107 
4108 /* Python wrapper */
4109 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4110 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 ";
4111 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4112  PyObject *__pyx_r = 0;
4113  __Pyx_RefNannyDeclarations
4114  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4115  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4116 
4117  /* function exit code */
4118  __Pyx_RefNannyFinishContext();
4119  return __pyx_r;
4120 }
4121 
4122 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4123  PyObject *__pyx_r = NULL;
4124  __Pyx_RefNannyDeclarations
4125  PyObject *__pyx_t_1 = NULL;
4126  int __pyx_lineno = 0;
4127  const char *__pyx_filename = NULL;
4128  int __pyx_clineno = 0;
4129  __Pyx_RefNannySetupContext("count", 0);
4130 
4131  /* "PyClical.pyx":320
4132  * 3
4133  * """
4134  * return self.instance.count() # <<<<<<<<<<<<<<
4135  *
4136  * def count_neg(self):
4137  */
4138  __Pyx_XDECREF(__pyx_r);
4139  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4140  __Pyx_GOTREF(__pyx_t_1);
4141  __pyx_r = __pyx_t_1;
4142  __pyx_t_1 = 0;
4143  goto __pyx_L0;
4144 
4145  /* "PyClical.pyx":313
4146  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4147  *
4148  * def count(self): # <<<<<<<<<<<<<<
4149  * """
4150  * Cardinality: Number of indices included in set.
4151  */
4152 
4153  /* function exit code */
4154  __pyx_L1_error:;
4155  __Pyx_XDECREF(__pyx_t_1);
4156  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4157  __pyx_r = NULL;
4158  __pyx_L0:;
4159  __Pyx_XGIVEREF(__pyx_r);
4160  __Pyx_RefNannyFinishContext();
4161  return __pyx_r;
4162 }
4163 
4164 /* "PyClical.pyx":322
4165  * return self.instance.count()
4166  *
4167  * def count_neg(self): # <<<<<<<<<<<<<<
4168  * """
4169  * Number of negative indices included in set.
4170  */
4171 
4172 /* Python wrapper */
4173 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4174 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 ";
4175 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4176  PyObject *__pyx_r = 0;
4177  __Pyx_RefNannyDeclarations
4178  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4179  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4180 
4181  /* function exit code */
4182  __Pyx_RefNannyFinishContext();
4183  return __pyx_r;
4184 }
4185 
4186 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4187  PyObject *__pyx_r = NULL;
4188  __Pyx_RefNannyDeclarations
4189  PyObject *__pyx_t_1 = NULL;
4190  int __pyx_lineno = 0;
4191  const char *__pyx_filename = NULL;
4192  int __pyx_clineno = 0;
4193  __Pyx_RefNannySetupContext("count_neg", 0);
4194 
4195  /* "PyClical.pyx":329
4196  * 1
4197  * """
4198  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4199  *
4200  * def count_pos(self):
4201  */
4202  __Pyx_XDECREF(__pyx_r);
4203  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_neg()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4204  __Pyx_GOTREF(__pyx_t_1);
4205  __pyx_r = __pyx_t_1;
4206  __pyx_t_1 = 0;
4207  goto __pyx_L0;
4208 
4209  /* "PyClical.pyx":322
4210  * return self.instance.count()
4211  *
4212  * def count_neg(self): # <<<<<<<<<<<<<<
4213  * """
4214  * Number of negative indices included in set.
4215  */
4216 
4217  /* function exit code */
4218  __pyx_L1_error:;
4219  __Pyx_XDECREF(__pyx_t_1);
4220  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4221  __pyx_r = NULL;
4222  __pyx_L0:;
4223  __Pyx_XGIVEREF(__pyx_r);
4224  __Pyx_RefNannyFinishContext();
4225  return __pyx_r;
4226 }
4227 
4228 /* "PyClical.pyx":331
4229  * return self.instance.count_neg()
4230  *
4231  * def count_pos(self): # <<<<<<<<<<<<<<
4232  * """
4233  * Number of positive indices included in set.
4234  */
4235 
4236 /* Python wrapper */
4237 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4238 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 ";
4239 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4240  PyObject *__pyx_r = 0;
4241  __Pyx_RefNannyDeclarations
4242  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
4243  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4244 
4245  /* function exit code */
4246  __Pyx_RefNannyFinishContext();
4247  return __pyx_r;
4248 }
4249 
4250 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4251  PyObject *__pyx_r = NULL;
4252  __Pyx_RefNannyDeclarations
4253  PyObject *__pyx_t_1 = NULL;
4254  int __pyx_lineno = 0;
4255  const char *__pyx_filename = NULL;
4256  int __pyx_clineno = 0;
4257  __Pyx_RefNannySetupContext("count_pos", 0);
4258 
4259  /* "PyClical.pyx":338
4260  * 2
4261  * """
4262  * return self.instance.count_pos() # <<<<<<<<<<<<<<
4263  *
4264  * def min(self):
4265  */
4266  __Pyx_XDECREF(__pyx_r);
4267  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_pos()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4268  __Pyx_GOTREF(__pyx_t_1);
4269  __pyx_r = __pyx_t_1;
4270  __pyx_t_1 = 0;
4271  goto __pyx_L0;
4272 
4273  /* "PyClical.pyx":331
4274  * return self.instance.count_neg()
4275  *
4276  * def count_pos(self): # <<<<<<<<<<<<<<
4277  * """
4278  * Number of positive indices included in set.
4279  */
4280 
4281  /* function exit code */
4282  __pyx_L1_error:;
4283  __Pyx_XDECREF(__pyx_t_1);
4284  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4285  __pyx_r = NULL;
4286  __pyx_L0:;
4287  __Pyx_XGIVEREF(__pyx_r);
4288  __Pyx_RefNannyFinishContext();
4289  return __pyx_r;
4290 }
4291 
4292 /* "PyClical.pyx":340
4293  * return self.instance.count_pos()
4294  *
4295  * def min(self): # <<<<<<<<<<<<<<
4296  * """
4297  * Minimum member.
4298  */
4299 
4300 /* Python wrapper */
4301 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4302 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
4303 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4304  PyObject *__pyx_r = 0;
4305  __Pyx_RefNannyDeclarations
4306  __Pyx_RefNannySetupContext("min (wrapper)", 0);
4307  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4308 
4309  /* function exit code */
4310  __Pyx_RefNannyFinishContext();
4311  return __pyx_r;
4312 }
4313 
4314 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4315  PyObject *__pyx_r = NULL;
4316  __Pyx_RefNannyDeclarations
4317  PyObject *__pyx_t_1 = NULL;
4318  int __pyx_lineno = 0;
4319  const char *__pyx_filename = NULL;
4320  int __pyx_clineno = 0;
4321  __Pyx_RefNannySetupContext("min", 0);
4322 
4323  /* "PyClical.pyx":347
4324  * -1
4325  * """
4326  * return self.instance.min() # <<<<<<<<<<<<<<
4327  *
4328  * def max(self):
4329  */
4330  __Pyx_XDECREF(__pyx_r);
4331  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4332  __Pyx_GOTREF(__pyx_t_1);
4333  __pyx_r = __pyx_t_1;
4334  __pyx_t_1 = 0;
4335  goto __pyx_L0;
4336 
4337  /* "PyClical.pyx":340
4338  * return self.instance.count_pos()
4339  *
4340  * def min(self): # <<<<<<<<<<<<<<
4341  * """
4342  * Minimum member.
4343  */
4344 
4345  /* function exit code */
4346  __pyx_L1_error:;
4347  __Pyx_XDECREF(__pyx_t_1);
4348  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
4349  __pyx_r = NULL;
4350  __pyx_L0:;
4351  __Pyx_XGIVEREF(__pyx_r);
4352  __Pyx_RefNannyFinishContext();
4353  return __pyx_r;
4354 }
4355 
4356 /* "PyClical.pyx":349
4357  * return self.instance.min()
4358  *
4359  * def max(self): # <<<<<<<<<<<<<<
4360  * """
4361  * Maximum member.
4362  */
4363 
4364 /* Python wrapper */
4365 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4366 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
4367 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4368  PyObject *__pyx_r = 0;
4369  __Pyx_RefNannyDeclarations
4370  __Pyx_RefNannySetupContext("max (wrapper)", 0);
4371  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4372 
4373  /* function exit code */
4374  __Pyx_RefNannyFinishContext();
4375  return __pyx_r;
4376 }
4377 
4378 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4379  PyObject *__pyx_r = NULL;
4380  __Pyx_RefNannyDeclarations
4381  PyObject *__pyx_t_1 = NULL;
4382  int __pyx_lineno = 0;
4383  const char *__pyx_filename = NULL;
4384  int __pyx_clineno = 0;
4385  __Pyx_RefNannySetupContext("max", 0);
4386 
4387  /* "PyClical.pyx":356
4388  * 2
4389  * """
4390  * return self.instance.max() # <<<<<<<<<<<<<<
4391  *
4392  * def hash_fn(self):
4393  */
4394  __Pyx_XDECREF(__pyx_r);
4395  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4396  __Pyx_GOTREF(__pyx_t_1);
4397  __pyx_r = __pyx_t_1;
4398  __pyx_t_1 = 0;
4399  goto __pyx_L0;
4400 
4401  /* "PyClical.pyx":349
4402  * return self.instance.min()
4403  *
4404  * def max(self): # <<<<<<<<<<<<<<
4405  * """
4406  * Maximum member.
4407  */
4408 
4409  /* function exit code */
4410  __pyx_L1_error:;
4411  __Pyx_XDECREF(__pyx_t_1);
4412  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
4413  __pyx_r = NULL;
4414  __pyx_L0:;
4415  __Pyx_XGIVEREF(__pyx_r);
4416  __Pyx_RefNannyFinishContext();
4417  return __pyx_r;
4418 }
4419 
4420 /* "PyClical.pyx":358
4421  * return self.instance.max()
4422  *
4423  * def hash_fn(self): # <<<<<<<<<<<<<<
4424  * """
4425  * Hash function.
4426  */
4427 
4428 /* Python wrapper */
4429 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4430 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
4431 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4432  PyObject *__pyx_r = 0;
4433  __Pyx_RefNannyDeclarations
4434  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
4435  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4436 
4437  /* function exit code */
4438  __Pyx_RefNannyFinishContext();
4439  return __pyx_r;
4440 }
4441 
4442 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4443  PyObject *__pyx_r = NULL;
4444  __Pyx_RefNannyDeclarations
4445  PyObject *__pyx_t_1 = NULL;
4446  int __pyx_lineno = 0;
4447  const char *__pyx_filename = NULL;
4448  int __pyx_clineno = 0;
4449  __Pyx_RefNannySetupContext("hash_fn", 0);
4450 
4451  /* "PyClical.pyx":362
4452  * Hash function.
4453  * """
4454  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
4455  *
4456  * def sign_of_mult(self, rhs):
4457  */
4458  __Pyx_XDECREF(__pyx_r);
4459  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->hash_fn()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4460  __Pyx_GOTREF(__pyx_t_1);
4461  __pyx_r = __pyx_t_1;
4462  __pyx_t_1 = 0;
4463  goto __pyx_L0;
4464 
4465  /* "PyClical.pyx":358
4466  * return self.instance.max()
4467  *
4468  * def hash_fn(self): # <<<<<<<<<<<<<<
4469  * """
4470  * Hash function.
4471  */
4472 
4473  /* function exit code */
4474  __pyx_L1_error:;
4475  __Pyx_XDECREF(__pyx_t_1);
4476  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
4477  __pyx_r = NULL;
4478  __pyx_L0:;
4479  __Pyx_XGIVEREF(__pyx_r);
4480  __Pyx_RefNannyFinishContext();
4481  return __pyx_r;
4482 }
4483 
4484 /* "PyClical.pyx":364
4485  * return self.instance.hash_fn()
4486  *
4487  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
4488  * """
4489  * Sign of geometric product of two Clifford basis elements.
4490  */
4491 
4492 /* Python wrapper */
4493 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4494 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 ";
4495 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4496  PyObject *__pyx_r = 0;
4497  __Pyx_RefNannyDeclarations
4498  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
4499  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4500 
4501  /* function exit code */
4502  __Pyx_RefNannyFinishContext();
4503  return __pyx_r;
4504 }
4505 
4506 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4507  PyObject *__pyx_r = NULL;
4508  __Pyx_RefNannyDeclarations
4509  PyObject *__pyx_t_1 = NULL;
4510  int __pyx_lineno = 0;
4511  const char *__pyx_filename = NULL;
4512  int __pyx_clineno = 0;
4513  __Pyx_RefNannySetupContext("sign_of_mult", 0);
4514 
4515  /* "PyClical.pyx":371
4516  * 1
4517  * """
4518  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
4519  *
4520  * def sign_of_square(self):
4521  */
4522  __Pyx_XDECREF(__pyx_r);
4523  __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_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4524  __Pyx_GOTREF(__pyx_t_1);
4525  __pyx_r = __pyx_t_1;
4526  __pyx_t_1 = 0;
4527  goto __pyx_L0;
4528 
4529  /* "PyClical.pyx":364
4530  * return self.instance.hash_fn()
4531  *
4532  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
4533  * """
4534  * Sign of geometric product of two Clifford basis elements.
4535  */
4536 
4537  /* function exit code */
4538  __pyx_L1_error:;
4539  __Pyx_XDECREF(__pyx_t_1);
4540  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
4541  __pyx_r = NULL;
4542  __pyx_L0:;
4543  __Pyx_XGIVEREF(__pyx_r);
4544  __Pyx_RefNannyFinishContext();
4545  return __pyx_r;
4546 }
4547 
4548 /* "PyClical.pyx":373
4549  * return self.instance.sign_of_mult(toIndexSet(rhs))
4550  *
4551  * def sign_of_square(self): # <<<<<<<<<<<<<<
4552  * """
4553  * Sign of geometric square of a Clifford basis element.
4554  */
4555 
4556 /* Python wrapper */
4557 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4558 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 ";
4559 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4560  PyObject *__pyx_r = 0;
4561  __Pyx_RefNannyDeclarations
4562  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
4563  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4564 
4565  /* function exit code */
4566  __Pyx_RefNannyFinishContext();
4567  return __pyx_r;
4568 }
4569 
4570 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4571  PyObject *__pyx_r = NULL;
4572  __Pyx_RefNannyDeclarations
4573  PyObject *__pyx_t_1 = NULL;
4574  int __pyx_lineno = 0;
4575  const char *__pyx_filename = NULL;
4576  int __pyx_clineno = 0;
4577  __Pyx_RefNannySetupContext("sign_of_square", 0);
4578 
4579  /* "PyClical.pyx":380
4580  * -1
4581  * """
4582  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
4583  *
4584  * def __repr__(self):
4585  */
4586  __Pyx_XDECREF(__pyx_r);
4587  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_square()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4588  __Pyx_GOTREF(__pyx_t_1);
4589  __pyx_r = __pyx_t_1;
4590  __pyx_t_1 = 0;
4591  goto __pyx_L0;
4592 
4593  /* "PyClical.pyx":373
4594  * return self.instance.sign_of_mult(toIndexSet(rhs))
4595  *
4596  * def sign_of_square(self): # <<<<<<<<<<<<<<
4597  * """
4598  * Sign of geometric square of a Clifford basis element.
4599  */
4600 
4601  /* function exit code */
4602  __pyx_L1_error:;
4603  __Pyx_XDECREF(__pyx_t_1);
4604  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
4605  __pyx_r = NULL;
4606  __pyx_L0:;
4607  __Pyx_XGIVEREF(__pyx_r);
4608  __Pyx_RefNannyFinishContext();
4609  return __pyx_r;
4610 }
4611 
4612 /* "PyClical.pyx":382
4613  * return self.instance.sign_of_square()
4614  *
4615  * def __repr__(self): # <<<<<<<<<<<<<<
4616  * """
4617  * The official string representation of self.
4618  */
4619 
4620 /* Python wrapper */
4621 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
4622 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 ";
4623 #if CYTHON_COMPILING_IN_CPYTHON
4624 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
4625 #endif
4626 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
4627  PyObject *__pyx_r = 0;
4628  __Pyx_RefNannyDeclarations
4629  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
4630  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((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_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4638  PyObject *__pyx_r = NULL;
4639  __Pyx_RefNannyDeclarations
4640  PyObject *__pyx_t_1 = NULL;
4641  int __pyx_lineno = 0;
4642  const char *__pyx_filename = NULL;
4643  int __pyx_clineno = 0;
4644  __Pyx_RefNannySetupContext("__repr__", 0);
4645 
4646  /* "PyClical.pyx":391
4647  * 'index_set({1,2})'
4648  * """
4649  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
4650  *
4651  * def __str__(self):
4652  */
4653  __Pyx_XDECREF(__pyx_r);
4654  __pyx_t_1 = __Pyx_PyBytes_FromString(index_set_to_repr(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4655  __Pyx_GOTREF(__pyx_t_1);
4656  __pyx_r = __pyx_t_1;
4657  __pyx_t_1 = 0;
4658  goto __pyx_L0;
4659 
4660  /* "PyClical.pyx":382
4661  * return self.instance.sign_of_square()
4662  *
4663  * def __repr__(self): # <<<<<<<<<<<<<<
4664  * """
4665  * The official string representation of self.
4666  */
4667 
4668  /* function exit code */
4669  __pyx_L1_error:;
4670  __Pyx_XDECREF(__pyx_t_1);
4671  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4672  __pyx_r = NULL;
4673  __pyx_L0:;
4674  __Pyx_XGIVEREF(__pyx_r);
4675  __Pyx_RefNannyFinishContext();
4676  return __pyx_r;
4677 }
4678 
4679 /* "PyClical.pyx":393
4680  * return index_set_to_repr( self.unwrap() ).c_str()
4681  *
4682  * def __str__(self): # <<<<<<<<<<<<<<
4683  * """
4684  * The informal string representation of self.
4685  */
4686 
4687 /* Python wrapper */
4688 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
4689 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 ";
4690 #if CYTHON_COMPILING_IN_CPYTHON
4691 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
4692 #endif
4693 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
4694  PyObject *__pyx_r = 0;
4695  __Pyx_RefNannyDeclarations
4696  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
4697  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4698 
4699  /* function exit code */
4700  __Pyx_RefNannyFinishContext();
4701  return __pyx_r;
4702 }
4703 
4704 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4705  PyObject *__pyx_r = NULL;
4706  __Pyx_RefNannyDeclarations
4707  PyObject *__pyx_t_1 = NULL;
4708  int __pyx_lineno = 0;
4709  const char *__pyx_filename = NULL;
4710  int __pyx_clineno = 0;
4711  __Pyx_RefNannySetupContext("__str__", 0);
4712 
4713  /* "PyClical.pyx":402
4714  * '{1,2}'
4715  * """
4716  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
4717  *
4718  * def index_set_hidden_doctests():
4719  */
4720  __Pyx_XDECREF(__pyx_r);
4721  __pyx_t_1 = __Pyx_PyBytes_FromString(index_set_to_str(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4722  __Pyx_GOTREF(__pyx_t_1);
4723  __pyx_r = __pyx_t_1;
4724  __pyx_t_1 = 0;
4725  goto __pyx_L0;
4726 
4727  /* "PyClical.pyx":393
4728  * return index_set_to_repr( self.unwrap() ).c_str()
4729  *
4730  * def __str__(self): # <<<<<<<<<<<<<<
4731  * """
4732  * The informal string representation of self.
4733  */
4734 
4735  /* function exit code */
4736  __pyx_L1_error:;
4737  __Pyx_XDECREF(__pyx_t_1);
4738  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4739  __pyx_r = NULL;
4740  __pyx_L0:;
4741  __Pyx_XGIVEREF(__pyx_r);
4742  __Pyx_RefNannyFinishContext();
4743  return __pyx_r;
4744 }
4745 
4746 /* "PyClical.pyx":404
4747  * return index_set_to_str( self.unwrap() ).c_str()
4748  *
4749  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
4750  * """
4751  * Tests for functions that Doctest cannot see.
4752  */
4753 
4754 /* Python wrapper */
4755 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4756 static char __pyx_doc_8PyClical_index_set_hidden_doctests[] = "\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print index_set(1)\n {1}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set(index_set({1,2}))\n {1,2}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set(\"\")\n {}\n >>> print index_set(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print index_set(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print index_set(\"{1,2,100}\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print index_set({1,2,100})\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> index_se""t({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ";
4757  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};
4758  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
4759  PyObject *__pyx_r = 0;
4760  __Pyx_RefNannyDeclarations
4761  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
4762  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
4763 
4764  /* function exit code */
4765  __Pyx_RefNannyFinishContext();
4766  return __pyx_r;
4767  }
4768 
4769  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
4770  PyObject *__pyx_r = NULL;
4771  __Pyx_RefNannyDeclarations
4772  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
4773 
4774  /* "PyClical.pyx":488
4775  * False
4776  * """
4777  * return # <<<<<<<<<<<<<<
4778  *
4779  * cpdef inline compare(lhs,rhs):
4780  */
4781  __Pyx_XDECREF(__pyx_r);
4782  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4783  goto __pyx_L0;
4784 
4785  /* "PyClical.pyx":404
4786  * return index_set_to_str( self.unwrap() ).c_str()
4787  *
4788  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
4789  * """
4790  * Tests for functions that Doctest cannot see.
4791  */
4792 
4793  /* function exit code */
4794  __pyx_L0:;
4795  __Pyx_XGIVEREF(__pyx_r);
4796  __Pyx_RefNannyFinishContext();
4797  return __pyx_r;
4798  }
4799 
4800  /* "PyClical.pyx":490
4801  * return
4802  *
4803  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
4804  * """
4805  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
4806  */
4807 
4808  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4809  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
4810  PyObject *__pyx_r = NULL;
4811  __Pyx_RefNannyDeclarations
4812  PyObject *__pyx_t_1 = NULL;
4813  int __pyx_lineno = 0;
4814  const char *__pyx_filename = NULL;
4815  int __pyx_clineno = 0;
4816  __Pyx_RefNannySetupContext("compare", 0);
4817 
4818  /* "PyClical.pyx":500
4819  * 1
4820  * """
4821  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4822  *
4823  * cpdef inline min_neg(obj):
4824  */
4825  __Pyx_XDECREF(__pyx_r);
4826  __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_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4827  __Pyx_GOTREF(__pyx_t_1);
4828  __pyx_r = __pyx_t_1;
4829  __pyx_t_1 = 0;
4830  goto __pyx_L0;
4831 
4832  /* "PyClical.pyx":490
4833  * return
4834  *
4835  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
4836  * """
4837  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
4838  */
4839 
4840  /* function exit code */
4841  __pyx_L1_error:;
4842  __Pyx_XDECREF(__pyx_t_1);
4843  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4844  __pyx_r = 0;
4845  __pyx_L0:;
4846  __Pyx_XGIVEREF(__pyx_r);
4847  __Pyx_RefNannyFinishContext();
4848  return __pyx_r;
4849  }
4850 
4851  /* Python wrapper */
4852  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4853  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 ";
4854  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4855  PyObject *__pyx_v_lhs = 0;
4856  PyObject *__pyx_v_rhs = 0;
4857  int __pyx_lineno = 0;
4858  const char *__pyx_filename = NULL;
4859  int __pyx_clineno = 0;
4860  PyObject *__pyx_r = 0;
4861  __Pyx_RefNannyDeclarations
4862  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
4863  {
4864  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
4865  PyObject* values[2] = {0,0};
4866  if (unlikely(__pyx_kwds)) {
4867  Py_ssize_t kw_args;
4868  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4869  switch (pos_args) {
4870  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4871  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4872  case 0: break;
4873  default: goto __pyx_L5_argtuple_error;
4874  }
4875  kw_args = PyDict_Size(__pyx_kwds);
4876  switch (pos_args) {
4877  case 0:
4878  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
4879  else goto __pyx_L5_argtuple_error;
4880  case 1:
4881  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
4882  else {
4883  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4884  }
4885  }
4886  if (unlikely(kw_args > 0)) {
4887  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4888  }
4889  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4890  goto __pyx_L5_argtuple_error;
4891  } else {
4892  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4893  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4894  }
4895  __pyx_v_lhs = values[0];
4896  __pyx_v_rhs = values[1];
4897  }
4898  goto __pyx_L4_argument_unpacking_done;
4899  __pyx_L5_argtuple_error:;
4900  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4901  __pyx_L3_error:;
4902  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4903  __Pyx_RefNannyFinishContext();
4904  return NULL;
4905  __pyx_L4_argument_unpacking_done:;
4906  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
4907 
4908  /* function exit code */
4909  __Pyx_RefNannyFinishContext();
4910  return __pyx_r;
4911  }
4912 
4913  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4914  PyObject *__pyx_r = NULL;
4915  __Pyx_RefNannyDeclarations
4916  PyObject *__pyx_t_1 = NULL;
4917  int __pyx_lineno = 0;
4918  const char *__pyx_filename = NULL;
4919  int __pyx_clineno = 0;
4920  __Pyx_RefNannySetupContext("compare", 0);
4921  __Pyx_XDECREF(__pyx_r);
4922  __pyx_t_1 = __pyx_f_8PyClical_compare(__pyx_v_lhs, __pyx_v_rhs, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4923  __Pyx_GOTREF(__pyx_t_1);
4924  __pyx_r = __pyx_t_1;
4925  __pyx_t_1 = 0;
4926  goto __pyx_L0;
4927 
4928  /* function exit code */
4929  __pyx_L1_error:;
4930  __Pyx_XDECREF(__pyx_t_1);
4931  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
4932  __pyx_r = NULL;
4933  __pyx_L0:;
4934  __Pyx_XGIVEREF(__pyx_r);
4935  __Pyx_RefNannyFinishContext();
4936  return __pyx_r;
4937  }
4938 
4939  /* "PyClical.pyx":502
4940  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
4941  *
4942  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
4943  * """
4944  * Minimum negative index, or 0 if none.
4945  */
4946 
4947  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
4948  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
4949  PyObject *__pyx_r = NULL;
4950  __Pyx_RefNannyDeclarations
4951  PyObject *__pyx_t_1 = NULL;
4952  int __pyx_lineno = 0;
4953  const char *__pyx_filename = NULL;
4954  int __pyx_clineno = 0;
4955  __Pyx_RefNannySetupContext("min_neg", 0);
4956 
4957  /* "PyClical.pyx":509
4958  * 0
4959  * """
4960  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
4961  *
4962  * cpdef inline max_pos(obj):
4963  */
4964  __Pyx_XDECREF(__pyx_r);
4965  __pyx_t_1 = __Pyx_PyInt_From_int(min_neg(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4966  __Pyx_GOTREF(__pyx_t_1);
4967  __pyx_r = __pyx_t_1;
4968  __pyx_t_1 = 0;
4969  goto __pyx_L0;
4970 
4971  /* "PyClical.pyx":502
4972  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
4973  *
4974  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
4975  * """
4976  * Minimum negative index, or 0 if none.
4977  */
4978 
4979  /* function exit code */
4980  __pyx_L1_error:;
4981  __Pyx_XDECREF(__pyx_t_1);
4982  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4983  __pyx_r = 0;
4984  __pyx_L0:;
4985  __Pyx_XGIVEREF(__pyx_r);
4986  __Pyx_RefNannyFinishContext();
4987  return __pyx_r;
4988  }
4989 
4990  /* Python wrapper */
4991  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
4992  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 ";
4993  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
4994  PyObject *__pyx_r = 0;
4995  __Pyx_RefNannyDeclarations
4996  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
4997  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
4998 
4999  /* function exit code */
5000  __Pyx_RefNannyFinishContext();
5001  return __pyx_r;
5002  }
5003 
5004  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5005  PyObject *__pyx_r = NULL;
5006  __Pyx_RefNannyDeclarations
5007  PyObject *__pyx_t_1 = NULL;
5008  int __pyx_lineno = 0;
5009  const char *__pyx_filename = NULL;
5010  int __pyx_clineno = 0;
5011  __Pyx_RefNannySetupContext("min_neg", 0);
5012  __Pyx_XDECREF(__pyx_r);
5013  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5014  __Pyx_GOTREF(__pyx_t_1);
5015  __pyx_r = __pyx_t_1;
5016  __pyx_t_1 = 0;
5017  goto __pyx_L0;
5018 
5019  /* function exit code */
5020  __pyx_L1_error:;
5021  __Pyx_XDECREF(__pyx_t_1);
5022  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5023  __pyx_r = NULL;
5024  __pyx_L0:;
5025  __Pyx_XGIVEREF(__pyx_r);
5026  __Pyx_RefNannyFinishContext();
5027  return __pyx_r;
5028  }
5029 
5030  /* "PyClical.pyx":511
5031  * return glucat.min_neg( toIndexSet(obj) )
5032  *
5033  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5034  * """
5035  * Maximum positive index, or 0 if none.
5036  */
5037 
5038  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5039  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5040  PyObject *__pyx_r = NULL;
5041  __Pyx_RefNannyDeclarations
5042  PyObject *__pyx_t_1 = NULL;
5043  int __pyx_lineno = 0;
5044  const char *__pyx_filename = NULL;
5045  int __pyx_clineno = 0;
5046  __Pyx_RefNannySetupContext("max_pos", 0);
5047 
5048  /* "PyClical.pyx":518
5049  * 2
5050  * """
5051  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5052  *
5053  * cdef inline vector[scalar_t] list_to_vector(lst):
5054  */
5055  __Pyx_XDECREF(__pyx_r);
5056  __pyx_t_1 = __Pyx_PyInt_From_int(max_pos(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5057  __Pyx_GOTREF(__pyx_t_1);
5058  __pyx_r = __pyx_t_1;
5059  __pyx_t_1 = 0;
5060  goto __pyx_L0;
5061 
5062  /* "PyClical.pyx":511
5063  * return glucat.min_neg( toIndexSet(obj) )
5064  *
5065  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5066  * """
5067  * Maximum positive index, or 0 if none.
5068  */
5069 
5070  /* function exit code */
5071  __pyx_L1_error:;
5072  __Pyx_XDECREF(__pyx_t_1);
5073  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5074  __pyx_r = 0;
5075  __pyx_L0:;
5076  __Pyx_XGIVEREF(__pyx_r);
5077  __Pyx_RefNannyFinishContext();
5078  return __pyx_r;
5079  }
5080 
5081  /* Python wrapper */
5082  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5083  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 ";
5084  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5085  PyObject *__pyx_r = 0;
5086  __Pyx_RefNannyDeclarations
5087  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5088  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5089 
5090  /* function exit code */
5091  __Pyx_RefNannyFinishContext();
5092  return __pyx_r;
5093  }
5094 
5095  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5096  PyObject *__pyx_r = NULL;
5097  __Pyx_RefNannyDeclarations
5098  PyObject *__pyx_t_1 = NULL;
5099  int __pyx_lineno = 0;
5100  const char *__pyx_filename = NULL;
5101  int __pyx_clineno = 0;
5102  __Pyx_RefNannySetupContext("max_pos", 0);
5103  __Pyx_XDECREF(__pyx_r);
5104  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5105  __Pyx_GOTREF(__pyx_t_1);
5106  __pyx_r = __pyx_t_1;
5107  __pyx_t_1 = 0;
5108  goto __pyx_L0;
5109 
5110  /* function exit code */
5111  __pyx_L1_error:;
5112  __Pyx_XDECREF(__pyx_t_1);
5113  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5114  __pyx_r = NULL;
5115  __pyx_L0:;
5116  __Pyx_XGIVEREF(__pyx_r);
5117  __Pyx_RefNannyFinishContext();
5118  return __pyx_r;
5119  }
5120 
5121  /* "PyClical.pyx":520
5122  * return glucat.max_pos( toIndexSet(obj) )
5123  *
5124  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5125  * """
5126  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5127  */
5128 
5129  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5130  std::vector<scalar_t> __pyx_v_v;
5131  PyObject *__pyx_v_s = NULL;
5132  std::vector<scalar_t> __pyx_r;
5133  __Pyx_RefNannyDeclarations
5134  PyObject *__pyx_t_1 = NULL;
5135  Py_ssize_t __pyx_t_2;
5136  PyObject *(*__pyx_t_3)(PyObject *);
5137  PyObject *__pyx_t_4 = NULL;
5138  scalar_t __pyx_t_5;
5139  int __pyx_lineno = 0;
5140  const char *__pyx_filename = NULL;
5141  int __pyx_clineno = 0;
5142  __Pyx_RefNannySetupContext("list_to_vector", 0);
5143 
5144  /* "PyClical.pyx":525
5145  * """
5146  * cdef vector[scalar_t] v
5147  * for s in lst: # <<<<<<<<<<<<<<
5148  * v.push_back(<scalar_t>s)
5149  * return v
5150  */
5151  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5152  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5153  __pyx_t_3 = NULL;
5154  } else {
5155  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5156  __Pyx_GOTREF(__pyx_t_1);
5157  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5158  }
5159  for (;;) {
5160  if (likely(!__pyx_t_3)) {
5161  if (likely(PyList_CheckExact(__pyx_t_1))) {
5162  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5163  #if CYTHON_COMPILING_IN_CPYTHON
5164  __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_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5165  #else
5166  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5167  #endif
5168  } else {
5169  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5170  #if CYTHON_COMPILING_IN_CPYTHON
5171  __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_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5172  #else
5173  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5174  #endif
5175  }
5176  } else {
5177  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5178  if (unlikely(!__pyx_t_4)) {
5179  PyObject* exc_type = PyErr_Occurred();
5180  if (exc_type) {
5181  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5182  else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5183  }
5184  break;
5185  }
5186  __Pyx_GOTREF(__pyx_t_4);
5187  }
5188  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5189  __pyx_t_4 = 0;
5190 
5191  /* "PyClical.pyx":526
5192  * cdef vector[scalar_t] v
5193  * for s in lst:
5194  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
5195  * return v
5196  *
5197  */
5198  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_5 == (scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5199  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
5200 
5201  /* "PyClical.pyx":525
5202  * """
5203  * cdef vector[scalar_t] v
5204  * for s in lst: # <<<<<<<<<<<<<<
5205  * v.push_back(<scalar_t>s)
5206  * return v
5207  */
5208  }
5209  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5210 
5211  /* "PyClical.pyx":527
5212  * for s in lst:
5213  * v.push_back(<scalar_t>s)
5214  * return v # <<<<<<<<<<<<<<
5215  *
5216  * # Forward reference.
5217  */
5218  __pyx_r = __pyx_v_v;
5219  goto __pyx_L0;
5220 
5221  /* "PyClical.pyx":520
5222  * return glucat.max_pos( toIndexSet(obj) )
5223  *
5224  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5225  * """
5226  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5227  */
5228 
5229  /* function exit code */
5230  __pyx_L1_error:;
5231  __Pyx_XDECREF(__pyx_t_1);
5232  __Pyx_XDECREF(__pyx_t_4);
5233  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
5234  __pyx_L0:;
5235  __Pyx_XDECREF(__pyx_v_s);
5236  __Pyx_RefNannyFinishContext();
5237  return __pyx_r;
5238  }
5239 
5240  /* "PyClical.pyx":532
5241  * cdef class clifford
5242  *
5243  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
5244  * return clifford(obj).instance[0]
5245  *
5246  */
5247 
5248  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
5249  Clifford __pyx_r;
5250  __Pyx_RefNannyDeclarations
5251  PyObject *__pyx_t_1 = NULL;
5252  PyObject *__pyx_t_2 = NULL;
5253  int __pyx_lineno = 0;
5254  const char *__pyx_filename = NULL;
5255  int __pyx_clineno = 0;
5256  __Pyx_RefNannySetupContext("toClifford", 0);
5257 
5258  /* "PyClical.pyx":533
5259  *
5260  * cdef inline Clifford toClifford(obj):
5261  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
5262  *
5263  * cdef class clifford:
5264  */
5265  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5266  __Pyx_GOTREF(__pyx_t_1);
5267  __Pyx_INCREF(__pyx_v_obj);
5268  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
5269  __Pyx_GIVEREF(__pyx_v_obj);
5270  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5271  __Pyx_GOTREF(__pyx_t_2);
5272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5273  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
5274  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5275  goto __pyx_L0;
5276 
5277  /* "PyClical.pyx":532
5278  * cdef class clifford
5279  *
5280  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
5281  * return clifford(obj).instance[0]
5282  *
5283  */
5284 
5285  /* function exit code */
5286  __pyx_L1_error:;
5287  __Pyx_XDECREF(__pyx_t_1);
5288  __Pyx_XDECREF(__pyx_t_2);
5289  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
5290  __pyx_L0:;
5291  __Pyx_RefNannyFinishContext();
5292  return __pyx_r;
5293  }
5294 
5295  /* "PyClical.pyx":541
5296  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
5297  *
5298  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
5299  * """
5300  * Wrap an instance of the C++ class Clifford.
5301  */
5302 
5303  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
5304  PyObject *__pyx_r = NULL;
5305  __Pyx_RefNannyDeclarations
5306  __Pyx_RefNannySetupContext("wrap", 0);
5307 
5308  /* "PyClical.pyx":545
5309  * Wrap an instance of the C++ class Clifford.
5310  * """
5311  * self.instance[0] = other # <<<<<<<<<<<<<<
5312  * return self
5313  *
5314  */
5315  (__pyx_v_self->instance[0]) = __pyx_v_other;
5316 
5317  /* "PyClical.pyx":546
5318  * """
5319  * self.instance[0] = other
5320  * return self # <<<<<<<<<<<<<<
5321  *
5322  * cdef inline Clifford unwrap(clifford self):
5323  */
5324  __Pyx_XDECREF(__pyx_r);
5325  __Pyx_INCREF(((PyObject *)__pyx_v_self));
5326  __pyx_r = ((PyObject *)__pyx_v_self);
5327  goto __pyx_L0;
5328 
5329  /* "PyClical.pyx":541
5330  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
5331  *
5332  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
5333  * """
5334  * Wrap an instance of the C++ class Clifford.
5335  */
5336 
5337  /* function exit code */
5338  __pyx_L0:;
5339  __Pyx_XGIVEREF(__pyx_r);
5340  __Pyx_RefNannyFinishContext();
5341  return __pyx_r;
5342  }
5343 
5344  /* "PyClical.pyx":548
5345  * return self
5346  *
5347  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
5348  * """
5349  * Return the wrapped C++ Clifford instance.
5350  */
5351 
5352  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5353  Clifford __pyx_r;
5354  __Pyx_RefNannyDeclarations
5355  __Pyx_RefNannySetupContext("unwrap", 0);
5356 
5357  /* "PyClical.pyx":552
5358  * Return the wrapped C++ Clifford instance.
5359  * """
5360  * return self.instance[0] # <<<<<<<<<<<<<<
5361  *
5362  * cpdef copy(clifford self):
5363  */
5364  __pyx_r = (__pyx_v_self->instance[0]);
5365  goto __pyx_L0;
5366 
5367  /* "PyClical.pyx":548
5368  * return self
5369  *
5370  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
5371  * """
5372  * Return the wrapped C++ Clifford instance.
5373  */
5374 
5375  /* function exit code */
5376  __pyx_L0:;
5377  __Pyx_RefNannyFinishContext();
5378  return __pyx_r;
5379  }
5380 
5381  /* "PyClical.pyx":554
5382  * return self.instance[0]
5383  *
5384  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
5385  * """
5386  * Copy this clifford object.
5387  */
5388 
5389  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5390  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
5391  PyObject *__pyx_r = NULL;
5392  __Pyx_RefNannyDeclarations
5393  PyObject *__pyx_t_1 = NULL;
5394  PyObject *__pyx_t_2 = NULL;
5395  PyObject *__pyx_t_3 = NULL;
5396  PyObject *__pyx_t_4 = NULL;
5397  int __pyx_lineno = 0;
5398  const char *__pyx_filename = NULL;
5399  int __pyx_clineno = 0;
5400  __Pyx_RefNannySetupContext("copy", 0);
5401  /* Check if called by wrapper */
5402  if (unlikely(__pyx_skip_dispatch)) ;
5403  /* Check if overridden in Python */
5404  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
5405  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5406  __Pyx_GOTREF(__pyx_t_1);
5407  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
5408  __Pyx_XDECREF(__pyx_r);
5409  __Pyx_INCREF(__pyx_t_1);
5410  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
5411  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
5412  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5413  if (likely(__pyx_t_4)) {
5414  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5415  __Pyx_INCREF(__pyx_t_4);
5416  __Pyx_INCREF(function);
5417  __Pyx_DECREF_SET(__pyx_t_3, function);
5418  }
5419  }
5420  if (__pyx_t_4) {
5421  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5422  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5423  } else {
5424  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5425  }
5426  __Pyx_GOTREF(__pyx_t_2);
5427  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5428  __pyx_r = __pyx_t_2;
5429  __pyx_t_2 = 0;
5430  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5431  goto __pyx_L0;
5432  }
5433  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5434  }
5435 
5436  /* "PyClical.pyx":561
5437  * {2}
5438  * """
5439  * return clifford(self) # <<<<<<<<<<<<<<
5440  *
5441  * def __cinit__(self, other = 0, ixt = None):
5442  */
5443  __Pyx_XDECREF(__pyx_r);
5444  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5445  __Pyx_GOTREF(__pyx_t_1);
5446  __Pyx_INCREF(((PyObject *)__pyx_v_self));
5447  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
5448  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5449  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5450  __Pyx_GOTREF(__pyx_t_2);
5451  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5452  __pyx_r = __pyx_t_2;
5453  __pyx_t_2 = 0;
5454  goto __pyx_L0;
5455 
5456  /* "PyClical.pyx":554
5457  * return self.instance[0]
5458  *
5459  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
5460  * """
5461  * Copy this clifford object.
5462  */
5463 
5464  /* function exit code */
5465  __pyx_L1_error:;
5466  __Pyx_XDECREF(__pyx_t_1);
5467  __Pyx_XDECREF(__pyx_t_2);
5468  __Pyx_XDECREF(__pyx_t_3);
5469  __Pyx_XDECREF(__pyx_t_4);
5470  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5471  __pyx_r = 0;
5472  __pyx_L0:;
5473  __Pyx_XGIVEREF(__pyx_r);
5474  __Pyx_RefNannyFinishContext();
5475  return __pyx_r;
5476  }
5477 
5478  /* Python wrapper */
5479  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5480  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 ";
5481  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5482  PyObject *__pyx_r = 0;
5483  __Pyx_RefNannyDeclarations
5484  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
5485  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
5486 
5487  /* function exit code */
5488  __Pyx_RefNannyFinishContext();
5489  return __pyx_r;
5490  }
5491 
5492  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
5493  PyObject *__pyx_r = NULL;
5494  __Pyx_RefNannyDeclarations
5495  PyObject *__pyx_t_1 = NULL;
5496  int __pyx_lineno = 0;
5497  const char *__pyx_filename = NULL;
5498  int __pyx_clineno = 0;
5499  __Pyx_RefNannySetupContext("copy", 0);
5500  __Pyx_XDECREF(__pyx_r);
5501  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5502  __Pyx_GOTREF(__pyx_t_1);
5503  __pyx_r = __pyx_t_1;
5504  __pyx_t_1 = 0;
5505  goto __pyx_L0;
5506 
5507  /* function exit code */
5508  __pyx_L1_error:;
5509  __Pyx_XDECREF(__pyx_t_1);
5510  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
5511  __pyx_r = NULL;
5512  __pyx_L0:;
5513  __Pyx_XGIVEREF(__pyx_r);
5514  __Pyx_RefNannyFinishContext();
5515  return __pyx_r;
5516  }
5517 
5518  /* "PyClical.pyx":563
5519  * return clifford(self)
5520  *
5521  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
5522  * """
5523  * Construct an object of type clifford.
5524  */
5525 
5526  /* Python wrapper */
5527  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5528  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5529  PyObject *__pyx_v_other = 0;
5530  PyObject *__pyx_v_ixt = 0;
5531  int __pyx_lineno = 0;
5532  const char *__pyx_filename = NULL;
5533  int __pyx_clineno = 0;
5534  int __pyx_r;
5535  __Pyx_RefNannyDeclarations
5536  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
5537  {
5538  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
5539  PyObject* values[2] = {0,0};
5540  values[0] = ((PyObject *)__pyx_int_0);
5541  values[1] = ((PyObject *)Py_None);
5542  if (unlikely(__pyx_kwds)) {
5543  Py_ssize_t kw_args;
5544  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5545  switch (pos_args) {
5546  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5547  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5548  case 0: break;
5549  default: goto __pyx_L5_argtuple_error;
5550  }
5551  kw_args = PyDict_Size(__pyx_kwds);
5552  switch (pos_args) {
5553  case 0:
5554  if (kw_args > 0) {
5555  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
5556  if (value) { values[0] = value; kw_args--; }
5557  }
5558  case 1:
5559  if (kw_args > 0) {
5560  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt);
5561  if (value) { values[1] = value; kw_args--; }
5562  }
5563  }
5564  if (unlikely(kw_args > 0)) {
5565  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5566  }
5567  } else {
5568  switch (PyTuple_GET_SIZE(__pyx_args)) {
5569  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5570  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5571  case 0: break;
5572  default: goto __pyx_L5_argtuple_error;
5573  }
5574  }
5575  __pyx_v_other = values[0];
5576  __pyx_v_ixt = values[1];
5577  }
5578  goto __pyx_L4_argument_unpacking_done;
5579  __pyx_L5_argtuple_error:;
5580  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5581  __pyx_L3_error:;
5582  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5583  __Pyx_RefNannyFinishContext();
5584  return -1;
5585  __pyx_L4_argument_unpacking_done:;
5586  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
5587 
5588  /* function exit code */
5589  __Pyx_RefNannyFinishContext();
5590  return __pyx_r;
5591  }
5592 
5593  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
5594  PyObject *__pyx_v_error_msg_prefix = NULL;
5595  PyObject *__pyx_v_err = NULL;
5596  int __pyx_r;
5597  __Pyx_RefNannyDeclarations
5598  int __pyx_t_1;
5599  int __pyx_t_2;
5600  PyObject *__pyx_t_3 = NULL;
5601  PyObject *__pyx_t_4 = NULL;
5602  PyObject *__pyx_t_5 = NULL;
5603  Clifford *__pyx_t_6;
5604  PyObject *__pyx_t_7 = NULL;
5605  PyObject *__pyx_t_8 = NULL;
5606  scalar_t __pyx_t_9;
5607  PyObject *__pyx_t_10 = NULL;
5608  PyObject *__pyx_t_11 = NULL;
5609  PyObject *__pyx_t_12 = NULL;
5610  char *__pyx_t_13;
5611  int __pyx_t_14;
5612  PyObject *__pyx_t_15 = NULL;
5613  PyObject *__pyx_t_16 = NULL;
5614  PyObject *__pyx_t_17 = NULL;
5615  PyObject *__pyx_t_18 = NULL;
5616  int __pyx_lineno = 0;
5617  const char *__pyx_filename = NULL;
5618  int __pyx_clineno = 0;
5619  __Pyx_RefNannySetupContext("__cinit__", 0);
5620 
5621  /* "PyClical.pyx":588
5622  * 2{1}+3{2}
5623  * """
5624  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
5625  * if ixt is None:
5626  * try:
5627  */
5628  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
5629  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
5630 
5631  /* "PyClical.pyx":589
5632  * """
5633  * error_msg_prefix = "Cannot initialize clifford object from"
5634  * if ixt is None: # <<<<<<<<<<<<<<
5635  * try:
5636  * if isinstance(other, clifford):
5637  */
5638  __pyx_t_1 = (__pyx_v_ixt == Py_None);
5639  __pyx_t_2 = (__pyx_t_1 != 0);
5640  if (__pyx_t_2) {
5641 
5642  /* "PyClical.pyx":590
5643  * error_msg_prefix = "Cannot initialize clifford object from"
5644  * if ixt is None:
5645  * try: # <<<<<<<<<<<<<<
5646  * if isinstance(other, clifford):
5647  * self.instance = new Clifford((<clifford>other).unwrap())
5648  */
5649  {
5650  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
5651  __Pyx_XGOTREF(__pyx_t_3);
5652  __Pyx_XGOTREF(__pyx_t_4);
5653  __Pyx_XGOTREF(__pyx_t_5);
5654  /*try:*/ {
5655 
5656  /* "PyClical.pyx":591
5657  * if ixt is None:
5658  * try:
5659  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
5660  * self.instance = new Clifford((<clifford>other).unwrap())
5661  * elif isinstance(other, index_set):
5662  */
5663  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_clifford));
5664  __pyx_t_1 = (__pyx_t_2 != 0);
5665  if (__pyx_t_1) {
5666 
5667  /* "PyClical.pyx":592
5668  * try:
5669  * if isinstance(other, clifford):
5670  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
5671  * elif isinstance(other, index_set):
5672  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5673  */
5674  try {
5675  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
5676  } catch(...) {
5677  __Pyx_CppExn2PyErr();
5678  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5679  }
5680  __pyx_v_self->instance = __pyx_t_6;
5681  goto __pyx_L12;
5682  }
5683 
5684  /* "PyClical.pyx":593
5685  * if isinstance(other, clifford):
5686  * self.instance = new Clifford((<clifford>other).unwrap())
5687  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
5688  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5689  * elif isinstance(other, numbers.Real):
5690  */
5691  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, ((PyObject*)__pyx_ptype_8PyClical_index_set));
5692  __pyx_t_2 = (__pyx_t_1 != 0);
5693  if (__pyx_t_2) {
5694 
5695  /* "PyClical.pyx":594
5696  * self.instance = new Clifford((<clifford>other).unwrap())
5697  * elif isinstance(other, index_set):
5698  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
5699  * elif isinstance(other, numbers.Real):
5700  * self.instance = new Clifford(<scalar_t>other)
5701  */
5702  try {
5703  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
5704  } catch(...) {
5705  __Pyx_CppExn2PyErr();
5706  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5707  }
5708  __pyx_v_self->instance = __pyx_t_6;
5709  goto __pyx_L12;
5710  }
5711 
5712  /* "PyClical.pyx":595
5713  * elif isinstance(other, index_set):
5714  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5715  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
5716  * self.instance = new Clifford(<scalar_t>other)
5717  * elif isinstance(other, str):
5718  */
5719  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5720  __Pyx_GOTREF(__pyx_t_7);
5721  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Real); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5722  __Pyx_GOTREF(__pyx_t_8);
5723  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5724  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_8); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5725  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5726  __pyx_t_1 = (__pyx_t_2 != 0);
5727  if (__pyx_t_1) {
5728 
5729  /* "PyClical.pyx":596
5730  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
5731  * elif isinstance(other, numbers.Real):
5732  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
5733  * elif isinstance(other, str):
5734  * try:
5735  */
5736  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == (scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5737  try {
5738  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
5739  } catch(...) {
5740  __Pyx_CppExn2PyErr();
5741  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5742  }
5743  __pyx_v_self->instance = __pyx_t_6;
5744  goto __pyx_L12;
5745  }
5746 
5747  /* "PyClical.pyx":597
5748  * elif isinstance(other, numbers.Real):
5749  * self.instance = new Clifford(<scalar_t>other)
5750  * elif isinstance(other, str): # <<<<<<<<<<<<<<
5751  * try:
5752  * self.instance = new Clifford(<char *>other)
5753  */
5754  __pyx_t_1 = PyString_Check(__pyx_v_other);
5755  __pyx_t_2 = (__pyx_t_1 != 0);
5756  if (__pyx_t_2) {
5757 
5758  /* "PyClical.pyx":598
5759  * self.instance = new Clifford(<scalar_t>other)
5760  * elif isinstance(other, str):
5761  * try: # <<<<<<<<<<<<<<
5762  * self.instance = new Clifford(<char *>other)
5763  * except RuntimeError:
5764  */
5765  {
5766  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
5767  __Pyx_XGOTREF(__pyx_t_10);
5768  __Pyx_XGOTREF(__pyx_t_11);
5769  __Pyx_XGOTREF(__pyx_t_12);
5770  /*try:*/ {
5771 
5772  /* "PyClical.pyx":599
5773  * elif isinstance(other, str):
5774  * try:
5775  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
5776  * except RuntimeError:
5777  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
5778  */
5779  __pyx_t_13 = __Pyx_PyObject_AsString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
5780  try {
5781  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
5782  } catch(...) {
5783  __Pyx_CppExn2PyErr();
5784  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
5785  }
5786  __pyx_v_self->instance = __pyx_t_6;
5787  }
5788  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
5789  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
5790  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
5791  goto __pyx_L20_try_end;
5792  __pyx_L13_error:;
5793  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5794  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5795 
5796  /* "PyClical.pyx":600
5797  * try:
5798  * self.instance = new Clifford(<char *>other)
5799  * except RuntimeError: # <<<<<<<<<<<<<<
5800  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
5801  * else:
5802  */
5803  __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5804  if (__pyx_t_14) {
5805  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5806  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5807  __Pyx_GOTREF(__pyx_t_8);
5808  __Pyx_GOTREF(__pyx_t_7);
5809  __Pyx_GOTREF(__pyx_t_15);
5810 
5811  /* "PyClical.pyx":601
5812  * self.instance = new Clifford(<char *>other)
5813  * except RuntimeError:
5814  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
5815  * else:
5816  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
5817  */
5818  __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5819  __Pyx_GOTREF(__pyx_t_16);
5820  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5821  __Pyx_GOTREF(__pyx_t_17);
5822  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5823  __Pyx_GOTREF(__pyx_t_18);
5824  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5825  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5826  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5827  __Pyx_GOTREF(__pyx_t_17);
5828  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5829  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5830  __Pyx_GOTREF(__pyx_t_18);
5831  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
5832  __Pyx_GIVEREF(__pyx_t_17);
5833  __pyx_t_17 = 0;
5834  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5835  __Pyx_GOTREF(__pyx_t_17);
5836  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5837  __Pyx_Raise(__pyx_t_17, 0, 0, 0);
5838  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5839  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
5840  }
5841  goto __pyx_L15_except_error;
5842  __pyx_L15_except_error:;
5843  __Pyx_XGIVEREF(__pyx_t_10);
5844  __Pyx_XGIVEREF(__pyx_t_11);
5845  __Pyx_XGIVEREF(__pyx_t_12);
5846  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
5847  goto __pyx_L4_error;
5848  __pyx_L20_try_end:;
5849  }
5850  goto __pyx_L12;
5851  }
5852  /*else*/ {
5853 
5854  /* "PyClical.pyx":603
5855  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
5856  * else:
5857  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
5858  * except RuntimeError as err:
5859  * raise ValueError(error_msg_prefix + " " + str(type(other))
5860  */
5861  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5862  __Pyx_GOTREF(__pyx_t_15);
5863  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5864  __Pyx_GOTREF(__pyx_t_7);
5865  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5866  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5867  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5868  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5869  __Pyx_GOTREF(__pyx_t_8);
5870  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5871  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5872  __Pyx_GOTREF(__pyx_t_7);
5873  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
5874  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5875  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5876  __Pyx_GOTREF(__pyx_t_8);
5877  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5878  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5879  __Pyx_GOTREF(__pyx_t_7);
5880  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
5881  __Pyx_GIVEREF(__pyx_t_8);
5882  __pyx_t_8 = 0;
5883  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5884  __Pyx_GOTREF(__pyx_t_8);
5885  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5886  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
5887  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5888  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
5889  }
5890  __pyx_L12:;
5891  }
5892  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5893  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5894  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
5895  goto __pyx_L11_try_end;
5896  __pyx_L4_error:;
5897  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
5898  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
5899  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
5900  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
5901  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
5902  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5903 
5904  /* "PyClical.pyx":604
5905  * else:
5906  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
5907  * except RuntimeError as err: # <<<<<<<<<<<<<<
5908  * raise ValueError(error_msg_prefix + " " + str(type(other))
5909  * + " value " + repr(other) + ":"
5910  */
5911  __pyx_t_14 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
5912  if (__pyx_t_14) {
5913  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5914  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5915  __Pyx_GOTREF(__pyx_t_8);
5916  __Pyx_GOTREF(__pyx_t_7);
5917  __Pyx_GOTREF(__pyx_t_15);
5918  __Pyx_INCREF(__pyx_t_7);
5919  __pyx_v_err = __pyx_t_7;
5920 
5921  /* "PyClical.pyx":605
5922  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
5923  * except RuntimeError as err:
5924  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
5925  * + " value " + repr(other) + ":"
5926  * + "\n\t" + str(err))
5927  */
5928  __pyx_t_17 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5929  __Pyx_GOTREF(__pyx_t_17);
5930  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5931  __Pyx_GOTREF(__pyx_t_18);
5932  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5933  PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
5934  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
5935  __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5936  __Pyx_GOTREF(__pyx_t_16);
5937  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5938  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5939  __Pyx_GOTREF(__pyx_t_18);
5940  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5941  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5942 
5943  /* "PyClical.pyx":606
5944  * except RuntimeError as err:
5945  * raise ValueError(error_msg_prefix + " " + str(type(other))
5946  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
5947  * + "\n\t" + str(err))
5948  * elif isinstance(ixt, index_set):
5949  */
5950  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_value); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5951  __Pyx_GOTREF(__pyx_t_16);
5952  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5953  __pyx_t_18 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5954  __Pyx_GOTREF(__pyx_t_18);
5955  __pyx_t_17 = PyNumber_Add(__pyx_t_16, __pyx_t_18); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5956  __Pyx_GOTREF(__pyx_t_17);
5957  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5958  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5959  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_kp_s__3); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5960  __Pyx_GOTREF(__pyx_t_18);
5961  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5962 
5963  /* "PyClical.pyx":607
5964  * raise ValueError(error_msg_prefix + " " + str(type(other))
5965  * + " value " + repr(other) + ":"
5966  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
5967  * elif isinstance(ixt, index_set):
5968  * if isinstance(other, numbers.Real):
5969  */
5970  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s__4); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5971  __Pyx_GOTREF(__pyx_t_17);
5972  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5973  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5974  __Pyx_GOTREF(__pyx_t_18);
5975  __Pyx_INCREF(__pyx_v_err);
5976  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
5977  __Pyx_GIVEREF(__pyx_v_err);
5978  __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5979  __Pyx_GOTREF(__pyx_t_16);
5980  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
5981  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5982  __Pyx_GOTREF(__pyx_t_18);
5983  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
5984  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
5985 
5986  /* "PyClical.pyx":605
5987  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
5988  * except RuntimeError as err:
5989  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
5990  * + " value " + repr(other) + ":"
5991  * + "\n\t" + str(err))
5992  */
5993  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5994  __Pyx_GOTREF(__pyx_t_16);
5995  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
5996  __Pyx_GIVEREF(__pyx_t_18);
5997  __pyx_t_18 = 0;
5998  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
5999  __Pyx_GOTREF(__pyx_t_18);
6000  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6001  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6002  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6003  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6004  }
6005  goto __pyx_L6_except_error;
6006  __pyx_L6_except_error:;
6007  __Pyx_XGIVEREF(__pyx_t_3);
6008  __Pyx_XGIVEREF(__pyx_t_4);
6009  __Pyx_XGIVEREF(__pyx_t_5);
6010  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6011  goto __pyx_L1_error;
6012  __pyx_L11_try_end:;
6013  }
6014  goto __pyx_L3;
6015  }
6016 
6017  /* "PyClical.pyx":608
6018  * + " value " + repr(other) + ":"
6019  * + "\n\t" + str(err))
6020  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6021  * if isinstance(other, numbers.Real):
6022  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6023  */
6024  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
6025  __pyx_t_1 = (__pyx_t_2 != 0);
6026  if (__pyx_t_1) {
6027 
6028  /* "PyClical.pyx":609
6029  * + "\n\t" + str(err))
6030  * elif isinstance(ixt, index_set):
6031  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6032  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6033  * elif isinstance(other, collections.Sequence):
6034  */
6035  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6036  __Pyx_GOTREF(__pyx_t_15);
6037  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_Real); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6038  __Pyx_GOTREF(__pyx_t_7);
6039  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6040  __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6041  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6042  __pyx_t_2 = (__pyx_t_1 != 0);
6043  if (__pyx_t_2) {
6044 
6045  /* "PyClical.pyx":610
6046  * elif isinstance(ixt, index_set):
6047  * if isinstance(other, numbers.Real):
6048  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6049  * elif isinstance(other, collections.Sequence):
6050  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6051  */
6052  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == (scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6053  try {
6054  __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));
6055  } catch(...) {
6056  __Pyx_CppExn2PyErr();
6057  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6058  }
6059  __pyx_v_self->instance = __pyx_t_6;
6060  goto __pyx_L25;
6061  }
6062 
6063  /* "PyClical.pyx":611
6064  * if isinstance(other, numbers.Real):
6065  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6066  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6067  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6068  * else:
6069  */
6070  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6071  __Pyx_GOTREF(__pyx_t_7);
6072  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6073  __Pyx_GOTREF(__pyx_t_15);
6074  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6075  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_15); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6076  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6077  __pyx_t_1 = (__pyx_t_2 != 0);
6078  if (__pyx_t_1) {
6079 
6080  /* "PyClical.pyx":612
6081  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6082  * elif isinstance(other, collections.Sequence):
6083  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6084  * else:
6085  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6086  */
6087  try {
6088  __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)));
6089  } catch(...) {
6090  __Pyx_CppExn2PyErr();
6091  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6092  }
6093  __pyx_v_self->instance = __pyx_t_6;
6094  goto __pyx_L25;
6095  }
6096  /*else*/ {
6097 
6098  /* "PyClical.pyx":614
6099  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6100  * else:
6101  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6102  * + ", " + repr(ixt) + ").")
6103  * else:
6104  */
6105  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__5); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6106  __Pyx_GOTREF(__pyx_t_15);
6107  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6108  __Pyx_GOTREF(__pyx_t_7);
6109  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6110  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6111  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6112  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6113  __Pyx_GOTREF(__pyx_t_8);
6114  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6115  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6116  __Pyx_GOTREF(__pyx_t_7);
6117  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6118  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6119 
6120  /* "PyClical.pyx":615
6121  * else:
6122  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6123  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
6124  * else:
6125  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6126  */
6127  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6128  __Pyx_GOTREF(__pyx_t_8);
6129  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6130  __pyx_t_7 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6131  __Pyx_GOTREF(__pyx_t_7);
6132  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6133  __Pyx_GOTREF(__pyx_t_15);
6134  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6135  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6136  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6137  __Pyx_GOTREF(__pyx_t_7);
6138  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6139 
6140  /* "PyClical.pyx":614
6141  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6142  * else:
6143  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6144  * + ", " + repr(ixt) + ").")
6145  * else:
6146  */
6147  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6148  __Pyx_GOTREF(__pyx_t_15);
6149  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6150  __Pyx_GIVEREF(__pyx_t_7);
6151  __pyx_t_7 = 0;
6152  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6153  __Pyx_GOTREF(__pyx_t_7);
6154  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6155  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6156  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6157  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6158  }
6159  __pyx_L25:;
6160  goto __pyx_L3;
6161  }
6162  /*else*/ {
6163 
6164  /* "PyClical.pyx":617
6165  * + ", " + repr(ixt) + ").")
6166  * else:
6167  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6168  * + ", " + str(type(ixt)) + ").")
6169  *
6170  */
6171  __pyx_t_7 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6172  __Pyx_GOTREF(__pyx_t_7);
6173  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6174  __Pyx_GOTREF(__pyx_t_15);
6175  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6176  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6177  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6178  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_15, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6179  __Pyx_GOTREF(__pyx_t_8);
6180  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6181  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6182  __Pyx_GOTREF(__pyx_t_15);
6183  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6184  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6185 
6186  /* "PyClical.pyx":618
6187  * else:
6188  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6189  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
6190  *
6191  * def __dealloc__(self):
6192  */
6193  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6194  __Pyx_GOTREF(__pyx_t_8);
6195  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6196  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6197  __Pyx_GOTREF(__pyx_t_15);
6198  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6199  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
6200  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6201  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6202  __Pyx_GOTREF(__pyx_t_7);
6203  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6204  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6205  __Pyx_GOTREF(__pyx_t_15);
6206  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6207  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6208  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6209  __Pyx_GOTREF(__pyx_t_7);
6210  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6211 
6212  /* "PyClical.pyx":617
6213  * + ", " + repr(ixt) + ").")
6214  * else:
6215  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6216  * + ", " + str(type(ixt)) + ").")
6217  *
6218  */
6219  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6220  __Pyx_GOTREF(__pyx_t_15);
6221  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
6222  __Pyx_GIVEREF(__pyx_t_7);
6223  __pyx_t_7 = 0;
6224  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6225  __Pyx_GOTREF(__pyx_t_7);
6226  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6227  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
6228  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6229  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6230  }
6231  __pyx_L3:;
6232 
6233  /* "PyClical.pyx":563
6234  * return clifford(self)
6235  *
6236  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6237  * """
6238  * Construct an object of type clifford.
6239  */
6240 
6241  /* function exit code */
6242  __pyx_r = 0;
6243  goto __pyx_L0;
6244  __pyx_L1_error:;
6245  __Pyx_XDECREF(__pyx_t_7);
6246  __Pyx_XDECREF(__pyx_t_8);
6247  __Pyx_XDECREF(__pyx_t_15);
6248  __Pyx_XDECREF(__pyx_t_16);
6249  __Pyx_XDECREF(__pyx_t_17);
6250  __Pyx_XDECREF(__pyx_t_18);
6251  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6252  __pyx_r = -1;
6253  __pyx_L0:;
6254  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6255  __Pyx_XDECREF(__pyx_v_err);
6256  __Pyx_RefNannyFinishContext();
6257  return __pyx_r;
6258  }
6259 
6260  /* "PyClical.pyx":620
6261  * + ", " + str(type(ixt)) + ").")
6262  *
6263  * def __dealloc__(self): # <<<<<<<<<<<<<<
6264  * """
6265  * Clean up by deallocating the instance of C++ class Clifford.
6266  */
6267 
6268  /* Python wrapper */
6269  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
6270  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
6271  __Pyx_RefNannyDeclarations
6272  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
6273  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6274 
6275  /* function exit code */
6276  __Pyx_RefNannyFinishContext();
6277  }
6278 
6279  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6280  __Pyx_RefNannyDeclarations
6281  __Pyx_RefNannySetupContext("__dealloc__", 0);
6282 
6283  /* "PyClical.pyx":624
6284  * Clean up by deallocating the instance of C++ class Clifford.
6285  * """
6286  * del self.instance # <<<<<<<<<<<<<<
6287  *
6288  * def __contains__(self, x):
6289  */
6290  delete __pyx_v_self->instance;
6291 
6292  /* "PyClical.pyx":620
6293  * + ", " + str(type(ixt)) + ").")
6294  *
6295  * def __dealloc__(self): # <<<<<<<<<<<<<<
6296  * """
6297  * Clean up by deallocating the instance of C++ class Clifford.
6298  */
6299 
6300  /* function exit code */
6301  __Pyx_RefNannyFinishContext();
6302  }
6303 
6304  /* "PyClical.pyx":626
6305  * del self.instance
6306  *
6307  * def __contains__(self, x): # <<<<<<<<<<<<<<
6308  * """
6309  * Not applicable.
6310  */
6311 
6312  /* Python wrapper */
6313  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
6314  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 ";
6315  #if CYTHON_COMPILING_IN_CPYTHON
6316  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
6317  #endif
6318  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
6319  int __pyx_r;
6320  __Pyx_RefNannyDeclarations
6321  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
6322  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
6323 
6324  /* function exit code */
6325  __Pyx_RefNannyFinishContext();
6326  return __pyx_r;
6327  }
6328 
6329  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
6330  int __pyx_r;
6331  __Pyx_RefNannyDeclarations
6332  PyObject *__pyx_t_1 = NULL;
6333  int __pyx_lineno = 0;
6334  const char *__pyx_filename = NULL;
6335  int __pyx_clineno = 0;
6336  __Pyx_RefNannySetupContext("__contains__", 0);
6337 
6338  /* "PyClical.pyx":635
6339  * TypeError: Not applicable.
6340  * """
6341  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
6342  *
6343  * def __iter__(self):
6344  */
6345  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6346  __Pyx_GOTREF(__pyx_t_1);
6347  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6348  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6349  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6350 
6351  /* "PyClical.pyx":626
6352  * del self.instance
6353  *
6354  * def __contains__(self, x): # <<<<<<<<<<<<<<
6355  * """
6356  * Not applicable.
6357  */
6358 
6359  /* function exit code */
6360  __pyx_L1_error:;
6361  __Pyx_XDECREF(__pyx_t_1);
6362  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6363  __pyx_r = -1;
6364  __Pyx_RefNannyFinishContext();
6365  return __pyx_r;
6366  }
6367 
6368  /* "PyClical.pyx":637
6369  * raise TypeError("Not applicable.")
6370  *
6371  * def __iter__(self): # <<<<<<<<<<<<<<
6372  * """
6373  * Not applicable.
6374  */
6375 
6376  /* Python wrapper */
6377  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
6378  static char __pyx_doc_8PyClical_8clifford_8__iter__[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})): print a,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
6379  #if CYTHON_COMPILING_IN_CPYTHON
6380  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
6381  #endif
6382  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
6383  PyObject *__pyx_r = 0;
6384  __Pyx_RefNannyDeclarations
6385  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
6386  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6387 
6388  /* function exit code */
6389  __Pyx_RefNannyFinishContext();
6390  return __pyx_r;
6391  }
6392 
6393  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6394  PyObject *__pyx_r = NULL;
6395  __Pyx_RefNannyDeclarations
6396  PyObject *__pyx_t_1 = NULL;
6397  int __pyx_lineno = 0;
6398  const char *__pyx_filename = NULL;
6399  int __pyx_clineno = 0;
6400  __Pyx_RefNannySetupContext("__iter__", 0);
6401 
6402  /* "PyClical.pyx":646
6403  * TypeError: Not applicable.
6404  * """
6405  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
6406  *
6407  * def reframe(self, ixt):
6408  */
6409  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6410  __Pyx_GOTREF(__pyx_t_1);
6411  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6412  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6413  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6414 
6415  /* "PyClical.pyx":637
6416  * raise TypeError("Not applicable.")
6417  *
6418  * def __iter__(self): # <<<<<<<<<<<<<<
6419  * """
6420  * Not applicable.
6421  */
6422 
6423  /* function exit code */
6424  __pyx_L1_error:;
6425  __Pyx_XDECREF(__pyx_t_1);
6426  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6427  __pyx_r = NULL;
6428  __Pyx_XGIVEREF(__pyx_r);
6429  __Pyx_RefNannyFinishContext();
6430  return __pyx_r;
6431  }
6432 
6433  /* "PyClical.pyx":648
6434  * raise TypeError("Not applicable.")
6435  *
6436  * def reframe(self, ixt): # <<<<<<<<<<<<<<
6437  * """
6438  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
6439  */
6440 
6441  /* Python wrapper */
6442  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
6443  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 ";
6444  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
6445  PyObject *__pyx_r = 0;
6446  __Pyx_RefNannyDeclarations
6447  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
6448  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
6449 
6450  /* function exit code */
6451  __Pyx_RefNannyFinishContext();
6452  return __pyx_r;
6453  }
6454 
6455  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
6456  PyObject *__pyx_v_error_msg_prefix = NULL;
6457  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
6458  PyObject *__pyx_v_err = NULL;
6459  PyObject *__pyx_r = NULL;
6460  __Pyx_RefNannyDeclarations
6461  int __pyx_t_1;
6462  int __pyx_t_2;
6463  PyObject *__pyx_t_3 = NULL;
6464  PyObject *__pyx_t_4 = NULL;
6465  PyObject *__pyx_t_5 = NULL;
6466  PyObject *__pyx_t_6 = NULL;
6467  Clifford *__pyx_t_7;
6468  int __pyx_t_8;
6469  PyObject *__pyx_t_9 = NULL;
6470  PyObject *__pyx_t_10 = NULL;
6471  PyObject *__pyx_t_11 = NULL;
6472  PyObject *__pyx_t_12 = NULL;
6473  PyObject *__pyx_t_13 = NULL;
6474  int __pyx_lineno = 0;
6475  const char *__pyx_filename = NULL;
6476  int __pyx_clineno = 0;
6477  __Pyx_RefNannySetupContext("reframe", 0);
6478 
6479  /* "PyClical.pyx":658
6480  * True
6481  * """
6482  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
6483  * if isinstance(ixt, index_set):
6484  * try:
6485  */
6486  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
6487  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
6488 
6489  /* "PyClical.pyx":659
6490  * """
6491  * error_msg_prefix = "Cannot reframe"
6492  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6493  * try:
6494  * result = clifford()
6495  */
6496  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, ((PyObject*)__pyx_ptype_8PyClical_index_set));
6497  __pyx_t_2 = (__pyx_t_1 != 0);
6498  if (__pyx_t_2) {
6499 
6500  /* "PyClical.pyx":660
6501  * error_msg_prefix = "Cannot reframe"
6502  * if isinstance(ixt, index_set):
6503  * try: # <<<<<<<<<<<<<<
6504  * result = clifford()
6505  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6506  */
6507  {
6508  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6509  __Pyx_XGOTREF(__pyx_t_3);
6510  __Pyx_XGOTREF(__pyx_t_4);
6511  __Pyx_XGOTREF(__pyx_t_5);
6512  /*try:*/ {
6513 
6514  /* "PyClical.pyx":661
6515  * if isinstance(ixt, index_set):
6516  * try:
6517  * result = clifford() # <<<<<<<<<<<<<<
6518  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6519  * except RuntimeError as err:
6520  */
6521  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
6522  __Pyx_GOTREF(__pyx_t_6);
6523  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
6524  __pyx_t_6 = 0;
6525 
6526  /* "PyClical.pyx":662
6527  * try:
6528  * result = clifford()
6529  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6530  * except RuntimeError as err:
6531  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6532  */
6533  try {
6534  __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)));
6535  } catch(...) {
6536  __Pyx_CppExn2PyErr();
6537  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
6538  }
6539  __pyx_v_result->instance = __pyx_t_7;
6540  }
6541  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6542  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6543  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6544  goto __pyx_L11_try_end;
6545  __pyx_L4_error:;
6546  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6547 
6548  /* "PyClical.pyx":663
6549  * result = clifford()
6550  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6551  * except RuntimeError as err: # <<<<<<<<<<<<<<
6552  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6553  * + str(ixt) + ":"
6554  */
6555  __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6556  if (__pyx_t_8) {
6557  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6558  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6559  __Pyx_GOTREF(__pyx_t_6);
6560  __Pyx_GOTREF(__pyx_t_9);
6561  __Pyx_GOTREF(__pyx_t_10);
6562  __Pyx_INCREF(__pyx_t_9);
6563  __pyx_v_err = __pyx_t_9;
6564 
6565  /* "PyClical.pyx":664
6566  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6567  * except RuntimeError as err:
6568  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
6569  * + str(ixt) + ":"
6570  * + "\n\t" + str(err))
6571  */
6572  __pyx_t_11 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_from); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6573  __Pyx_GOTREF(__pyx_t_11);
6574  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6575  __Pyx_GOTREF(__pyx_t_12);
6576  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6577  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
6578  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6579  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6580  __Pyx_GOTREF(__pyx_t_13);
6581  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6582  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6583  __Pyx_GOTREF(__pyx_t_12);
6584  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6585  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6586  __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_kp_s_to_frame); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6587  __Pyx_GOTREF(__pyx_t_13);
6588  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6589 
6590  /* "PyClical.pyx":665
6591  * except RuntimeError as err:
6592  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6593  * + str(ixt) + ":" # <<<<<<<<<<<<<<
6594  * + "\n\t" + str(err))
6595  * else:
6596  */
6597  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6598  __Pyx_GOTREF(__pyx_t_12);
6599  __Pyx_INCREF(__pyx_v_ixt);
6600  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
6601  __Pyx_GIVEREF(__pyx_v_ixt);
6602  __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6603  __Pyx_GOTREF(__pyx_t_11);
6604  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6605  __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6606  __Pyx_GOTREF(__pyx_t_12);
6607  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6608  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6609  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_kp_s__3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6610  __Pyx_GOTREF(__pyx_t_11);
6611  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6612 
6613  /* "PyClical.pyx":666
6614  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
6615  * + str(ixt) + ":"
6616  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6617  * else:
6618  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
6619  */
6620  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_kp_s__4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6621  __Pyx_GOTREF(__pyx_t_12);
6622  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6623  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6624  __Pyx_GOTREF(__pyx_t_11);
6625  __Pyx_INCREF(__pyx_v_err);
6626  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
6627  __Pyx_GIVEREF(__pyx_v_err);
6628  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6629  __Pyx_GOTREF(__pyx_t_13);
6630  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6631  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6632  __Pyx_GOTREF(__pyx_t_11);
6633  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
6634  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6635 
6636  /* "PyClical.pyx":664
6637  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
6638  * except RuntimeError as err:
6639  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
6640  * + str(ixt) + ":"
6641  * + "\n\t" + str(err))
6642  */
6643  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6644  __Pyx_GOTREF(__pyx_t_13);
6645  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
6646  __Pyx_GIVEREF(__pyx_t_11);
6647  __pyx_t_11 = 0;
6648  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6649  __Pyx_GOTREF(__pyx_t_11);
6650  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
6651  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
6652  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
6653  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
6654  }
6655  goto __pyx_L6_except_error;
6656  __pyx_L6_except_error:;
6657  __Pyx_XGIVEREF(__pyx_t_3);
6658  __Pyx_XGIVEREF(__pyx_t_4);
6659  __Pyx_XGIVEREF(__pyx_t_5);
6660  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6661  goto __pyx_L1_error;
6662  __pyx_L11_try_end:;
6663  }
6664  goto __pyx_L3;
6665  }
6666  /*else*/ {
6667 
6668  /* "PyClical.pyx":668
6669  * + "\n\t" + str(err))
6670  * else:
6671  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
6672  * return result
6673  *
6674  */
6675  __pyx_t_10 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_using); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6676  __Pyx_GOTREF(__pyx_t_10);
6677  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6678  __Pyx_GOTREF(__pyx_t_9);
6679  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6680  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
6681  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
6682  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6683  __Pyx_GOTREF(__pyx_t_6);
6684  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6685  __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6686  __Pyx_GOTREF(__pyx_t_9);
6687  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6688  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6689  __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6690  __Pyx_GOTREF(__pyx_t_6);
6691  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6692  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6693  __Pyx_GOTREF(__pyx_t_9);
6694  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
6695  __Pyx_GIVEREF(__pyx_t_6);
6696  __pyx_t_6 = 0;
6697  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6698  __Pyx_GOTREF(__pyx_t_6);
6699  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
6700  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6701  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6702  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6703  }
6704  __pyx_L3:;
6705 
6706  /* "PyClical.pyx":669
6707  * else:
6708  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
6709  * return result # <<<<<<<<<<<<<<
6710  *
6711  * def __richcmp__(lhs, rhs, int op):
6712  */
6713  __Pyx_XDECREF(__pyx_r);
6714  __Pyx_INCREF(((PyObject *)__pyx_v_result));
6715  __pyx_r = ((PyObject *)__pyx_v_result);
6716  goto __pyx_L0;
6717 
6718  /* "PyClical.pyx":648
6719  * raise TypeError("Not applicable.")
6720  *
6721  * def reframe(self, ixt): # <<<<<<<<<<<<<<
6722  * """
6723  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
6724  */
6725 
6726  /* function exit code */
6727  __pyx_L1_error:;
6728  __Pyx_XDECREF(__pyx_t_6);
6729  __Pyx_XDECREF(__pyx_t_9);
6730  __Pyx_XDECREF(__pyx_t_10);
6731  __Pyx_XDECREF(__pyx_t_11);
6732  __Pyx_XDECREF(__pyx_t_12);
6733  __Pyx_XDECREF(__pyx_t_13);
6734  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
6735  __pyx_r = NULL;
6736  __pyx_L0:;
6737  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
6738  __Pyx_XDECREF((PyObject *)__pyx_v_result);
6739  __Pyx_XDECREF(__pyx_v_err);
6740  __Pyx_XGIVEREF(__pyx_r);
6741  __Pyx_RefNannyFinishContext();
6742  return __pyx_r;
6743  }
6744 
6745  /* "PyClical.pyx":671
6746  * return result
6747  *
6748  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
6749  * """
6750  * Compare objects of type clifford.
6751  */
6752 
6753  /* Python wrapper */
6754  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
6755  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
6756  PyObject *__pyx_r = 0;
6757  __Pyx_RefNannyDeclarations
6758  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
6759  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
6760 
6761  /* function exit code */
6762  __Pyx_RefNannyFinishContext();
6763  return __pyx_r;
6764  }
6765 
6766  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
6767  PyObject *__pyx_r = NULL;
6768  __Pyx_RefNannyDeclarations
6769  int __pyx_t_1;
6770  int __pyx_t_2;
6771  int __pyx_t_3;
6772  PyObject *__pyx_t_4 = NULL;
6773  PyObject *__pyx_t_5 = NULL;
6774  PyObject *__pyx_t_6 = NULL;
6775  int __pyx_lineno = 0;
6776  const char *__pyx_filename = NULL;
6777  int __pyx_clineno = 0;
6778  __Pyx_RefNannySetupContext("__richcmp__", 0);
6779 
6780  /* "PyClical.pyx":690
6781  * True
6782  * """
6783  * if op == 2: # == # <<<<<<<<<<<<<<
6784  * if (lhs is None) or (rhs is None):
6785  * return bool(lhs is rhs)
6786  */
6787  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
6788  if (__pyx_t_1) {
6789 
6790  /* "PyClical.pyx":691
6791  * """
6792  * if op == 2: # ==
6793  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
6794  * return bool(lhs is rhs)
6795  * else:
6796  */
6797  __pyx_t_2 = (__pyx_v_lhs == Py_None);
6798  __pyx_t_3 = (__pyx_t_2 != 0);
6799  if (!__pyx_t_3) {
6800  goto __pyx_L6_next_or;
6801  } else {
6802  __pyx_t_1 = __pyx_t_3;
6803  goto __pyx_L5_bool_binop_done;
6804  }
6805  __pyx_L6_next_or:;
6806  __pyx_t_3 = (__pyx_v_rhs == Py_None);
6807  __pyx_t_2 = (__pyx_t_3 != 0);
6808  __pyx_t_1 = __pyx_t_2;
6809  __pyx_L5_bool_binop_done:;
6810  if (__pyx_t_1) {
6811 
6812  /* "PyClical.pyx":692
6813  * if op == 2: # ==
6814  * if (lhs is None) or (rhs is None):
6815  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
6816  * else:
6817  * return bool( toClifford(lhs) == toClifford(rhs) )
6818  */
6819  __Pyx_XDECREF(__pyx_r);
6820  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
6821  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6822  __Pyx_GOTREF(__pyx_t_4);
6823  __pyx_r = __pyx_t_4;
6824  __pyx_t_4 = 0;
6825  goto __pyx_L0;
6826  }
6827  /*else*/ {
6828 
6829  /* "PyClical.pyx":694
6830  * return bool(lhs is rhs)
6831  * else:
6832  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
6833  * elif op == 3: # !=
6834  * if (lhs is None) or (rhs is None):
6835  */
6836  __Pyx_XDECREF(__pyx_r);
6837  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
6838  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6839  __Pyx_GOTREF(__pyx_t_4);
6840  __pyx_r = __pyx_t_4;
6841  __pyx_t_4 = 0;
6842  goto __pyx_L0;
6843  }
6844  }
6845 
6846  /* "PyClical.pyx":695
6847  * else:
6848  * return bool( toClifford(lhs) == toClifford(rhs) )
6849  * elif op == 3: # != # <<<<<<<<<<<<<<
6850  * if (lhs is None) or (rhs is None):
6851  * return not bool(lhs is rhs)
6852  */
6853  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
6854  if (__pyx_t_1) {
6855 
6856  /* "PyClical.pyx":696
6857  * return bool( toClifford(lhs) == toClifford(rhs) )
6858  * elif op == 3: # !=
6859  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
6860  * return not bool(lhs is rhs)
6861  * else:
6862  */
6863  __pyx_t_2 = (__pyx_v_lhs == Py_None);
6864  __pyx_t_3 = (__pyx_t_2 != 0);
6865  if (!__pyx_t_3) {
6866  goto __pyx_L9_next_or;
6867  } else {
6868  __pyx_t_1 = __pyx_t_3;
6869  goto __pyx_L8_bool_binop_done;
6870  }
6871  __pyx_L9_next_or:;
6872  __pyx_t_3 = (__pyx_v_rhs == Py_None);
6873  __pyx_t_2 = (__pyx_t_3 != 0);
6874  __pyx_t_1 = __pyx_t_2;
6875  __pyx_L8_bool_binop_done:;
6876  if (__pyx_t_1) {
6877 
6878  /* "PyClical.pyx":697
6879  * elif op == 3: # !=
6880  * if (lhs is None) or (rhs is None):
6881  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
6882  * else:
6883  * return bool( toClifford(lhs) != toClifford(rhs) )
6884  */
6885  __Pyx_XDECREF(__pyx_r);
6886  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
6887  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6888  __Pyx_GOTREF(__pyx_t_4);
6889  __pyx_r = __pyx_t_4;
6890  __pyx_t_4 = 0;
6891  goto __pyx_L0;
6892  }
6893  /*else*/ {
6894 
6895  /* "PyClical.pyx":699
6896  * return not bool(lhs is rhs)
6897  * else:
6898  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
6899  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
6900  * raise TypeError("This comparison operator is not implemented for "
6901  */
6902  __Pyx_XDECREF(__pyx_r);
6903  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
6904  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6905  __Pyx_GOTREF(__pyx_t_4);
6906  __pyx_r = __pyx_t_4;
6907  __pyx_t_4 = 0;
6908  goto __pyx_L0;
6909  }
6910  }
6911 
6912  /* "PyClical.pyx":700
6913  * else:
6914  * return bool( toClifford(lhs) != toClifford(rhs) )
6915  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
6916  * raise TypeError("This comparison operator is not implemented for "
6917  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
6918  */
6919  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, ((PyObject*)__pyx_ptype_8PyClical_clifford));
6920  __pyx_t_3 = (__pyx_t_2 != 0);
6921  if (!__pyx_t_3) {
6922  goto __pyx_L11_next_or;
6923  } else {
6924  __pyx_t_1 = __pyx_t_3;
6925  goto __pyx_L10_bool_binop_done;
6926  }
6927  __pyx_L11_next_or:;
6928  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, ((PyObject*)__pyx_ptype_8PyClical_clifford));
6929  __pyx_t_2 = (__pyx_t_3 != 0);
6930  __pyx_t_1 = __pyx_t_2;
6931  __pyx_L10_bool_binop_done:;
6932  if (__pyx_t_1) {
6933 
6934  /* "PyClical.pyx":702
6935  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
6936  * raise TypeError("This comparison operator is not implemented for "
6937  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
6938  * else:
6939  * return NotImplemented
6940  */
6941  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6942  __Pyx_GOTREF(__pyx_t_4);
6943  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
6944  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
6945  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
6946  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6947  __Pyx_GOTREF(__pyx_t_5);
6948  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6949  __pyx_t_4 = PyNumber_Add(__pyx_kp_s_This_comparison_operator_is_not, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6950  __Pyx_GOTREF(__pyx_t_4);
6951  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6952  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6953  __Pyx_GOTREF(__pyx_t_5);
6954  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6955  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6956  __Pyx_GOTREF(__pyx_t_4);
6957  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
6958  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
6959  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
6960  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6961  __Pyx_GOTREF(__pyx_t_6);
6962  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6963  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6964  __Pyx_GOTREF(__pyx_t_4);
6965  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6966  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6967  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6968  __Pyx_GOTREF(__pyx_t_6);
6969  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6970 
6971  /* "PyClical.pyx":701
6972  * return bool( toClifford(lhs) != toClifford(rhs) )
6973  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
6974  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
6975  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
6976  * else:
6977  */
6978  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6979  __Pyx_GOTREF(__pyx_t_4);
6980  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
6981  __Pyx_GIVEREF(__pyx_t_6);
6982  __pyx_t_6 = 0;
6983  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6984  __Pyx_GOTREF(__pyx_t_6);
6985  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6986  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
6987  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6988  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6989  }
6990  /*else*/ {
6991 
6992  /* "PyClical.pyx":704
6993  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
6994  * else:
6995  * return NotImplemented # <<<<<<<<<<<<<<
6996  *
6997  * def __getitem__(self, ixt):
6998  */
6999  __Pyx_XDECREF(__pyx_r);
7000  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7001  __pyx_r = __pyx_builtin_NotImplemented;
7002  goto __pyx_L0;
7003  }
7004 
7005  /* "PyClical.pyx":671
7006  * return result
7007  *
7008  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7009  * """
7010  * Compare objects of type clifford.
7011  */
7012 
7013  /* function exit code */
7014  __pyx_L1_error:;
7015  __Pyx_XDECREF(__pyx_t_4);
7016  __Pyx_XDECREF(__pyx_t_5);
7017  __Pyx_XDECREF(__pyx_t_6);
7018  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7019  __pyx_r = NULL;
7020  __pyx_L0:;
7021  __Pyx_XGIVEREF(__pyx_r);
7022  __Pyx_RefNannyFinishContext();
7023  return __pyx_r;
7024  }
7025 
7026  /* "PyClical.pyx":706
7027  * return NotImplemented
7028  *
7029  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7030  * """
7031  * Subscripting: map from index set to scalar coordinate.
7032  */
7033 
7034  /* Python wrapper */
7035  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7036  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 ";
7037  #if CYTHON_COMPILING_IN_CPYTHON
7038  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7039  #endif
7040  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7041  PyObject *__pyx_r = 0;
7042  __Pyx_RefNannyDeclarations
7043  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7044  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7045 
7046  /* function exit code */
7047  __Pyx_RefNannyFinishContext();
7048  return __pyx_r;
7049  }
7050 
7051  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7052  PyObject *__pyx_r = NULL;
7053  __Pyx_RefNannyDeclarations
7054  PyObject *__pyx_t_1 = NULL;
7055  int __pyx_lineno = 0;
7056  const char *__pyx_filename = NULL;
7057  int __pyx_clineno = 0;
7058  __Pyx_RefNannySetupContext("__getitem__", 0);
7059 
7060  /* "PyClical.pyx":719
7061  * 2.0
7062  * """
7063  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7064  *
7065  * def __neg__(self):
7066  */
7067  __Pyx_XDECREF(__pyx_r);
7068  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->operator[](__pyx_f_8PyClical_toIndexSet(__pyx_v_ixt))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7069  __Pyx_GOTREF(__pyx_t_1);
7070  __pyx_r = __pyx_t_1;
7071  __pyx_t_1 = 0;
7072  goto __pyx_L0;
7073 
7074  /* "PyClical.pyx":706
7075  * return NotImplemented
7076  *
7077  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7078  * """
7079  * Subscripting: map from index set to scalar coordinate.
7080  */
7081 
7082  /* function exit code */
7083  __pyx_L1_error:;
7084  __Pyx_XDECREF(__pyx_t_1);
7085  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7086  __pyx_r = NULL;
7087  __pyx_L0:;
7088  __Pyx_XGIVEREF(__pyx_r);
7089  __Pyx_RefNannyFinishContext();
7090  return __pyx_r;
7091  }
7092 
7093  /* "PyClical.pyx":721
7094  * return self.instance.getitem(toIndexSet(ixt))
7095  *
7096  * def __neg__(self): # <<<<<<<<<<<<<<
7097  * """
7098  * Unary -.
7099  */
7100 
7101  /* Python wrapper */
7102  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7103  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7104  #if CYTHON_COMPILING_IN_CPYTHON
7105  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7106  #endif
7107  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7108  PyObject *__pyx_r = 0;
7109  __Pyx_RefNannyDeclarations
7110  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7111  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7112 
7113  /* function exit code */
7114  __Pyx_RefNannyFinishContext();
7115  return __pyx_r;
7116  }
7117 
7118  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7119  PyObject *__pyx_r = NULL;
7120  __Pyx_RefNannyDeclarations
7121  PyObject *__pyx_t_1 = NULL;
7122  PyObject *__pyx_t_2 = NULL;
7123  int __pyx_lineno = 0;
7124  const char *__pyx_filename = NULL;
7125  int __pyx_clineno = 0;
7126  __Pyx_RefNannySetupContext("__neg__", 0);
7127 
7128  /* "PyClical.pyx":728
7129  * -{1}
7130  * """
7131  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7132  *
7133  * def __pos__(self):
7134  */
7135  __Pyx_XDECREF(__pyx_r);
7136  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7137  __Pyx_GOTREF(__pyx_t_1);
7138  __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_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7139  __Pyx_GOTREF(__pyx_t_2);
7140  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7141  __pyx_r = __pyx_t_2;
7142  __pyx_t_2 = 0;
7143  goto __pyx_L0;
7144 
7145  /* "PyClical.pyx":721
7146  * return self.instance.getitem(toIndexSet(ixt))
7147  *
7148  * def __neg__(self): # <<<<<<<<<<<<<<
7149  * """
7150  * Unary -.
7151  */
7152 
7153  /* function exit code */
7154  __pyx_L1_error:;
7155  __Pyx_XDECREF(__pyx_t_1);
7156  __Pyx_XDECREF(__pyx_t_2);
7157  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7158  __pyx_r = NULL;
7159  __pyx_L0:;
7160  __Pyx_XGIVEREF(__pyx_r);
7161  __Pyx_RefNannyFinishContext();
7162  return __pyx_r;
7163  }
7164 
7165  /* "PyClical.pyx":730
7166  * return clifford().wrap( self.instance.neg() )
7167  *
7168  * def __pos__(self): # <<<<<<<<<<<<<<
7169  * """
7170  * Unary +.
7171  */
7172 
7173  /* Python wrapper */
7174  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
7175  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
7176  #if CYTHON_COMPILING_IN_CPYTHON
7177  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
7178  #endif
7179  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
7180  PyObject *__pyx_r = 0;
7181  __Pyx_RefNannyDeclarations
7182  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
7183  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7184 
7185  /* function exit code */
7186  __Pyx_RefNannyFinishContext();
7187  return __pyx_r;
7188  }
7189 
7190  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7191  PyObject *__pyx_r = NULL;
7192  __Pyx_RefNannyDeclarations
7193  PyObject *__pyx_t_1 = NULL;
7194  PyObject *__pyx_t_2 = NULL;
7195  int __pyx_lineno = 0;
7196  const char *__pyx_filename = NULL;
7197  int __pyx_clineno = 0;
7198  __Pyx_RefNannySetupContext("__pos__", 0);
7199 
7200  /* "PyClical.pyx":737
7201  * {1}
7202  * """
7203  * return clifford(self) # <<<<<<<<<<<<<<
7204  *
7205  * def __add__(lhs, rhs):
7206  */
7207  __Pyx_XDECREF(__pyx_r);
7208  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7209  __Pyx_GOTREF(__pyx_t_1);
7210  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7211  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
7212  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7213  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7214  __Pyx_GOTREF(__pyx_t_2);
7215  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7216  __pyx_r = __pyx_t_2;
7217  __pyx_t_2 = 0;
7218  goto __pyx_L0;
7219 
7220  /* "PyClical.pyx":730
7221  * return clifford().wrap( self.instance.neg() )
7222  *
7223  * def __pos__(self): # <<<<<<<<<<<<<<
7224  * """
7225  * Unary +.
7226  */
7227 
7228  /* function exit code */
7229  __pyx_L1_error:;
7230  __Pyx_XDECREF(__pyx_t_1);
7231  __Pyx_XDECREF(__pyx_t_2);
7232  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7233  __pyx_r = NULL;
7234  __pyx_L0:;
7235  __Pyx_XGIVEREF(__pyx_r);
7236  __Pyx_RefNannyFinishContext();
7237  return __pyx_r;
7238  }
7239 
7240  /* "PyClical.pyx":739
7241  * return clifford(self)
7242  *
7243  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
7244  * """
7245  * Geometric sum.
7246  */
7247 
7248  /* Python wrapper */
7249  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
7250  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 ";
7251  #if CYTHON_COMPILING_IN_CPYTHON
7252  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
7253  #endif
7254  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7255  PyObject *__pyx_r = 0;
7256  __Pyx_RefNannyDeclarations
7257  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
7258  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7259 
7260  /* function exit code */
7261  __Pyx_RefNannyFinishContext();
7262  return __pyx_r;
7263  }
7264 
7265  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7266  PyObject *__pyx_r = NULL;
7267  __Pyx_RefNannyDeclarations
7268  PyObject *__pyx_t_1 = NULL;
7269  PyObject *__pyx_t_2 = NULL;
7270  int __pyx_lineno = 0;
7271  const char *__pyx_filename = NULL;
7272  int __pyx_clineno = 0;
7273  __Pyx_RefNannySetupContext("__add__", 0);
7274 
7275  /* "PyClical.pyx":748
7276  * {1}+{2}
7277  * """
7278  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
7279  *
7280  * def __iadd__(self, rhs):
7281  */
7282  __Pyx_XDECREF(__pyx_r);
7283  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7284  __Pyx_GOTREF(__pyx_t_1);
7285  __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_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7286  __Pyx_GOTREF(__pyx_t_2);
7287  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7288  __pyx_r = __pyx_t_2;
7289  __pyx_t_2 = 0;
7290  goto __pyx_L0;
7291 
7292  /* "PyClical.pyx":739
7293  * return clifford(self)
7294  *
7295  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
7296  * """
7297  * Geometric sum.
7298  */
7299 
7300  /* function exit code */
7301  __pyx_L1_error:;
7302  __Pyx_XDECREF(__pyx_t_1);
7303  __Pyx_XDECREF(__pyx_t_2);
7304  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7305  __pyx_r = NULL;
7306  __pyx_L0:;
7307  __Pyx_XGIVEREF(__pyx_r);
7308  __Pyx_RefNannyFinishContext();
7309  return __pyx_r;
7310  }
7311 
7312  /* "PyClical.pyx":750
7313  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
7314  *
7315  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
7316  * """
7317  * Geometric sum.
7318  */
7319 
7320  /* Python wrapper */
7321  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
7322  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 ";
7323  #if CYTHON_COMPILING_IN_CPYTHON
7324  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
7325  #endif
7326  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7327  PyObject *__pyx_r = 0;
7328  __Pyx_RefNannyDeclarations
7329  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
7330  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7331 
7332  /* function exit code */
7333  __Pyx_RefNannyFinishContext();
7334  return __pyx_r;
7335  }
7336 
7337  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7338  PyObject *__pyx_r = NULL;
7339  __Pyx_RefNannyDeclarations
7340  PyObject *__pyx_t_1 = NULL;
7341  int __pyx_lineno = 0;
7342  const char *__pyx_filename = NULL;
7343  int __pyx_clineno = 0;
7344  __Pyx_RefNannySetupContext("__iadd__", 0);
7345 
7346  /* "PyClical.pyx":757
7347  * 1+{2}
7348  * """
7349  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
7350  *
7351  * def __sub__(lhs, rhs):
7352  */
7353  __Pyx_XDECREF(__pyx_r);
7354  __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_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7355  __Pyx_GOTREF(__pyx_t_1);
7356  __pyx_r = __pyx_t_1;
7357  __pyx_t_1 = 0;
7358  goto __pyx_L0;
7359 
7360  /* "PyClical.pyx":750
7361  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
7362  *
7363  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
7364  * """
7365  * Geometric sum.
7366  */
7367 
7368  /* function exit code */
7369  __pyx_L1_error:;
7370  __Pyx_XDECREF(__pyx_t_1);
7371  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7372  __pyx_r = NULL;
7373  __pyx_L0:;
7374  __Pyx_XGIVEREF(__pyx_r);
7375  __Pyx_RefNannyFinishContext();
7376  return __pyx_r;
7377  }
7378 
7379  /* "PyClical.pyx":759
7380  * return self.wrap( self.unwrap() + toClifford(rhs) )
7381  *
7382  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
7383  * """
7384  * Geometric difference.
7385  */
7386 
7387  /* Python wrapper */
7388  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
7389  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 ";
7390  #if CYTHON_COMPILING_IN_CPYTHON
7391  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
7392  #endif
7393  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7394  PyObject *__pyx_r = 0;
7395  __Pyx_RefNannyDeclarations
7396  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
7397  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7398 
7399  /* function exit code */
7400  __Pyx_RefNannyFinishContext();
7401  return __pyx_r;
7402  }
7403 
7404  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7405  PyObject *__pyx_r = NULL;
7406  __Pyx_RefNannyDeclarations
7407  PyObject *__pyx_t_1 = NULL;
7408  PyObject *__pyx_t_2 = NULL;
7409  int __pyx_lineno = 0;
7410  const char *__pyx_filename = NULL;
7411  int __pyx_clineno = 0;
7412  __Pyx_RefNannySetupContext("__sub__", 0);
7413 
7414  /* "PyClical.pyx":768
7415  * {1}-{2}
7416  * """
7417  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
7418  *
7419  * def __isub__(self, rhs):
7420  */
7421  __Pyx_XDECREF(__pyx_r);
7422  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7423  __Pyx_GOTREF(__pyx_t_1);
7424  __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_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7425  __Pyx_GOTREF(__pyx_t_2);
7426  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7427  __pyx_r = __pyx_t_2;
7428  __pyx_t_2 = 0;
7429  goto __pyx_L0;
7430 
7431  /* "PyClical.pyx":759
7432  * return self.wrap( self.unwrap() + toClifford(rhs) )
7433  *
7434  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
7435  * """
7436  * Geometric difference.
7437  */
7438 
7439  /* function exit code */
7440  __pyx_L1_error:;
7441  __Pyx_XDECREF(__pyx_t_1);
7442  __Pyx_XDECREF(__pyx_t_2);
7443  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7444  __pyx_r = NULL;
7445  __pyx_L0:;
7446  __Pyx_XGIVEREF(__pyx_r);
7447  __Pyx_RefNannyFinishContext();
7448  return __pyx_r;
7449  }
7450 
7451  /* "PyClical.pyx":770
7452  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
7453  *
7454  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
7455  * """
7456  * Geometric difference.
7457  */
7458 
7459  /* Python wrapper */
7460  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
7461  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 ";
7462  #if CYTHON_COMPILING_IN_CPYTHON
7463  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
7464  #endif
7465  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7466  PyObject *__pyx_r = 0;
7467  __Pyx_RefNannyDeclarations
7468  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
7469  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7470 
7471  /* function exit code */
7472  __Pyx_RefNannyFinishContext();
7473  return __pyx_r;
7474  }
7475 
7476  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7477  PyObject *__pyx_r = NULL;
7478  __Pyx_RefNannyDeclarations
7479  PyObject *__pyx_t_1 = NULL;
7480  int __pyx_lineno = 0;
7481  const char *__pyx_filename = NULL;
7482  int __pyx_clineno = 0;
7483  __Pyx_RefNannySetupContext("__isub__", 0);
7484 
7485  /* "PyClical.pyx":777
7486  * 1-{2}
7487  * """
7488  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
7489  *
7490  * def __mul__(lhs, rhs):
7491  */
7492  __Pyx_XDECREF(__pyx_r);
7493  __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_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7494  __Pyx_GOTREF(__pyx_t_1);
7495  __pyx_r = __pyx_t_1;
7496  __pyx_t_1 = 0;
7497  goto __pyx_L0;
7498 
7499  /* "PyClical.pyx":770
7500  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
7501  *
7502  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
7503  * """
7504  * Geometric difference.
7505  */
7506 
7507  /* function exit code */
7508  __pyx_L1_error:;
7509  __Pyx_XDECREF(__pyx_t_1);
7510  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7511  __pyx_r = NULL;
7512  __pyx_L0:;
7513  __Pyx_XGIVEREF(__pyx_r);
7514  __Pyx_RefNannyFinishContext();
7515  return __pyx_r;
7516  }
7517 
7518  /* "PyClical.pyx":779
7519  * return self.wrap( self.unwrap() - toClifford(rhs) )
7520  *
7521  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
7522  * """
7523  * Geometric product.
7524  */
7525 
7526  /* Python wrapper */
7527  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
7528  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 ";
7529  #if CYTHON_COMPILING_IN_CPYTHON
7530  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
7531  #endif
7532  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7533  PyObject *__pyx_r = 0;
7534  __Pyx_RefNannyDeclarations
7535  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
7536  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7537 
7538  /* function exit code */
7539  __Pyx_RefNannyFinishContext();
7540  return __pyx_r;
7541  }
7542 
7543  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7544  PyObject *__pyx_r = NULL;
7545  __Pyx_RefNannyDeclarations
7546  PyObject *__pyx_t_1 = NULL;
7547  PyObject *__pyx_t_2 = NULL;
7548  int __pyx_lineno = 0;
7549  const char *__pyx_filename = NULL;
7550  int __pyx_clineno = 0;
7551  __Pyx_RefNannySetupContext("__mul__", 0);
7552 
7553  /* "PyClical.pyx":790
7554  * {2}
7555  * """
7556  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
7557  *
7558  * def __imul__(self, rhs):
7559  */
7560  __Pyx_XDECREF(__pyx_r);
7561  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7562  __Pyx_GOTREF(__pyx_t_1);
7563  __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_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7564  __Pyx_GOTREF(__pyx_t_2);
7565  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7566  __pyx_r = __pyx_t_2;
7567  __pyx_t_2 = 0;
7568  goto __pyx_L0;
7569 
7570  /* "PyClical.pyx":779
7571  * return self.wrap( self.unwrap() - toClifford(rhs) )
7572  *
7573  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
7574  * """
7575  * Geometric product.
7576  */
7577 
7578  /* function exit code */
7579  __pyx_L1_error:;
7580  __Pyx_XDECREF(__pyx_t_1);
7581  __Pyx_XDECREF(__pyx_t_2);
7582  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7583  __pyx_r = NULL;
7584  __pyx_L0:;
7585  __Pyx_XGIVEREF(__pyx_r);
7586  __Pyx_RefNannyFinishContext();
7587  return __pyx_r;
7588  }
7589 
7590  /* "PyClical.pyx":792
7591  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
7592  *
7593  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
7594  * """
7595  * Geometric product.
7596  */
7597 
7598  /* Python wrapper */
7599  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
7600  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 ";
7601  #if CYTHON_COMPILING_IN_CPYTHON
7602  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
7603  #endif
7604  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7605  PyObject *__pyx_r = 0;
7606  __Pyx_RefNannyDeclarations
7607  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
7608  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7609 
7610  /* function exit code */
7611  __Pyx_RefNannyFinishContext();
7612  return __pyx_r;
7613  }
7614 
7615  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7616  PyObject *__pyx_r = NULL;
7617  __Pyx_RefNannyDeclarations
7618  PyObject *__pyx_t_1 = NULL;
7619  int __pyx_lineno = 0;
7620  const char *__pyx_filename = NULL;
7621  int __pyx_clineno = 0;
7622  __Pyx_RefNannySetupContext("__imul__", 0);
7623 
7624  /* "PyClical.pyx":803
7625  * {2}
7626  * """
7627  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
7628  *
7629  * def __mod__(lhs, rhs):
7630  */
7631  __Pyx_XDECREF(__pyx_r);
7632  __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_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7633  __Pyx_GOTREF(__pyx_t_1);
7634  __pyx_r = __pyx_t_1;
7635  __pyx_t_1 = 0;
7636  goto __pyx_L0;
7637 
7638  /* "PyClical.pyx":792
7639  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
7640  *
7641  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
7642  * """
7643  * Geometric product.
7644  */
7645 
7646  /* function exit code */
7647  __pyx_L1_error:;
7648  __Pyx_XDECREF(__pyx_t_1);
7649  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7650  __pyx_r = NULL;
7651  __pyx_L0:;
7652  __Pyx_XGIVEREF(__pyx_r);
7653  __Pyx_RefNannyFinishContext();
7654  return __pyx_r;
7655  }
7656 
7657  /* "PyClical.pyx":805
7658  * return self.wrap( self.unwrap() * toClifford(rhs) )
7659  *
7660  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
7661  * """
7662  * Contraction.
7663  */
7664 
7665  /* Python wrapper */
7666  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
7667  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 ";
7668  #if CYTHON_COMPILING_IN_CPYTHON
7669  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
7670  #endif
7671  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7672  PyObject *__pyx_r = 0;
7673  __Pyx_RefNannyDeclarations
7674  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
7675  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7676 
7677  /* function exit code */
7678  __Pyx_RefNannyFinishContext();
7679  return __pyx_r;
7680  }
7681 
7682  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7683  PyObject *__pyx_r = NULL;
7684  __Pyx_RefNannyDeclarations
7685  PyObject *__pyx_t_1 = NULL;
7686  PyObject *__pyx_t_2 = NULL;
7687  int __pyx_lineno = 0;
7688  const char *__pyx_filename = NULL;
7689  int __pyx_clineno = 0;
7690  __Pyx_RefNannySetupContext("__mod__", 0);
7691 
7692  /* "PyClical.pyx":818
7693  * {2}
7694  * """
7695  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
7696  *
7697  * def __imod__(self, rhs):
7698  */
7699  __Pyx_XDECREF(__pyx_r);
7700  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7701  __Pyx_GOTREF(__pyx_t_1);
7702  __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_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7703  __Pyx_GOTREF(__pyx_t_2);
7704  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7705  __pyx_r = __pyx_t_2;
7706  __pyx_t_2 = 0;
7707  goto __pyx_L0;
7708 
7709  /* "PyClical.pyx":805
7710  * return self.wrap( self.unwrap() * toClifford(rhs) )
7711  *
7712  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
7713  * """
7714  * Contraction.
7715  */
7716 
7717  /* function exit code */
7718  __pyx_L1_error:;
7719  __Pyx_XDECREF(__pyx_t_1);
7720  __Pyx_XDECREF(__pyx_t_2);
7721  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7722  __pyx_r = NULL;
7723  __pyx_L0:;
7724  __Pyx_XGIVEREF(__pyx_r);
7725  __Pyx_RefNannyFinishContext();
7726  return __pyx_r;
7727  }
7728 
7729  /* "PyClical.pyx":820
7730  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
7731  *
7732  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
7733  * """
7734  * Contraction.
7735  */
7736 
7737  /* Python wrapper */
7738  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
7739  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 ";
7740  #if CYTHON_COMPILING_IN_CPYTHON
7741  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
7742  #endif
7743  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7744  PyObject *__pyx_r = 0;
7745  __Pyx_RefNannyDeclarations
7746  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
7747  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7748 
7749  /* function exit code */
7750  __Pyx_RefNannyFinishContext();
7751  return __pyx_r;
7752  }
7753 
7754  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7755  PyObject *__pyx_r = NULL;
7756  __Pyx_RefNannyDeclarations
7757  PyObject *__pyx_t_1 = NULL;
7758  int __pyx_lineno = 0;
7759  const char *__pyx_filename = NULL;
7760  int __pyx_clineno = 0;
7761  __Pyx_RefNannySetupContext("__imod__", 0);
7762 
7763  /* "PyClical.pyx":833
7764  * {2}
7765  * """
7766  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
7767  *
7768  * def __and__(lhs, rhs):
7769  */
7770  __Pyx_XDECREF(__pyx_r);
7771  __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_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7772  __Pyx_GOTREF(__pyx_t_1);
7773  __pyx_r = __pyx_t_1;
7774  __pyx_t_1 = 0;
7775  goto __pyx_L0;
7776 
7777  /* "PyClical.pyx":820
7778  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
7779  *
7780  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
7781  * """
7782  * Contraction.
7783  */
7784 
7785  /* function exit code */
7786  __pyx_L1_error:;
7787  __Pyx_XDECREF(__pyx_t_1);
7788  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7789  __pyx_r = NULL;
7790  __pyx_L0:;
7791  __Pyx_XGIVEREF(__pyx_r);
7792  __Pyx_RefNannyFinishContext();
7793  return __pyx_r;
7794  }
7795 
7796  /* "PyClical.pyx":835
7797  * return self.wrap( self.unwrap() % toClifford(rhs) )
7798  *
7799  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
7800  * """
7801  * Inner product.
7802  */
7803 
7804  /* Python wrapper */
7805  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
7806  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 ";
7807  #if CYTHON_COMPILING_IN_CPYTHON
7808  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
7809  #endif
7810  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7811  PyObject *__pyx_r = 0;
7812  __Pyx_RefNannyDeclarations
7813  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
7814  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7815 
7816  /* function exit code */
7817  __Pyx_RefNannyFinishContext();
7818  return __pyx_r;
7819  }
7820 
7821  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7822  PyObject *__pyx_r = NULL;
7823  __Pyx_RefNannyDeclarations
7824  PyObject *__pyx_t_1 = NULL;
7825  PyObject *__pyx_t_2 = NULL;
7826  int __pyx_lineno = 0;
7827  const char *__pyx_filename = NULL;
7828  int __pyx_clineno = 0;
7829  __Pyx_RefNannySetupContext("__and__", 0);
7830 
7831  /* "PyClical.pyx":848
7832  * {2}
7833  * """
7834  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
7835  *
7836  * def __iand__(self, rhs):
7837  */
7838  __Pyx_XDECREF(__pyx_r);
7839  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7840  __Pyx_GOTREF(__pyx_t_1);
7841  __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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7842  __Pyx_GOTREF(__pyx_t_2);
7843  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7844  __pyx_r = __pyx_t_2;
7845  __pyx_t_2 = 0;
7846  goto __pyx_L0;
7847 
7848  /* "PyClical.pyx":835
7849  * return self.wrap( self.unwrap() % toClifford(rhs) )
7850  *
7851  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
7852  * """
7853  * Inner product.
7854  */
7855 
7856  /* function exit code */
7857  __pyx_L1_error:;
7858  __Pyx_XDECREF(__pyx_t_1);
7859  __Pyx_XDECREF(__pyx_t_2);
7860  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7861  __pyx_r = NULL;
7862  __pyx_L0:;
7863  __Pyx_XGIVEREF(__pyx_r);
7864  __Pyx_RefNannyFinishContext();
7865  return __pyx_r;
7866  }
7867 
7868  /* "PyClical.pyx":850
7869  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
7870  *
7871  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
7872  * """
7873  * Inner product.
7874  */
7875 
7876  /* Python wrapper */
7877  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
7878  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 ";
7879  #if CYTHON_COMPILING_IN_CPYTHON
7880  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
7881  #endif
7882  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
7883  PyObject *__pyx_r = 0;
7884  __Pyx_RefNannyDeclarations
7885  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
7886  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
7887 
7888  /* function exit code */
7889  __Pyx_RefNannyFinishContext();
7890  return __pyx_r;
7891  }
7892 
7893  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
7894  PyObject *__pyx_r = NULL;
7895  __Pyx_RefNannyDeclarations
7896  PyObject *__pyx_t_1 = NULL;
7897  int __pyx_lineno = 0;
7898  const char *__pyx_filename = NULL;
7899  int __pyx_clineno = 0;
7900  __Pyx_RefNannySetupContext("__iand__", 0);
7901 
7902  /* "PyClical.pyx":863
7903  * {2}
7904  * """
7905  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
7906  *
7907  * def __xor__(lhs, rhs):
7908  */
7909  __Pyx_XDECREF(__pyx_r);
7910  __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_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7911  __Pyx_GOTREF(__pyx_t_1);
7912  __pyx_r = __pyx_t_1;
7913  __pyx_t_1 = 0;
7914  goto __pyx_L0;
7915 
7916  /* "PyClical.pyx":850
7917  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
7918  *
7919  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
7920  * """
7921  * Inner product.
7922  */
7923 
7924  /* function exit code */
7925  __pyx_L1_error:;
7926  __Pyx_XDECREF(__pyx_t_1);
7927  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7928  __pyx_r = NULL;
7929  __pyx_L0:;
7930  __Pyx_XGIVEREF(__pyx_r);
7931  __Pyx_RefNannyFinishContext();
7932  return __pyx_r;
7933  }
7934 
7935  /* "PyClical.pyx":865
7936  * return self.wrap( self.unwrap() & toClifford(rhs) )
7937  *
7938  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
7939  * """
7940  * Outer product.
7941  */
7942 
7943  /* Python wrapper */
7944  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
7945  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 ";
7946  #if CYTHON_COMPILING_IN_CPYTHON
7947  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
7948  #endif
7949  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7950  PyObject *__pyx_r = 0;
7951  __Pyx_RefNannyDeclarations
7952  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
7953  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
7954 
7955  /* function exit code */
7956  __Pyx_RefNannyFinishContext();
7957  return __pyx_r;
7958  }
7959 
7960  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
7961  PyObject *__pyx_r = NULL;
7962  __Pyx_RefNannyDeclarations
7963  PyObject *__pyx_t_1 = NULL;
7964  PyObject *__pyx_t_2 = NULL;
7965  int __pyx_lineno = 0;
7966  const char *__pyx_filename = NULL;
7967  int __pyx_clineno = 0;
7968  __Pyx_RefNannySetupContext("__xor__", 0);
7969 
7970  /* "PyClical.pyx":878
7971  * 0
7972  * """
7973  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
7974  *
7975  * def __ixor__(self, rhs):
7976  */
7977  __Pyx_XDECREF(__pyx_r);
7978  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7979  __Pyx_GOTREF(__pyx_t_1);
7980  __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_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7981  __Pyx_GOTREF(__pyx_t_2);
7982  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7983  __pyx_r = __pyx_t_2;
7984  __pyx_t_2 = 0;
7985  goto __pyx_L0;
7986 
7987  /* "PyClical.pyx":865
7988  * return self.wrap( self.unwrap() & toClifford(rhs) )
7989  *
7990  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
7991  * """
7992  * Outer product.
7993  */
7994 
7995  /* function exit code */
7996  __pyx_L1_error:;
7997  __Pyx_XDECREF(__pyx_t_1);
7998  __Pyx_XDECREF(__pyx_t_2);
7999  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8000  __pyx_r = NULL;
8001  __pyx_L0:;
8002  __Pyx_XGIVEREF(__pyx_r);
8003  __Pyx_RefNannyFinishContext();
8004  return __pyx_r;
8005  }
8006 
8007  /* "PyClical.pyx":880
8008  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8009  *
8010  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8011  * """
8012  * Outer product.
8013  */
8014 
8015  /* Python wrapper */
8016  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8017  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 ";
8018  #if CYTHON_COMPILING_IN_CPYTHON
8019  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8020  #endif
8021  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8022  PyObject *__pyx_r = 0;
8023  __Pyx_RefNannyDeclarations
8024  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8025  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8026 
8027  /* function exit code */
8028  __Pyx_RefNannyFinishContext();
8029  return __pyx_r;
8030  }
8031 
8032  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8033  PyObject *__pyx_r = NULL;
8034  __Pyx_RefNannyDeclarations
8035  PyObject *__pyx_t_1 = NULL;
8036  int __pyx_lineno = 0;
8037  const char *__pyx_filename = NULL;
8038  int __pyx_clineno = 0;
8039  __Pyx_RefNannySetupContext("__ixor__", 0);
8040 
8041  /* "PyClical.pyx":893
8042  * 0
8043  * """
8044  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8045  *
8046  * def __div__(lhs, rhs):
8047  */
8048  __Pyx_XDECREF(__pyx_r);
8049  __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_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8050  __Pyx_GOTREF(__pyx_t_1);
8051  __pyx_r = __pyx_t_1;
8052  __pyx_t_1 = 0;
8053  goto __pyx_L0;
8054 
8055  /* "PyClical.pyx":880
8056  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8057  *
8058  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8059  * """
8060  * Outer product.
8061  */
8062 
8063  /* function exit code */
8064  __pyx_L1_error:;
8065  __Pyx_XDECREF(__pyx_t_1);
8066  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8067  __pyx_r = NULL;
8068  __pyx_L0:;
8069  __Pyx_XGIVEREF(__pyx_r);
8070  __Pyx_RefNannyFinishContext();
8071  return __pyx_r;
8072  }
8073 
8074  /* "PyClical.pyx":895
8075  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8076  *
8077  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8078  * """
8079  * Geometric quotient.
8080  */
8081 
8082  /* Python wrapper */
8083  #if PY_MAJOR_VERSION < 3
8084  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8085  static char __pyx_doc_8PyClical_8clifford_44__div__[] = "\n Geometric quotient.\n\n >>> print clifford(\"{1}\") / clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) / clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") / clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") / clifford(\"{1,2}\")\n -{2}\n ";
8086  #if CYTHON_COMPILING_IN_CPYTHON
8087  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8088  #endif
8089  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8090  PyObject *__pyx_r = 0;
8091  __Pyx_RefNannyDeclarations
8092  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8093  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8094 
8095  /* function exit code */
8096  __Pyx_RefNannyFinishContext();
8097  return __pyx_r;
8098  }
8099  #endif
8101  #if PY_MAJOR_VERSION < 3
8102  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8103  PyObject *__pyx_r = NULL;
8104  __Pyx_RefNannyDeclarations
8105  PyObject *__pyx_t_1 = NULL;
8106  PyObject *__pyx_t_2 = NULL;
8107  int __pyx_lineno = 0;
8108  const char *__pyx_filename = NULL;
8109  int __pyx_clineno = 0;
8110  __Pyx_RefNannySetupContext("__div__", 0);
8111 
8112  /* "PyClical.pyx":908
8113  * -{2}
8114  * """
8115  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8116  *
8117  * def __idiv__(self, rhs):
8118  */
8119  __Pyx_XDECREF(__pyx_r);
8120  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8121  __Pyx_GOTREF(__pyx_t_1);
8122  __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_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8123  __Pyx_GOTREF(__pyx_t_2);
8124  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8125  __pyx_r = __pyx_t_2;
8126  __pyx_t_2 = 0;
8127  goto __pyx_L0;
8128 
8129  /* "PyClical.pyx":895
8130  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8131  *
8132  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8133  * """
8134  * Geometric quotient.
8135  */
8136 
8137  /* function exit code */
8138  __pyx_L1_error:;
8139  __Pyx_XDECREF(__pyx_t_1);
8140  __Pyx_XDECREF(__pyx_t_2);
8141  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8142  __pyx_r = NULL;
8143  __pyx_L0:;
8144  __Pyx_XGIVEREF(__pyx_r);
8145  __Pyx_RefNannyFinishContext();
8146  return __pyx_r;
8147  }
8148  #endif
8150  /* "PyClical.pyx":910
8151  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8152  *
8153  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8154  * """
8155  * Geometric quotient.
8156  */
8157 
8158  /* Python wrapper */
8159  #if PY_MAJOR_VERSION < 3
8160  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8161  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 ";
8162  #if CYTHON_COMPILING_IN_CPYTHON
8163  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8164  #endif
8165  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8166  PyObject *__pyx_r = 0;
8167  __Pyx_RefNannyDeclarations
8168  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8169  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8170 
8171  /* function exit code */
8172  __Pyx_RefNannyFinishContext();
8173  return __pyx_r;
8174  }
8175  #endif
8177  #if PY_MAJOR_VERSION < 3
8178  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8179  PyObject *__pyx_r = NULL;
8180  __Pyx_RefNannyDeclarations
8181  PyObject *__pyx_t_1 = NULL;
8182  int __pyx_lineno = 0;
8183  const char *__pyx_filename = NULL;
8184  int __pyx_clineno = 0;
8185  __Pyx_RefNannySetupContext("__idiv__", 0);
8186 
8187  /* "PyClical.pyx":923
8188  * -{2}
8189  * """
8190  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8191  *
8192  * def inv(self):
8193  */
8194  __Pyx_XDECREF(__pyx_r);
8195  __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_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8196  __Pyx_GOTREF(__pyx_t_1);
8197  __pyx_r = __pyx_t_1;
8198  __pyx_t_1 = 0;
8199  goto __pyx_L0;
8200 
8201  /* "PyClical.pyx":910
8202  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8203  *
8204  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8205  * """
8206  * Geometric quotient.
8207  */
8208 
8209  /* function exit code */
8210  __pyx_L1_error:;
8211  __Pyx_XDECREF(__pyx_t_1);
8212  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8213  __pyx_r = NULL;
8214  __pyx_L0:;
8215  __Pyx_XGIVEREF(__pyx_r);
8216  __Pyx_RefNannyFinishContext();
8217  return __pyx_r;
8218  }
8219  #endif
8221  /* "PyClical.pyx":925
8222  * return self.wrap( self.unwrap() / toClifford(rhs) )
8223  *
8224  * def inv(self): # <<<<<<<<<<<<<<
8225  * """
8226  * Geometric multiplicative inverse.
8227  */
8228 
8229  /* Python wrapper */
8230  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8231  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 ";
8232  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8233  PyObject *__pyx_r = 0;
8234  __Pyx_RefNannyDeclarations
8235  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
8236  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8237 
8238  /* function exit code */
8239  __Pyx_RefNannyFinishContext();
8240  return __pyx_r;
8241  }
8242 
8243  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8244  PyObject *__pyx_r = NULL;
8245  __Pyx_RefNannyDeclarations
8246  PyObject *__pyx_t_1 = NULL;
8247  PyObject *__pyx_t_2 = NULL;
8248  int __pyx_lineno = 0;
8249  const char *__pyx_filename = NULL;
8250  int __pyx_clineno = 0;
8251  __Pyx_RefNannySetupContext("inv", 0);
8252 
8253  /* "PyClical.pyx":936
8254  * -{1,2}
8255  * """
8256  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
8257  *
8258  * def __or__(lhs, rhs):
8259  */
8260  __Pyx_XDECREF(__pyx_r);
8261  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8262  __Pyx_GOTREF(__pyx_t_1);
8263  __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_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8264  __Pyx_GOTREF(__pyx_t_2);
8265  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8266  __pyx_r = __pyx_t_2;
8267  __pyx_t_2 = 0;
8268  goto __pyx_L0;
8269 
8270  /* "PyClical.pyx":925
8271  * return self.wrap( self.unwrap() / toClifford(rhs) )
8272  *
8273  * def inv(self): # <<<<<<<<<<<<<<
8274  * """
8275  * Geometric multiplicative inverse.
8276  */
8277 
8278  /* function exit code */
8279  __pyx_L1_error:;
8280  __Pyx_XDECREF(__pyx_t_1);
8281  __Pyx_XDECREF(__pyx_t_2);
8282  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
8283  __pyx_r = NULL;
8284  __pyx_L0:;
8285  __Pyx_XGIVEREF(__pyx_r);
8286  __Pyx_RefNannyFinishContext();
8287  return __pyx_r;
8288  }
8289 
8290  /* "PyClical.pyx":938
8291  * return clifford().wrap( self.instance.inv() )
8292  *
8293  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
8294  * """
8295  * Transform left hand side, using right hand side as a transformation.
8296  */
8297 
8298  /* Python wrapper */
8299  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8300  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 ";
8301  #if CYTHON_COMPILING_IN_CPYTHON
8302  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
8303  #endif
8304  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8305  PyObject *__pyx_r = 0;
8306  __Pyx_RefNannyDeclarations
8307  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
8308  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8309 
8310  /* function exit code */
8311  __Pyx_RefNannyFinishContext();
8312  return __pyx_r;
8313  }
8314 
8315  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8316  PyObject *__pyx_r = NULL;
8317  __Pyx_RefNannyDeclarations
8318  PyObject *__pyx_t_1 = NULL;
8319  PyObject *__pyx_t_2 = NULL;
8320  int __pyx_lineno = 0;
8321  const char *__pyx_filename = NULL;
8322  int __pyx_clineno = 0;
8323  __Pyx_RefNannySetupContext("__or__", 0);
8324 
8325  /* "PyClical.pyx":947
8326  * -{1}
8327  * """
8328  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
8329  *
8330  * def __ior__(self, rhs):
8331  */
8332  __Pyx_XDECREF(__pyx_r);
8333  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8334  __Pyx_GOTREF(__pyx_t_1);
8335  __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_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8336  __Pyx_GOTREF(__pyx_t_2);
8337  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8338  __pyx_r = __pyx_t_2;
8339  __pyx_t_2 = 0;
8340  goto __pyx_L0;
8341 
8342  /* "PyClical.pyx":938
8343  * return clifford().wrap( self.instance.inv() )
8344  *
8345  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
8346  * """
8347  * Transform left hand side, using right hand side as a transformation.
8348  */
8349 
8350  /* function exit code */
8351  __pyx_L1_error:;
8352  __Pyx_XDECREF(__pyx_t_1);
8353  __Pyx_XDECREF(__pyx_t_2);
8354  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8355  __pyx_r = NULL;
8356  __pyx_L0:;
8357  __Pyx_XGIVEREF(__pyx_r);
8358  __Pyx_RefNannyFinishContext();
8359  return __pyx_r;
8360  }
8361 
8362  /* "PyClical.pyx":949
8363  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
8364  *
8365  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
8366  * """
8367  * Transform left hand side, using right hand side as a transformation.
8368  */
8369 
8370  /* Python wrapper */
8371  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8372  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 ";
8373  #if CYTHON_COMPILING_IN_CPYTHON
8374  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
8375  #endif
8376  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8377  PyObject *__pyx_r = 0;
8378  __Pyx_RefNannyDeclarations
8379  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
8380  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8381 
8382  /* function exit code */
8383  __Pyx_RefNannyFinishContext();
8384  return __pyx_r;
8385  }
8386 
8387  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8388  PyObject *__pyx_r = NULL;
8389  __Pyx_RefNannyDeclarations
8390  PyObject *__pyx_t_1 = NULL;
8391  int __pyx_lineno = 0;
8392  const char *__pyx_filename = NULL;
8393  int __pyx_clineno = 0;
8394  __Pyx_RefNannySetupContext("__ior__", 0);
8395 
8396  /* "PyClical.pyx":958
8397  * -{1}
8398  * """
8399  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
8400  *
8401  * def __pow__(self, m, dummy):
8402  */
8403  __Pyx_XDECREF(__pyx_r);
8404  __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_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8405  __Pyx_GOTREF(__pyx_t_1);
8406  __pyx_r = __pyx_t_1;
8407  __pyx_t_1 = 0;
8408  goto __pyx_L0;
8409 
8410  /* "PyClical.pyx":949
8411  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
8412  *
8413  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
8414  * """
8415  * Transform left hand side, using right hand side as a transformation.
8416  */
8417 
8418  /* function exit code */
8419  __pyx_L1_error:;
8420  __Pyx_XDECREF(__pyx_t_1);
8421  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8422  __pyx_r = NULL;
8423  __pyx_L0:;
8424  __Pyx_XGIVEREF(__pyx_r);
8425  __Pyx_RefNannyFinishContext();
8426  return __pyx_r;
8427  }
8428 
8429  /* "PyClical.pyx":960
8430  * return self.wrap( self.unwrap() | toClifford(rhs) )
8431  *
8432  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
8433  * """
8434  * Power: self to the m.
8435  */
8436 
8437  /* Python wrapper */
8438  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
8439  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 ";
8440  #if CYTHON_COMPILING_IN_CPYTHON
8441  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
8442  #endif
8443  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
8444  PyObject *__pyx_r = 0;
8445  __Pyx_RefNannyDeclarations
8446  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
8447  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
8448 
8449  /* function exit code */
8450  __Pyx_RefNannyFinishContext();
8451  return __pyx_r;
8452  }
8453 
8454  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
8455  PyObject *__pyx_r = NULL;
8456  __Pyx_RefNannyDeclarations
8457  PyObject *__pyx_t_1 = NULL;
8458  int __pyx_lineno = 0;
8459  const char *__pyx_filename = NULL;
8460  int __pyx_clineno = 0;
8461  __Pyx_RefNannySetupContext("__pow__", 0);
8462 
8463  /* "PyClical.pyx":977
8464  * 1
8465  * """
8466  * return pow(self, m) # <<<<<<<<<<<<<<
8467  *
8468  * def pow(self, m):
8469  */
8470  __Pyx_XDECREF(__pyx_r);
8471  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_self, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8472  __Pyx_GOTREF(__pyx_t_1);
8473  __pyx_r = __pyx_t_1;
8474  __pyx_t_1 = 0;
8475  goto __pyx_L0;
8476 
8477  /* "PyClical.pyx":960
8478  * return self.wrap( self.unwrap() | toClifford(rhs) )
8479  *
8480  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
8481  * """
8482  * Power: self to the m.
8483  */
8484 
8485  /* function exit code */
8486  __pyx_L1_error:;
8487  __Pyx_XDECREF(__pyx_t_1);
8488  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8489  __pyx_r = NULL;
8490  __pyx_L0:;
8491  __Pyx_XGIVEREF(__pyx_r);
8492  __Pyx_RefNannyFinishContext();
8493  return __pyx_r;
8494  }
8495 
8496  /* "PyClical.pyx":979
8497  * return pow(self, m)
8498  *
8499  * def pow(self, m): # <<<<<<<<<<<<<<
8500  * """
8501  * Power: self to the m.
8502  */
8503 
8504  /* Python wrapper */
8505  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
8506  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 ";
8507  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
8508  PyObject *__pyx_r = 0;
8509  __Pyx_RefNannyDeclarations
8510  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
8511  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
8512 
8513  /* function exit code */
8514  __Pyx_RefNannyFinishContext();
8515  return __pyx_r;
8516  }
8517 
8518  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
8519  PyObject *__pyx_r = NULL;
8520  __Pyx_RefNannyDeclarations
8521  PyObject *__pyx_t_1 = NULL;
8522  PyObject *__pyx_t_2 = NULL;
8523  int __pyx_t_3;
8524  int __pyx_t_4;
8525  int __pyx_t_5;
8526  int __pyx_lineno = 0;
8527  const char *__pyx_filename = NULL;
8528  int __pyx_clineno = 0;
8529  __Pyx_RefNannySetupContext("pow", 0);
8530 
8531  /* "PyClical.pyx":998
8532  * 1
8533  * """
8534  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
8535  * return clifford().wrap( self.instance.pow(m) )
8536  * else:
8537  */
8538  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8539  __Pyx_GOTREF(__pyx_t_1);
8540  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Integral); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8541  __Pyx_GOTREF(__pyx_t_2);
8542  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8543  __pyx_t_3 = PyObject_IsInstance(__pyx_v_m, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8544  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8545  __pyx_t_4 = (__pyx_t_3 != 0);
8546  if (__pyx_t_4) {
8547 
8548  /* "PyClical.pyx":999
8549  * """
8550  * if isinstance(m, numbers.Integral):
8551  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
8552  * else:
8553  * return exp(m * log(self))
8554  */
8555  __Pyx_XDECREF(__pyx_r);
8556  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8557  __Pyx_GOTREF(__pyx_t_2);
8558  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8559  __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_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8560  __Pyx_GOTREF(__pyx_t_1);
8561  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8562  __pyx_r = __pyx_t_1;
8563  __pyx_t_1 = 0;
8564  goto __pyx_L0;
8565  }
8566  /*else*/ {
8567 
8568  /* "PyClical.pyx":1001
8569  * return clifford().wrap( self.instance.pow(m) )
8570  * else:
8571  * return exp(m * log(self)) # <<<<<<<<<<<<<<
8572  *
8573  * def outer_pow(self, m):
8574  */
8575  __Pyx_XDECREF(__pyx_r);
8576  __pyx_t_1 = __pyx_f_8PyClical_log(((PyObject *)__pyx_v_self), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8577  __Pyx_GOTREF(__pyx_t_1);
8578  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8579  __Pyx_GOTREF(__pyx_t_2);
8580  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8581  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8582  __Pyx_GOTREF(__pyx_t_1);
8583  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8584  __pyx_r = __pyx_t_1;
8585  __pyx_t_1 = 0;
8586  goto __pyx_L0;
8587  }
8588 
8589  /* "PyClical.pyx":979
8590  * return pow(self, m)
8591  *
8592  * def pow(self, m): # <<<<<<<<<<<<<<
8593  * """
8594  * Power: self to the m.
8595  */
8596 
8597  /* function exit code */
8598  __pyx_L1_error:;
8599  __Pyx_XDECREF(__pyx_t_1);
8600  __Pyx_XDECREF(__pyx_t_2);
8601  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
8602  __pyx_r = NULL;
8603  __pyx_L0:;
8604  __Pyx_XGIVEREF(__pyx_r);
8605  __Pyx_RefNannyFinishContext();
8606  return __pyx_r;
8607  }
8608 
8609  /* "PyClical.pyx":1003
8610  * return exp(m * log(self))
8611  *
8612  * def outer_pow(self, m): # <<<<<<<<<<<<<<
8613  * """
8614  * Outer product power.
8615  */
8616 
8617  /* Python wrapper */
8618  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
8619  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 ";
8620  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
8621  PyObject *__pyx_r = 0;
8622  __Pyx_RefNannyDeclarations
8623  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
8624  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
8625 
8626  /* function exit code */
8627  __Pyx_RefNannyFinishContext();
8628  return __pyx_r;
8629  }
8630 
8631  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
8632  PyObject *__pyx_r = NULL;
8633  __Pyx_RefNannyDeclarations
8634  PyObject *__pyx_t_1 = NULL;
8635  int __pyx_t_2;
8636  PyObject *__pyx_t_3 = NULL;
8637  int __pyx_lineno = 0;
8638  const char *__pyx_filename = NULL;
8639  int __pyx_clineno = 0;
8640  __Pyx_RefNannySetupContext("outer_pow", 0);
8641 
8642  /* "PyClical.pyx":1017
8643  *
8644  * """
8645  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
8646  *
8647  * def __call__(self, grade):
8648  */
8649  __Pyx_XDECREF(__pyx_r);
8650  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8651  __Pyx_GOTREF(__pyx_t_1);
8652  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8653  __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_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8654  __Pyx_GOTREF(__pyx_t_3);
8655  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8656  __pyx_r = __pyx_t_3;
8657  __pyx_t_3 = 0;
8658  goto __pyx_L0;
8659 
8660  /* "PyClical.pyx":1003
8661  * return exp(m * log(self))
8662  *
8663  * def outer_pow(self, m): # <<<<<<<<<<<<<<
8664  * """
8665  * Outer product power.
8666  */
8667 
8668  /* function exit code */
8669  __pyx_L1_error:;
8670  __Pyx_XDECREF(__pyx_t_1);
8671  __Pyx_XDECREF(__pyx_t_3);
8672  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
8673  __pyx_r = NULL;
8674  __pyx_L0:;
8675  __Pyx_XGIVEREF(__pyx_r);
8676  __Pyx_RefNannyFinishContext();
8677  return __pyx_r;
8678  }
8679 
8680  /* "PyClical.pyx":1019
8681  * return clifford().wrap( self.instance.outer_pow(m) )
8682  *
8683  * def __call__(self, grade): # <<<<<<<<<<<<<<
8684  * """
8685  * Pure grade-vector part.
8686  */
8687 
8688  /* Python wrapper */
8689  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8690  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 ";
8691  #if CYTHON_COMPILING_IN_CPYTHON
8692  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
8693  #endif
8694  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8695  PyObject *__pyx_v_grade = 0;
8696  int __pyx_lineno = 0;
8697  const char *__pyx_filename = NULL;
8698  int __pyx_clineno = 0;
8699  PyObject *__pyx_r = 0;
8700  __Pyx_RefNannyDeclarations
8701  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
8702  {
8703  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
8704  PyObject* values[1] = {0};
8705  if (unlikely(__pyx_kwds)) {
8706  Py_ssize_t kw_args;
8707  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8708  switch (pos_args) {
8709  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8710  case 0: break;
8711  default: goto __pyx_L5_argtuple_error;
8712  }
8713  kw_args = PyDict_Size(__pyx_kwds);
8714  switch (pos_args) {
8715  case 0:
8716  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
8717  else goto __pyx_L5_argtuple_error;
8718  }
8719  if (unlikely(kw_args > 0)) {
8720  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8721  }
8722  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
8723  goto __pyx_L5_argtuple_error;
8724  } else {
8725  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8726  }
8727  __pyx_v_grade = values[0];
8728  }
8729  goto __pyx_L4_argument_unpacking_done;
8730  __pyx_L5_argtuple_error:;
8731  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8732  __pyx_L3_error:;
8733  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8734  __Pyx_RefNannyFinishContext();
8735  return NULL;
8736  __pyx_L4_argument_unpacking_done:;
8737  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
8738 
8739  /* function exit code */
8740  __Pyx_RefNannyFinishContext();
8741  return __pyx_r;
8742  }
8743 
8744  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
8745  PyObject *__pyx_r = NULL;
8746  __Pyx_RefNannyDeclarations
8747  PyObject *__pyx_t_1 = NULL;
8748  int __pyx_t_2;
8749  PyObject *__pyx_t_3 = NULL;
8750  int __pyx_lineno = 0;
8751  const char *__pyx_filename = NULL;
8752  int __pyx_clineno = 0;
8753  __Pyx_RefNannySetupContext("__call__", 0);
8754 
8755  /* "PyClical.pyx":1036
8756  * 0
8757  * """
8758  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
8759  *
8760  * def scalar(self):
8761  */
8762  __Pyx_XDECREF(__pyx_r);
8763  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8764  __Pyx_GOTREF(__pyx_t_1);
8765  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_grade); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8766  __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_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8767  __Pyx_GOTREF(__pyx_t_3);
8768  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8769  __pyx_r = __pyx_t_3;
8770  __pyx_t_3 = 0;
8771  goto __pyx_L0;
8772 
8773  /* "PyClical.pyx":1019
8774  * return clifford().wrap( self.instance.outer_pow(m) )
8775  *
8776  * def __call__(self, grade): # <<<<<<<<<<<<<<
8777  * """
8778  * Pure grade-vector part.
8779  */
8780 
8781  /* function exit code */
8782  __pyx_L1_error:;
8783  __Pyx_XDECREF(__pyx_t_1);
8784  __Pyx_XDECREF(__pyx_t_3);
8785  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8786  __pyx_r = NULL;
8787  __pyx_L0:;
8788  __Pyx_XGIVEREF(__pyx_r);
8789  __Pyx_RefNannyFinishContext();
8790  return __pyx_r;
8791  }
8792 
8793  /* "PyClical.pyx":1038
8794  * return clifford().wrap( self.instance.call(grade) )
8795  *
8796  * def scalar(self): # <<<<<<<<<<<<<<
8797  * """
8798  * Scalar part.
8799  */
8800 
8801  /* Python wrapper */
8802  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8803  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 ";
8804  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8805  PyObject *__pyx_r = 0;
8806  __Pyx_RefNannyDeclarations
8807  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
8808  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8809 
8810  /* function exit code */
8811  __Pyx_RefNannyFinishContext();
8812  return __pyx_r;
8813  }
8814 
8815  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8816  PyObject *__pyx_r = NULL;
8817  __Pyx_RefNannyDeclarations
8818  PyObject *__pyx_t_1 = NULL;
8819  int __pyx_lineno = 0;
8820  const char *__pyx_filename = NULL;
8821  int __pyx_clineno = 0;
8822  __Pyx_RefNannySetupContext("scalar", 0);
8823 
8824  /* "PyClical.pyx":1047
8825  * 0.0
8826  * """
8827  * return self.instance.scalar() # <<<<<<<<<<<<<<
8828  *
8829  * def pure(self):
8830  */
8831  __Pyx_XDECREF(__pyx_r);
8832  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8833  __Pyx_GOTREF(__pyx_t_1);
8834  __pyx_r = __pyx_t_1;
8835  __pyx_t_1 = 0;
8836  goto __pyx_L0;
8837 
8838  /* "PyClical.pyx":1038
8839  * return clifford().wrap( self.instance.call(grade) )
8840  *
8841  * def scalar(self): # <<<<<<<<<<<<<<
8842  * """
8843  * Scalar part.
8844  */
8845 
8846  /* function exit code */
8847  __pyx_L1_error:;
8848  __Pyx_XDECREF(__pyx_t_1);
8849  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
8850  __pyx_r = NULL;
8851  __pyx_L0:;
8852  __Pyx_XGIVEREF(__pyx_r);
8853  __Pyx_RefNannyFinishContext();
8854  return __pyx_r;
8855  }
8856 
8857  /* "PyClical.pyx":1049
8858  * return self.instance.scalar()
8859  *
8860  * def pure(self): # <<<<<<<<<<<<<<
8861  * """
8862  * Pure part.
8863  */
8864 
8865  /* Python wrapper */
8866  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8867  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 ";
8868  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8869  PyObject *__pyx_r = 0;
8870  __Pyx_RefNannyDeclarations
8871  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
8872  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8873 
8874  /* function exit code */
8875  __Pyx_RefNannyFinishContext();
8876  return __pyx_r;
8877  }
8878 
8879  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8880  PyObject *__pyx_r = NULL;
8881  __Pyx_RefNannyDeclarations
8882  PyObject *__pyx_t_1 = NULL;
8883  PyObject *__pyx_t_2 = NULL;
8884  int __pyx_lineno = 0;
8885  const char *__pyx_filename = NULL;
8886  int __pyx_clineno = 0;
8887  __Pyx_RefNannySetupContext("pure", 0);
8888 
8889  /* "PyClical.pyx":1058
8890  * {1,2}
8891  * """
8892  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
8893  *
8894  * def even(self):
8895  */
8896  __Pyx_XDECREF(__pyx_r);
8897  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8898  __Pyx_GOTREF(__pyx_t_1);
8899  __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_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8900  __Pyx_GOTREF(__pyx_t_2);
8901  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8902  __pyx_r = __pyx_t_2;
8903  __pyx_t_2 = 0;
8904  goto __pyx_L0;
8905 
8906  /* "PyClical.pyx":1049
8907  * return self.instance.scalar()
8908  *
8909  * def pure(self): # <<<<<<<<<<<<<<
8910  * """
8911  * Pure part.
8912  */
8913 
8914  /* function exit code */
8915  __pyx_L1_error:;
8916  __Pyx_XDECREF(__pyx_t_1);
8917  __Pyx_XDECREF(__pyx_t_2);
8918  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
8919  __pyx_r = NULL;
8920  __pyx_L0:;
8921  __Pyx_XGIVEREF(__pyx_r);
8922  __Pyx_RefNannyFinishContext();
8923  return __pyx_r;
8924  }
8925 
8926  /* "PyClical.pyx":1060
8927  * return clifford().wrap( self.instance.pure() )
8928  *
8929  * def even(self): # <<<<<<<<<<<<<<
8930  * """
8931  * Even part of multivector, sum of even grade terms.
8932  */
8933 
8934  /* Python wrapper */
8935  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8936  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 ";
8937  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8938  PyObject *__pyx_r = 0;
8939  __Pyx_RefNannyDeclarations
8940  __Pyx_RefNannySetupContext("even (wrapper)", 0);
8941  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8942 
8943  /* function exit code */
8944  __Pyx_RefNannyFinishContext();
8945  return __pyx_r;
8946  }
8947 
8948  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8949  PyObject *__pyx_r = NULL;
8950  __Pyx_RefNannyDeclarations
8951  PyObject *__pyx_t_1 = NULL;
8952  PyObject *__pyx_t_2 = NULL;
8953  int __pyx_lineno = 0;
8954  const char *__pyx_filename = NULL;
8955  int __pyx_clineno = 0;
8956  __Pyx_RefNannySetupContext("even", 0);
8957 
8958  /* "PyClical.pyx":1067
8959  * 1+{1,2}
8960  * """
8961  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
8962  *
8963  * def odd(self):
8964  */
8965  __Pyx_XDECREF(__pyx_r);
8966  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8967  __Pyx_GOTREF(__pyx_t_1);
8968  __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_filename = __pyx_f[0]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8969  __Pyx_GOTREF(__pyx_t_2);
8970  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8971  __pyx_r = __pyx_t_2;
8972  __pyx_t_2 = 0;
8973  goto __pyx_L0;
8974 
8975  /* "PyClical.pyx":1060
8976  * return clifford().wrap( self.instance.pure() )
8977  *
8978  * def even(self): # <<<<<<<<<<<<<<
8979  * """
8980  * Even part of multivector, sum of even grade terms.
8981  */
8982 
8983  /* function exit code */
8984  __pyx_L1_error:;
8985  __Pyx_XDECREF(__pyx_t_1);
8986  __Pyx_XDECREF(__pyx_t_2);
8987  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
8988  __pyx_r = NULL;
8989  __pyx_L0:;
8990  __Pyx_XGIVEREF(__pyx_r);
8991  __Pyx_RefNannyFinishContext();
8992  return __pyx_r;
8993  }
8994 
8995  /* "PyClical.pyx":1069
8996  * return clifford().wrap( self.instance.even() )
8997  *
8998  * def odd(self): # <<<<<<<<<<<<<<
8999  * """
9000  * Odd part of multivector, sum of odd grade terms.
9001  */
9002 
9003  /* Python wrapper */
9004  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9005  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 ";
9006  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9007  PyObject *__pyx_r = 0;
9008  __Pyx_RefNannyDeclarations
9009  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9010  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9011 
9012  /* function exit code */
9013  __Pyx_RefNannyFinishContext();
9014  return __pyx_r;
9015  }
9016 
9017  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9018  PyObject *__pyx_r = NULL;
9019  __Pyx_RefNannyDeclarations
9020  PyObject *__pyx_t_1 = NULL;
9021  PyObject *__pyx_t_2 = NULL;
9022  int __pyx_lineno = 0;
9023  const char *__pyx_filename = NULL;
9024  int __pyx_clineno = 0;
9025  __Pyx_RefNannySetupContext("odd", 0);
9026 
9027  /* "PyClical.pyx":1076
9028  * {1}
9029  * """
9030  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9031  *
9032  * def vector_part(self, frm = None):
9033  */
9034  __Pyx_XDECREF(__pyx_r);
9035  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9036  __Pyx_GOTREF(__pyx_t_1);
9037  __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_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9038  __Pyx_GOTREF(__pyx_t_2);
9039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9040  __pyx_r = __pyx_t_2;
9041  __pyx_t_2 = 0;
9042  goto __pyx_L0;
9043 
9044  /* "PyClical.pyx":1069
9045  * return clifford().wrap( self.instance.even() )
9046  *
9047  * def odd(self): # <<<<<<<<<<<<<<
9048  * """
9049  * Odd part of multivector, sum of odd grade terms.
9050  */
9051 
9052  /* function exit code */
9053  __pyx_L1_error:;
9054  __Pyx_XDECREF(__pyx_t_1);
9055  __Pyx_XDECREF(__pyx_t_2);
9056  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9057  __pyx_r = NULL;
9058  __pyx_L0:;
9059  __Pyx_XGIVEREF(__pyx_r);
9060  __Pyx_RefNannyFinishContext();
9061  return __pyx_r;
9062  }
9063 
9064  /* "PyClical.pyx":1078
9065  * return clifford().wrap( self.instance.odd() )
9066  *
9067  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9068  * """
9069  * Vector part of multivector, as a Python list, with respect to frm.
9070  */
9071 
9072  /* Python wrapper */
9073  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9074  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 ";
9075  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9076  PyObject *__pyx_v_frm = 0;
9077  int __pyx_lineno = 0;
9078  const char *__pyx_filename = NULL;
9079  int __pyx_clineno = 0;
9080  PyObject *__pyx_r = 0;
9081  __Pyx_RefNannyDeclarations
9082  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9083  {
9084  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9085  PyObject* values[1] = {0};
9086  values[0] = ((PyObject *)Py_None);
9087  if (unlikely(__pyx_kwds)) {
9088  Py_ssize_t kw_args;
9089  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9090  switch (pos_args) {
9091  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9092  case 0: break;
9093  default: goto __pyx_L5_argtuple_error;
9094  }
9095  kw_args = PyDict_Size(__pyx_kwds);
9096  switch (pos_args) {
9097  case 0:
9098  if (kw_args > 0) {
9099  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frm);
9100  if (value) { values[0] = value; kw_args--; }
9101  }
9102  }
9103  if (unlikely(kw_args > 0)) {
9104  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9105  }
9106  } else {
9107  switch (PyTuple_GET_SIZE(__pyx_args)) {
9108  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9109  case 0: break;
9110  default: goto __pyx_L5_argtuple_error;
9111  }
9112  }
9113  __pyx_v_frm = values[0];
9114  }
9115  goto __pyx_L4_argument_unpacking_done;
9116  __pyx_L5_argtuple_error:;
9117  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9118  __pyx_L3_error:;
9119  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9120  __Pyx_RefNannyFinishContext();
9121  return NULL;
9122  __pyx_L4_argument_unpacking_done:;
9123  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9124 
9125  /* function exit code */
9126  __Pyx_RefNannyFinishContext();
9127  return __pyx_r;
9128  }
9129 
9130  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9131  PyObject *__pyx_v_error_msg_prefix = NULL;
9132  std::vector<scalar_t> __pyx_v_vec;
9133  int __pyx_v_n;
9134  int __pyx_v_i;
9135  PyObject *__pyx_v_lst = NULL;
9136  PyObject *__pyx_v_err = NULL;
9137  PyObject *__pyx_r = NULL;
9138  __Pyx_RefNannyDeclarations
9139  PyObject *__pyx_t_1 = NULL;
9140  PyObject *__pyx_t_2 = NULL;
9141  PyObject *__pyx_t_3 = NULL;
9142  int __pyx_t_4;
9143  int __pyx_t_5;
9144  std::vector<scalar_t> __pyx_t_6;
9145  PyObject *__pyx_t_7 = NULL;
9146  int __pyx_t_8;
9147  int __pyx_t_9;
9148  PyObject *__pyx_t_10 = NULL;
9149  PyObject *__pyx_t_11 = NULL;
9150  PyObject *__pyx_t_12 = NULL;
9151  PyObject *__pyx_t_13 = NULL;
9152  PyObject *__pyx_t_14 = NULL;
9153  int __pyx_lineno = 0;
9154  const char *__pyx_filename = NULL;
9155  int __pyx_clineno = 0;
9156  __Pyx_RefNannySetupContext("vector_part", 0);
9157 
9158  /* "PyClical.pyx":1087
9159  * [0.0, 2.0, 3.0]
9160  * """
9161  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9162  * cdef vector[scalar_t] vec
9163  * cdef int n
9164  */
9165  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9166  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9167 
9168  /* "PyClical.pyx":1091
9169  * cdef int n
9170  * cdef int i
9171  * try: # <<<<<<<<<<<<<<
9172  * if frm is None:
9173  * vec = self.instance.vector_part()
9174  */
9175  {
9176  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9177  __Pyx_XGOTREF(__pyx_t_1);
9178  __Pyx_XGOTREF(__pyx_t_2);
9179  __Pyx_XGOTREF(__pyx_t_3);
9180  /*try:*/ {
9181 
9182  /* "PyClical.pyx":1092
9183  * cdef int i
9184  * try:
9185  * if frm is None: # <<<<<<<<<<<<<<
9186  * vec = self.instance.vector_part()
9187  * else:
9188  */
9189  __pyx_t_4 = (__pyx_v_frm == Py_None);
9190  __pyx_t_5 = (__pyx_t_4 != 0);
9191  if (__pyx_t_5) {
9192 
9193  /* "PyClical.pyx":1093
9194  * try:
9195  * if frm is None:
9196  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9197  * else:
9198  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9199  */
9200  __pyx_v_vec = __pyx_v_self->instance->vector_part();
9201  goto __pyx_L11;
9202  }
9203  /*else*/ {
9204 
9205  /* "PyClical.pyx":1095
9206  * vec = self.instance.vector_part()
9207  * else:
9208  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9209  * n = vec.size()
9210  * lst = [0.0]*n
9211  */
9212  try {
9213  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9214  } catch(...) {
9215  __Pyx_CppExn2PyErr();
9216  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9217  }
9218  __pyx_v_vec = __pyx_t_6;
9219  }
9220  __pyx_L11:;
9221 
9222  /* "PyClical.pyx":1096
9223  * else:
9224  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9225  * n = vec.size() # <<<<<<<<<<<<<<
9226  * lst = [0.0]*n
9227  * for i in xrange(n):
9228  */
9229  __pyx_v_n = __pyx_v_vec.size();
9230 
9231  /* "PyClical.pyx":1097
9232  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9233  * n = vec.size()
9234  * lst = [0.0]*n # <<<<<<<<<<<<<<
9235  * for i in xrange(n):
9236  * lst[i] = vec[i]
9237  */
9238  __pyx_t_7 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9239  __Pyx_GOTREF(__pyx_t_7);
9240  { Py_ssize_t __pyx_temp;
9241  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
9242  __Pyx_INCREF(__pyx_float_0_0);
9243  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
9244  __Pyx_GIVEREF(__pyx_float_0_0);
9245  }
9246  }
9247  __pyx_v_lst = ((PyObject*)__pyx_t_7);
9248  __pyx_t_7 = 0;
9249 
9250  /* "PyClical.pyx":1098
9251  * n = vec.size()
9252  * lst = [0.0]*n
9253  * for i in xrange(n): # <<<<<<<<<<<<<<
9254  * lst[i] = vec[i]
9255  * return lst
9256  */
9257  __pyx_t_8 = __pyx_v_n;
9258  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
9259  __pyx_v_i = __pyx_t_9;
9260 
9261  /* "PyClical.pyx":1099
9262  * lst = [0.0]*n
9263  * for i in xrange(n):
9264  * lst[i] = vec[i] # <<<<<<<<<<<<<<
9265  * return lst
9266  * except RuntimeError as err:
9267  */
9268  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9269  __Pyx_GOTREF(__pyx_t_7);
9270  if (unlikely(__Pyx_SetItemInt(__pyx_v_lst, __pyx_v_i, __pyx_t_7, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9271  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9272  }
9273 
9274  /* "PyClical.pyx":1100
9275  * for i in xrange(n):
9276  * lst[i] = vec[i]
9277  * return lst # <<<<<<<<<<<<<<
9278  * except RuntimeError as err:
9279  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
9280  */
9281  __Pyx_XDECREF(__pyx_r);
9282  __Pyx_INCREF(__pyx_v_lst);
9283  __pyx_r = __pyx_v_lst;
9284  goto __pyx_L7_try_return;
9285  }
9286  __pyx_L3_error:;
9287  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9288 
9289  /* "PyClical.pyx":1101
9290  * lst[i] = vec[i]
9291  * return lst
9292  * except RuntimeError as err: # <<<<<<<<<<<<<<
9293  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
9294  * + repr(frm) + " as frame:\n\t"
9295  */
9296  __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
9297  if (__pyx_t_8) {
9298  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9299  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9300  __Pyx_GOTREF(__pyx_t_7);
9301  __Pyx_GOTREF(__pyx_t_10);
9302  __Pyx_GOTREF(__pyx_t_11);
9303  __Pyx_INCREF(__pyx_t_10);
9304  __pyx_v_err = __pyx_t_10;
9305 
9306  /* "PyClical.pyx":1102
9307  * return lst
9308  * except RuntimeError as err:
9309  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
9310  * + repr(frm) + " as frame:\n\t"
9311  * + str(err))
9312  */
9313  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9314  __Pyx_GOTREF(__pyx_t_12);
9315  __Pyx_INCREF(((PyObject *)__pyx_v_self));
9316  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
9317  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
9318  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9319  __Pyx_GOTREF(__pyx_t_13);
9320  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9321  __pyx_t_12 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9322  __Pyx_GOTREF(__pyx_t_12);
9323  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9324  __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_kp_s_using_invalid); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9325  __Pyx_GOTREF(__pyx_t_13);
9326  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9327 
9328  /* "PyClical.pyx":1103
9329  * except RuntimeError as err:
9330  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
9331  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
9332  * + str(err))
9333  *
9334  */
9335  __pyx_t_12 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9336  __Pyx_GOTREF(__pyx_t_12);
9337  __pyx_t_14 = PyNumber_Add(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9338  __Pyx_GOTREF(__pyx_t_14);
9339  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9340  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9341  __pyx_t_12 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_as_frame); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9342  __Pyx_GOTREF(__pyx_t_12);
9343  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9344 
9345  /* "PyClical.pyx":1104
9346  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
9347  * + repr(frm) + " as frame:\n\t"
9348  * + str(err)) # <<<<<<<<<<<<<<
9349  *
9350  * def involute(self):
9351  */
9352  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9353  __Pyx_GOTREF(__pyx_t_14);
9354  __Pyx_INCREF(__pyx_v_err);
9355  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
9356  __Pyx_GIVEREF(__pyx_v_err);
9357  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9358  __Pyx_GOTREF(__pyx_t_13);
9359  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9360  __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9361  __Pyx_GOTREF(__pyx_t_14);
9362  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
9363  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9364 
9365  /* "PyClical.pyx":1102
9366  * return lst
9367  * except RuntimeError as err:
9368  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
9369  * + repr(frm) + " as frame:\n\t"
9370  * + str(err))
9371  */
9372  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9373  __Pyx_GOTREF(__pyx_t_13);
9374  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
9375  __Pyx_GIVEREF(__pyx_t_14);
9376  __pyx_t_14 = 0;
9377  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9378  __Pyx_GOTREF(__pyx_t_14);
9379  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
9380  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
9381  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9382  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
9383  }
9384  goto __pyx_L5_except_error;
9385  __pyx_L5_except_error:;
9386  __Pyx_XGIVEREF(__pyx_t_1);
9387  __Pyx_XGIVEREF(__pyx_t_2);
9388  __Pyx_XGIVEREF(__pyx_t_3);
9389  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9390  goto __pyx_L1_error;
9391  __pyx_L7_try_return:;
9392  __Pyx_XGIVEREF(__pyx_t_1);
9393  __Pyx_XGIVEREF(__pyx_t_2);
9394  __Pyx_XGIVEREF(__pyx_t_3);
9395  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9396  goto __pyx_L0;
9397  }
9398 
9399  /* "PyClical.pyx":1078
9400  * return clifford().wrap( self.instance.odd() )
9401  *
9402  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9403  * """
9404  * Vector part of multivector, as a Python list, with respect to frm.
9405  */
9406 
9407  /* function exit code */
9408  __pyx_L1_error:;
9409  __Pyx_XDECREF(__pyx_t_7);
9410  __Pyx_XDECREF(__pyx_t_10);
9411  __Pyx_XDECREF(__pyx_t_11);
9412  __Pyx_XDECREF(__pyx_t_12);
9413  __Pyx_XDECREF(__pyx_t_13);
9414  __Pyx_XDECREF(__pyx_t_14);
9415  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9416  __pyx_r = NULL;
9417  __pyx_L0:;
9418  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
9419  __Pyx_XDECREF(__pyx_v_lst);
9420  __Pyx_XDECREF(__pyx_v_err);
9421  __Pyx_XGIVEREF(__pyx_r);
9422  __Pyx_RefNannyFinishContext();
9423  return __pyx_r;
9424  }
9425 
9426  /* "PyClical.pyx":1106
9427  * + str(err))
9428  *
9429  * def involute(self): # <<<<<<<<<<<<<<
9430  * """
9431  * Main involution, each {i} is replaced by -{i} in each term,
9432  */
9433 
9434  /* Python wrapper */
9435  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9436  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 ";
9437  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9438  PyObject *__pyx_r = 0;
9439  __Pyx_RefNannyDeclarations
9440  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
9441  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9442 
9443  /* function exit code */
9444  __Pyx_RefNannyFinishContext();
9445  return __pyx_r;
9446  }
9447 
9448  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9449  PyObject *__pyx_r = NULL;
9450  __Pyx_RefNannyDeclarations
9451  PyObject *__pyx_t_1 = NULL;
9452  PyObject *__pyx_t_2 = NULL;
9453  int __pyx_lineno = 0;
9454  const char *__pyx_filename = NULL;
9455  int __pyx_clineno = 0;
9456  __Pyx_RefNannySetupContext("involute", 0);
9457 
9458  /* "PyClical.pyx":1120
9459  * 1-{1}+{1,2}
9460  * """
9461  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
9462  *
9463  * def reverse(self):
9464  */
9465  __Pyx_XDECREF(__pyx_r);
9466  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9467  __Pyx_GOTREF(__pyx_t_1);
9468  __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_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9469  __Pyx_GOTREF(__pyx_t_2);
9470  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9471  __pyx_r = __pyx_t_2;
9472  __pyx_t_2 = 0;
9473  goto __pyx_L0;
9474 
9475  /* "PyClical.pyx":1106
9476  * + str(err))
9477  *
9478  * def involute(self): # <<<<<<<<<<<<<<
9479  * """
9480  * Main involution, each {i} is replaced by -{i} in each term,
9481  */
9482 
9483  /* function exit code */
9484  __pyx_L1_error:;
9485  __Pyx_XDECREF(__pyx_t_1);
9486  __Pyx_XDECREF(__pyx_t_2);
9487  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
9488  __pyx_r = NULL;
9489  __pyx_L0:;
9490  __Pyx_XGIVEREF(__pyx_r);
9491  __Pyx_RefNannyFinishContext();
9492  return __pyx_r;
9493  }
9494 
9495  /* "PyClical.pyx":1122
9496  * return clifford().wrap( self.instance.involute() )
9497  *
9498  * def reverse(self): # <<<<<<<<<<<<<<
9499  * """
9500  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
9501  */
9502 
9503  /* Python wrapper */
9504  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9505  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 ";
9506  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9507  PyObject *__pyx_r = 0;
9508  __Pyx_RefNannyDeclarations
9509  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
9510  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9511 
9512  /* function exit code */
9513  __Pyx_RefNannyFinishContext();
9514  return __pyx_r;
9515  }
9516 
9517  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9518  PyObject *__pyx_r = NULL;
9519  __Pyx_RefNannyDeclarations
9520  PyObject *__pyx_t_1 = NULL;
9521  PyObject *__pyx_t_2 = NULL;
9522  int __pyx_lineno = 0;
9523  const char *__pyx_filename = NULL;
9524  int __pyx_clineno = 0;
9525  __Pyx_RefNannySetupContext("reverse", 0);
9526 
9527  /* "PyClical.pyx":1135
9528  * 1+{1}-{1,2}
9529  * """
9530  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
9531  *
9532  * def conj(self):
9533  */
9534  __Pyx_XDECREF(__pyx_r);
9535  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9536  __Pyx_GOTREF(__pyx_t_1);
9537  __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_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9538  __Pyx_GOTREF(__pyx_t_2);
9539  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9540  __pyx_r = __pyx_t_2;
9541  __pyx_t_2 = 0;
9542  goto __pyx_L0;
9543 
9544  /* "PyClical.pyx":1122
9545  * return clifford().wrap( self.instance.involute() )
9546  *
9547  * def reverse(self): # <<<<<<<<<<<<<<
9548  * """
9549  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
9550  */
9551 
9552  /* function exit code */
9553  __pyx_L1_error:;
9554  __Pyx_XDECREF(__pyx_t_1);
9555  __Pyx_XDECREF(__pyx_t_2);
9556  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
9557  __pyx_r = NULL;
9558  __pyx_L0:;
9559  __Pyx_XGIVEREF(__pyx_r);
9560  __Pyx_RefNannyFinishContext();
9561  return __pyx_r;
9562  }
9563 
9564  /* "PyClical.pyx":1137
9565  * return clifford().wrap( self.instance.reverse() )
9566  *
9567  * def conj(self): # <<<<<<<<<<<<<<
9568  * """
9569  * Conjugation, reverse o involute == involute o reverse.
9570  */
9571 
9572  /* Python wrapper */
9573  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9574  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 ";
9575  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9576  PyObject *__pyx_r = 0;
9577  __Pyx_RefNannyDeclarations
9578  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
9579  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9580 
9581  /* function exit code */
9582  __Pyx_RefNannyFinishContext();
9583  return __pyx_r;
9584  }
9585 
9586  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9587  PyObject *__pyx_r = NULL;
9588  __Pyx_RefNannyDeclarations
9589  PyObject *__pyx_t_1 = NULL;
9590  PyObject *__pyx_t_2 = NULL;
9591  int __pyx_lineno = 0;
9592  const char *__pyx_filename = NULL;
9593  int __pyx_clineno = 0;
9594  __Pyx_RefNannySetupContext("conj", 0);
9595 
9596  /* "PyClical.pyx":1150
9597  * 1-{1}-{1,2}
9598  * """
9599  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
9600  *
9601  * def quad(self):
9602  */
9603  __Pyx_XDECREF(__pyx_r);
9604  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9605  __Pyx_GOTREF(__pyx_t_1);
9606  __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_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9607  __Pyx_GOTREF(__pyx_t_2);
9608  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9609  __pyx_r = __pyx_t_2;
9610  __pyx_t_2 = 0;
9611  goto __pyx_L0;
9612 
9613  /* "PyClical.pyx":1137
9614  * return clifford().wrap( self.instance.reverse() )
9615  *
9616  * def conj(self): # <<<<<<<<<<<<<<
9617  * """
9618  * Conjugation, reverse o involute == involute o reverse.
9619  */
9620 
9621  /* function exit code */
9622  __pyx_L1_error:;
9623  __Pyx_XDECREF(__pyx_t_1);
9624  __Pyx_XDECREF(__pyx_t_2);
9625  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
9626  __pyx_r = NULL;
9627  __pyx_L0:;
9628  __Pyx_XGIVEREF(__pyx_r);
9629  __Pyx_RefNannyFinishContext();
9630  return __pyx_r;
9631  }
9632 
9633  /* "PyClical.pyx":1152
9634  * return clifford().wrap( self.instance.conj() )
9635  *
9636  * def quad(self): # <<<<<<<<<<<<<<
9637  * """
9638  * Quadratic form == (rev(x)*x)(0).
9639  */
9640 
9641  /* Python wrapper */
9642  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9643  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 ";
9644  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9645  PyObject *__pyx_r = 0;
9646  __Pyx_RefNannyDeclarations
9647  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
9648  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9649 
9650  /* function exit code */
9651  __Pyx_RefNannyFinishContext();
9652  return __pyx_r;
9653  }
9654 
9655  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9656  PyObject *__pyx_r = NULL;
9657  __Pyx_RefNannyDeclarations
9658  PyObject *__pyx_t_1 = NULL;
9659  int __pyx_lineno = 0;
9660  const char *__pyx_filename = NULL;
9661  int __pyx_clineno = 0;
9662  __Pyx_RefNannySetupContext("quad", 0);
9663 
9664  /* "PyClical.pyx":1161
9665  * 2.0
9666  * """
9667  * return self.instance.quad() # <<<<<<<<<<<<<<
9668  *
9669  * def norm(self):
9670  */
9671  __Pyx_XDECREF(__pyx_r);
9672  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9673  __Pyx_GOTREF(__pyx_t_1);
9674  __pyx_r = __pyx_t_1;
9675  __pyx_t_1 = 0;
9676  goto __pyx_L0;
9677 
9678  /* "PyClical.pyx":1152
9679  * return clifford().wrap( self.instance.conj() )
9680  *
9681  * def quad(self): # <<<<<<<<<<<<<<
9682  * """
9683  * Quadratic form == (rev(x)*x)(0).
9684  */
9685 
9686  /* function exit code */
9687  __pyx_L1_error:;
9688  __Pyx_XDECREF(__pyx_t_1);
9689  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
9690  __pyx_r = NULL;
9691  __pyx_L0:;
9692  __Pyx_XGIVEREF(__pyx_r);
9693  __Pyx_RefNannyFinishContext();
9694  return __pyx_r;
9695  }
9696 
9697  /* "PyClical.pyx":1163
9698  * return self.instance.quad()
9699  *
9700  * def norm(self): # <<<<<<<<<<<<<<
9701  * """
9702  * Norm == sum of squares of coordinates.
9703  */
9704 
9705  /* Python wrapper */
9706  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9707  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 ";
9708  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9709  PyObject *__pyx_r = 0;
9710  __Pyx_RefNannyDeclarations
9711  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
9712  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9713 
9714  /* function exit code */
9715  __Pyx_RefNannyFinishContext();
9716  return __pyx_r;
9717  }
9718 
9719  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9720  PyObject *__pyx_r = NULL;
9721  __Pyx_RefNannyDeclarations
9722  PyObject *__pyx_t_1 = NULL;
9723  int __pyx_lineno = 0;
9724  const char *__pyx_filename = NULL;
9725  int __pyx_clineno = 0;
9726  __Pyx_RefNannySetupContext("norm", 0);
9727 
9728  /* "PyClical.pyx":1172
9729  * 4.0
9730  * """
9731  * return self.instance.norm() # <<<<<<<<<<<<<<
9732  *
9733  * def abs(self):
9734  */
9735  __Pyx_XDECREF(__pyx_r);
9736  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9737  __Pyx_GOTREF(__pyx_t_1);
9738  __pyx_r = __pyx_t_1;
9739  __pyx_t_1 = 0;
9740  goto __pyx_L0;
9741 
9742  /* "PyClical.pyx":1163
9743  * return self.instance.quad()
9744  *
9745  * def norm(self): # <<<<<<<<<<<<<<
9746  * """
9747  * Norm == sum of squares of coordinates.
9748  */
9749 
9750  /* function exit code */
9751  __pyx_L1_error:;
9752  __Pyx_XDECREF(__pyx_t_1);
9753  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
9754  __pyx_r = NULL;
9755  __pyx_L0:;
9756  __Pyx_XGIVEREF(__pyx_r);
9757  __Pyx_RefNannyFinishContext();
9758  return __pyx_r;
9759  }
9760 
9761  /* "PyClical.pyx":1174
9762  * return self.instance.norm()
9763  *
9764  * def abs(self): # <<<<<<<<<<<<<<
9765  * """
9766  * Absolute value: square root of norm.
9767  */
9768 
9769  /* Python wrapper */
9770  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9771  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 ";
9772  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9773  PyObject *__pyx_r = 0;
9774  __Pyx_RefNannyDeclarations
9775  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
9776  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9777 
9778  /* function exit code */
9779  __Pyx_RefNannyFinishContext();
9780  return __pyx_r;
9781  }
9782 
9783  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9784  PyObject *__pyx_r = NULL;
9785  __Pyx_RefNannyDeclarations
9786  PyObject *__pyx_t_1 = NULL;
9787  int __pyx_lineno = 0;
9788  const char *__pyx_filename = NULL;
9789  int __pyx_clineno = 0;
9790  __Pyx_RefNannySetupContext("abs", 0);
9791 
9792  /* "PyClical.pyx":1181
9793  * 2.0
9794  * """
9795  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
9796  *
9797  * def max_abs(self):
9798  */
9799  __Pyx_XDECREF(__pyx_r);
9800  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9801  __Pyx_GOTREF(__pyx_t_1);
9802  __pyx_r = __pyx_t_1;
9803  __pyx_t_1 = 0;
9804  goto __pyx_L0;
9805 
9806  /* "PyClical.pyx":1174
9807  * return self.instance.norm()
9808  *
9809  * def abs(self): # <<<<<<<<<<<<<<
9810  * """
9811  * Absolute value: square root of norm.
9812  */
9813 
9814  /* function exit code */
9815  __pyx_L1_error:;
9816  __Pyx_XDECREF(__pyx_t_1);
9817  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9818  __pyx_r = NULL;
9819  __pyx_L0:;
9820  __Pyx_XGIVEREF(__pyx_r);
9821  __Pyx_RefNannyFinishContext();
9822  return __pyx_r;
9823  }
9824 
9825  /* "PyClical.pyx":1183
9826  * return glucat.abs( self.unwrap() )
9827  *
9828  * def max_abs(self): # <<<<<<<<<<<<<<
9829  * """
9830  * Maximum of absolute values of components of multivector: multivector infinity norm.
9831  */
9832 
9833  /* Python wrapper */
9834  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9835  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 ";
9836  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9837  PyObject *__pyx_r = 0;
9838  __Pyx_RefNannyDeclarations
9839  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
9840  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9841 
9842  /* function exit code */
9843  __Pyx_RefNannyFinishContext();
9844  return __pyx_r;
9845  }
9846 
9847  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9848  PyObject *__pyx_r = NULL;
9849  __Pyx_RefNannyDeclarations
9850  PyObject *__pyx_t_1 = NULL;
9851  int __pyx_lineno = 0;
9852  const char *__pyx_filename = NULL;
9853  int __pyx_clineno = 0;
9854  __Pyx_RefNannySetupContext("max_abs", 0);
9855 
9856  /* "PyClical.pyx":1192
9857  * 3.0
9858  * """
9859  * return self.instance.max_abs() # <<<<<<<<<<<<<<
9860  *
9861  * def truncated(self, limit):
9862  */
9863  __Pyx_XDECREF(__pyx_r);
9864  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9865  __Pyx_GOTREF(__pyx_t_1);
9866  __pyx_r = __pyx_t_1;
9867  __pyx_t_1 = 0;
9868  goto __pyx_L0;
9869 
9870  /* "PyClical.pyx":1183
9871  * return glucat.abs( self.unwrap() )
9872  *
9873  * def max_abs(self): # <<<<<<<<<<<<<<
9874  * """
9875  * Maximum of absolute values of components of multivector: multivector infinity norm.
9876  */
9877 
9878  /* function exit code */
9879  __pyx_L1_error:;
9880  __Pyx_XDECREF(__pyx_t_1);
9881  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
9882  __pyx_r = NULL;
9883  __pyx_L0:;
9884  __Pyx_XGIVEREF(__pyx_r);
9885  __Pyx_RefNannyFinishContext();
9886  return __pyx_r;
9887  }
9888 
9889  /* "PyClical.pyx":1194
9890  * return self.instance.max_abs()
9891  *
9892  * def truncated(self, limit): # <<<<<<<<<<<<<<
9893  * """
9894  * Remove all terms of self with relative size smaller than limit.
9895  */
9896 
9897  /* Python wrapper */
9898  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
9899  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 ";
9900  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
9901  PyObject *__pyx_r = 0;
9902  __Pyx_RefNannyDeclarations
9903  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
9904  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
9905 
9906  /* function exit code */
9907  __Pyx_RefNannyFinishContext();
9908  return __pyx_r;
9909  }
9910 
9911  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
9912  PyObject *__pyx_r = NULL;
9913  __Pyx_RefNannyDeclarations
9914  PyObject *__pyx_t_1 = NULL;
9915  scalar_t __pyx_t_2;
9916  PyObject *__pyx_t_3 = NULL;
9917  int __pyx_lineno = 0;
9918  const char *__pyx_filename = NULL;
9919  int __pyx_clineno = 0;
9920  __Pyx_RefNannySetupContext("truncated", 0);
9921 
9922  /* "PyClical.pyx":1203
9923  * clifford("10000+{1}")
9924  * """
9925  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
9926  *
9927  * def isnan(self):
9928  */
9929  __Pyx_XDECREF(__pyx_r);
9930  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9931  __Pyx_GOTREF(__pyx_t_1);
9932  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_limit); if (unlikely((__pyx_t_2 == (scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9933  __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_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9934  __Pyx_GOTREF(__pyx_t_3);
9935  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9936  __pyx_r = __pyx_t_3;
9937  __pyx_t_3 = 0;
9938  goto __pyx_L0;
9939 
9940  /* "PyClical.pyx":1194
9941  * return self.instance.max_abs()
9942  *
9943  * def truncated(self, limit): # <<<<<<<<<<<<<<
9944  * """
9945  * Remove all terms of self with relative size smaller than limit.
9946  */
9947 
9948  /* function exit code */
9949  __pyx_L1_error:;
9950  __Pyx_XDECREF(__pyx_t_1);
9951  __Pyx_XDECREF(__pyx_t_3);
9952  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
9953  __pyx_r = NULL;
9954  __pyx_L0:;
9955  __Pyx_XGIVEREF(__pyx_r);
9956  __Pyx_RefNannyFinishContext();
9957  return __pyx_r;
9958  }
9959 
9960  /* "PyClical.pyx":1205
9961  * return clifford().wrap( self.instance.truncated(limit) )
9962  *
9963  * def isnan(self): # <<<<<<<<<<<<<<
9964  * """
9965  * Check if a multivector contains any IEEE NaN values.
9966  */
9967 
9968  /* Python wrapper */
9969  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9970  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
9971  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9972  PyObject *__pyx_r = 0;
9973  __Pyx_RefNannyDeclarations
9974  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
9975  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9976 
9977  /* function exit code */
9978  __Pyx_RefNannyFinishContext();
9979  return __pyx_r;
9980  }
9981 
9982  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9983  PyObject *__pyx_r = NULL;
9984  __Pyx_RefNannyDeclarations
9985  PyObject *__pyx_t_1 = NULL;
9986  int __pyx_lineno = 0;
9987  const char *__pyx_filename = NULL;
9988  int __pyx_clineno = 0;
9989  __Pyx_RefNannySetupContext("isnan", 0);
9990 
9991  /* "PyClical.pyx":1212
9992  * False
9993  * """
9994  * return self.instance.isnan() # <<<<<<<<<<<<<<
9995  *
9996  * def frame(self):
9997  */
9998  __Pyx_XDECREF(__pyx_r);
9999  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10000  __Pyx_GOTREF(__pyx_t_1);
10001  __pyx_r = __pyx_t_1;
10002  __pyx_t_1 = 0;
10003  goto __pyx_L0;
10004 
10005  /* "PyClical.pyx":1205
10006  * return clifford().wrap( self.instance.truncated(limit) )
10007  *
10008  * def isnan(self): # <<<<<<<<<<<<<<
10009  * """
10010  * Check if a multivector contains any IEEE NaN values.
10011  */
10012 
10013  /* function exit code */
10014  __pyx_L1_error:;
10015  __Pyx_XDECREF(__pyx_t_1);
10016  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10017  __pyx_r = NULL;
10018  __pyx_L0:;
10019  __Pyx_XGIVEREF(__pyx_r);
10020  __Pyx_RefNannyFinishContext();
10021  return __pyx_r;
10022  }
10023 
10024  /* "PyClical.pyx":1214
10025  * return self.instance.isnan()
10026  *
10027  * def frame(self): # <<<<<<<<<<<<<<
10028  * """
10029  * Subalgebra generated by all generators of terms of given multivector.
10030  */
10031 
10032  /* Python wrapper */
10033  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10034  static char __pyx_doc_8PyClical_8clifford_90frame[] = "\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame()\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <type 'PyClical.index_set'>\n ";
10035  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10036  PyObject *__pyx_r = 0;
10037  __Pyx_RefNannyDeclarations
10038  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10039  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10040 
10041  /* function exit code */
10042  __Pyx_RefNannyFinishContext();
10043  return __pyx_r;
10044  }
10045 
10046  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10047  PyObject *__pyx_r = NULL;
10048  __Pyx_RefNannyDeclarations
10049  PyObject *__pyx_t_1 = NULL;
10050  PyObject *__pyx_t_2 = NULL;
10051  int __pyx_lineno = 0;
10052  const char *__pyx_filename = NULL;
10053  int __pyx_clineno = 0;
10054  __Pyx_RefNannySetupContext("frame", 0);
10055 
10056  /* "PyClical.pyx":1223
10057  * <type 'PyClical.index_set'>
10058  * """
10059  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10060  *
10061  * def __repr__(self):
10062  */
10063  __Pyx_XDECREF(__pyx_r);
10064  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10065  __Pyx_GOTREF(__pyx_t_1);
10066  __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_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10067  __Pyx_GOTREF(__pyx_t_2);
10068  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10069  __pyx_r = __pyx_t_2;
10070  __pyx_t_2 = 0;
10071  goto __pyx_L0;
10072 
10073  /* "PyClical.pyx":1214
10074  * return self.instance.isnan()
10075  *
10076  * def frame(self): # <<<<<<<<<<<<<<
10077  * """
10078  * Subalgebra generated by all generators of terms of given multivector.
10079  */
10080 
10081  /* function exit code */
10082  __pyx_L1_error:;
10083  __Pyx_XDECREF(__pyx_t_1);
10084  __Pyx_XDECREF(__pyx_t_2);
10085  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10086  __pyx_r = NULL;
10087  __pyx_L0:;
10088  __Pyx_XGIVEREF(__pyx_r);
10089  __Pyx_RefNannyFinishContext();
10090  return __pyx_r;
10091  }
10092 
10093  /* "PyClical.pyx":1225
10094  * return index_set().wrap( self.instance.frame() )
10095  *
10096  * def __repr__(self): # <<<<<<<<<<<<<<
10097  * """
10098  * The official string representation of self.
10099  */
10100 
10101  /* Python wrapper */
10102  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10103  static char __pyx_doc_8PyClical_8clifford_92__repr__[] = "\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__repr__()\n 'clifford(\"1+3{-1}+2{1,2}+4{-2,7}\")'\n ";
10104  #if CYTHON_COMPILING_IN_CPYTHON
10105  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10106  #endif
10107  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10108  PyObject *__pyx_r = 0;
10109  __Pyx_RefNannyDeclarations
10110  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10111  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10112 
10113  /* function exit code */
10114  __Pyx_RefNannyFinishContext();
10115  return __pyx_r;
10116  }
10117 
10118  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10119  PyObject *__pyx_r = NULL;
10120  __Pyx_RefNannyDeclarations
10121  PyObject *__pyx_t_1 = NULL;
10122  int __pyx_lineno = 0;
10123  const char *__pyx_filename = NULL;
10124  int __pyx_clineno = 0;
10125  __Pyx_RefNannySetupContext("__repr__", 0);
10126 
10127  /* "PyClical.pyx":1232
10128  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10129  * """
10130  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10131  *
10132  * def __str__(self):
10133  */
10134  __Pyx_XDECREF(__pyx_r);
10135  __pyx_t_1 = __Pyx_PyBytes_FromString(clifford_to_repr(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10136  __Pyx_GOTREF(__pyx_t_1);
10137  __pyx_r = __pyx_t_1;
10138  __pyx_t_1 = 0;
10139  goto __pyx_L0;
10140 
10141  /* "PyClical.pyx":1225
10142  * return index_set().wrap( self.instance.frame() )
10143  *
10144  * def __repr__(self): # <<<<<<<<<<<<<<
10145  * """
10146  * The official string representation of self.
10147  */
10148 
10149  /* function exit code */
10150  __pyx_L1_error:;
10151  __Pyx_XDECREF(__pyx_t_1);
10152  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10153  __pyx_r = NULL;
10154  __pyx_L0:;
10155  __Pyx_XGIVEREF(__pyx_r);
10156  __Pyx_RefNannyFinishContext();
10157  return __pyx_r;
10158  }
10159 
10160  /* "PyClical.pyx":1234
10161  * return clifford_to_repr( self.unwrap() ).c_str()
10162  *
10163  * def __str__(self): # <<<<<<<<<<<<<<
10164  * """
10165  * The informal string representation of self.
10166  */
10167 
10168  /* Python wrapper */
10169  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10170  static char __pyx_doc_8PyClical_8clifford_94__str__[] = "\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__str__()\n '1+3{-1}+2{1,2}+4{-2,7}'\n ";
10171  #if CYTHON_COMPILING_IN_CPYTHON
10172  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10173  #endif
10174  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10175  PyObject *__pyx_r = 0;
10176  __Pyx_RefNannyDeclarations
10177  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10178  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10179 
10180  /* function exit code */
10181  __Pyx_RefNannyFinishContext();
10182  return __pyx_r;
10183  }
10184 
10185  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10186  PyObject *__pyx_r = NULL;
10187  __Pyx_RefNannyDeclarations
10188  PyObject *__pyx_t_1 = NULL;
10189  int __pyx_lineno = 0;
10190  const char *__pyx_filename = NULL;
10191  int __pyx_clineno = 0;
10192  __Pyx_RefNannySetupContext("__str__", 0);
10193 
10194  /* "PyClical.pyx":1241
10195  * '1+3{-1}+2{1,2}+4{-2,7}'
10196  * """
10197  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10198  *
10199  * def clifford_hidden_doctests():
10200  */
10201  __Pyx_XDECREF(__pyx_r);
10202  __pyx_t_1 = __Pyx_PyBytes_FromString(clifford_to_str(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10203  __Pyx_GOTREF(__pyx_t_1);
10204  __pyx_r = __pyx_t_1;
10205  __pyx_t_1 = 0;
10206  goto __pyx_L0;
10207 
10208  /* "PyClical.pyx":1234
10209  * return clifford_to_repr( self.unwrap() ).c_str()
10210  *
10211  * def __str__(self): # <<<<<<<<<<<<<<
10212  * """
10213  * The informal string representation of self.
10214  */
10215 
10216  /* function exit code */
10217  __pyx_L1_error:;
10218  __Pyx_XDECREF(__pyx_t_1);
10219  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10220  __pyx_r = NULL;
10221  __pyx_L0:;
10222  __Pyx_XGIVEREF(__pyx_r);
10223  __Pyx_RefNannyFinishContext();
10224  return __pyx_r;
10225  }
10226 
10227  /* "PyClical.pyx":1243
10228  * return clifford_to_str( self.unwrap() ).c_str()
10229  *
10230  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
10231  * """
10232  * Tests for functions that Doctest cannot see.
10233  */
10234 
10235  /* Python wrapper */
10236  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10237  static char __pyx_doc_8PyClical_8clifford_hidden_doctests[] = "\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print clifford(2)\n 2\n >>> print clifford(2L)\n 2\n >>> print clifford(2.0)\n 2\n >>> print clifford(1.0e-1)\n 0.1\n >>> print clifford(\"2\")\n 2\n >>> print clifford(\"2{1,2,3}\")\n 2{1,2,3}\n >>> print clifford(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print clifford(\"-{1}\")\n -{1}\n >>> print clifford(2,index_set({1,2}))\n 2{1,2}\n >>> print clifford([2,3],index_set({1,2}))\n 2{1}+3{2}\n >>> print clifford([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type 'list'>).\n >>> print clifford(\"\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print clifford(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print clifford(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print clifford(\"+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print clifford(\"-\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford"" object from invalid string '-'.\n >>> print clifford(\"{1}+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ";
10238  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};
10239  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
10240  PyObject *__pyx_r = 0;
10241  __Pyx_RefNannyDeclarations
10242  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
10243  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
10244 
10245  /* function exit code */
10246  __Pyx_RefNannyFinishContext();
10247  return __pyx_r;
10248  }
10249 
10250  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
10251  PyObject *__pyx_r = NULL;
10252  __Pyx_RefNannyDeclarations
10253  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
10254 
10255  /* "PyClical.pyx":1327
10256  * True
10257  * """
10258  * return # <<<<<<<<<<<<<<
10259  *
10260  * cpdef inline inv(obj):
10261  */
10262  __Pyx_XDECREF(__pyx_r);
10263  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10264  goto __pyx_L0;
10265 
10266  /* "PyClical.pyx":1243
10267  * return clifford_to_str( self.unwrap() ).c_str()
10268  *
10269  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
10270  * """
10271  * Tests for functions that Doctest cannot see.
10272  */
10273 
10274  /* function exit code */
10275  __pyx_L0:;
10276  __Pyx_XGIVEREF(__pyx_r);
10277  __Pyx_RefNannyFinishContext();
10278  return __pyx_r;
10279  }
10280 
10281  /* "PyClical.pyx":1329
10282  * return
10283  *
10284  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
10285  * """
10286  * Geometric multiplicative inverse.
10287  */
10288 
10289  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10290  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
10291  PyObject *__pyx_r = NULL;
10292  __Pyx_RefNannyDeclarations
10293  PyObject *__pyx_t_1 = NULL;
10294  PyObject *__pyx_t_2 = NULL;
10295  PyObject *__pyx_t_3 = NULL;
10296  int __pyx_lineno = 0;
10297  const char *__pyx_filename = NULL;
10298  int __pyx_clineno = 0;
10299  __Pyx_RefNannySetupContext("inv", 0);
10300 
10301  /* "PyClical.pyx":1342
10302  * nan
10303  * """
10304  * return clifford(obj).inv() # <<<<<<<<<<<<<<
10305  *
10306  * cpdef inline scalar(obj):
10307  */
10308  __Pyx_XDECREF(__pyx_r);
10309  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10310  __Pyx_GOTREF(__pyx_t_2);
10311  __Pyx_INCREF(__pyx_v_obj);
10312  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10313  __Pyx_GIVEREF(__pyx_v_obj);
10314  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10315  __Pyx_GOTREF(__pyx_t_3);
10316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10317  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10318  __Pyx_GOTREF(__pyx_t_2);
10319  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10320  __pyx_t_3 = NULL;
10321  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10322  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10323  if (likely(__pyx_t_3)) {
10324  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10325  __Pyx_INCREF(__pyx_t_3);
10326  __Pyx_INCREF(function);
10327  __Pyx_DECREF_SET(__pyx_t_2, function);
10328  }
10329  }
10330  if (__pyx_t_3) {
10331  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10332  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10333  } else {
10334  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10335  }
10336  __Pyx_GOTREF(__pyx_t_1);
10337  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10338  __pyx_r = __pyx_t_1;
10339  __pyx_t_1 = 0;
10340  goto __pyx_L0;
10341 
10342  /* "PyClical.pyx":1329
10343  * return
10344  *
10345  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
10346  * """
10347  * Geometric multiplicative inverse.
10348  */
10349 
10350  /* function exit code */
10351  __pyx_L1_error:;
10352  __Pyx_XDECREF(__pyx_t_1);
10353  __Pyx_XDECREF(__pyx_t_2);
10354  __Pyx_XDECREF(__pyx_t_3);
10355  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10356  __pyx_r = 0;
10357  __pyx_L0:;
10358  __Pyx_XGIVEREF(__pyx_r);
10359  __Pyx_RefNannyFinishContext();
10360  return __pyx_r;
10361  }
10362 
10363  /* Python wrapper */
10364  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10365  static char __pyx_doc_8PyClical_10inv[] = "\n Geometric multiplicative inverse.\n\n >>> print inv(clifford(\"{1}\"))\n {1}\n >>> print inv(clifford(\"{-1}\"))\n -{-1}\n >>> print inv(clifford(\"{-2,-1}\"))\n -{-2,-1}\n >>> print inv(clifford(\"{-1}+{1}\"))\n nan\n ";
10366  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10367  PyObject *__pyx_r = 0;
10368  __Pyx_RefNannyDeclarations
10369  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
10370  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
10371 
10372  /* function exit code */
10373  __Pyx_RefNannyFinishContext();
10374  return __pyx_r;
10375  }
10376 
10377  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10378  PyObject *__pyx_r = NULL;
10379  __Pyx_RefNannyDeclarations
10380  PyObject *__pyx_t_1 = NULL;
10381  int __pyx_lineno = 0;
10382  const char *__pyx_filename = NULL;
10383  int __pyx_clineno = 0;
10384  __Pyx_RefNannySetupContext("inv", 0);
10385  __Pyx_XDECREF(__pyx_r);
10386  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10387  __Pyx_GOTREF(__pyx_t_1);
10388  __pyx_r = __pyx_t_1;
10389  __pyx_t_1 = 0;
10390  goto __pyx_L0;
10391 
10392  /* function exit code */
10393  __pyx_L1_error:;
10394  __Pyx_XDECREF(__pyx_t_1);
10395  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
10396  __pyx_r = NULL;
10397  __pyx_L0:;
10398  __Pyx_XGIVEREF(__pyx_r);
10399  __Pyx_RefNannyFinishContext();
10400  return __pyx_r;
10401  }
10402 
10403  /* "PyClical.pyx":1344
10404  * return clifford(obj).inv()
10405  *
10406  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
10407  * """
10408  * Scalar part.
10409  */
10410 
10411  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10412  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
10413  PyObject *__pyx_r = NULL;
10414  __Pyx_RefNannyDeclarations
10415  PyObject *__pyx_t_1 = NULL;
10416  PyObject *__pyx_t_2 = NULL;
10417  PyObject *__pyx_t_3 = NULL;
10418  int __pyx_lineno = 0;
10419  const char *__pyx_filename = NULL;
10420  int __pyx_clineno = 0;
10421  __Pyx_RefNannySetupContext("scalar", 0);
10422 
10423  /* "PyClical.pyx":1353
10424  * 0.0
10425  * """
10426  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
10427  *
10428  * cpdef inline real(obj):
10429  */
10430  __Pyx_XDECREF(__pyx_r);
10431  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10432  __Pyx_GOTREF(__pyx_t_2);
10433  __Pyx_INCREF(__pyx_v_obj);
10434  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10435  __Pyx_GIVEREF(__pyx_v_obj);
10436  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10437  __Pyx_GOTREF(__pyx_t_3);
10438  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10439  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_scalar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10440  __Pyx_GOTREF(__pyx_t_2);
10441  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10442  __pyx_t_3 = NULL;
10443  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10444  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10445  if (likely(__pyx_t_3)) {
10446  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10447  __Pyx_INCREF(__pyx_t_3);
10448  __Pyx_INCREF(function);
10449  __Pyx_DECREF_SET(__pyx_t_2, function);
10450  }
10451  }
10452  if (__pyx_t_3) {
10453  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10454  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10455  } else {
10456  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10457  }
10458  __Pyx_GOTREF(__pyx_t_1);
10459  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10460  __pyx_r = __pyx_t_1;
10461  __pyx_t_1 = 0;
10462  goto __pyx_L0;
10463 
10464  /* "PyClical.pyx":1344
10465  * return clifford(obj).inv()
10466  *
10467  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
10468  * """
10469  * Scalar part.
10470  */
10471 
10472  /* function exit code */
10473  __pyx_L1_error:;
10474  __Pyx_XDECREF(__pyx_t_1);
10475  __Pyx_XDECREF(__pyx_t_2);
10476  __Pyx_XDECREF(__pyx_t_3);
10477  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10478  __pyx_r = 0;
10479  __pyx_L0:;
10480  __Pyx_XGIVEREF(__pyx_r);
10481  __Pyx_RefNannyFinishContext();
10482  return __pyx_r;
10483  }
10484 
10485  /* Python wrapper */
10486  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10487  static char __pyx_doc_8PyClical_12scalar[] = "\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
10488  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10489  PyObject *__pyx_r = 0;
10490  __Pyx_RefNannyDeclarations
10491  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
10492  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
10493 
10494  /* function exit code */
10495  __Pyx_RefNannyFinishContext();
10496  return __pyx_r;
10497  }
10498 
10499  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10500  PyObject *__pyx_r = NULL;
10501  __Pyx_RefNannyDeclarations
10502  PyObject *__pyx_t_1 = NULL;
10503  int __pyx_lineno = 0;
10504  const char *__pyx_filename = NULL;
10505  int __pyx_clineno = 0;
10506  __Pyx_RefNannySetupContext("scalar", 0);
10507  __Pyx_XDECREF(__pyx_r);
10508  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10509  __Pyx_GOTREF(__pyx_t_1);
10510  __pyx_r = __pyx_t_1;
10511  __pyx_t_1 = 0;
10512  goto __pyx_L0;
10513 
10514  /* function exit code */
10515  __pyx_L1_error:;
10516  __Pyx_XDECREF(__pyx_t_1);
10517  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10518  __pyx_r = NULL;
10519  __pyx_L0:;
10520  __Pyx_XGIVEREF(__pyx_r);
10521  __Pyx_RefNannyFinishContext();
10522  return __pyx_r;
10523  }
10524 
10525  /* "PyClical.pyx":1355
10526  * return clifford(obj).scalar()
10527  *
10528  * cpdef inline real(obj): # <<<<<<<<<<<<<<
10529  * """
10530  * Real part: synonym for scalar part.
10531  */
10532 
10533  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10534  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
10535  PyObject *__pyx_r = NULL;
10536  __Pyx_RefNannyDeclarations
10537  PyObject *__pyx_t_1 = NULL;
10538  PyObject *__pyx_t_2 = NULL;
10539  PyObject *__pyx_t_3 = NULL;
10540  int __pyx_lineno = 0;
10541  const char *__pyx_filename = NULL;
10542  int __pyx_clineno = 0;
10543  __Pyx_RefNannySetupContext("real", 0);
10544 
10545  /* "PyClical.pyx":1364
10546  * 0.0
10547  * """
10548  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
10549  *
10550  * cpdef inline imag(obj):
10551  */
10552  __Pyx_XDECREF(__pyx_r);
10553  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10554  __Pyx_GOTREF(__pyx_t_2);
10555  __Pyx_INCREF(__pyx_v_obj);
10556  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10557  __Pyx_GIVEREF(__pyx_v_obj);
10558  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10559  __Pyx_GOTREF(__pyx_t_3);
10560  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10561  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_scalar); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10562  __Pyx_GOTREF(__pyx_t_2);
10563  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10564  __pyx_t_3 = NULL;
10565  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10566  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10567  if (likely(__pyx_t_3)) {
10568  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10569  __Pyx_INCREF(__pyx_t_3);
10570  __Pyx_INCREF(function);
10571  __Pyx_DECREF_SET(__pyx_t_2, function);
10572  }
10573  }
10574  if (__pyx_t_3) {
10575  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10576  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10577  } else {
10578  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10579  }
10580  __Pyx_GOTREF(__pyx_t_1);
10581  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10582  __pyx_r = __pyx_t_1;
10583  __pyx_t_1 = 0;
10584  goto __pyx_L0;
10585 
10586  /* "PyClical.pyx":1355
10587  * return clifford(obj).scalar()
10588  *
10589  * cpdef inline real(obj): # <<<<<<<<<<<<<<
10590  * """
10591  * Real part: synonym for scalar part.
10592  */
10593 
10594  /* function exit code */
10595  __pyx_L1_error:;
10596  __Pyx_XDECREF(__pyx_t_1);
10597  __Pyx_XDECREF(__pyx_t_2);
10598  __Pyx_XDECREF(__pyx_t_3);
10599  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
10600  __pyx_r = 0;
10601  __pyx_L0:;
10602  __Pyx_XGIVEREF(__pyx_r);
10603  __Pyx_RefNannyFinishContext();
10604  return __pyx_r;
10605  }
10606 
10607  /* Python wrapper */
10608  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10609  static char __pyx_doc_8PyClical_14real[] = "\n Real part: synonym for scalar part.\n\n >>> real(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> real(clifford(\"{1,2}\"))\n 0.0\n ";
10610  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10611  PyObject *__pyx_r = 0;
10612  __Pyx_RefNannyDeclarations
10613  __Pyx_RefNannySetupContext("real (wrapper)", 0);
10614  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
10615 
10616  /* function exit code */
10617  __Pyx_RefNannyFinishContext();
10618  return __pyx_r;
10619  }
10620 
10621  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10622  PyObject *__pyx_r = NULL;
10623  __Pyx_RefNannyDeclarations
10624  PyObject *__pyx_t_1 = NULL;
10625  int __pyx_lineno = 0;
10626  const char *__pyx_filename = NULL;
10627  int __pyx_clineno = 0;
10628  __Pyx_RefNannySetupContext("real", 0);
10629  __Pyx_XDECREF(__pyx_r);
10630  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10631  __Pyx_GOTREF(__pyx_t_1);
10632  __pyx_r = __pyx_t_1;
10633  __pyx_t_1 = 0;
10634  goto __pyx_L0;
10635 
10636  /* function exit code */
10637  __pyx_L1_error:;
10638  __Pyx_XDECREF(__pyx_t_1);
10639  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
10640  __pyx_r = NULL;
10641  __pyx_L0:;
10642  __Pyx_XGIVEREF(__pyx_r);
10643  __Pyx_RefNannyFinishContext();
10644  return __pyx_r;
10645  }
10646 
10647  /* "PyClical.pyx":1366
10648  * return clifford(obj).scalar()
10649  *
10650  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
10651  * """
10652  * Imaginary part: deprecated (always 0).
10653  */
10654 
10655  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10656  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
10657  PyObject *__pyx_r = NULL;
10658  __Pyx_RefNannyDeclarations
10659  __Pyx_RefNannySetupContext("imag", 0);
10660 
10661  /* "PyClical.pyx":1375
10662  * 0.0
10663  * """
10664  * return 0.0 # <<<<<<<<<<<<<<
10665  *
10666  * cpdef inline pure(obj):
10667  */
10668  __Pyx_XDECREF(__pyx_r);
10669  __Pyx_INCREF(__pyx_float_0_0);
10670  __pyx_r = __pyx_float_0_0;
10671  goto __pyx_L0;
10672 
10673  /* "PyClical.pyx":1366
10674  * return clifford(obj).scalar()
10675  *
10676  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
10677  * """
10678  * Imaginary part: deprecated (always 0).
10679  */
10680 
10681  /* function exit code */
10682  __pyx_L0:;
10683  __Pyx_XGIVEREF(__pyx_r);
10684  __Pyx_RefNannyFinishContext();
10685  return __pyx_r;
10686  }
10687 
10688  /* Python wrapper */
10689  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10690  static char __pyx_doc_8PyClical_16imag[] = "\n Imaginary part: deprecated (always 0).\n\n >>> imag(clifford(\"1+{1}+{1,2}\"))\n 0.0\n >>> imag(clifford(\"{1,2}\"))\n 0.0\n ";
10691  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10692  PyObject *__pyx_r = 0;
10693  __Pyx_RefNannyDeclarations
10694  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
10695  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
10696 
10697  /* function exit code */
10698  __Pyx_RefNannyFinishContext();
10699  return __pyx_r;
10700  }
10701 
10702  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10703  PyObject *__pyx_r = NULL;
10704  __Pyx_RefNannyDeclarations
10705  PyObject *__pyx_t_1 = NULL;
10706  int __pyx_lineno = 0;
10707  const char *__pyx_filename = NULL;
10708  int __pyx_clineno = 0;
10709  __Pyx_RefNannySetupContext("imag", 0);
10710  __Pyx_XDECREF(__pyx_r);
10711  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10712  __Pyx_GOTREF(__pyx_t_1);
10713  __pyx_r = __pyx_t_1;
10714  __pyx_t_1 = 0;
10715  goto __pyx_L0;
10716 
10717  /* function exit code */
10718  __pyx_L1_error:;
10719  __Pyx_XDECREF(__pyx_t_1);
10720  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
10721  __pyx_r = NULL;
10722  __pyx_L0:;
10723  __Pyx_XGIVEREF(__pyx_r);
10724  __Pyx_RefNannyFinishContext();
10725  return __pyx_r;
10726  }
10727 
10728  /* "PyClical.pyx":1377
10729  * return 0.0
10730  *
10731  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
10732  * """
10733  * Pure part
10734  */
10735 
10736  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10737  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
10738  PyObject *__pyx_r = NULL;
10739  __Pyx_RefNannyDeclarations
10740  PyObject *__pyx_t_1 = NULL;
10741  PyObject *__pyx_t_2 = NULL;
10742  PyObject *__pyx_t_3 = NULL;
10743  int __pyx_lineno = 0;
10744  const char *__pyx_filename = NULL;
10745  int __pyx_clineno = 0;
10746  __Pyx_RefNannySetupContext("pure", 0);
10747 
10748  /* "PyClical.pyx":1386
10749  * {1,2}
10750  * """
10751  * return clifford(obj).pure() # <<<<<<<<<<<<<<
10752  *
10753  * cpdef inline even(obj):
10754  */
10755  __Pyx_XDECREF(__pyx_r);
10756  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10757  __Pyx_GOTREF(__pyx_t_2);
10758  __Pyx_INCREF(__pyx_v_obj);
10759  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10760  __Pyx_GIVEREF(__pyx_v_obj);
10761  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10762  __Pyx_GOTREF(__pyx_t_3);
10763  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10764  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pure); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10765  __Pyx_GOTREF(__pyx_t_2);
10766  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10767  __pyx_t_3 = NULL;
10768  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10769  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10770  if (likely(__pyx_t_3)) {
10771  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10772  __Pyx_INCREF(__pyx_t_3);
10773  __Pyx_INCREF(function);
10774  __Pyx_DECREF_SET(__pyx_t_2, function);
10775  }
10776  }
10777  if (__pyx_t_3) {
10778  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10779  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10780  } else {
10781  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10782  }
10783  __Pyx_GOTREF(__pyx_t_1);
10784  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10785  __pyx_r = __pyx_t_1;
10786  __pyx_t_1 = 0;
10787  goto __pyx_L0;
10788 
10789  /* "PyClical.pyx":1377
10790  * return 0.0
10791  *
10792  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
10793  * """
10794  * Pure part
10795  */
10796 
10797  /* function exit code */
10798  __pyx_L1_error:;
10799  __Pyx_XDECREF(__pyx_t_1);
10800  __Pyx_XDECREF(__pyx_t_2);
10801  __Pyx_XDECREF(__pyx_t_3);
10802  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10803  __pyx_r = 0;
10804  __pyx_L0:;
10805  __Pyx_XGIVEREF(__pyx_r);
10806  __Pyx_RefNannyFinishContext();
10807  return __pyx_r;
10808  }
10809 
10810  /* Python wrapper */
10811  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10812  static char __pyx_doc_8PyClical_18pure[] = "\n Pure part\n\n >>> print pure(clifford(\"1+{1}+{1,2}\"))\n {1}+{1,2}\n >>> print pure(clifford(\"{1,2}\"))\n {1,2}\n ";
10813  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10814  PyObject *__pyx_r = 0;
10815  __Pyx_RefNannyDeclarations
10816  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
10817  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
10818 
10819  /* function exit code */
10820  __Pyx_RefNannyFinishContext();
10821  return __pyx_r;
10822  }
10823 
10824  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10825  PyObject *__pyx_r = NULL;
10826  __Pyx_RefNannyDeclarations
10827  PyObject *__pyx_t_1 = NULL;
10828  int __pyx_lineno = 0;
10829  const char *__pyx_filename = NULL;
10830  int __pyx_clineno = 0;
10831  __Pyx_RefNannySetupContext("pure", 0);
10832  __Pyx_XDECREF(__pyx_r);
10833  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10834  __Pyx_GOTREF(__pyx_t_1);
10835  __pyx_r = __pyx_t_1;
10836  __pyx_t_1 = 0;
10837  goto __pyx_L0;
10838 
10839  /* function exit code */
10840  __pyx_L1_error:;
10841  __Pyx_XDECREF(__pyx_t_1);
10842  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
10843  __pyx_r = NULL;
10844  __pyx_L0:;
10845  __Pyx_XGIVEREF(__pyx_r);
10846  __Pyx_RefNannyFinishContext();
10847  return __pyx_r;
10848  }
10849 
10850  /* "PyClical.pyx":1388
10851  * return clifford(obj).pure()
10852  *
10853  * cpdef inline even(obj): # <<<<<<<<<<<<<<
10854  * """
10855  * Even part of multivector, sum of even grade terms.
10856  */
10857 
10858  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10859  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
10860  PyObject *__pyx_r = NULL;
10861  __Pyx_RefNannyDeclarations
10862  PyObject *__pyx_t_1 = NULL;
10863  PyObject *__pyx_t_2 = NULL;
10864  PyObject *__pyx_t_3 = NULL;
10865  int __pyx_lineno = 0;
10866  const char *__pyx_filename = NULL;
10867  int __pyx_clineno = 0;
10868  __Pyx_RefNannySetupContext("even", 0);
10869 
10870  /* "PyClical.pyx":1395
10871  * 1+{1,2}
10872  * """
10873  * return clifford(obj).even() # <<<<<<<<<<<<<<
10874  *
10875  * cpdef inline odd(obj):
10876  */
10877  __Pyx_XDECREF(__pyx_r);
10878  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10879  __Pyx_GOTREF(__pyx_t_2);
10880  __Pyx_INCREF(__pyx_v_obj);
10881  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
10882  __Pyx_GIVEREF(__pyx_v_obj);
10883  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10884  __Pyx_GOTREF(__pyx_t_3);
10885  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10886  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_even); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10887  __Pyx_GOTREF(__pyx_t_2);
10888  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10889  __pyx_t_3 = NULL;
10890  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
10891  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10892  if (likely(__pyx_t_3)) {
10893  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10894  __Pyx_INCREF(__pyx_t_3);
10895  __Pyx_INCREF(function);
10896  __Pyx_DECREF_SET(__pyx_t_2, function);
10897  }
10898  }
10899  if (__pyx_t_3) {
10900  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10901  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10902  } else {
10903  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10904  }
10905  __Pyx_GOTREF(__pyx_t_1);
10906  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10907  __pyx_r = __pyx_t_1;
10908  __pyx_t_1 = 0;
10909  goto __pyx_L0;
10910 
10911  /* "PyClical.pyx":1388
10912  * return clifford(obj).pure()
10913  *
10914  * cpdef inline even(obj): # <<<<<<<<<<<<<<
10915  * """
10916  * Even part of multivector, sum of even grade terms.
10917  */
10918 
10919  /* function exit code */
10920  __pyx_L1_error:;
10921  __Pyx_XDECREF(__pyx_t_1);
10922  __Pyx_XDECREF(__pyx_t_2);
10923  __Pyx_XDECREF(__pyx_t_3);
10924  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10925  __pyx_r = 0;
10926  __pyx_L0:;
10927  __Pyx_XGIVEREF(__pyx_r);
10928  __Pyx_RefNannyFinishContext();
10929  return __pyx_r;
10930  }
10931 
10932  /* Python wrapper */
10933  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10934  static char __pyx_doc_8PyClical_20even[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print even(clifford(\"1+{1}+{1,2}\"))\n 1+{1,2}\n ";
10935  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10936  PyObject *__pyx_r = 0;
10937  __Pyx_RefNannyDeclarations
10938  __Pyx_RefNannySetupContext("even (wrapper)", 0);
10939  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
10940 
10941  /* function exit code */
10942  __Pyx_RefNannyFinishContext();
10943  return __pyx_r;
10944  }
10945 
10946  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
10947  PyObject *__pyx_r = NULL;
10948  __Pyx_RefNannyDeclarations
10949  PyObject *__pyx_t_1 = NULL;
10950  int __pyx_lineno = 0;
10951  const char *__pyx_filename = NULL;
10952  int __pyx_clineno = 0;
10953  __Pyx_RefNannySetupContext("even", 0);
10954  __Pyx_XDECREF(__pyx_r);
10955  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10956  __Pyx_GOTREF(__pyx_t_1);
10957  __pyx_r = __pyx_t_1;
10958  __pyx_t_1 = 0;
10959  goto __pyx_L0;
10960 
10961  /* function exit code */
10962  __pyx_L1_error:;
10963  __Pyx_XDECREF(__pyx_t_1);
10964  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
10965  __pyx_r = NULL;
10966  __pyx_L0:;
10967  __Pyx_XGIVEREF(__pyx_r);
10968  __Pyx_RefNannyFinishContext();
10969  return __pyx_r;
10970  }
10971 
10972  /* "PyClical.pyx":1397
10973  * return clifford(obj).even()
10974  *
10975  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
10976  * """
10977  * Odd part of multivector, sum of odd grade terms.
10978  */
10979 
10980  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
10981  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
10982  PyObject *__pyx_r = NULL;
10983  __Pyx_RefNannyDeclarations
10984  PyObject *__pyx_t_1 = NULL;
10985  PyObject *__pyx_t_2 = NULL;
10986  PyObject *__pyx_t_3 = NULL;
10987  int __pyx_lineno = 0;
10988  const char *__pyx_filename = NULL;
10989  int __pyx_clineno = 0;
10990  __Pyx_RefNannySetupContext("odd", 0);
10991 
10992  /* "PyClical.pyx":1404
10993  * {1}
10994  * """
10995  * return clifford(obj).odd() # <<<<<<<<<<<<<<
10996  *
10997  * cpdef inline involute(obj):
10998  */
10999  __Pyx_XDECREF(__pyx_r);
11000  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11001  __Pyx_GOTREF(__pyx_t_2);
11002  __Pyx_INCREF(__pyx_v_obj);
11003  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11004  __Pyx_GIVEREF(__pyx_v_obj);
11005  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11006  __Pyx_GOTREF(__pyx_t_3);
11007  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11008  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_odd); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11009  __Pyx_GOTREF(__pyx_t_2);
11010  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11011  __pyx_t_3 = NULL;
11012  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11013  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11014  if (likely(__pyx_t_3)) {
11015  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11016  __Pyx_INCREF(__pyx_t_3);
11017  __Pyx_INCREF(function);
11018  __Pyx_DECREF_SET(__pyx_t_2, function);
11019  }
11020  }
11021  if (__pyx_t_3) {
11022  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11023  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11024  } else {
11025  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11026  }
11027  __Pyx_GOTREF(__pyx_t_1);
11028  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11029  __pyx_r = __pyx_t_1;
11030  __pyx_t_1 = 0;
11031  goto __pyx_L0;
11032 
11033  /* "PyClical.pyx":1397
11034  * return clifford(obj).even()
11035  *
11036  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11037  * """
11038  * Odd part of multivector, sum of odd grade terms.
11039  */
11040 
11041  /* function exit code */
11042  __pyx_L1_error:;
11043  __Pyx_XDECREF(__pyx_t_1);
11044  __Pyx_XDECREF(__pyx_t_2);
11045  __Pyx_XDECREF(__pyx_t_3);
11046  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11047  __pyx_r = 0;
11048  __pyx_L0:;
11049  __Pyx_XGIVEREF(__pyx_r);
11050  __Pyx_RefNannyFinishContext();
11051  return __pyx_r;
11052  }
11053 
11054  /* Python wrapper */
11055  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11056  static char __pyx_doc_8PyClical_22odd[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print odd(clifford(\"1+{1}+{1,2}\"))\n {1}\n ";
11057  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11058  PyObject *__pyx_r = 0;
11059  __Pyx_RefNannyDeclarations
11060  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11061  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11062 
11063  /* function exit code */
11064  __Pyx_RefNannyFinishContext();
11065  return __pyx_r;
11066  }
11067 
11068  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11069  PyObject *__pyx_r = NULL;
11070  __Pyx_RefNannyDeclarations
11071  PyObject *__pyx_t_1 = NULL;
11072  int __pyx_lineno = 0;
11073  const char *__pyx_filename = NULL;
11074  int __pyx_clineno = 0;
11075  __Pyx_RefNannySetupContext("odd", 0);
11076  __Pyx_XDECREF(__pyx_r);
11077  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11078  __Pyx_GOTREF(__pyx_t_1);
11079  __pyx_r = __pyx_t_1;
11080  __pyx_t_1 = 0;
11081  goto __pyx_L0;
11082 
11083  /* function exit code */
11084  __pyx_L1_error:;
11085  __Pyx_XDECREF(__pyx_t_1);
11086  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11087  __pyx_r = NULL;
11088  __pyx_L0:;
11089  __Pyx_XGIVEREF(__pyx_r);
11090  __Pyx_RefNannyFinishContext();
11091  return __pyx_r;
11092  }
11093 
11094  /* "PyClical.pyx":1406
11095  * return clifford(obj).odd()
11096  *
11097  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11098  * """
11099  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11100  */
11101 
11102  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11103  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11104  PyObject *__pyx_r = NULL;
11105  __Pyx_RefNannyDeclarations
11106  PyObject *__pyx_t_1 = NULL;
11107  PyObject *__pyx_t_2 = NULL;
11108  PyObject *__pyx_t_3 = NULL;
11109  int __pyx_lineno = 0;
11110  const char *__pyx_filename = NULL;
11111  int __pyx_clineno = 0;
11112  __Pyx_RefNannySetupContext("involute", 0);
11113 
11114  /* "PyClical.pyx":1419
11115  * 1-{1}+{1,2}
11116  * """
11117  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11118  *
11119  * cpdef inline reverse(obj):
11120  */
11121  __Pyx_XDECREF(__pyx_r);
11122  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11123  __Pyx_GOTREF(__pyx_t_2);
11124  __Pyx_INCREF(__pyx_v_obj);
11125  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11126  __Pyx_GIVEREF(__pyx_v_obj);
11127  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11128  __Pyx_GOTREF(__pyx_t_3);
11129  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11130  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_involute); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11131  __Pyx_GOTREF(__pyx_t_2);
11132  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11133  __pyx_t_3 = NULL;
11134  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11135  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11136  if (likely(__pyx_t_3)) {
11137  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11138  __Pyx_INCREF(__pyx_t_3);
11139  __Pyx_INCREF(function);
11140  __Pyx_DECREF_SET(__pyx_t_2, function);
11141  }
11142  }
11143  if (__pyx_t_3) {
11144  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11145  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11146  } else {
11147  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11148  }
11149  __Pyx_GOTREF(__pyx_t_1);
11150  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11151  __pyx_r = __pyx_t_1;
11152  __pyx_t_1 = 0;
11153  goto __pyx_L0;
11154 
11155  /* "PyClical.pyx":1406
11156  * return clifford(obj).odd()
11157  *
11158  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11159  * """
11160  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11161  */
11162 
11163  /* function exit code */
11164  __pyx_L1_error:;
11165  __Pyx_XDECREF(__pyx_t_1);
11166  __Pyx_XDECREF(__pyx_t_2);
11167  __Pyx_XDECREF(__pyx_t_3);
11168  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11169  __pyx_r = 0;
11170  __pyx_L0:;
11171  __Pyx_XGIVEREF(__pyx_r);
11172  __Pyx_RefNannyFinishContext();
11173  return __pyx_r;
11174  }
11175 
11176  /* Python wrapper */
11177  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11178  static char __pyx_doc_8PyClical_24involute[] = "\n Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})\n\n >>> print involute(clifford(\"{1}\"))\n -{1}\n >>> print involute(clifford(\"{2}\") * clifford(\"{1}\"))\n -{1,2}\n >>> print involute(clifford(\"{1}\") * clifford(\"{2}\"))\n {1,2}\n >>> print involute(clifford(\"1+{1}+{1,2}\"))\n 1-{1}+{1,2}\n ";
11179  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11180  PyObject *__pyx_r = 0;
11181  __Pyx_RefNannyDeclarations
11182  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11183  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11184 
11185  /* function exit code */
11186  __Pyx_RefNannyFinishContext();
11187  return __pyx_r;
11188  }
11189 
11190  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11191  PyObject *__pyx_r = NULL;
11192  __Pyx_RefNannyDeclarations
11193  PyObject *__pyx_t_1 = NULL;
11194  int __pyx_lineno = 0;
11195  const char *__pyx_filename = NULL;
11196  int __pyx_clineno = 0;
11197  __Pyx_RefNannySetupContext("involute", 0);
11198  __Pyx_XDECREF(__pyx_r);
11199  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11200  __Pyx_GOTREF(__pyx_t_1);
11201  __pyx_r = __pyx_t_1;
11202  __pyx_t_1 = 0;
11203  goto __pyx_L0;
11204 
11205  /* function exit code */
11206  __pyx_L1_error:;
11207  __Pyx_XDECREF(__pyx_t_1);
11208  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11209  __pyx_r = NULL;
11210  __pyx_L0:;
11211  __Pyx_XGIVEREF(__pyx_r);
11212  __Pyx_RefNannyFinishContext();
11213  return __pyx_r;
11214  }
11215 
11216  /* "PyClical.pyx":1421
11217  * return clifford(obj).involute()
11218  *
11219  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11220  * """
11221  * Reversion, eg. {1}*{2} -> {2}*{1}
11222  */
11223 
11224  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11225  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11226  PyObject *__pyx_r = NULL;
11227  __Pyx_RefNannyDeclarations
11228  PyObject *__pyx_t_1 = NULL;
11229  PyObject *__pyx_t_2 = NULL;
11230  PyObject *__pyx_t_3 = NULL;
11231  int __pyx_lineno = 0;
11232  const char *__pyx_filename = NULL;
11233  int __pyx_clineno = 0;
11234  __Pyx_RefNannySetupContext("reverse", 0);
11235 
11236  /* "PyClical.pyx":1434
11237  * 1+{1}-{1,2}
11238  * """
11239  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11240  *
11241  * cpdef inline conj(obj):
11242  */
11243  __Pyx_XDECREF(__pyx_r);
11244  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11245  __Pyx_GOTREF(__pyx_t_2);
11246  __Pyx_INCREF(__pyx_v_obj);
11247  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11248  __Pyx_GIVEREF(__pyx_v_obj);
11249  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11250  __Pyx_GOTREF(__pyx_t_3);
11251  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11252  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11253  __Pyx_GOTREF(__pyx_t_2);
11254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11255  __pyx_t_3 = NULL;
11256  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11257  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11258  if (likely(__pyx_t_3)) {
11259  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11260  __Pyx_INCREF(__pyx_t_3);
11261  __Pyx_INCREF(function);
11262  __Pyx_DECREF_SET(__pyx_t_2, function);
11263  }
11264  }
11265  if (__pyx_t_3) {
11266  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11267  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11268  } else {
11269  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11270  }
11271  __Pyx_GOTREF(__pyx_t_1);
11272  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11273  __pyx_r = __pyx_t_1;
11274  __pyx_t_1 = 0;
11275  goto __pyx_L0;
11276 
11277  /* "PyClical.pyx":1421
11278  * return clifford(obj).involute()
11279  *
11280  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11281  * """
11282  * Reversion, eg. {1}*{2} -> {2}*{1}
11283  */
11284 
11285  /* function exit code */
11286  __pyx_L1_error:;
11287  __Pyx_XDECREF(__pyx_t_1);
11288  __Pyx_XDECREF(__pyx_t_2);
11289  __Pyx_XDECREF(__pyx_t_3);
11290  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11291  __pyx_r = 0;
11292  __pyx_L0:;
11293  __Pyx_XGIVEREF(__pyx_r);
11294  __Pyx_RefNannyFinishContext();
11295  return __pyx_r;
11296  }
11297 
11298  /* Python wrapper */
11299  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11300  static char __pyx_doc_8PyClical_26reverse[] = "\n Reversion, eg. {1}*{2} -> {2}*{1}\n\n >>> print reverse(clifford(\"{1}\"))\n {1}\n >>> print reverse(clifford(\"{2}\") * clifford(\"{1}\"))\n {1,2}\n >>> print reverse(clifford(\"{1}\") * clifford(\"{2}\"))\n -{1,2}\n >>> print reverse(clifford(\"1+{1}+{1,2}\"))\n 1+{1}-{1,2}\n ";
11301  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11302  PyObject *__pyx_r = 0;
11303  __Pyx_RefNannyDeclarations
11304  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
11305  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
11306 
11307  /* function exit code */
11308  __Pyx_RefNannyFinishContext();
11309  return __pyx_r;
11310  }
11311 
11312  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11313  PyObject *__pyx_r = NULL;
11314  __Pyx_RefNannyDeclarations
11315  PyObject *__pyx_t_1 = NULL;
11316  int __pyx_lineno = 0;
11317  const char *__pyx_filename = NULL;
11318  int __pyx_clineno = 0;
11319  __Pyx_RefNannySetupContext("reverse", 0);
11320  __Pyx_XDECREF(__pyx_r);
11321  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11322  __Pyx_GOTREF(__pyx_t_1);
11323  __pyx_r = __pyx_t_1;
11324  __pyx_t_1 = 0;
11325  goto __pyx_L0;
11326 
11327  /* function exit code */
11328  __pyx_L1_error:;
11329  __Pyx_XDECREF(__pyx_t_1);
11330  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11331  __pyx_r = NULL;
11332  __pyx_L0:;
11333  __Pyx_XGIVEREF(__pyx_r);
11334  __Pyx_RefNannyFinishContext();
11335  return __pyx_r;
11336  }
11337 
11338  /* "PyClical.pyx":1436
11339  * return clifford(obj).reverse()
11340  *
11341  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
11342  * """
11343  * Conjugation, reverse o involute == involute o reverse.
11344  */
11345 
11346  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11347  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11348  PyObject *__pyx_r = NULL;
11349  __Pyx_RefNannyDeclarations
11350  PyObject *__pyx_t_1 = NULL;
11351  PyObject *__pyx_t_2 = NULL;
11352  PyObject *__pyx_t_3 = NULL;
11353  int __pyx_lineno = 0;
11354  const char *__pyx_filename = NULL;
11355  int __pyx_clineno = 0;
11356  __Pyx_RefNannySetupContext("conj", 0);
11357 
11358  /* "PyClical.pyx":1449
11359  * 1-{1}-{1,2}
11360  * """
11361  * return clifford(obj).conj() # <<<<<<<<<<<<<<
11362  *
11363  * cpdef inline quad(obj):
11364  */
11365  __Pyx_XDECREF(__pyx_r);
11366  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11367  __Pyx_GOTREF(__pyx_t_2);
11368  __Pyx_INCREF(__pyx_v_obj);
11369  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11370  __Pyx_GIVEREF(__pyx_v_obj);
11371  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11372  __Pyx_GOTREF(__pyx_t_3);
11373  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11374  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_conj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11375  __Pyx_GOTREF(__pyx_t_2);
11376  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11377  __pyx_t_3 = NULL;
11378  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11379  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11380  if (likely(__pyx_t_3)) {
11381  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11382  __Pyx_INCREF(__pyx_t_3);
11383  __Pyx_INCREF(function);
11384  __Pyx_DECREF_SET(__pyx_t_2, function);
11385  }
11386  }
11387  if (__pyx_t_3) {
11388  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11389  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11390  } else {
11391  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11392  }
11393  __Pyx_GOTREF(__pyx_t_1);
11394  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11395  __pyx_r = __pyx_t_1;
11396  __pyx_t_1 = 0;
11397  goto __pyx_L0;
11398 
11399  /* "PyClical.pyx":1436
11400  * return clifford(obj).reverse()
11401  *
11402  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
11403  * """
11404  * Conjugation, reverse o involute == involute o reverse.
11405  */
11406 
11407  /* function exit code */
11408  __pyx_L1_error:;
11409  __Pyx_XDECREF(__pyx_t_1);
11410  __Pyx_XDECREF(__pyx_t_2);
11411  __Pyx_XDECREF(__pyx_t_3);
11412  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11413  __pyx_r = 0;
11414  __pyx_L0:;
11415  __Pyx_XGIVEREF(__pyx_r);
11416  __Pyx_RefNannyFinishContext();
11417  return __pyx_r;
11418  }
11419 
11420  /* Python wrapper */
11421  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11422  static char __pyx_doc_8PyClical_28conj[] = "\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print conj(clifford(\"{1}\"))\n -{1}\n >>> print conj(clifford(\"{2}\") * clifford(\"{1}\"))\n {1,2}\n >>> print conj(clifford(\"{1}\") * clifford(\"{2}\"))\n -{1,2}\n >>> print conj(clifford(\"1+{1}+{1,2}\"))\n 1-{1}-{1,2}\n ";
11423  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11424  PyObject *__pyx_r = 0;
11425  __Pyx_RefNannyDeclarations
11426  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
11427  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
11428 
11429  /* function exit code */
11430  __Pyx_RefNannyFinishContext();
11431  return __pyx_r;
11432  }
11433 
11434  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11435  PyObject *__pyx_r = NULL;
11436  __Pyx_RefNannyDeclarations
11437  PyObject *__pyx_t_1 = NULL;
11438  int __pyx_lineno = 0;
11439  const char *__pyx_filename = NULL;
11440  int __pyx_clineno = 0;
11441  __Pyx_RefNannySetupContext("conj", 0);
11442  __Pyx_XDECREF(__pyx_r);
11443  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11444  __Pyx_GOTREF(__pyx_t_1);
11445  __pyx_r = __pyx_t_1;
11446  __pyx_t_1 = 0;
11447  goto __pyx_L0;
11448 
11449  /* function exit code */
11450  __pyx_L1_error:;
11451  __Pyx_XDECREF(__pyx_t_1);
11452  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
11453  __pyx_r = NULL;
11454  __pyx_L0:;
11455  __Pyx_XGIVEREF(__pyx_r);
11456  __Pyx_RefNannyFinishContext();
11457  return __pyx_r;
11458  }
11459 
11460  /* "PyClical.pyx":1451
11461  * return clifford(obj).conj()
11462  *
11463  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
11464  * """
11465  * Quadratic form == (rev(x)*x)(0).
11466  */
11467 
11468  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11469  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11470  PyObject *__pyx_r = NULL;
11471  __Pyx_RefNannyDeclarations
11472  PyObject *__pyx_t_1 = NULL;
11473  PyObject *__pyx_t_2 = NULL;
11474  PyObject *__pyx_t_3 = NULL;
11475  int __pyx_lineno = 0;
11476  const char *__pyx_filename = NULL;
11477  int __pyx_clineno = 0;
11478  __Pyx_RefNannySetupContext("quad", 0);
11479 
11480  /* "PyClical.pyx":1460
11481  * 2.0
11482  * """
11483  * return clifford(obj).quad() # <<<<<<<<<<<<<<
11484  *
11485  * cpdef inline norm(obj):
11486  */
11487  __Pyx_XDECREF(__pyx_r);
11488  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11489  __Pyx_GOTREF(__pyx_t_2);
11490  __Pyx_INCREF(__pyx_v_obj);
11491  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11492  __Pyx_GIVEREF(__pyx_v_obj);
11493  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11494  __Pyx_GOTREF(__pyx_t_3);
11495  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11496  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_quad); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11497  __Pyx_GOTREF(__pyx_t_2);
11498  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11499  __pyx_t_3 = NULL;
11500  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11501  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11502  if (likely(__pyx_t_3)) {
11503  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11504  __Pyx_INCREF(__pyx_t_3);
11505  __Pyx_INCREF(function);
11506  __Pyx_DECREF_SET(__pyx_t_2, function);
11507  }
11508  }
11509  if (__pyx_t_3) {
11510  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11511  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11512  } else {
11513  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11514  }
11515  __Pyx_GOTREF(__pyx_t_1);
11516  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11517  __pyx_r = __pyx_t_1;
11518  __pyx_t_1 = 0;
11519  goto __pyx_L0;
11520 
11521  /* "PyClical.pyx":1451
11522  * return clifford(obj).conj()
11523  *
11524  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
11525  * """
11526  * Quadratic form == (rev(x)*x)(0).
11527  */
11528 
11529  /* function exit code */
11530  __pyx_L1_error:;
11531  __Pyx_XDECREF(__pyx_t_1);
11532  __Pyx_XDECREF(__pyx_t_2);
11533  __Pyx_XDECREF(__pyx_t_3);
11534  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
11535  __pyx_r = 0;
11536  __pyx_L0:;
11537  __Pyx_XGIVEREF(__pyx_r);
11538  __Pyx_RefNannyFinishContext();
11539  return __pyx_r;
11540  }
11541 
11542  /* Python wrapper */
11543  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11544  static char __pyx_doc_8PyClical_30quad[] = "\n Quadratic form == (rev(x)*x)(0).\n\n >>> print quad(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> print quad(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
11545  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11546  PyObject *__pyx_r = 0;
11547  __Pyx_RefNannyDeclarations
11548  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
11549  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
11550 
11551  /* function exit code */
11552  __Pyx_RefNannyFinishContext();
11553  return __pyx_r;
11554  }
11555 
11556  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11557  PyObject *__pyx_r = NULL;
11558  __Pyx_RefNannyDeclarations
11559  PyObject *__pyx_t_1 = NULL;
11560  int __pyx_lineno = 0;
11561  const char *__pyx_filename = NULL;
11562  int __pyx_clineno = 0;
11563  __Pyx_RefNannySetupContext("quad", 0);
11564  __Pyx_XDECREF(__pyx_r);
11565  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11566  __Pyx_GOTREF(__pyx_t_1);
11567  __pyx_r = __pyx_t_1;
11568  __pyx_t_1 = 0;
11569  goto __pyx_L0;
11570 
11571  /* function exit code */
11572  __pyx_L1_error:;
11573  __Pyx_XDECREF(__pyx_t_1);
11574  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
11575  __pyx_r = NULL;
11576  __pyx_L0:;
11577  __Pyx_XGIVEREF(__pyx_r);
11578  __Pyx_RefNannyFinishContext();
11579  return __pyx_r;
11580  }
11581 
11582  /* "PyClical.pyx":1462
11583  * return clifford(obj).quad()
11584  *
11585  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
11586  * """
11587  * norm == sum of squares of coordinates.
11588  */
11589 
11590  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11591  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11592  PyObject *__pyx_r = NULL;
11593  __Pyx_RefNannyDeclarations
11594  PyObject *__pyx_t_1 = NULL;
11595  PyObject *__pyx_t_2 = NULL;
11596  PyObject *__pyx_t_3 = NULL;
11597  int __pyx_lineno = 0;
11598  const char *__pyx_filename = NULL;
11599  int __pyx_clineno = 0;
11600  __Pyx_RefNannySetupContext("norm", 0);
11601 
11602  /* "PyClical.pyx":1471
11603  * 4.0
11604  * """
11605  * return clifford(obj).norm() # <<<<<<<<<<<<<<
11606  *
11607  * cpdef inline abs(obj):
11608  */
11609  __Pyx_XDECREF(__pyx_r);
11610  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11611  __Pyx_GOTREF(__pyx_t_2);
11612  __Pyx_INCREF(__pyx_v_obj);
11613  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11614  __Pyx_GIVEREF(__pyx_v_obj);
11615  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11616  __Pyx_GOTREF(__pyx_t_3);
11617  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11618  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_norm); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11619  __Pyx_GOTREF(__pyx_t_2);
11620  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11621  __pyx_t_3 = NULL;
11622  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
11623  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11624  if (likely(__pyx_t_3)) {
11625  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11626  __Pyx_INCREF(__pyx_t_3);
11627  __Pyx_INCREF(function);
11628  __Pyx_DECREF_SET(__pyx_t_2, function);
11629  }
11630  }
11631  if (__pyx_t_3) {
11632  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11633  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11634  } else {
11635  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11636  }
11637  __Pyx_GOTREF(__pyx_t_1);
11638  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11639  __pyx_r = __pyx_t_1;
11640  __pyx_t_1 = 0;
11641  goto __pyx_L0;
11642 
11643  /* "PyClical.pyx":1462
11644  * return clifford(obj).quad()
11645  *
11646  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
11647  * """
11648  * norm == sum of squares of coordinates.
11649  */
11650 
11651  /* function exit code */
11652  __pyx_L1_error:;
11653  __Pyx_XDECREF(__pyx_t_1);
11654  __Pyx_XDECREF(__pyx_t_2);
11655  __Pyx_XDECREF(__pyx_t_3);
11656  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
11657  __pyx_r = 0;
11658  __pyx_L0:;
11659  __Pyx_XGIVEREF(__pyx_r);
11660  __Pyx_RefNannyFinishContext();
11661  return __pyx_r;
11662  }
11663 
11664  /* Python wrapper */
11665  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11666  static char __pyx_doc_8PyClical_32norm[] = "\n norm == sum of squares of coordinates.\n\n >>> norm(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> norm(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 4.0\n ";
11667  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11668  PyObject *__pyx_r = 0;
11669  __Pyx_RefNannyDeclarations
11670  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
11671  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
11672 
11673  /* function exit code */
11674  __Pyx_RefNannyFinishContext();
11675  return __pyx_r;
11676  }
11677 
11678  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11679  PyObject *__pyx_r = NULL;
11680  __Pyx_RefNannyDeclarations
11681  PyObject *__pyx_t_1 = NULL;
11682  int __pyx_lineno = 0;
11683  const char *__pyx_filename = NULL;
11684  int __pyx_clineno = 0;
11685  __Pyx_RefNannySetupContext("norm", 0);
11686  __Pyx_XDECREF(__pyx_r);
11687  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11688  __Pyx_GOTREF(__pyx_t_1);
11689  __pyx_r = __pyx_t_1;
11690  __pyx_t_1 = 0;
11691  goto __pyx_L0;
11692 
11693  /* function exit code */
11694  __pyx_L1_error:;
11695  __Pyx_XDECREF(__pyx_t_1);
11696  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
11697  __pyx_r = NULL;
11698  __pyx_L0:;
11699  __Pyx_XGIVEREF(__pyx_r);
11700  __Pyx_RefNannyFinishContext();
11701  return __pyx_r;
11702  }
11703 
11704  /* "PyClical.pyx":1473
11705  * return clifford(obj).norm()
11706  *
11707  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
11708  * """
11709  * Absolute value of multivector: multivector 2-norm.
11710  */
11711 
11712  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11713  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11714  PyObject *__pyx_r = NULL;
11715  __Pyx_RefNannyDeclarations
11716  PyObject *__pyx_t_1 = NULL;
11717  int __pyx_lineno = 0;
11718  const char *__pyx_filename = NULL;
11719  int __pyx_clineno = 0;
11720  __Pyx_RefNannySetupContext("abs", 0);
11721 
11722  /* "PyClical.pyx":1480
11723  * 2.0
11724  * """
11725  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
11726  *
11727  * cpdef inline max_abs(obj):
11728  */
11729  __Pyx_XDECREF(__pyx_r);
11730  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11731  __Pyx_GOTREF(__pyx_t_1);
11732  __pyx_r = __pyx_t_1;
11733  __pyx_t_1 = 0;
11734  goto __pyx_L0;
11735 
11736  /* "PyClical.pyx":1473
11737  * return clifford(obj).norm()
11738  *
11739  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
11740  * """
11741  * Absolute value of multivector: multivector 2-norm.
11742  */
11743 
11744  /* function exit code */
11745  __pyx_L1_error:;
11746  __Pyx_XDECREF(__pyx_t_1);
11747  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11748  __pyx_r = 0;
11749  __pyx_L0:;
11750  __Pyx_XGIVEREF(__pyx_r);
11751  __Pyx_RefNannyFinishContext();
11752  return __pyx_r;
11753  }
11754 
11755  /* Python wrapper */
11756  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11757  static char __pyx_doc_8PyClical_34abs[] = "\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
11758  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11759  PyObject *__pyx_r = 0;
11760  __Pyx_RefNannyDeclarations
11761  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
11762  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
11763 
11764  /* function exit code */
11765  __Pyx_RefNannyFinishContext();
11766  return __pyx_r;
11767  }
11768 
11769  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11770  PyObject *__pyx_r = NULL;
11771  __Pyx_RefNannyDeclarations
11772  PyObject *__pyx_t_1 = NULL;
11773  int __pyx_lineno = 0;
11774  const char *__pyx_filename = NULL;
11775  int __pyx_clineno = 0;
11776  __Pyx_RefNannySetupContext("abs", 0);
11777  __Pyx_XDECREF(__pyx_r);
11778  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11779  __Pyx_GOTREF(__pyx_t_1);
11780  __pyx_r = __pyx_t_1;
11781  __pyx_t_1 = 0;
11782  goto __pyx_L0;
11783 
11784  /* function exit code */
11785  __pyx_L1_error:;
11786  __Pyx_XDECREF(__pyx_t_1);
11787  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11788  __pyx_r = NULL;
11789  __pyx_L0:;
11790  __Pyx_XGIVEREF(__pyx_r);
11791  __Pyx_RefNannyFinishContext();
11792  return __pyx_r;
11793  }
11794 
11795  /* "PyClical.pyx":1482
11796  * return glucat.abs(toClifford(obj))
11797  *
11798  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
11799  * """
11800  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
11801  */
11802 
11803  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11804  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11805  PyObject *__pyx_r = NULL;
11806  __Pyx_RefNannyDeclarations
11807  PyObject *__pyx_t_1 = NULL;
11808  int __pyx_lineno = 0;
11809  const char *__pyx_filename = NULL;
11810  int __pyx_clineno = 0;
11811  __Pyx_RefNannySetupContext("max_abs", 0);
11812 
11813  /* "PyClical.pyx":1492
11814  *
11815  * """
11816  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
11817  *
11818  * cpdef inline pow(obj, m):
11819  */
11820  __Pyx_XDECREF(__pyx_r);
11821  __pyx_t_1 = PyFloat_FromDouble(max_abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11822  __Pyx_GOTREF(__pyx_t_1);
11823  __pyx_r = __pyx_t_1;
11824  __pyx_t_1 = 0;
11825  goto __pyx_L0;
11826 
11827  /* "PyClical.pyx":1482
11828  * return glucat.abs(toClifford(obj))
11829  *
11830  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
11831  * """
11832  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
11833  */
11834 
11835  /* function exit code */
11836  __pyx_L1_error:;
11837  __Pyx_XDECREF(__pyx_t_1);
11838  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11839  __pyx_r = 0;
11840  __pyx_L0:;
11841  __Pyx_XGIVEREF(__pyx_r);
11842  __Pyx_RefNannyFinishContext();
11843  return __pyx_r;
11844  }
11845 
11846  /* Python wrapper */
11847  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11848  static char __pyx_doc_8PyClical_36max_abs[] = "\n Maximum absolute value of coordinates multivector: multivector infinity-norm.\n\n >>> max_abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 1.0\n >>> max_abs(clifford(\"3+2{1}+{1,2}\"))\n 3.0\n\n ";
11849  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11850  PyObject *__pyx_r = 0;
11851  __Pyx_RefNannyDeclarations
11852  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
11853  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
11854 
11855  /* function exit code */
11856  __Pyx_RefNannyFinishContext();
11857  return __pyx_r;
11858  }
11859 
11860  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11861  PyObject *__pyx_r = NULL;
11862  __Pyx_RefNannyDeclarations
11863  PyObject *__pyx_t_1 = NULL;
11864  int __pyx_lineno = 0;
11865  const char *__pyx_filename = NULL;
11866  int __pyx_clineno = 0;
11867  __Pyx_RefNannySetupContext("max_abs", 0);
11868  __Pyx_XDECREF(__pyx_r);
11869  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11870  __Pyx_GOTREF(__pyx_t_1);
11871  __pyx_r = __pyx_t_1;
11872  __pyx_t_1 = 0;
11873  goto __pyx_L0;
11874 
11875  /* function exit code */
11876  __pyx_L1_error:;
11877  __Pyx_XDECREF(__pyx_t_1);
11878  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
11879  __pyx_r = NULL;
11880  __pyx_L0:;
11881  __Pyx_XGIVEREF(__pyx_r);
11882  __Pyx_RefNannyFinishContext();
11883  return __pyx_r;
11884  }
11885 
11886  /* "PyClical.pyx":1494
11887  * return glucat.max_abs(toClifford(obj))
11888  *
11889  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
11890  * """
11891  * Integer power of multivector: obj to the m.
11892  */
11893 
11894  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11895  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
11896  PyObject *__pyx_r = NULL;
11897  __Pyx_RefNannyDeclarations
11898  PyObject *__pyx_t_1 = NULL;
11899  PyObject *__pyx_t_2 = NULL;
11900  PyObject *__pyx_t_3 = NULL;
11901  PyObject *__pyx_t_4 = NULL;
11902  PyObject *__pyx_t_5 = NULL;
11903  PyObject *__pyx_t_6 = NULL;
11904  Py_ssize_t __pyx_t_7;
11905  PyObject *__pyx_t_8 = NULL;
11906  PyObject *__pyx_t_9 = NULL;
11907  PyObject *__pyx_t_10 = NULL;
11908  PyObject *__pyx_t_11 = NULL;
11909  int __pyx_lineno = 0;
11910  const char *__pyx_filename = NULL;
11911  int __pyx_clineno = 0;
11912  __Pyx_RefNannySetupContext("pow", 0);
11913 
11914  /* "PyClical.pyx":1513
11915  * 1
11916  * """
11917  * try: # <<<<<<<<<<<<<<
11918  * math.pow(obj, m)
11919  * except:
11920  */
11921  {
11922  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
11923  __Pyx_XGOTREF(__pyx_t_1);
11924  __Pyx_XGOTREF(__pyx_t_2);
11925  __Pyx_XGOTREF(__pyx_t_3);
11926  /*try:*/ {
11927 
11928  /* "PyClical.pyx":1514
11929  * """
11930  * try:
11931  * math.pow(obj, m) # <<<<<<<<<<<<<<
11932  * except:
11933  * return clifford(obj).pow(m)
11934  */
11935  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11936  __Pyx_GOTREF(__pyx_t_5);
11937  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pow); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11938  __Pyx_GOTREF(__pyx_t_6);
11939  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11940  __pyx_t_5 = NULL;
11941  __pyx_t_7 = 0;
11942  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
11943  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
11944  if (likely(__pyx_t_5)) {
11945  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11946  __Pyx_INCREF(__pyx_t_5);
11947  __Pyx_INCREF(function);
11948  __Pyx_DECREF_SET(__pyx_t_6, function);
11949  __pyx_t_7 = 1;
11950  }
11951  }
11952  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11953  __Pyx_GOTREF(__pyx_t_8);
11954  if (__pyx_t_5) {
11955  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
11956  }
11957  __Pyx_INCREF(__pyx_v_obj);
11958  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
11959  __Pyx_GIVEREF(__pyx_v_obj);
11960  __Pyx_INCREF(__pyx_v_m);
11961  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
11962  __Pyx_GIVEREF(__pyx_v_m);
11963  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
11964  __Pyx_GOTREF(__pyx_t_4);
11965  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11966  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11967  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11968  }
11969  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11970  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11971  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11972  goto __pyx_L10_try_end;
11973  __pyx_L3_error:;
11974  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11975  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
11976  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11977  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11978 
11979  /* "PyClical.pyx":1515
11980  * try:
11981  * math.pow(obj, m)
11982  * except: # <<<<<<<<<<<<<<
11983  * return clifford(obj).pow(m)
11984  *
11985  */
11986  /*except:*/ {
11987  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
11988  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
11989  __Pyx_GOTREF(__pyx_t_4);
11990  __Pyx_GOTREF(__pyx_t_6);
11991  __Pyx_GOTREF(__pyx_t_8);
11992 
11993  /* "PyClical.pyx":1516
11994  * math.pow(obj, m)
11995  * except:
11996  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
11997  *
11998  * cpdef inline outer_pow(obj, m):
11999  */
12000  __Pyx_XDECREF(__pyx_r);
12001  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12002  __Pyx_GOTREF(__pyx_t_9);
12003  __Pyx_INCREF(__pyx_v_obj);
12004  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
12005  __Pyx_GIVEREF(__pyx_v_obj);
12006  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12007  __Pyx_GOTREF(__pyx_t_10);
12008  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12009  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_pow); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12010  __Pyx_GOTREF(__pyx_t_9);
12011  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12012  __pyx_t_10 = NULL;
12013  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_9))) {
12014  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
12015  if (likely(__pyx_t_10)) {
12016  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
12017  __Pyx_INCREF(__pyx_t_10);
12018  __Pyx_INCREF(function);
12019  __Pyx_DECREF_SET(__pyx_t_9, function);
12020  }
12021  }
12022  if (!__pyx_t_10) {
12023  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_m); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12024  __Pyx_GOTREF(__pyx_t_5);
12025  } else {
12026  __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12027  __Pyx_GOTREF(__pyx_t_11);
12028  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = NULL;
12029  __Pyx_INCREF(__pyx_v_m);
12030  PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12031  __Pyx_GIVEREF(__pyx_v_m);
12032  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12033  __Pyx_GOTREF(__pyx_t_5);
12034  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12035  }
12036  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12037  __pyx_r = __pyx_t_5;
12038  __pyx_t_5 = 0;
12039  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12040  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12041  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12042  goto __pyx_L6_except_return;
12043  }
12044  __pyx_L5_except_error:;
12045  __Pyx_XGIVEREF(__pyx_t_1);
12046  __Pyx_XGIVEREF(__pyx_t_2);
12047  __Pyx_XGIVEREF(__pyx_t_3);
12048  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12049  goto __pyx_L1_error;
12050  __pyx_L6_except_return:;
12051  __Pyx_XGIVEREF(__pyx_t_1);
12052  __Pyx_XGIVEREF(__pyx_t_2);
12053  __Pyx_XGIVEREF(__pyx_t_3);
12054  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12055  goto __pyx_L0;
12056  __pyx_L10_try_end:;
12057  }
12058 
12059  /* "PyClical.pyx":1494
12060  * return glucat.max_abs(toClifford(obj))
12061  *
12062  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12063  * """
12064  * Integer power of multivector: obj to the m.
12065  */
12066 
12067  /* function exit code */
12068  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12069  goto __pyx_L0;
12070  __pyx_L1_error:;
12071  __Pyx_XDECREF(__pyx_t_4);
12072  __Pyx_XDECREF(__pyx_t_5);
12073  __Pyx_XDECREF(__pyx_t_6);
12074  __Pyx_XDECREF(__pyx_t_8);
12075  __Pyx_XDECREF(__pyx_t_9);
12076  __Pyx_XDECREF(__pyx_t_10);
12077  __Pyx_XDECREF(__pyx_t_11);
12078  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12079  __pyx_r = 0;
12080  __pyx_L0:;
12081  __Pyx_XGIVEREF(__pyx_r);
12082  __Pyx_RefNannyFinishContext();
12083  return __pyx_r;
12084  }
12085 
12086  /* Python wrapper */
12087  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12088  static char __pyx_doc_8PyClical_38pow[] = "\n Integer power of multivector: obj to the m.\n\n >>> x=clifford(\"{1}\"); print pow(x,2)\n 1\n >>> x=clifford(\"2\"); print pow(x,2)\n 4\n >>> x=clifford(\"2+{1}\"); print pow(x,0)\n 1\n >>> x=clifford(\"2+{1}\"); print pow(x,1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print pow(x,2)\n 5+4{1}\n >>> print pow(clifford(\"1+{1}+{1,2}\"),3)\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\");print exp(pi/2) * pow(i, i)\n 1\n ";
12089  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12090  PyObject *__pyx_v_obj = 0;
12091  PyObject *__pyx_v_m = 0;
12092  int __pyx_lineno = 0;
12093  const char *__pyx_filename = NULL;
12094  int __pyx_clineno = 0;
12095  PyObject *__pyx_r = 0;
12096  __Pyx_RefNannyDeclarations
12097  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12098  {
12099  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12100  PyObject* values[2] = {0,0};
12101  if (unlikely(__pyx_kwds)) {
12102  Py_ssize_t kw_args;
12103  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12104  switch (pos_args) {
12105  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12106  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12107  case 0: break;
12108  default: goto __pyx_L5_argtuple_error;
12109  }
12110  kw_args = PyDict_Size(__pyx_kwds);
12111  switch (pos_args) {
12112  case 0:
12113  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12114  else goto __pyx_L5_argtuple_error;
12115  case 1:
12116  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12117  else {
12118  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12119  }
12120  }
12121  if (unlikely(kw_args > 0)) {
12122  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12123  }
12124  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12125  goto __pyx_L5_argtuple_error;
12126  } else {
12127  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12128  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12129  }
12130  __pyx_v_obj = values[0];
12131  __pyx_v_m = values[1];
12132  }
12133  goto __pyx_L4_argument_unpacking_done;
12134  __pyx_L5_argtuple_error:;
12135  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12136  __pyx_L3_error:;
12137  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12138  __Pyx_RefNannyFinishContext();
12139  return NULL;
12140  __pyx_L4_argument_unpacking_done:;
12141  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12142 
12143  /* function exit code */
12144  __Pyx_RefNannyFinishContext();
12145  return __pyx_r;
12146  }
12147 
12148  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12149  PyObject *__pyx_r = NULL;
12150  __Pyx_RefNannyDeclarations
12151  PyObject *__pyx_t_1 = NULL;
12152  int __pyx_lineno = 0;
12153  const char *__pyx_filename = NULL;
12154  int __pyx_clineno = 0;
12155  __Pyx_RefNannySetupContext("pow", 0);
12156  __Pyx_XDECREF(__pyx_r);
12157  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12158  __Pyx_GOTREF(__pyx_t_1);
12159  __pyx_r = __pyx_t_1;
12160  __pyx_t_1 = 0;
12161  goto __pyx_L0;
12162 
12163  /* function exit code */
12164  __pyx_L1_error:;
12165  __Pyx_XDECREF(__pyx_t_1);
12166  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12167  __pyx_r = NULL;
12168  __pyx_L0:;
12169  __Pyx_XGIVEREF(__pyx_r);
12170  __Pyx_RefNannyFinishContext();
12171  return __pyx_r;
12172  }
12173 
12174  /* "PyClical.pyx":1518
12175  * return clifford(obj).pow(m)
12176  *
12177  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12178  * """
12179  * Outer product power of multivector.
12180  */
12181 
12182  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12183  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12184  PyObject *__pyx_r = NULL;
12185  __Pyx_RefNannyDeclarations
12186  PyObject *__pyx_t_1 = NULL;
12187  PyObject *__pyx_t_2 = NULL;
12188  PyObject *__pyx_t_3 = NULL;
12189  PyObject *__pyx_t_4 = NULL;
12190  int __pyx_lineno = 0;
12191  const char *__pyx_filename = NULL;
12192  int __pyx_clineno = 0;
12193  __Pyx_RefNannySetupContext("outer_pow", 0);
12194 
12195  /* "PyClical.pyx":1525
12196  * 1+3{1}+3{1,2}
12197  * """
12198  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12199  *
12200  * cpdef inline complexifier(obj):
12201  */
12202  __Pyx_XDECREF(__pyx_r);
12203  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12204  __Pyx_GOTREF(__pyx_t_2);
12205  __Pyx_INCREF(__pyx_v_obj);
12206  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12207  __Pyx_GIVEREF(__pyx_v_obj);
12208  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12209  __Pyx_GOTREF(__pyx_t_3);
12210  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12211  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outer_pow); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12212  __Pyx_GOTREF(__pyx_t_2);
12213  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12214  __pyx_t_3 = NULL;
12215  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
12216  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12217  if (likely(__pyx_t_3)) {
12218  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12219  __Pyx_INCREF(__pyx_t_3);
12220  __Pyx_INCREF(function);
12221  __Pyx_DECREF_SET(__pyx_t_2, function);
12222  }
12223  }
12224  if (!__pyx_t_3) {
12225  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_m); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12226  __Pyx_GOTREF(__pyx_t_1);
12227  } else {
12228  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12229  __Pyx_GOTREF(__pyx_t_4);
12230  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
12231  __Pyx_INCREF(__pyx_v_m);
12232  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
12233  __Pyx_GIVEREF(__pyx_v_m);
12234  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12235  __Pyx_GOTREF(__pyx_t_1);
12236  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12237  }
12238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12239  __pyx_r = __pyx_t_1;
12240  __pyx_t_1 = 0;
12241  goto __pyx_L0;
12242 
12243  /* "PyClical.pyx":1518
12244  * return clifford(obj).pow(m)
12245  *
12246  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12247  * """
12248  * Outer product power of multivector.
12249  */
12250 
12251  /* function exit code */
12252  __pyx_L1_error:;
12253  __Pyx_XDECREF(__pyx_t_1);
12254  __Pyx_XDECREF(__pyx_t_2);
12255  __Pyx_XDECREF(__pyx_t_3);
12256  __Pyx_XDECREF(__pyx_t_4);
12257  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12258  __pyx_r = 0;
12259  __pyx_L0:;
12260  __Pyx_XGIVEREF(__pyx_r);
12261  __Pyx_RefNannyFinishContext();
12262  return __pyx_r;
12263  }
12264 
12265  /* Python wrapper */
12266  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12267  static char __pyx_doc_8PyClical_40outer_pow[] = "\n Outer product power of multivector.\n\n >>> print outer_pow(clifford(\"1+{1}+{1,2}\"),3)\n 1+3{1}+3{1,2}\n ";
12268  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12269  PyObject *__pyx_v_obj = 0;
12270  PyObject *__pyx_v_m = 0;
12271  int __pyx_lineno = 0;
12272  const char *__pyx_filename = NULL;
12273  int __pyx_clineno = 0;
12274  PyObject *__pyx_r = 0;
12275  __Pyx_RefNannyDeclarations
12276  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12277  {
12278  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12279  PyObject* values[2] = {0,0};
12280  if (unlikely(__pyx_kwds)) {
12281  Py_ssize_t kw_args;
12282  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12283  switch (pos_args) {
12284  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12285  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12286  case 0: break;
12287  default: goto __pyx_L5_argtuple_error;
12288  }
12289  kw_args = PyDict_Size(__pyx_kwds);
12290  switch (pos_args) {
12291  case 0:
12292  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12293  else goto __pyx_L5_argtuple_error;
12294  case 1:
12295  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12296  else {
12297  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12298  }
12299  }
12300  if (unlikely(kw_args > 0)) {
12301  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12302  }
12303  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12304  goto __pyx_L5_argtuple_error;
12305  } else {
12306  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12307  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12308  }
12309  __pyx_v_obj = values[0];
12310  __pyx_v_m = values[1];
12311  }
12312  goto __pyx_L4_argument_unpacking_done;
12313  __pyx_L5_argtuple_error:;
12314  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12315  __pyx_L3_error:;
12316  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12317  __Pyx_RefNannyFinishContext();
12318  return NULL;
12319  __pyx_L4_argument_unpacking_done:;
12320  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12321 
12322  /* function exit code */
12323  __Pyx_RefNannyFinishContext();
12324  return __pyx_r;
12325  }
12326 
12327  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12328  PyObject *__pyx_r = NULL;
12329  __Pyx_RefNannyDeclarations
12330  PyObject *__pyx_t_1 = NULL;
12331  int __pyx_lineno = 0;
12332  const char *__pyx_filename = NULL;
12333  int __pyx_clineno = 0;
12334  __Pyx_RefNannySetupContext("outer_pow", 0);
12335  __Pyx_XDECREF(__pyx_r);
12336  __pyx_t_1 = __pyx_f_8PyClical_outer_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12337  __Pyx_GOTREF(__pyx_t_1);
12338  __pyx_r = __pyx_t_1;
12339  __pyx_t_1 = 0;
12340  goto __pyx_L0;
12341 
12342  /* function exit code */
12343  __pyx_L1_error:;
12344  __Pyx_XDECREF(__pyx_t_1);
12345  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12346  __pyx_r = NULL;
12347  __pyx_L0:;
12348  __Pyx_XGIVEREF(__pyx_r);
12349  __Pyx_RefNannyFinishContext();
12350  return __pyx_r;
12351  }
12352 
12353  /* "PyClical.pyx":1527
12354  * return clifford(obj).outer_pow(m)
12355  *
12356  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
12357  * """
12358  * Square root of -1 which commutes with all members of the frame of the given multivector.
12359  */
12360 
12361  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12362  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12363  PyObject *__pyx_r = NULL;
12364  __Pyx_RefNannyDeclarations
12365  PyObject *__pyx_t_1 = NULL;
12366  PyObject *__pyx_t_2 = NULL;
12367  int __pyx_lineno = 0;
12368  const char *__pyx_filename = NULL;
12369  int __pyx_clineno = 0;
12370  __Pyx_RefNannySetupContext("complexifier", 0);
12371 
12372  /* "PyClical.pyx":1540
12373  * {-1}
12374  * """
12375  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
12376  *
12377  * cpdef inline sqrt(obj, i = None):
12378  */
12379  __Pyx_XDECREF(__pyx_r);
12380  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12381  __Pyx_GOTREF(__pyx_t_1);
12382  __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_filename = __pyx_f[0]; __pyx_lineno = 1540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12383  __Pyx_GOTREF(__pyx_t_2);
12384  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12385  __pyx_r = __pyx_t_2;
12386  __pyx_t_2 = 0;
12387  goto __pyx_L0;
12388 
12389  /* "PyClical.pyx":1527
12390  * return clifford(obj).outer_pow(m)
12391  *
12392  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
12393  * """
12394  * Square root of -1 which commutes with all members of the frame of the given multivector.
12395  */
12396 
12397  /* function exit code */
12398  __pyx_L1_error:;
12399  __Pyx_XDECREF(__pyx_t_1);
12400  __Pyx_XDECREF(__pyx_t_2);
12401  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12402  __pyx_r = 0;
12403  __pyx_L0:;
12404  __Pyx_XGIVEREF(__pyx_r);
12405  __Pyx_RefNannyFinishContext();
12406  return __pyx_r;
12407  }
12408 
12409  /* Python wrapper */
12410  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12411  static char __pyx_doc_8PyClical_42complexifier[] = "\n Square root of -1 which commutes with all members of the frame of the given multivector.\n\n >>> print complexifier(clifford(index_set({1})))\n {1,2,3}\n >>> print complexifier(clifford(index_set({-1})))\n {-1}\n >>> print complexifier(index_set({1}))\n {1,2,3}\n >>> print complexifier(index_set({-1}))\n {-1}\n ";
12412  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12413  PyObject *__pyx_r = 0;
12414  __Pyx_RefNannyDeclarations
12415  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
12416  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
12417 
12418  /* function exit code */
12419  __Pyx_RefNannyFinishContext();
12420  return __pyx_r;
12421  }
12422 
12423  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12424  PyObject *__pyx_r = NULL;
12425  __Pyx_RefNannyDeclarations
12426  PyObject *__pyx_t_1 = NULL;
12427  int __pyx_lineno = 0;
12428  const char *__pyx_filename = NULL;
12429  int __pyx_clineno = 0;
12430  __Pyx_RefNannySetupContext("complexifier", 0);
12431  __Pyx_XDECREF(__pyx_r);
12432  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12433  __Pyx_GOTREF(__pyx_t_1);
12434  __pyx_r = __pyx_t_1;
12435  __pyx_t_1 = 0;
12436  goto __pyx_L0;
12437 
12438  /* function exit code */
12439  __pyx_L1_error:;
12440  __Pyx_XDECREF(__pyx_t_1);
12441  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
12442  __pyx_r = NULL;
12443  __pyx_L0:;
12444  __Pyx_XGIVEREF(__pyx_r);
12445  __Pyx_RefNannyFinishContext();
12446  return __pyx_r;
12447  }
12448 
12449  /* "PyClical.pyx":1542
12450  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
12451  *
12452  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
12453  * """
12454  * Square root of multivector with optional complexifier.
12455  */
12456 
12457  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12458  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) {
12459  PyObject *__pyx_v_i = ((PyObject *)Py_None);
12460  PyObject *__pyx_r = NULL;
12461  __Pyx_RefNannyDeclarations
12462  int __pyx_t_1;
12463  int __pyx_t_2;
12464  PyObject *__pyx_t_3 = NULL;
12465  Clifford __pyx_t_4;
12466  PyObject *__pyx_t_5 = NULL;
12467  PyObject *__pyx_t_6 = NULL;
12468  PyObject *__pyx_t_7 = NULL;
12469  PyObject *__pyx_t_8 = NULL;
12470  PyObject *__pyx_t_9 = NULL;
12471  PyObject *__pyx_t_10 = NULL;
12472  PyObject *__pyx_t_11 = NULL;
12473  int __pyx_lineno = 0;
12474  const char *__pyx_filename = NULL;
12475  int __pyx_clineno = 0;
12476  __Pyx_RefNannySetupContext("sqrt", 0);
12477  if (__pyx_optional_args) {
12478  if (__pyx_optional_args->__pyx_n > 0) {
12479  __pyx_v_i = __pyx_optional_args->i;
12480  }
12481  }
12482 
12483  /* "PyClical.pyx":1557
12484  * -1
12485  * """
12486  * if not (i is None): # <<<<<<<<<<<<<<
12487  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
12488  * else:
12489  */
12490  __pyx_t_1 = (__pyx_v_i != Py_None);
12491  __pyx_t_2 = (__pyx_t_1 != 0);
12492  if (__pyx_t_2) {
12493 
12494  /* "PyClical.pyx":1558
12495  * """
12496  * if not (i is None):
12497  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
12498  * else:
12499  * try:
12500  */
12501  __Pyx_XDECREF(__pyx_r);
12502  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12503  __Pyx_GOTREF(__pyx_t_3);
12504  try {
12505  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
12506  } catch(...) {
12507  __Pyx_CppExn2PyErr();
12508  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12509  }
12510  __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_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12511  __Pyx_GOTREF(__pyx_t_5);
12512  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12513  __pyx_r = __pyx_t_5;
12514  __pyx_t_5 = 0;
12515  goto __pyx_L0;
12516  }
12517  /*else*/ {
12518 
12519  /* "PyClical.pyx":1560
12520  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
12521  * else:
12522  * try: # <<<<<<<<<<<<<<
12523  * return math.sqrt(obj)
12524  * except:
12525  */
12526  {
12527  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
12528  __Pyx_XGOTREF(__pyx_t_6);
12529  __Pyx_XGOTREF(__pyx_t_7);
12530  __Pyx_XGOTREF(__pyx_t_8);
12531  /*try:*/ {
12532 
12533  /* "PyClical.pyx":1561
12534  * else:
12535  * try:
12536  * return math.sqrt(obj) # <<<<<<<<<<<<<<
12537  * except:
12538  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
12539  */
12540  __Pyx_XDECREF(__pyx_r);
12541  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12542  __Pyx_GOTREF(__pyx_t_3);
12543  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12544  __Pyx_GOTREF(__pyx_t_9);
12545  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12546  __pyx_t_3 = NULL;
12547  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
12548  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
12549  if (likely(__pyx_t_3)) {
12550  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
12551  __Pyx_INCREF(__pyx_t_3);
12552  __Pyx_INCREF(function);
12553  __Pyx_DECREF_SET(__pyx_t_9, function);
12554  }
12555  }
12556  if (!__pyx_t_3) {
12557  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12558  __Pyx_GOTREF(__pyx_t_5);
12559  } else {
12560  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12561  __Pyx_GOTREF(__pyx_t_10);
12562  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
12563  __Pyx_INCREF(__pyx_v_obj);
12564  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
12565  __Pyx_GIVEREF(__pyx_v_obj);
12566  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
12567  __Pyx_GOTREF(__pyx_t_5);
12568  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12569  }
12570  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12571  __pyx_r = __pyx_t_5;
12572  __pyx_t_5 = 0;
12573  goto __pyx_L8_try_return;
12574  }
12575  __pyx_L4_error:;
12576  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12577  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12578  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12579  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12580 
12581  /* "PyClical.pyx":1562
12582  * try:
12583  * return math.sqrt(obj)
12584  * except: # <<<<<<<<<<<<<<
12585  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
12586  *
12587  */
12588  /*except:*/ {
12589  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12590  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12591  __Pyx_GOTREF(__pyx_t_5);
12592  __Pyx_GOTREF(__pyx_t_9);
12593  __Pyx_GOTREF(__pyx_t_10);
12594 
12595  /* "PyClical.pyx":1563
12596  * return math.sqrt(obj)
12597  * except:
12598  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
12599  *
12600  * cpdef inline exp(obj):
12601  */
12602  __Pyx_XDECREF(__pyx_r);
12603  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12604  __Pyx_GOTREF(__pyx_t_3);
12605  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
12606  __Pyx_GOTREF(__pyx_t_11);
12607  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12608  __pyx_r = __pyx_t_11;
12609  __pyx_t_11 = 0;
12610  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12611  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12612  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12613  goto __pyx_L7_except_return;
12614  }
12615  __pyx_L6_except_error:;
12616  __Pyx_XGIVEREF(__pyx_t_6);
12617  __Pyx_XGIVEREF(__pyx_t_7);
12618  __Pyx_XGIVEREF(__pyx_t_8);
12619  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12620  goto __pyx_L1_error;
12621  __pyx_L8_try_return:;
12622  __Pyx_XGIVEREF(__pyx_t_6);
12623  __Pyx_XGIVEREF(__pyx_t_7);
12624  __Pyx_XGIVEREF(__pyx_t_8);
12625  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12626  goto __pyx_L0;
12627  __pyx_L7_except_return:;
12628  __Pyx_XGIVEREF(__pyx_t_6);
12629  __Pyx_XGIVEREF(__pyx_t_7);
12630  __Pyx_XGIVEREF(__pyx_t_8);
12631  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
12632  goto __pyx_L0;
12633  }
12634  }
12635 
12636  /* "PyClical.pyx":1542
12637  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
12638  *
12639  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
12640  * """
12641  * Square root of multivector with optional complexifier.
12642  */
12643 
12644  /* function exit code */
12645  __pyx_L1_error:;
12646  __Pyx_XDECREF(__pyx_t_3);
12647  __Pyx_XDECREF(__pyx_t_5);
12648  __Pyx_XDECREF(__pyx_t_9);
12649  __Pyx_XDECREF(__pyx_t_10);
12650  __Pyx_XDECREF(__pyx_t_11);
12651  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12652  __pyx_r = 0;
12653  __pyx_L0:;
12654  __Pyx_XGIVEREF(__pyx_r);
12655  __Pyx_RefNannyFinishContext();
12656  return __pyx_r;
12657  }
12658 
12659  /* Python wrapper */
12660  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12661  static char __pyx_doc_8PyClical_44sqrt[] = "\n Square root of multivector with optional complexifier.\n\n >>> print sqrt(-1)\n {-1}\n >>> print sqrt(clifford(\"2{-1}\"))\n 1+{-1}\n >>> j=sqrt(-1,complexifier(index_set({1}))); print j; print j*j\n {1,2,3}\n -1\n >>> j=sqrt(-1,\"{1,2,3}\"); print j; print j*j\n {1,2,3}\n -1\n ";
12662  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12663  PyObject *__pyx_v_obj = 0;
12664  PyObject *__pyx_v_i = 0;
12665  int __pyx_lineno = 0;
12666  const char *__pyx_filename = NULL;
12667  int __pyx_clineno = 0;
12668  PyObject *__pyx_r = 0;
12669  __Pyx_RefNannyDeclarations
12670  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
12671  {
12672  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
12673  PyObject* values[2] = {0,0};
12674  values[1] = ((PyObject *)Py_None);
12675  if (unlikely(__pyx_kwds)) {
12676  Py_ssize_t kw_args;
12677  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12678  switch (pos_args) {
12679  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12680  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12681  case 0: break;
12682  default: goto __pyx_L5_argtuple_error;
12683  }
12684  kw_args = PyDict_Size(__pyx_kwds);
12685  switch (pos_args) {
12686  case 0:
12687  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12688  else goto __pyx_L5_argtuple_error;
12689  case 1:
12690  if (kw_args > 0) {
12691  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
12692  if (value) { values[1] = value; kw_args--; }
12693  }
12694  }
12695  if (unlikely(kw_args > 0)) {
12696  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12697  }
12698  } else {
12699  switch (PyTuple_GET_SIZE(__pyx_args)) {
12700  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12701  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12702  break;
12703  default: goto __pyx_L5_argtuple_error;
12704  }
12705  }
12706  __pyx_v_obj = values[0];
12707  __pyx_v_i = values[1];
12708  }
12709  goto __pyx_L4_argument_unpacking_done;
12710  __pyx_L5_argtuple_error:;
12711  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12712  __pyx_L3_error:;
12713  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12714  __Pyx_RefNannyFinishContext();
12715  return NULL;
12716  __pyx_L4_argument_unpacking_done:;
12717  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
12718 
12719  /* function exit code */
12720  __Pyx_RefNannyFinishContext();
12721  return __pyx_r;
12722  }
12723 
12724  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
12725  PyObject *__pyx_r = NULL;
12726  __Pyx_RefNannyDeclarations
12727  PyObject *__pyx_t_1 = NULL;
12728  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
12729  int __pyx_lineno = 0;
12730  const char *__pyx_filename = NULL;
12731  int __pyx_clineno = 0;
12732  __Pyx_RefNannySetupContext("sqrt", 0);
12733  __Pyx_XDECREF(__pyx_r);
12734  __pyx_t_2.__pyx_n = 1;
12735  __pyx_t_2.i = __pyx_v_i;
12736  __pyx_t_1 = __pyx_f_8PyClical_sqrt(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12737  __Pyx_GOTREF(__pyx_t_1);
12738  __pyx_r = __pyx_t_1;
12739  __pyx_t_1 = 0;
12740  goto __pyx_L0;
12741 
12742  /* function exit code */
12743  __pyx_L1_error:;
12744  __Pyx_XDECREF(__pyx_t_1);
12745  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
12746  __pyx_r = NULL;
12747  __pyx_L0:;
12748  __Pyx_XGIVEREF(__pyx_r);
12749  __Pyx_RefNannyFinishContext();
12750  return __pyx_r;
12751  }
12752 
12753  /* "PyClical.pyx":1565
12754  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
12755  *
12756  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
12757  * """
12758  * Exponential of multivector.
12759  */
12760 
12761  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12762  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12763  PyObject *__pyx_r = NULL;
12764  __Pyx_RefNannyDeclarations
12765  PyObject *__pyx_t_1 = NULL;
12766  PyObject *__pyx_t_2 = NULL;
12767  PyObject *__pyx_t_3 = NULL;
12768  PyObject *__pyx_t_4 = NULL;
12769  PyObject *__pyx_t_5 = NULL;
12770  PyObject *__pyx_t_6 = NULL;
12771  PyObject *__pyx_t_7 = NULL;
12772  PyObject *__pyx_t_8 = NULL;
12773  int __pyx_lineno = 0;
12774  const char *__pyx_filename = NULL;
12775  int __pyx_clineno = 0;
12776  __Pyx_RefNannySetupContext("exp", 0);
12777 
12778  /* "PyClical.pyx":1574
12779  * {1,2}
12780  * """
12781  * try: # <<<<<<<<<<<<<<
12782  * return math.exp(obj)
12783  * except:
12784  */
12785  {
12786  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12787  __Pyx_XGOTREF(__pyx_t_1);
12788  __Pyx_XGOTREF(__pyx_t_2);
12789  __Pyx_XGOTREF(__pyx_t_3);
12790  /*try:*/ {
12791 
12792  /* "PyClical.pyx":1575
12793  * """
12794  * try:
12795  * return math.exp(obj) # <<<<<<<<<<<<<<
12796  * except:
12797  * return clifford().wrap( glucat.exp(toClifford(obj)) )
12798  */
12799  __Pyx_XDECREF(__pyx_r);
12800  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12801  __Pyx_GOTREF(__pyx_t_5);
12802  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12803  __Pyx_GOTREF(__pyx_t_6);
12804  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12805  __pyx_t_5 = NULL;
12806  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
12807  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12808  if (likely(__pyx_t_5)) {
12809  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12810  __Pyx_INCREF(__pyx_t_5);
12811  __Pyx_INCREF(function);
12812  __Pyx_DECREF_SET(__pyx_t_6, function);
12813  }
12814  }
12815  if (!__pyx_t_5) {
12816  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12817  __Pyx_GOTREF(__pyx_t_4);
12818  } else {
12819  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12820  __Pyx_GOTREF(__pyx_t_7);
12821  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
12822  __Pyx_INCREF(__pyx_v_obj);
12823  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
12824  __Pyx_GIVEREF(__pyx_v_obj);
12825  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
12826  __Pyx_GOTREF(__pyx_t_4);
12827  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12828  }
12829  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12830  __pyx_r = __pyx_t_4;
12831  __pyx_t_4 = 0;
12832  goto __pyx_L7_try_return;
12833  }
12834  __pyx_L3_error:;
12835  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12836  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12837  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12838  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12839 
12840  /* "PyClical.pyx":1576
12841  * try:
12842  * return math.exp(obj)
12843  * except: # <<<<<<<<<<<<<<
12844  * return clifford().wrap( glucat.exp(toClifford(obj)) )
12845  *
12846  */
12847  /*except:*/ {
12848  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
12849  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12850  __Pyx_GOTREF(__pyx_t_4);
12851  __Pyx_GOTREF(__pyx_t_6);
12852  __Pyx_GOTREF(__pyx_t_7);
12853 
12854  /* "PyClical.pyx":1577
12855  * return math.exp(obj)
12856  * except:
12857  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
12858  *
12859  * cpdef inline log(obj,i = None):
12860  */
12861  __Pyx_XDECREF(__pyx_r);
12862  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12863  __Pyx_GOTREF(__pyx_t_5);
12864  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), exp(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
12865  __Pyx_GOTREF(__pyx_t_8);
12866  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12867  __pyx_r = __pyx_t_8;
12868  __pyx_t_8 = 0;
12869  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12870  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12871  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12872  goto __pyx_L6_except_return;
12873  }
12874  __pyx_L5_except_error:;
12875  __Pyx_XGIVEREF(__pyx_t_1);
12876  __Pyx_XGIVEREF(__pyx_t_2);
12877  __Pyx_XGIVEREF(__pyx_t_3);
12878  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12879  goto __pyx_L1_error;
12880  __pyx_L7_try_return:;
12881  __Pyx_XGIVEREF(__pyx_t_1);
12882  __Pyx_XGIVEREF(__pyx_t_2);
12883  __Pyx_XGIVEREF(__pyx_t_3);
12884  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12885  goto __pyx_L0;
12886  __pyx_L6_except_return:;
12887  __Pyx_XGIVEREF(__pyx_t_1);
12888  __Pyx_XGIVEREF(__pyx_t_2);
12889  __Pyx_XGIVEREF(__pyx_t_3);
12890  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12891  goto __pyx_L0;
12892  }
12893 
12894  /* "PyClical.pyx":1565
12895  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
12896  *
12897  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
12898  * """
12899  * Exponential of multivector.
12900  */
12901 
12902  /* function exit code */
12903  __pyx_L1_error:;
12904  __Pyx_XDECREF(__pyx_t_4);
12905  __Pyx_XDECREF(__pyx_t_5);
12906  __Pyx_XDECREF(__pyx_t_6);
12907  __Pyx_XDECREF(__pyx_t_7);
12908  __Pyx_XDECREF(__pyx_t_8);
12909  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
12910  __pyx_r = 0;
12911  __pyx_L0:;
12912  __Pyx_XGIVEREF(__pyx_r);
12913  __Pyx_RefNannyFinishContext();
12914  return __pyx_r;
12915  }
12916 
12917  /* Python wrapper */
12918  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12919  static char __pyx_doc_8PyClical_46exp[] = "\n Exponential of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print exp(x)\n 0.7071+0.7071{1,2}\n >>> x=clifford(\"{1,2}\") * pi/2; print exp(x)\n {1,2}\n ";
12920  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12921  PyObject *__pyx_r = 0;
12922  __Pyx_RefNannyDeclarations
12923  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
12924  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
12925 
12926  /* function exit code */
12927  __Pyx_RefNannyFinishContext();
12928  return __pyx_r;
12929  }
12930 
12931  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12932  PyObject *__pyx_r = NULL;
12933  __Pyx_RefNannyDeclarations
12934  PyObject *__pyx_t_1 = NULL;
12935  int __pyx_lineno = 0;
12936  const char *__pyx_filename = NULL;
12937  int __pyx_clineno = 0;
12938  __Pyx_RefNannySetupContext("exp", 0);
12939  __Pyx_XDECREF(__pyx_r);
12940  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12941  __Pyx_GOTREF(__pyx_t_1);
12942  __pyx_r = __pyx_t_1;
12943  __pyx_t_1 = 0;
12944  goto __pyx_L0;
12945 
12946  /* function exit code */
12947  __pyx_L1_error:;
12948  __Pyx_XDECREF(__pyx_t_1);
12949  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
12950  __pyx_r = NULL;
12951  __pyx_L0:;
12952  __Pyx_XGIVEREF(__pyx_r);
12953  __Pyx_RefNannyFinishContext();
12954  return __pyx_r;
12955  }
12956 
12957  /* "PyClical.pyx":1579
12958  * return clifford().wrap( glucat.exp(toClifford(obj)) )
12959  *
12960  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
12961  * """
12962  * Natural logarithm of multivector with optional complexifier.
12963  */
12964 
12965  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12966  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) {
12967  PyObject *__pyx_v_i = ((PyObject *)Py_None);
12968  PyObject *__pyx_r = NULL;
12969  __Pyx_RefNannyDeclarations
12970  int __pyx_t_1;
12971  int __pyx_t_2;
12972  PyObject *__pyx_t_3 = NULL;
12973  Clifford __pyx_t_4;
12974  PyObject *__pyx_t_5 = NULL;
12975  PyObject *__pyx_t_6 = NULL;
12976  PyObject *__pyx_t_7 = NULL;
12977  PyObject *__pyx_t_8 = NULL;
12978  PyObject *__pyx_t_9 = NULL;
12979  PyObject *__pyx_t_10 = NULL;
12980  PyObject *__pyx_t_11 = NULL;
12981  int __pyx_lineno = 0;
12982  const char *__pyx_filename = NULL;
12983  int __pyx_clineno = 0;
12984  __Pyx_RefNannySetupContext("log", 0);
12985  if (__pyx_optional_args) {
12986  if (__pyx_optional_args->__pyx_n > 0) {
12987  __pyx_v_i = __pyx_optional_args->i;
12988  }
12989  }
12990 
12991  /* "PyClical.pyx":1594
12992  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
12993  * """
12994  * if not (i is None): # <<<<<<<<<<<<<<
12995  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
12996  * else:
12997  */
12998  __pyx_t_1 = (__pyx_v_i != Py_None);
12999  __pyx_t_2 = (__pyx_t_1 != 0);
13000  if (__pyx_t_2) {
13001 
13002  /* "PyClical.pyx":1595
13003  * """
13004  * if not (i is None):
13005  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13006  * else:
13007  * try:
13008  */
13009  __Pyx_XDECREF(__pyx_r);
13010  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13011  __Pyx_GOTREF(__pyx_t_3);
13012  try {
13013  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13014  } catch(...) {
13015  __Pyx_CppExn2PyErr();
13016  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13017  }
13018  __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_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13019  __Pyx_GOTREF(__pyx_t_5);
13020  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13021  __pyx_r = __pyx_t_5;
13022  __pyx_t_5 = 0;
13023  goto __pyx_L0;
13024  }
13025  /*else*/ {
13026 
13027  /* "PyClical.pyx":1597
13028  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13029  * else:
13030  * try: # <<<<<<<<<<<<<<
13031  * return math.log(obj)
13032  * except:
13033  */
13034  {
13035  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13036  __Pyx_XGOTREF(__pyx_t_6);
13037  __Pyx_XGOTREF(__pyx_t_7);
13038  __Pyx_XGOTREF(__pyx_t_8);
13039  /*try:*/ {
13040 
13041  /* "PyClical.pyx":1598
13042  * else:
13043  * try:
13044  * return math.log(obj) # <<<<<<<<<<<<<<
13045  * except:
13046  * return clifford().wrap( glucat.log(toClifford(obj)) )
13047  */
13048  __Pyx_XDECREF(__pyx_r);
13049  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13050  __Pyx_GOTREF(__pyx_t_3);
13051  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13052  __Pyx_GOTREF(__pyx_t_9);
13053  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13054  __pyx_t_3 = NULL;
13055  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13056  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13057  if (likely(__pyx_t_3)) {
13058  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13059  __Pyx_INCREF(__pyx_t_3);
13060  __Pyx_INCREF(function);
13061  __Pyx_DECREF_SET(__pyx_t_9, function);
13062  }
13063  }
13064  if (!__pyx_t_3) {
13065  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13066  __Pyx_GOTREF(__pyx_t_5);
13067  } else {
13068  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13069  __Pyx_GOTREF(__pyx_t_10);
13070  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
13071  __Pyx_INCREF(__pyx_v_obj);
13072  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13073  __Pyx_GIVEREF(__pyx_v_obj);
13074  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13075  __Pyx_GOTREF(__pyx_t_5);
13076  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13077  }
13078  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13079  __pyx_r = __pyx_t_5;
13080  __pyx_t_5 = 0;
13081  goto __pyx_L8_try_return;
13082  }
13083  __pyx_L4_error:;
13084  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13085  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13086  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13087  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13088 
13089  /* "PyClical.pyx":1599
13090  * try:
13091  * return math.log(obj)
13092  * except: # <<<<<<<<<<<<<<
13093  * return clifford().wrap( glucat.log(toClifford(obj)) )
13094  *
13095  */
13096  /*except:*/ {
13097  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13098  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13099  __Pyx_GOTREF(__pyx_t_5);
13100  __Pyx_GOTREF(__pyx_t_9);
13101  __Pyx_GOTREF(__pyx_t_10);
13102 
13103  /* "PyClical.pyx":1600
13104  * return math.log(obj)
13105  * except:
13106  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13107  *
13108  * cpdef inline cos(obj,i = None):
13109  */
13110  __Pyx_XDECREF(__pyx_r);
13111  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13112  __Pyx_GOTREF(__pyx_t_3);
13113  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), log(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13114  __Pyx_GOTREF(__pyx_t_11);
13115  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13116  __pyx_r = __pyx_t_11;
13117  __pyx_t_11 = 0;
13118  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13119  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13120  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13121  goto __pyx_L7_except_return;
13122  }
13123  __pyx_L6_except_error:;
13124  __Pyx_XGIVEREF(__pyx_t_6);
13125  __Pyx_XGIVEREF(__pyx_t_7);
13126  __Pyx_XGIVEREF(__pyx_t_8);
13127  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13128  goto __pyx_L1_error;
13129  __pyx_L8_try_return:;
13130  __Pyx_XGIVEREF(__pyx_t_6);
13131  __Pyx_XGIVEREF(__pyx_t_7);
13132  __Pyx_XGIVEREF(__pyx_t_8);
13133  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13134  goto __pyx_L0;
13135  __pyx_L7_except_return:;
13136  __Pyx_XGIVEREF(__pyx_t_6);
13137  __Pyx_XGIVEREF(__pyx_t_7);
13138  __Pyx_XGIVEREF(__pyx_t_8);
13139  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13140  goto __pyx_L0;
13141  }
13142  }
13143 
13144  /* "PyClical.pyx":1579
13145  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13146  *
13147  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13148  * """
13149  * Natural logarithm of multivector with optional complexifier.
13150  */
13151 
13152  /* function exit code */
13153  __pyx_L1_error:;
13154  __Pyx_XDECREF(__pyx_t_3);
13155  __Pyx_XDECREF(__pyx_t_5);
13156  __Pyx_XDECREF(__pyx_t_9);
13157  __Pyx_XDECREF(__pyx_t_10);
13158  __Pyx_XDECREF(__pyx_t_11);
13159  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13160  __pyx_r = 0;
13161  __pyx_L0:;
13162  __Pyx_XGIVEREF(__pyx_r);
13163  __Pyx_RefNannyFinishContext();
13164  return __pyx_r;
13165  }
13166 
13167  /* Python wrapper */
13168  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13169  static char __pyx_doc_8PyClical_48log[] = "\n Natural logarithm of multivector with optional complexifier.\n\n >>> x=clifford(\"{-1}\"); print (log(x,\"{-1}\") * 2/pi)\n {-1}\n >>> x=clifford(\"{1,2}\"); print (log(x,\"{1,2,3}\") * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print (log(x) * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print (log(x,\"{1,2}\") * 2/pi)\n Traceback (most recent call last):\n ...\n RuntimeError: check_complex(val, i): i is not a valid complexifier for val\n ";
13170  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13171  PyObject *__pyx_v_obj = 0;
13172  PyObject *__pyx_v_i = 0;
13173  int __pyx_lineno = 0;
13174  const char *__pyx_filename = NULL;
13175  int __pyx_clineno = 0;
13176  PyObject *__pyx_r = 0;
13177  __Pyx_RefNannyDeclarations
13178  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13179  {
13180  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13181  PyObject* values[2] = {0,0};
13182  values[1] = ((PyObject *)Py_None);
13183  if (unlikely(__pyx_kwds)) {
13184  Py_ssize_t kw_args;
13185  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13186  switch (pos_args) {
13187  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13188  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13189  case 0: break;
13190  default: goto __pyx_L5_argtuple_error;
13191  }
13192  kw_args = PyDict_Size(__pyx_kwds);
13193  switch (pos_args) {
13194  case 0:
13195  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13196  else goto __pyx_L5_argtuple_error;
13197  case 1:
13198  if (kw_args > 0) {
13199  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13200  if (value) { values[1] = value; kw_args--; }
13201  }
13202  }
13203  if (unlikely(kw_args > 0)) {
13204  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13205  }
13206  } else {
13207  switch (PyTuple_GET_SIZE(__pyx_args)) {
13208  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13209  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13210  break;
13211  default: goto __pyx_L5_argtuple_error;
13212  }
13213  }
13214  __pyx_v_obj = values[0];
13215  __pyx_v_i = values[1];
13216  }
13217  goto __pyx_L4_argument_unpacking_done;
13218  __pyx_L5_argtuple_error:;
13219  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13220  __pyx_L3_error:;
13221  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13222  __Pyx_RefNannyFinishContext();
13223  return NULL;
13224  __pyx_L4_argument_unpacking_done:;
13225  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13226 
13227  /* function exit code */
13228  __Pyx_RefNannyFinishContext();
13229  return __pyx_r;
13230  }
13231 
13232  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13233  PyObject *__pyx_r = NULL;
13234  __Pyx_RefNannyDeclarations
13235  PyObject *__pyx_t_1 = NULL;
13236  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13237  int __pyx_lineno = 0;
13238  const char *__pyx_filename = NULL;
13239  int __pyx_clineno = 0;
13240  __Pyx_RefNannySetupContext("log", 0);
13241  __Pyx_XDECREF(__pyx_r);
13242  __pyx_t_2.__pyx_n = 1;
13243  __pyx_t_2.i = __pyx_v_i;
13244  __pyx_t_1 = __pyx_f_8PyClical_log(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13245  __Pyx_GOTREF(__pyx_t_1);
13246  __pyx_r = __pyx_t_1;
13247  __pyx_t_1 = 0;
13248  goto __pyx_L0;
13249 
13250  /* function exit code */
13251  __pyx_L1_error:;
13252  __Pyx_XDECREF(__pyx_t_1);
13253  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13254  __pyx_r = NULL;
13255  __pyx_L0:;
13256  __Pyx_XGIVEREF(__pyx_r);
13257  __Pyx_RefNannyFinishContext();
13258  return __pyx_r;
13259  }
13260 
13261  /* "PyClical.pyx":1602
13262  * return clifford().wrap( glucat.log(toClifford(obj)) )
13263  *
13264  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13265  * """
13266  * Cosine of multivector with optional complexifier.
13267  */
13268 
13269  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13270  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) {
13271  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13272  PyObject *__pyx_r = NULL;
13273  __Pyx_RefNannyDeclarations
13274  int __pyx_t_1;
13275  int __pyx_t_2;
13276  PyObject *__pyx_t_3 = NULL;
13277  Clifford __pyx_t_4;
13278  PyObject *__pyx_t_5 = NULL;
13279  PyObject *__pyx_t_6 = NULL;
13280  PyObject *__pyx_t_7 = NULL;
13281  PyObject *__pyx_t_8 = NULL;
13282  PyObject *__pyx_t_9 = NULL;
13283  PyObject *__pyx_t_10 = NULL;
13284  PyObject *__pyx_t_11 = NULL;
13285  int __pyx_lineno = 0;
13286  const char *__pyx_filename = NULL;
13287  int __pyx_clineno = 0;
13288  __Pyx_RefNannySetupContext("cos", 0);
13289  if (__pyx_optional_args) {
13290  if (__pyx_optional_args->__pyx_n > 0) {
13291  __pyx_v_i = __pyx_optional_args->i;
13292  }
13293  }
13294 
13295  /* "PyClical.pyx":1611
13296  * {1,2}
13297  * """
13298  * if not (i is None): # <<<<<<<<<<<<<<
13299  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13300  * else:
13301  */
13302  __pyx_t_1 = (__pyx_v_i != Py_None);
13303  __pyx_t_2 = (__pyx_t_1 != 0);
13304  if (__pyx_t_2) {
13305 
13306  /* "PyClical.pyx":1612
13307  * """
13308  * if not (i is None):
13309  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13310  * else:
13311  * try:
13312  */
13313  __Pyx_XDECREF(__pyx_r);
13314  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13315  __Pyx_GOTREF(__pyx_t_3);
13316  try {
13317  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13318  } catch(...) {
13319  __Pyx_CppExn2PyErr();
13320  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13321  }
13322  __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_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13323  __Pyx_GOTREF(__pyx_t_5);
13324  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13325  __pyx_r = __pyx_t_5;
13326  __pyx_t_5 = 0;
13327  goto __pyx_L0;
13328  }
13329  /*else*/ {
13330 
13331  /* "PyClical.pyx":1614
13332  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13333  * else:
13334  * try: # <<<<<<<<<<<<<<
13335  * return math.cos(obj)
13336  * except:
13337  */
13338  {
13339  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13340  __Pyx_XGOTREF(__pyx_t_6);
13341  __Pyx_XGOTREF(__pyx_t_7);
13342  __Pyx_XGOTREF(__pyx_t_8);
13343  /*try:*/ {
13344 
13345  /* "PyClical.pyx":1615
13346  * else:
13347  * try:
13348  * return math.cos(obj) # <<<<<<<<<<<<<<
13349  * except:
13350  * return clifford().wrap( glucat.cos(toClifford(obj)) )
13351  */
13352  __Pyx_XDECREF(__pyx_r);
13353  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13354  __Pyx_GOTREF(__pyx_t_3);
13355  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13356  __Pyx_GOTREF(__pyx_t_9);
13357  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13358  __pyx_t_3 = NULL;
13359  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13360  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13361  if (likely(__pyx_t_3)) {
13362  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13363  __Pyx_INCREF(__pyx_t_3);
13364  __Pyx_INCREF(function);
13365  __Pyx_DECREF_SET(__pyx_t_9, function);
13366  }
13367  }
13368  if (!__pyx_t_3) {
13369  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13370  __Pyx_GOTREF(__pyx_t_5);
13371  } else {
13372  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13373  __Pyx_GOTREF(__pyx_t_10);
13374  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
13375  __Pyx_INCREF(__pyx_v_obj);
13376  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13377  __Pyx_GIVEREF(__pyx_v_obj);
13378  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13379  __Pyx_GOTREF(__pyx_t_5);
13380  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13381  }
13382  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13383  __pyx_r = __pyx_t_5;
13384  __pyx_t_5 = 0;
13385  goto __pyx_L8_try_return;
13386  }
13387  __pyx_L4_error:;
13388  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13389  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13390  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13391  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13392 
13393  /* "PyClical.pyx":1616
13394  * try:
13395  * return math.cos(obj)
13396  * except: # <<<<<<<<<<<<<<
13397  * return clifford().wrap( glucat.cos(toClifford(obj)) )
13398  *
13399  */
13400  /*except:*/ {
13401  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13402  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13403  __Pyx_GOTREF(__pyx_t_5);
13404  __Pyx_GOTREF(__pyx_t_9);
13405  __Pyx_GOTREF(__pyx_t_10);
13406 
13407  /* "PyClical.pyx":1617
13408  * return math.cos(obj)
13409  * except:
13410  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
13411  *
13412  * cpdef inline acos(obj,i = None):
13413  */
13414  __Pyx_XDECREF(__pyx_r);
13415  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13416  __Pyx_GOTREF(__pyx_t_3);
13417  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13418  __Pyx_GOTREF(__pyx_t_11);
13419  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13420  __pyx_r = __pyx_t_11;
13421  __pyx_t_11 = 0;
13422  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13423  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13424  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13425  goto __pyx_L7_except_return;
13426  }
13427  __pyx_L6_except_error:;
13428  __Pyx_XGIVEREF(__pyx_t_6);
13429  __Pyx_XGIVEREF(__pyx_t_7);
13430  __Pyx_XGIVEREF(__pyx_t_8);
13431  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13432  goto __pyx_L1_error;
13433  __pyx_L8_try_return:;
13434  __Pyx_XGIVEREF(__pyx_t_6);
13435  __Pyx_XGIVEREF(__pyx_t_7);
13436  __Pyx_XGIVEREF(__pyx_t_8);
13437  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13438  goto __pyx_L0;
13439  __pyx_L7_except_return:;
13440  __Pyx_XGIVEREF(__pyx_t_6);
13441  __Pyx_XGIVEREF(__pyx_t_7);
13442  __Pyx_XGIVEREF(__pyx_t_8);
13443  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13444  goto __pyx_L0;
13445  }
13446  }
13447 
13448  /* "PyClical.pyx":1602
13449  * return clifford().wrap( glucat.log(toClifford(obj)) )
13450  *
13451  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13452  * """
13453  * Cosine of multivector with optional complexifier.
13454  */
13455 
13456  /* function exit code */
13457  __pyx_L1_error:;
13458  __Pyx_XDECREF(__pyx_t_3);
13459  __Pyx_XDECREF(__pyx_t_5);
13460  __Pyx_XDECREF(__pyx_t_9);
13461  __Pyx_XDECREF(__pyx_t_10);
13462  __Pyx_XDECREF(__pyx_t_11);
13463  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13464  __pyx_r = 0;
13465  __pyx_L0:;
13466  __Pyx_XGIVEREF(__pyx_r);
13467  __Pyx_RefNannyFinishContext();
13468  return __pyx_r;
13469  }
13470 
13471  /* Python wrapper */
13472  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13473  static char __pyx_doc_8PyClical_50cos[] = "\n Cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{1,2,3}\")\n {1,2}\n >>> x=clifford(\"{1,2}\"); print cos(acos(x))\n {1,2}\n ";
13474  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13475  PyObject *__pyx_v_obj = 0;
13476  PyObject *__pyx_v_i = 0;
13477  int __pyx_lineno = 0;
13478  const char *__pyx_filename = NULL;
13479  int __pyx_clineno = 0;
13480  PyObject *__pyx_r = 0;
13481  __Pyx_RefNannyDeclarations
13482  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
13483  {
13484  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13485  PyObject* values[2] = {0,0};
13486  values[1] = ((PyObject *)Py_None);
13487  if (unlikely(__pyx_kwds)) {
13488  Py_ssize_t kw_args;
13489  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13490  switch (pos_args) {
13491  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13492  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13493  case 0: break;
13494  default: goto __pyx_L5_argtuple_error;
13495  }
13496  kw_args = PyDict_Size(__pyx_kwds);
13497  switch (pos_args) {
13498  case 0:
13499  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13500  else goto __pyx_L5_argtuple_error;
13501  case 1:
13502  if (kw_args > 0) {
13503  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13504  if (value) { values[1] = value; kw_args--; }
13505  }
13506  }
13507  if (unlikely(kw_args > 0)) {
13508  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13509  }
13510  } else {
13511  switch (PyTuple_GET_SIZE(__pyx_args)) {
13512  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13513  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13514  break;
13515  default: goto __pyx_L5_argtuple_error;
13516  }
13517  }
13518  __pyx_v_obj = values[0];
13519  __pyx_v_i = values[1];
13520  }
13521  goto __pyx_L4_argument_unpacking_done;
13522  __pyx_L5_argtuple_error:;
13523  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13524  __pyx_L3_error:;
13525  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13526  __Pyx_RefNannyFinishContext();
13527  return NULL;
13528  __pyx_L4_argument_unpacking_done:;
13529  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
13530 
13531  /* function exit code */
13532  __Pyx_RefNannyFinishContext();
13533  return __pyx_r;
13534  }
13535 
13536  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13537  PyObject *__pyx_r = NULL;
13538  __Pyx_RefNannyDeclarations
13539  PyObject *__pyx_t_1 = NULL;
13540  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
13541  int __pyx_lineno = 0;
13542  const char *__pyx_filename = NULL;
13543  int __pyx_clineno = 0;
13544  __Pyx_RefNannySetupContext("cos", 0);
13545  __Pyx_XDECREF(__pyx_r);
13546  __pyx_t_2.__pyx_n = 1;
13547  __pyx_t_2.i = __pyx_v_i;
13548  __pyx_t_1 = __pyx_f_8PyClical_cos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13549  __Pyx_GOTREF(__pyx_t_1);
13550  __pyx_r = __pyx_t_1;
13551  __pyx_t_1 = 0;
13552  goto __pyx_L0;
13553 
13554  /* function exit code */
13555  __pyx_L1_error:;
13556  __Pyx_XDECREF(__pyx_t_1);
13557  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13558  __pyx_r = NULL;
13559  __pyx_L0:;
13560  __Pyx_XGIVEREF(__pyx_r);
13561  __Pyx_RefNannyFinishContext();
13562  return __pyx_r;
13563  }
13564 
13565  /* "PyClical.pyx":1619
13566  * return clifford().wrap( glucat.cos(toClifford(obj)) )
13567  *
13568  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
13569  * """
13570  * Inverse cosine of multivector with optional complexifier.
13571  */
13572 
13573  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13574  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) {
13575  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13576  PyObject *__pyx_r = NULL;
13577  __Pyx_RefNannyDeclarations
13578  int __pyx_t_1;
13579  int __pyx_t_2;
13580  PyObject *__pyx_t_3 = NULL;
13581  Clifford __pyx_t_4;
13582  PyObject *__pyx_t_5 = NULL;
13583  PyObject *__pyx_t_6 = NULL;
13584  PyObject *__pyx_t_7 = NULL;
13585  PyObject *__pyx_t_8 = NULL;
13586  PyObject *__pyx_t_9 = NULL;
13587  PyObject *__pyx_t_10 = NULL;
13588  PyObject *__pyx_t_11 = NULL;
13589  int __pyx_lineno = 0;
13590  const char *__pyx_filename = NULL;
13591  int __pyx_clineno = 0;
13592  __Pyx_RefNannySetupContext("acos", 0);
13593  if (__pyx_optional_args) {
13594  if (__pyx_optional_args->__pyx_n > 0) {
13595  __pyx_v_i = __pyx_optional_args->i;
13596  }
13597  }
13598 
13599  /* "PyClical.pyx":1632
13600  * {1,2}
13601  * """
13602  * if not (i is None): # <<<<<<<<<<<<<<
13603  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
13604  * else:
13605  */
13606  __pyx_t_1 = (__pyx_v_i != Py_None);
13607  __pyx_t_2 = (__pyx_t_1 != 0);
13608  if (__pyx_t_2) {
13609 
13610  /* "PyClical.pyx":1633
13611  * """
13612  * if not (i is None):
13613  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13614  * else:
13615  * try:
13616  */
13617  __Pyx_XDECREF(__pyx_r);
13618  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13619  __Pyx_GOTREF(__pyx_t_3);
13620  try {
13621  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13622  } catch(...) {
13623  __Pyx_CppExn2PyErr();
13624  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13625  }
13626  __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_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13627  __Pyx_GOTREF(__pyx_t_5);
13628  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13629  __pyx_r = __pyx_t_5;
13630  __pyx_t_5 = 0;
13631  goto __pyx_L0;
13632  }
13633  /*else*/ {
13634 
13635  /* "PyClical.pyx":1635
13636  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
13637  * else:
13638  * try: # <<<<<<<<<<<<<<
13639  * return math.acos(obj)
13640  * except:
13641  */
13642  {
13643  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13644  __Pyx_XGOTREF(__pyx_t_6);
13645  __Pyx_XGOTREF(__pyx_t_7);
13646  __Pyx_XGOTREF(__pyx_t_8);
13647  /*try:*/ {
13648 
13649  /* "PyClical.pyx":1636
13650  * else:
13651  * try:
13652  * return math.acos(obj) # <<<<<<<<<<<<<<
13653  * except:
13654  * return clifford().wrap( glucat.acos(toClifford(obj)) )
13655  */
13656  __Pyx_XDECREF(__pyx_r);
13657  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13658  __Pyx_GOTREF(__pyx_t_3);
13659  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acos); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13660  __Pyx_GOTREF(__pyx_t_9);
13661  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13662  __pyx_t_3 = NULL;
13663  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
13664  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13665  if (likely(__pyx_t_3)) {
13666  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13667  __Pyx_INCREF(__pyx_t_3);
13668  __Pyx_INCREF(function);
13669  __Pyx_DECREF_SET(__pyx_t_9, function);
13670  }
13671  }
13672  if (!__pyx_t_3) {
13673  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13674  __Pyx_GOTREF(__pyx_t_5);
13675  } else {
13676  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13677  __Pyx_GOTREF(__pyx_t_10);
13678  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
13679  __Pyx_INCREF(__pyx_v_obj);
13680  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13681  __Pyx_GIVEREF(__pyx_v_obj);
13682  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
13683  __Pyx_GOTREF(__pyx_t_5);
13684  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13685  }
13686  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13687  __pyx_r = __pyx_t_5;
13688  __pyx_t_5 = 0;
13689  goto __pyx_L8_try_return;
13690  }
13691  __pyx_L4_error:;
13692  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13693  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13694  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13695  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13696 
13697  /* "PyClical.pyx":1637
13698  * try:
13699  * return math.acos(obj)
13700  * except: # <<<<<<<<<<<<<<
13701  * return clifford().wrap( glucat.acos(toClifford(obj)) )
13702  *
13703  */
13704  /*except:*/ {
13705  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13706  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13707  __Pyx_GOTREF(__pyx_t_5);
13708  __Pyx_GOTREF(__pyx_t_9);
13709  __Pyx_GOTREF(__pyx_t_10);
13710 
13711  /* "PyClical.pyx":1638
13712  * return math.acos(obj)
13713  * except:
13714  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
13715  *
13716  * cpdef inline cosh(obj):
13717  */
13718  __Pyx_XDECREF(__pyx_r);
13719  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13720  __Pyx_GOTREF(__pyx_t_3);
13721  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
13722  __Pyx_GOTREF(__pyx_t_11);
13723  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13724  __pyx_r = __pyx_t_11;
13725  __pyx_t_11 = 0;
13726  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13727  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13728  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13729  goto __pyx_L7_except_return;
13730  }
13731  __pyx_L6_except_error:;
13732  __Pyx_XGIVEREF(__pyx_t_6);
13733  __Pyx_XGIVEREF(__pyx_t_7);
13734  __Pyx_XGIVEREF(__pyx_t_8);
13735  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13736  goto __pyx_L1_error;
13737  __pyx_L8_try_return:;
13738  __Pyx_XGIVEREF(__pyx_t_6);
13739  __Pyx_XGIVEREF(__pyx_t_7);
13740  __Pyx_XGIVEREF(__pyx_t_8);
13741  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13742  goto __pyx_L0;
13743  __pyx_L7_except_return:;
13744  __Pyx_XGIVEREF(__pyx_t_6);
13745  __Pyx_XGIVEREF(__pyx_t_7);
13746  __Pyx_XGIVEREF(__pyx_t_8);
13747  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13748  goto __pyx_L0;
13749  }
13750  }
13751 
13752  /* "PyClical.pyx":1619
13753  * return clifford().wrap( glucat.cos(toClifford(obj)) )
13754  *
13755  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
13756  * """
13757  * Inverse cosine of multivector with optional complexifier.
13758  */
13759 
13760  /* function exit code */
13761  __pyx_L1_error:;
13762  __Pyx_XDECREF(__pyx_t_3);
13763  __Pyx_XDECREF(__pyx_t_5);
13764  __Pyx_XDECREF(__pyx_t_9);
13765  __Pyx_XDECREF(__pyx_t_10);
13766  __Pyx_XDECREF(__pyx_t_11);
13767  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13768  __pyx_r = 0;
13769  __pyx_L0:;
13770  __Pyx_XGIVEREF(__pyx_r);
13771  __Pyx_RefNannyFinishContext();
13772  return __pyx_r;
13773  }
13774 
13775  /* Python wrapper */
13776  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13777  static char __pyx_doc_8PyClical_52acos[] = "\n Inverse cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{1,2,3}\")\n {1,2}\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{-1,1,2,3,4}\")\n {1,2}\n >>> print acos(0) / pi\n 0.5\n >>> x=clifford(\"{1,2}\"); print cos(acos(x))\n {1,2}\n ";
13778  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13779  PyObject *__pyx_v_obj = 0;
13780  PyObject *__pyx_v_i = 0;
13781  int __pyx_lineno = 0;
13782  const char *__pyx_filename = NULL;
13783  int __pyx_clineno = 0;
13784  PyObject *__pyx_r = 0;
13785  __Pyx_RefNannyDeclarations
13786  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
13787  {
13788  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13789  PyObject* values[2] = {0,0};
13790  values[1] = ((PyObject *)Py_None);
13791  if (unlikely(__pyx_kwds)) {
13792  Py_ssize_t kw_args;
13793  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13794  switch (pos_args) {
13795  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13796  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13797  case 0: break;
13798  default: goto __pyx_L5_argtuple_error;
13799  }
13800  kw_args = PyDict_Size(__pyx_kwds);
13801  switch (pos_args) {
13802  case 0:
13803  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13804  else goto __pyx_L5_argtuple_error;
13805  case 1:
13806  if (kw_args > 0) {
13807  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13808  if (value) { values[1] = value; kw_args--; }
13809  }
13810  }
13811  if (unlikely(kw_args > 0)) {
13812  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13813  }
13814  } else {
13815  switch (PyTuple_GET_SIZE(__pyx_args)) {
13816  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13817  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13818  break;
13819  default: goto __pyx_L5_argtuple_error;
13820  }
13821  }
13822  __pyx_v_obj = values[0];
13823  __pyx_v_i = values[1];
13824  }
13825  goto __pyx_L4_argument_unpacking_done;
13826  __pyx_L5_argtuple_error:;
13827  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13828  __pyx_L3_error:;
13829  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13830  __Pyx_RefNannyFinishContext();
13831  return NULL;
13832  __pyx_L4_argument_unpacking_done:;
13833  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
13834 
13835  /* function exit code */
13836  __Pyx_RefNannyFinishContext();
13837  return __pyx_r;
13838  }
13839 
13840  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13841  PyObject *__pyx_r = NULL;
13842  __Pyx_RefNannyDeclarations
13843  PyObject *__pyx_t_1 = NULL;
13844  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
13845  int __pyx_lineno = 0;
13846  const char *__pyx_filename = NULL;
13847  int __pyx_clineno = 0;
13848  __Pyx_RefNannySetupContext("acos", 0);
13849  __Pyx_XDECREF(__pyx_r);
13850  __pyx_t_2.__pyx_n = 1;
13851  __pyx_t_2.i = __pyx_v_i;
13852  __pyx_t_1 = __pyx_f_8PyClical_acos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13853  __Pyx_GOTREF(__pyx_t_1);
13854  __pyx_r = __pyx_t_1;
13855  __pyx_t_1 = 0;
13856  goto __pyx_L0;
13857 
13858  /* function exit code */
13859  __pyx_L1_error:;
13860  __Pyx_XDECREF(__pyx_t_1);
13861  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
13862  __pyx_r = NULL;
13863  __pyx_L0:;
13864  __Pyx_XGIVEREF(__pyx_r);
13865  __Pyx_RefNannyFinishContext();
13866  return __pyx_r;
13867  }
13868 
13869  /* "PyClical.pyx":1640
13870  * return clifford().wrap( glucat.acos(toClifford(obj)) )
13871  *
13872  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
13873  * """
13874  * Hyperbolic cosine of multivector.
13875  */
13876 
13877  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13878  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13879  PyObject *__pyx_r = NULL;
13880  __Pyx_RefNannyDeclarations
13881  PyObject *__pyx_t_1 = NULL;
13882  PyObject *__pyx_t_2 = NULL;
13883  PyObject *__pyx_t_3 = NULL;
13884  PyObject *__pyx_t_4 = NULL;
13885  PyObject *__pyx_t_5 = NULL;
13886  PyObject *__pyx_t_6 = NULL;
13887  PyObject *__pyx_t_7 = NULL;
13888  PyObject *__pyx_t_8 = NULL;
13889  int __pyx_lineno = 0;
13890  const char *__pyx_filename = NULL;
13891  int __pyx_clineno = 0;
13892  __Pyx_RefNannySetupContext("cosh", 0);
13893 
13894  /* "PyClical.pyx":1651
13895  * {1,2}
13896  * """
13897  * try: # <<<<<<<<<<<<<<
13898  * return math.cosh(obj)
13899  * except:
13900  */
13901  {
13902  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13903  __Pyx_XGOTREF(__pyx_t_1);
13904  __Pyx_XGOTREF(__pyx_t_2);
13905  __Pyx_XGOTREF(__pyx_t_3);
13906  /*try:*/ {
13907 
13908  /* "PyClical.pyx":1652
13909  * """
13910  * try:
13911  * return math.cosh(obj) # <<<<<<<<<<<<<<
13912  * except:
13913  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
13914  */
13915  __Pyx_XDECREF(__pyx_r);
13916  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13917  __Pyx_GOTREF(__pyx_t_5);
13918  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cosh); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13919  __Pyx_GOTREF(__pyx_t_6);
13920  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13921  __pyx_t_5 = NULL;
13922  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
13923  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13924  if (likely(__pyx_t_5)) {
13925  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13926  __Pyx_INCREF(__pyx_t_5);
13927  __Pyx_INCREF(function);
13928  __Pyx_DECREF_SET(__pyx_t_6, function);
13929  }
13930  }
13931  if (!__pyx_t_5) {
13932  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13933  __Pyx_GOTREF(__pyx_t_4);
13934  } else {
13935  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13936  __Pyx_GOTREF(__pyx_t_7);
13937  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
13938  __Pyx_INCREF(__pyx_v_obj);
13939  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13940  __Pyx_GIVEREF(__pyx_v_obj);
13941  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13942  __Pyx_GOTREF(__pyx_t_4);
13943  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13944  }
13945  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13946  __pyx_r = __pyx_t_4;
13947  __pyx_t_4 = 0;
13948  goto __pyx_L7_try_return;
13949  }
13950  __pyx_L3_error:;
13951  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13952  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13953  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13954  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13955 
13956  /* "PyClical.pyx":1653
13957  * try:
13958  * return math.cosh(obj)
13959  * except: # <<<<<<<<<<<<<<
13960  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
13961  *
13962  */
13963  /*except:*/ {
13964  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
13965  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1653; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
13966  __Pyx_GOTREF(__pyx_t_4);
13967  __Pyx_GOTREF(__pyx_t_6);
13968  __Pyx_GOTREF(__pyx_t_7);
13969 
13970  /* "PyClical.pyx":1654
13971  * return math.cosh(obj)
13972  * except:
13973  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
13974  *
13975  * cpdef inline acosh(obj,i = None):
13976  */
13977  __Pyx_XDECREF(__pyx_r);
13978  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
13979  __Pyx_GOTREF(__pyx_t_5);
13980  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), cosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
13981  __Pyx_GOTREF(__pyx_t_8);
13982  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13983  __pyx_r = __pyx_t_8;
13984  __pyx_t_8 = 0;
13985  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13986  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13987  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13988  goto __pyx_L6_except_return;
13989  }
13990  __pyx_L5_except_error:;
13991  __Pyx_XGIVEREF(__pyx_t_1);
13992  __Pyx_XGIVEREF(__pyx_t_2);
13993  __Pyx_XGIVEREF(__pyx_t_3);
13994  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13995  goto __pyx_L1_error;
13996  __pyx_L7_try_return:;
13997  __Pyx_XGIVEREF(__pyx_t_1);
13998  __Pyx_XGIVEREF(__pyx_t_2);
13999  __Pyx_XGIVEREF(__pyx_t_3);
14000  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14001  goto __pyx_L0;
14002  __pyx_L6_except_return:;
14003  __Pyx_XGIVEREF(__pyx_t_1);
14004  __Pyx_XGIVEREF(__pyx_t_2);
14005  __Pyx_XGIVEREF(__pyx_t_3);
14006  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14007  goto __pyx_L0;
14008  }
14009 
14010  /* "PyClical.pyx":1640
14011  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14012  *
14013  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14014  * """
14015  * Hyperbolic cosine of multivector.
14016  */
14017 
14018  /* function exit code */
14019  __pyx_L1_error:;
14020  __Pyx_XDECREF(__pyx_t_4);
14021  __Pyx_XDECREF(__pyx_t_5);
14022  __Pyx_XDECREF(__pyx_t_6);
14023  __Pyx_XDECREF(__pyx_t_7);
14024  __Pyx_XDECREF(__pyx_t_8);
14025  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14026  __pyx_r = 0;
14027  __pyx_L0:;
14028  __Pyx_XGIVEREF(__pyx_r);
14029  __Pyx_RefNannyFinishContext();
14030  return __pyx_r;
14031  }
14032 
14033  /* Python wrapper */
14034  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14035  static char __pyx_doc_8PyClical_54cosh[] = "\n Hyperbolic cosine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi; print cosh(x)\n -1\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print cosh(acosh(x))\n {1,2}\n ";
14036  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14037  PyObject *__pyx_r = 0;
14038  __Pyx_RefNannyDeclarations
14039  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14040  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14041 
14042  /* function exit code */
14043  __Pyx_RefNannyFinishContext();
14044  return __pyx_r;
14045  }
14046 
14047  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14048  PyObject *__pyx_r = NULL;
14049  __Pyx_RefNannyDeclarations
14050  PyObject *__pyx_t_1 = NULL;
14051  int __pyx_lineno = 0;
14052  const char *__pyx_filename = NULL;
14053  int __pyx_clineno = 0;
14054  __Pyx_RefNannySetupContext("cosh", 0);
14055  __Pyx_XDECREF(__pyx_r);
14056  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14057  __Pyx_GOTREF(__pyx_t_1);
14058  __pyx_r = __pyx_t_1;
14059  __pyx_t_1 = 0;
14060  goto __pyx_L0;
14061 
14062  /* function exit code */
14063  __pyx_L1_error:;
14064  __Pyx_XDECREF(__pyx_t_1);
14065  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14066  __pyx_r = NULL;
14067  __pyx_L0:;
14068  __Pyx_XGIVEREF(__pyx_r);
14069  __Pyx_RefNannyFinishContext();
14070  return __pyx_r;
14071  }
14072 
14073  /* "PyClical.pyx":1656
14074  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14075  *
14076  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14077  * """
14078  * Inverse hyperbolic cosine of multivector with optional complexifier.
14079  */
14080 
14081  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14082  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) {
14083  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14084  PyObject *__pyx_r = NULL;
14085  __Pyx_RefNannyDeclarations
14086  int __pyx_t_1;
14087  int __pyx_t_2;
14088  PyObject *__pyx_t_3 = NULL;
14089  Clifford __pyx_t_4;
14090  PyObject *__pyx_t_5 = NULL;
14091  PyObject *__pyx_t_6 = NULL;
14092  PyObject *__pyx_t_7 = NULL;
14093  PyObject *__pyx_t_8 = NULL;
14094  PyObject *__pyx_t_9 = NULL;
14095  PyObject *__pyx_t_10 = NULL;
14096  PyObject *__pyx_t_11 = NULL;
14097  int __pyx_lineno = 0;
14098  const char *__pyx_filename = NULL;
14099  int __pyx_clineno = 0;
14100  __Pyx_RefNannySetupContext("acosh", 0);
14101  if (__pyx_optional_args) {
14102  if (__pyx_optional_args->__pyx_n > 0) {
14103  __pyx_v_i = __pyx_optional_args->i;
14104  }
14105  }
14106 
14107  /* "PyClical.pyx":1671
14108  * {1,2}
14109  * """
14110  * if not (i is None): # <<<<<<<<<<<<<<
14111  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14112  * else:
14113  */
14114  __pyx_t_1 = (__pyx_v_i != Py_None);
14115  __pyx_t_2 = (__pyx_t_1 != 0);
14116  if (__pyx_t_2) {
14117 
14118  /* "PyClical.pyx":1672
14119  * """
14120  * if not (i is None):
14121  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14122  * else:
14123  * try:
14124  */
14125  __Pyx_XDECREF(__pyx_r);
14126  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14127  __Pyx_GOTREF(__pyx_t_3);
14128  try {
14129  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14130  } catch(...) {
14131  __Pyx_CppExn2PyErr();
14132  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14133  }
14134  __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_filename = __pyx_f[0]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14135  __Pyx_GOTREF(__pyx_t_5);
14136  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14137  __pyx_r = __pyx_t_5;
14138  __pyx_t_5 = 0;
14139  goto __pyx_L0;
14140  }
14141  /*else*/ {
14142 
14143  /* "PyClical.pyx":1674
14144  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14145  * else:
14146  * try: # <<<<<<<<<<<<<<
14147  * return math.acosh(obj)
14148  * except:
14149  */
14150  {
14151  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14152  __Pyx_XGOTREF(__pyx_t_6);
14153  __Pyx_XGOTREF(__pyx_t_7);
14154  __Pyx_XGOTREF(__pyx_t_8);
14155  /*try:*/ {
14156 
14157  /* "PyClical.pyx":1675
14158  * else:
14159  * try:
14160  * return math.acosh(obj) # <<<<<<<<<<<<<<
14161  * except:
14162  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14163  */
14164  __Pyx_XDECREF(__pyx_r);
14165  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14166  __Pyx_GOTREF(__pyx_t_3);
14167  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acosh); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14168  __Pyx_GOTREF(__pyx_t_9);
14169  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14170  __pyx_t_3 = NULL;
14171  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14172  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14173  if (likely(__pyx_t_3)) {
14174  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14175  __Pyx_INCREF(__pyx_t_3);
14176  __Pyx_INCREF(function);
14177  __Pyx_DECREF_SET(__pyx_t_9, function);
14178  }
14179  }
14180  if (!__pyx_t_3) {
14181  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14182  __Pyx_GOTREF(__pyx_t_5);
14183  } else {
14184  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14185  __Pyx_GOTREF(__pyx_t_10);
14186  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
14187  __Pyx_INCREF(__pyx_v_obj);
14188  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14189  __Pyx_GIVEREF(__pyx_v_obj);
14190  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14191  __Pyx_GOTREF(__pyx_t_5);
14192  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14193  }
14194  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14195  __pyx_r = __pyx_t_5;
14196  __pyx_t_5 = 0;
14197  goto __pyx_L8_try_return;
14198  }
14199  __pyx_L4_error:;
14200  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14201  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14202  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14203  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14204 
14205  /* "PyClical.pyx":1676
14206  * try:
14207  * return math.acosh(obj)
14208  * except: # <<<<<<<<<<<<<<
14209  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14210  *
14211  */
14212  /*except:*/ {
14213  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14214  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14215  __Pyx_GOTREF(__pyx_t_5);
14216  __Pyx_GOTREF(__pyx_t_9);
14217  __Pyx_GOTREF(__pyx_t_10);
14218 
14219  /* "PyClical.pyx":1677
14220  * return math.acosh(obj)
14221  * except:
14222  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14223  *
14224  * cpdef inline sin(obj,i = None):
14225  */
14226  __Pyx_XDECREF(__pyx_r);
14227  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14228  __Pyx_GOTREF(__pyx_t_3);
14229  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14230  __Pyx_GOTREF(__pyx_t_11);
14231  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14232  __pyx_r = __pyx_t_11;
14233  __pyx_t_11 = 0;
14234  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14235  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14236  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14237  goto __pyx_L7_except_return;
14238  }
14239  __pyx_L6_except_error:;
14240  __Pyx_XGIVEREF(__pyx_t_6);
14241  __Pyx_XGIVEREF(__pyx_t_7);
14242  __Pyx_XGIVEREF(__pyx_t_8);
14243  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14244  goto __pyx_L1_error;
14245  __pyx_L8_try_return:;
14246  __Pyx_XGIVEREF(__pyx_t_6);
14247  __Pyx_XGIVEREF(__pyx_t_7);
14248  __Pyx_XGIVEREF(__pyx_t_8);
14249  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14250  goto __pyx_L0;
14251  __pyx_L7_except_return:;
14252  __Pyx_XGIVEREF(__pyx_t_6);
14253  __Pyx_XGIVEREF(__pyx_t_7);
14254  __Pyx_XGIVEREF(__pyx_t_8);
14255  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14256  goto __pyx_L0;
14257  }
14258  }
14259 
14260  /* "PyClical.pyx":1656
14261  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14262  *
14263  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14264  * """
14265  * Inverse hyperbolic cosine of multivector with optional complexifier.
14266  */
14267 
14268  /* function exit code */
14269  __pyx_L1_error:;
14270  __Pyx_XDECREF(__pyx_t_3);
14271  __Pyx_XDECREF(__pyx_t_5);
14272  __Pyx_XDECREF(__pyx_t_9);
14273  __Pyx_XDECREF(__pyx_t_10);
14274  __Pyx_XDECREF(__pyx_t_11);
14275  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14276  __pyx_r = 0;
14277  __pyx_L0:;
14278  __Pyx_XGIVEREF(__pyx_r);
14279  __Pyx_RefNannyFinishContext();
14280  return __pyx_r;
14281  }
14282 
14283  /* Python wrapper */
14284  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14285  static char __pyx_doc_8PyClical_56acosh[] = "\n Inverse hyperbolic cosine of multivector with optional complexifier.\n\n >>> print acosh(0,\"{-2,-1,1}\")\n 1.571{-2,-1,1}\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x,\"{-1,1,2,3,4}\"))\n {1,2,3}\n >>> print acosh(0)\n 1.571{-1}\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print cosh(acosh(x))\n {1,2}\n ";
14286  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14287  PyObject *__pyx_v_obj = 0;
14288  PyObject *__pyx_v_i = 0;
14289  int __pyx_lineno = 0;
14290  const char *__pyx_filename = NULL;
14291  int __pyx_clineno = 0;
14292  PyObject *__pyx_r = 0;
14293  __Pyx_RefNannyDeclarations
14294  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
14295  {
14296  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14297  PyObject* values[2] = {0,0};
14298  values[1] = ((PyObject *)Py_None);
14299  if (unlikely(__pyx_kwds)) {
14300  Py_ssize_t kw_args;
14301  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14302  switch (pos_args) {
14303  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14304  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14305  case 0: break;
14306  default: goto __pyx_L5_argtuple_error;
14307  }
14308  kw_args = PyDict_Size(__pyx_kwds);
14309  switch (pos_args) {
14310  case 0:
14311  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14312  else goto __pyx_L5_argtuple_error;
14313  case 1:
14314  if (kw_args > 0) {
14315  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14316  if (value) { values[1] = value; kw_args--; }
14317  }
14318  }
14319  if (unlikely(kw_args > 0)) {
14320  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14321  }
14322  } else {
14323  switch (PyTuple_GET_SIZE(__pyx_args)) {
14324  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14325  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14326  break;
14327  default: goto __pyx_L5_argtuple_error;
14328  }
14329  }
14330  __pyx_v_obj = values[0];
14331  __pyx_v_i = values[1];
14332  }
14333  goto __pyx_L4_argument_unpacking_done;
14334  __pyx_L5_argtuple_error:;
14335  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14336  __pyx_L3_error:;
14337  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14338  __Pyx_RefNannyFinishContext();
14339  return NULL;
14340  __pyx_L4_argument_unpacking_done:;
14341  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
14342 
14343  /* function exit code */
14344  __Pyx_RefNannyFinishContext();
14345  return __pyx_r;
14346  }
14347 
14348  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14349  PyObject *__pyx_r = NULL;
14350  __Pyx_RefNannyDeclarations
14351  PyObject *__pyx_t_1 = NULL;
14352  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
14353  int __pyx_lineno = 0;
14354  const char *__pyx_filename = NULL;
14355  int __pyx_clineno = 0;
14356  __Pyx_RefNannySetupContext("acosh", 0);
14357  __Pyx_XDECREF(__pyx_r);
14358  __pyx_t_2.__pyx_n = 1;
14359  __pyx_t_2.i = __pyx_v_i;
14360  __pyx_t_1 = __pyx_f_8PyClical_acosh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14361  __Pyx_GOTREF(__pyx_t_1);
14362  __pyx_r = __pyx_t_1;
14363  __pyx_t_1 = 0;
14364  goto __pyx_L0;
14365 
14366  /* function exit code */
14367  __pyx_L1_error:;
14368  __Pyx_XDECREF(__pyx_t_1);
14369  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14370  __pyx_r = NULL;
14371  __pyx_L0:;
14372  __Pyx_XGIVEREF(__pyx_r);
14373  __Pyx_RefNannyFinishContext();
14374  return __pyx_r;
14375  }
14376 
14377  /* "PyClical.pyx":1679
14378  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14379  *
14380  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
14381  * """
14382  * Sine of multivector with optional complexifier.
14383  */
14384 
14385  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14386  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) {
14387  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14388  PyObject *__pyx_r = NULL;
14389  __Pyx_RefNannyDeclarations
14390  int __pyx_t_1;
14391  int __pyx_t_2;
14392  PyObject *__pyx_t_3 = NULL;
14393  Clifford __pyx_t_4;
14394  PyObject *__pyx_t_5 = NULL;
14395  PyObject *__pyx_t_6 = NULL;
14396  PyObject *__pyx_t_7 = NULL;
14397  PyObject *__pyx_t_8 = NULL;
14398  PyObject *__pyx_t_9 = NULL;
14399  PyObject *__pyx_t_10 = NULL;
14400  PyObject *__pyx_t_11 = NULL;
14401  int __pyx_lineno = 0;
14402  const char *__pyx_filename = NULL;
14403  int __pyx_clineno = 0;
14404  __Pyx_RefNannySetupContext("sin", 0);
14405  if (__pyx_optional_args) {
14406  if (__pyx_optional_args->__pyx_n > 0) {
14407  __pyx_v_i = __pyx_optional_args->i;
14408  }
14409  }
14410 
14411  /* "PyClical.pyx":1690
14412  * {1,2,3}
14413  * """
14414  * if not (i is None): # <<<<<<<<<<<<<<
14415  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
14416  * else:
14417  */
14418  __pyx_t_1 = (__pyx_v_i != Py_None);
14419  __pyx_t_2 = (__pyx_t_1 != 0);
14420  if (__pyx_t_2) {
14421 
14422  /* "PyClical.pyx":1691
14423  * """
14424  * if not (i is None):
14425  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14426  * else:
14427  * try:
14428  */
14429  __Pyx_XDECREF(__pyx_r);
14430  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14431  __Pyx_GOTREF(__pyx_t_3);
14432  try {
14433  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14434  } catch(...) {
14435  __Pyx_CppExn2PyErr();
14436  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14437  }
14438  __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_filename = __pyx_f[0]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14439  __Pyx_GOTREF(__pyx_t_5);
14440  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14441  __pyx_r = __pyx_t_5;
14442  __pyx_t_5 = 0;
14443  goto __pyx_L0;
14444  }
14445  /*else*/ {
14446 
14447  /* "PyClical.pyx":1693
14448  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
14449  * else:
14450  * try: # <<<<<<<<<<<<<<
14451  * return math.sin(obj)
14452  * except:
14453  */
14454  {
14455  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14456  __Pyx_XGOTREF(__pyx_t_6);
14457  __Pyx_XGOTREF(__pyx_t_7);
14458  __Pyx_XGOTREF(__pyx_t_8);
14459  /*try:*/ {
14460 
14461  /* "PyClical.pyx":1694
14462  * else:
14463  * try:
14464  * return math.sin(obj) # <<<<<<<<<<<<<<
14465  * except:
14466  * return clifford().wrap( glucat.sin(toClifford(obj)) )
14467  */
14468  __Pyx_XDECREF(__pyx_r);
14469  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14470  __Pyx_GOTREF(__pyx_t_3);
14471  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sin); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14472  __Pyx_GOTREF(__pyx_t_9);
14473  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14474  __pyx_t_3 = NULL;
14475  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14476  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14477  if (likely(__pyx_t_3)) {
14478  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14479  __Pyx_INCREF(__pyx_t_3);
14480  __Pyx_INCREF(function);
14481  __Pyx_DECREF_SET(__pyx_t_9, function);
14482  }
14483  }
14484  if (!__pyx_t_3) {
14485  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14486  __Pyx_GOTREF(__pyx_t_5);
14487  } else {
14488  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14489  __Pyx_GOTREF(__pyx_t_10);
14490  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
14491  __Pyx_INCREF(__pyx_v_obj);
14492  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14493  __Pyx_GIVEREF(__pyx_v_obj);
14494  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14495  __Pyx_GOTREF(__pyx_t_5);
14496  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14497  }
14498  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14499  __pyx_r = __pyx_t_5;
14500  __pyx_t_5 = 0;
14501  goto __pyx_L8_try_return;
14502  }
14503  __pyx_L4_error:;
14504  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14505  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14506  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14507  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14508 
14509  /* "PyClical.pyx":1695
14510  * try:
14511  * return math.sin(obj)
14512  * except: # <<<<<<<<<<<<<<
14513  * return clifford().wrap( glucat.sin(toClifford(obj)) )
14514  *
14515  */
14516  /*except:*/ {
14517  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14518  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14519  __Pyx_GOTREF(__pyx_t_5);
14520  __Pyx_GOTREF(__pyx_t_9);
14521  __Pyx_GOTREF(__pyx_t_10);
14522 
14523  /* "PyClical.pyx":1696
14524  * return math.sin(obj)
14525  * except:
14526  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
14527  *
14528  * cpdef inline asin(obj,i = None):
14529  */
14530  __Pyx_XDECREF(__pyx_r);
14531  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14532  __Pyx_GOTREF(__pyx_t_3);
14533  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14534  __Pyx_GOTREF(__pyx_t_11);
14535  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14536  __pyx_r = __pyx_t_11;
14537  __pyx_t_11 = 0;
14538  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14539  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14540  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14541  goto __pyx_L7_except_return;
14542  }
14543  __pyx_L6_except_error:;
14544  __Pyx_XGIVEREF(__pyx_t_6);
14545  __Pyx_XGIVEREF(__pyx_t_7);
14546  __Pyx_XGIVEREF(__pyx_t_8);
14547  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14548  goto __pyx_L1_error;
14549  __pyx_L8_try_return:;
14550  __Pyx_XGIVEREF(__pyx_t_6);
14551  __Pyx_XGIVEREF(__pyx_t_7);
14552  __Pyx_XGIVEREF(__pyx_t_8);
14553  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14554  goto __pyx_L0;
14555  __pyx_L7_except_return:;
14556  __Pyx_XGIVEREF(__pyx_t_6);
14557  __Pyx_XGIVEREF(__pyx_t_7);
14558  __Pyx_XGIVEREF(__pyx_t_8);
14559  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14560  goto __pyx_L0;
14561  }
14562  }
14563 
14564  /* "PyClical.pyx":1679
14565  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14566  *
14567  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
14568  * """
14569  * Sine of multivector with optional complexifier.
14570  */
14571 
14572  /* function exit code */
14573  __pyx_L1_error:;
14574  __Pyx_XDECREF(__pyx_t_3);
14575  __Pyx_XDECREF(__pyx_t_5);
14576  __Pyx_XDECREF(__pyx_t_9);
14577  __Pyx_XDECREF(__pyx_t_10);
14578  __Pyx_XDECREF(__pyx_t_11);
14579  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14580  __pyx_r = 0;
14581  __pyx_L0:;
14582  __Pyx_XGIVEREF(__pyx_r);
14583  __Pyx_RefNannyFinishContext();
14584  return __pyx_r;
14585  }
14586 
14587  /* Python wrapper */
14588  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14589  static char __pyx_doc_8PyClical_58sin[] = "\n Sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),s)\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),\"{-2,-1,1}\")\n {-1}\n >>> x=clifford(\"{1,2,3}\"); print asin(sin(x))\n {1,2,3}\n ";
14590  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14591  PyObject *__pyx_v_obj = 0;
14592  PyObject *__pyx_v_i = 0;
14593  int __pyx_lineno = 0;
14594  const char *__pyx_filename = NULL;
14595  int __pyx_clineno = 0;
14596  PyObject *__pyx_r = 0;
14597  __Pyx_RefNannyDeclarations
14598  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
14599  {
14600  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14601  PyObject* values[2] = {0,0};
14602  values[1] = ((PyObject *)Py_None);
14603  if (unlikely(__pyx_kwds)) {
14604  Py_ssize_t kw_args;
14605  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14606  switch (pos_args) {
14607  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14608  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14609  case 0: break;
14610  default: goto __pyx_L5_argtuple_error;
14611  }
14612  kw_args = PyDict_Size(__pyx_kwds);
14613  switch (pos_args) {
14614  case 0:
14615  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14616  else goto __pyx_L5_argtuple_error;
14617  case 1:
14618  if (kw_args > 0) {
14619  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14620  if (value) { values[1] = value; kw_args--; }
14621  }
14622  }
14623  if (unlikely(kw_args > 0)) {
14624  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14625  }
14626  } else {
14627  switch (PyTuple_GET_SIZE(__pyx_args)) {
14628  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14629  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14630  break;
14631  default: goto __pyx_L5_argtuple_error;
14632  }
14633  }
14634  __pyx_v_obj = values[0];
14635  __pyx_v_i = values[1];
14636  }
14637  goto __pyx_L4_argument_unpacking_done;
14638  __pyx_L5_argtuple_error:;
14639  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14640  __pyx_L3_error:;
14641  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14642  __Pyx_RefNannyFinishContext();
14643  return NULL;
14644  __pyx_L4_argument_unpacking_done:;
14645  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
14646 
14647  /* function exit code */
14648  __Pyx_RefNannyFinishContext();
14649  return __pyx_r;
14650  }
14651 
14652  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14653  PyObject *__pyx_r = NULL;
14654  __Pyx_RefNannyDeclarations
14655  PyObject *__pyx_t_1 = NULL;
14656  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
14657  int __pyx_lineno = 0;
14658  const char *__pyx_filename = NULL;
14659  int __pyx_clineno = 0;
14660  __Pyx_RefNannySetupContext("sin", 0);
14661  __Pyx_XDECREF(__pyx_r);
14662  __pyx_t_2.__pyx_n = 1;
14663  __pyx_t_2.i = __pyx_v_i;
14664  __pyx_t_1 = __pyx_f_8PyClical_sin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14665  __Pyx_GOTREF(__pyx_t_1);
14666  __pyx_r = __pyx_t_1;
14667  __pyx_t_1 = 0;
14668  goto __pyx_L0;
14669 
14670  /* function exit code */
14671  __pyx_L1_error:;
14672  __Pyx_XDECREF(__pyx_t_1);
14673  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14674  __pyx_r = NULL;
14675  __pyx_L0:;
14676  __Pyx_XGIVEREF(__pyx_r);
14677  __Pyx_RefNannyFinishContext();
14678  return __pyx_r;
14679  }
14680 
14681  /* "PyClical.pyx":1698
14682  * return clifford().wrap( glucat.sin(toClifford(obj)) )
14683  *
14684  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
14685  * """
14686  * Inverse sine of multivector with optional complexifier.
14687  */
14688 
14689  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14690  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) {
14691  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14692  PyObject *__pyx_r = NULL;
14693  __Pyx_RefNannyDeclarations
14694  int __pyx_t_1;
14695  int __pyx_t_2;
14696  PyObject *__pyx_t_3 = NULL;
14697  Clifford __pyx_t_4;
14698  PyObject *__pyx_t_5 = NULL;
14699  PyObject *__pyx_t_6 = NULL;
14700  PyObject *__pyx_t_7 = NULL;
14701  PyObject *__pyx_t_8 = NULL;
14702  PyObject *__pyx_t_9 = NULL;
14703  PyObject *__pyx_t_10 = NULL;
14704  PyObject *__pyx_t_11 = NULL;
14705  int __pyx_lineno = 0;
14706  const char *__pyx_filename = NULL;
14707  int __pyx_clineno = 0;
14708  __Pyx_RefNannySetupContext("asin", 0);
14709  if (__pyx_optional_args) {
14710  if (__pyx_optional_args->__pyx_n > 0) {
14711  __pyx_v_i = __pyx_optional_args->i;
14712  }
14713  }
14714 
14715  /* "PyClical.pyx":1711
14716  * {1,2,3}
14717  * """
14718  * if not (i is None): # <<<<<<<<<<<<<<
14719  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
14720  * else:
14721  */
14722  __pyx_t_1 = (__pyx_v_i != Py_None);
14723  __pyx_t_2 = (__pyx_t_1 != 0);
14724  if (__pyx_t_2) {
14725 
14726  /* "PyClical.pyx":1712
14727  * """
14728  * if not (i is None):
14729  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14730  * else:
14731  * try:
14732  */
14733  __Pyx_XDECREF(__pyx_r);
14734  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14735  __Pyx_GOTREF(__pyx_t_3);
14736  try {
14737  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14738  } catch(...) {
14739  __Pyx_CppExn2PyErr();
14740  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14741  }
14742  __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_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14743  __Pyx_GOTREF(__pyx_t_5);
14744  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14745  __pyx_r = __pyx_t_5;
14746  __pyx_t_5 = 0;
14747  goto __pyx_L0;
14748  }
14749  /*else*/ {
14750 
14751  /* "PyClical.pyx":1714
14752  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
14753  * else:
14754  * try: # <<<<<<<<<<<<<<
14755  * return math.asin(obj)
14756  * except:
14757  */
14758  {
14759  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14760  __Pyx_XGOTREF(__pyx_t_6);
14761  __Pyx_XGOTREF(__pyx_t_7);
14762  __Pyx_XGOTREF(__pyx_t_8);
14763  /*try:*/ {
14764 
14765  /* "PyClical.pyx":1715
14766  * else:
14767  * try:
14768  * return math.asin(obj) # <<<<<<<<<<<<<<
14769  * except:
14770  * return clifford().wrap( glucat.asin(toClifford(obj)) )
14771  */
14772  __Pyx_XDECREF(__pyx_r);
14773  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14774  __Pyx_GOTREF(__pyx_t_3);
14775  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asin); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14776  __Pyx_GOTREF(__pyx_t_9);
14777  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14778  __pyx_t_3 = NULL;
14779  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
14780  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14781  if (likely(__pyx_t_3)) {
14782  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14783  __Pyx_INCREF(__pyx_t_3);
14784  __Pyx_INCREF(function);
14785  __Pyx_DECREF_SET(__pyx_t_9, function);
14786  }
14787  }
14788  if (!__pyx_t_3) {
14789  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14790  __Pyx_GOTREF(__pyx_t_5);
14791  } else {
14792  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14793  __Pyx_GOTREF(__pyx_t_10);
14794  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
14795  __Pyx_INCREF(__pyx_v_obj);
14796  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14797  __Pyx_GIVEREF(__pyx_v_obj);
14798  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
14799  __Pyx_GOTREF(__pyx_t_5);
14800  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14801  }
14802  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14803  __pyx_r = __pyx_t_5;
14804  __pyx_t_5 = 0;
14805  goto __pyx_L8_try_return;
14806  }
14807  __pyx_L4_error:;
14808  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14809  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14810  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14811  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14812 
14813  /* "PyClical.pyx":1716
14814  * try:
14815  * return math.asin(obj)
14816  * except: # <<<<<<<<<<<<<<
14817  * return clifford().wrap( glucat.asin(toClifford(obj)) )
14818  *
14819  */
14820  /*except:*/ {
14821  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14822  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14823  __Pyx_GOTREF(__pyx_t_5);
14824  __Pyx_GOTREF(__pyx_t_9);
14825  __Pyx_GOTREF(__pyx_t_10);
14826 
14827  /* "PyClical.pyx":1717
14828  * return math.asin(obj)
14829  * except:
14830  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
14831  *
14832  * cpdef inline sinh(obj):
14833  */
14834  __Pyx_XDECREF(__pyx_r);
14835  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14836  __Pyx_GOTREF(__pyx_t_3);
14837  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
14838  __Pyx_GOTREF(__pyx_t_11);
14839  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14840  __pyx_r = __pyx_t_11;
14841  __pyx_t_11 = 0;
14842  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14843  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14844  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14845  goto __pyx_L7_except_return;
14846  }
14847  __pyx_L6_except_error:;
14848  __Pyx_XGIVEREF(__pyx_t_6);
14849  __Pyx_XGIVEREF(__pyx_t_7);
14850  __Pyx_XGIVEREF(__pyx_t_8);
14851  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14852  goto __pyx_L1_error;
14853  __pyx_L8_try_return:;
14854  __Pyx_XGIVEREF(__pyx_t_6);
14855  __Pyx_XGIVEREF(__pyx_t_7);
14856  __Pyx_XGIVEREF(__pyx_t_8);
14857  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14858  goto __pyx_L0;
14859  __pyx_L7_except_return:;
14860  __Pyx_XGIVEREF(__pyx_t_6);
14861  __Pyx_XGIVEREF(__pyx_t_7);
14862  __Pyx_XGIVEREF(__pyx_t_8);
14863  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14864  goto __pyx_L0;
14865  }
14866  }
14867 
14868  /* "PyClical.pyx":1698
14869  * return clifford().wrap( glucat.sin(toClifford(obj)) )
14870  *
14871  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
14872  * """
14873  * Inverse sine of multivector with optional complexifier.
14874  */
14875 
14876  /* function exit code */
14877  __pyx_L1_error:;
14878  __Pyx_XDECREF(__pyx_t_3);
14879  __Pyx_XDECREF(__pyx_t_5);
14880  __Pyx_XDECREF(__pyx_t_9);
14881  __Pyx_XDECREF(__pyx_t_10);
14882  __Pyx_XDECREF(__pyx_t_11);
14883  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14884  __pyx_r = 0;
14885  __pyx_L0:;
14886  __Pyx_XGIVEREF(__pyx_r);
14887  __Pyx_RefNannyFinishContext();
14888  return __pyx_r;
14889  }
14890 
14891  /* Python wrapper */
14892  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14893  static char __pyx_doc_8PyClical_60asin[] = "\n Inverse sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),s)\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),\"{-2,-1,1}\")\n {-1}\n >>> print asin(1) / pi\n 0.5\n >>> x=clifford(\"{1,2,3}\"); print asin(sin(x))\n {1,2,3}\n ";
14894  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14895  PyObject *__pyx_v_obj = 0;
14896  PyObject *__pyx_v_i = 0;
14897  int __pyx_lineno = 0;
14898  const char *__pyx_filename = NULL;
14899  int __pyx_clineno = 0;
14900  PyObject *__pyx_r = 0;
14901  __Pyx_RefNannyDeclarations
14902  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
14903  {
14904  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14905  PyObject* values[2] = {0,0};
14906  values[1] = ((PyObject *)Py_None);
14907  if (unlikely(__pyx_kwds)) {
14908  Py_ssize_t kw_args;
14909  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14910  switch (pos_args) {
14911  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14912  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14913  case 0: break;
14914  default: goto __pyx_L5_argtuple_error;
14915  }
14916  kw_args = PyDict_Size(__pyx_kwds);
14917  switch (pos_args) {
14918  case 0:
14919  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14920  else goto __pyx_L5_argtuple_error;
14921  case 1:
14922  if (kw_args > 0) {
14923  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14924  if (value) { values[1] = value; kw_args--; }
14925  }
14926  }
14927  if (unlikely(kw_args > 0)) {
14928  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14929  }
14930  } else {
14931  switch (PyTuple_GET_SIZE(__pyx_args)) {
14932  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14933  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14934  break;
14935  default: goto __pyx_L5_argtuple_error;
14936  }
14937  }
14938  __pyx_v_obj = values[0];
14939  __pyx_v_i = values[1];
14940  }
14941  goto __pyx_L4_argument_unpacking_done;
14942  __pyx_L5_argtuple_error:;
14943  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14944  __pyx_L3_error:;
14945  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14946  __Pyx_RefNannyFinishContext();
14947  return NULL;
14948  __pyx_L4_argument_unpacking_done:;
14949  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
14950 
14951  /* function exit code */
14952  __Pyx_RefNannyFinishContext();
14953  return __pyx_r;
14954  }
14955 
14956  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14957  PyObject *__pyx_r = NULL;
14958  __Pyx_RefNannyDeclarations
14959  PyObject *__pyx_t_1 = NULL;
14960  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
14961  int __pyx_lineno = 0;
14962  const char *__pyx_filename = NULL;
14963  int __pyx_clineno = 0;
14964  __Pyx_RefNannySetupContext("asin", 0);
14965  __Pyx_XDECREF(__pyx_r);
14966  __pyx_t_2.__pyx_n = 1;
14967  __pyx_t_2.i = __pyx_v_i;
14968  __pyx_t_1 = __pyx_f_8PyClical_asin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14969  __Pyx_GOTREF(__pyx_t_1);
14970  __pyx_r = __pyx_t_1;
14971  __pyx_t_1 = 0;
14972  goto __pyx_L0;
14973 
14974  /* function exit code */
14975  __pyx_L1_error:;
14976  __Pyx_XDECREF(__pyx_t_1);
14977  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
14978  __pyx_r = NULL;
14979  __pyx_L0:;
14980  __Pyx_XGIVEREF(__pyx_r);
14981  __Pyx_RefNannyFinishContext();
14982  return __pyx_r;
14983  }
14984 
14985  /* "PyClical.pyx":1719
14986  * return clifford().wrap( glucat.asin(toClifford(obj)) )
14987  *
14988  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
14989  * """
14990  * Hyperbolic sine of multivector.
14991  */
14992 
14993  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14994  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14995  PyObject *__pyx_r = NULL;
14996  __Pyx_RefNannyDeclarations
14997  PyObject *__pyx_t_1 = NULL;
14998  PyObject *__pyx_t_2 = NULL;
14999  PyObject *__pyx_t_3 = NULL;
15000  PyObject *__pyx_t_4 = NULL;
15001  PyObject *__pyx_t_5 = NULL;
15002  PyObject *__pyx_t_6 = NULL;
15003  PyObject *__pyx_t_7 = NULL;
15004  PyObject *__pyx_t_8 = NULL;
15005  int __pyx_lineno = 0;
15006  const char *__pyx_filename = NULL;
15007  int __pyx_clineno = 0;
15008  __Pyx_RefNannySetupContext("sinh", 0);
15009 
15010  /* "PyClical.pyx":1728
15011  * 0.5{1,2}
15012  * """
15013  * try: # <<<<<<<<<<<<<<
15014  * return math.sinh(obj)
15015  * except:
15016  */
15017  {
15018  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15019  __Pyx_XGOTREF(__pyx_t_1);
15020  __Pyx_XGOTREF(__pyx_t_2);
15021  __Pyx_XGOTREF(__pyx_t_3);
15022  /*try:*/ {
15023 
15024  /* "PyClical.pyx":1729
15025  * """
15026  * try:
15027  * return math.sinh(obj) # <<<<<<<<<<<<<<
15028  * except:
15029  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15030  */
15031  __Pyx_XDECREF(__pyx_r);
15032  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15033  __Pyx_GOTREF(__pyx_t_5);
15034  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sinh); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15035  __Pyx_GOTREF(__pyx_t_6);
15036  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15037  __pyx_t_5 = NULL;
15038  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
15039  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15040  if (likely(__pyx_t_5)) {
15041  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15042  __Pyx_INCREF(__pyx_t_5);
15043  __Pyx_INCREF(function);
15044  __Pyx_DECREF_SET(__pyx_t_6, function);
15045  }
15046  }
15047  if (!__pyx_t_5) {
15048  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15049  __Pyx_GOTREF(__pyx_t_4);
15050  } else {
15051  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15052  __Pyx_GOTREF(__pyx_t_7);
15053  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
15054  __Pyx_INCREF(__pyx_v_obj);
15055  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
15056  __Pyx_GIVEREF(__pyx_v_obj);
15057  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15058  __Pyx_GOTREF(__pyx_t_4);
15059  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15060  }
15061  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15062  __pyx_r = __pyx_t_4;
15063  __pyx_t_4 = 0;
15064  goto __pyx_L7_try_return;
15065  }
15066  __pyx_L3_error:;
15067  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15068  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15069  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15070  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15071 
15072  /* "PyClical.pyx":1730
15073  * try:
15074  * return math.sinh(obj)
15075  * except: # <<<<<<<<<<<<<<
15076  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15077  *
15078  */
15079  /*except:*/ {
15080  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15081  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
15082  __Pyx_GOTREF(__pyx_t_4);
15083  __Pyx_GOTREF(__pyx_t_6);
15084  __Pyx_GOTREF(__pyx_t_7);
15085 
15086  /* "PyClical.pyx":1731
15087  * return math.sinh(obj)
15088  * except:
15089  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15090  *
15091  * cpdef inline asinh(obj,i = None):
15092  */
15093  __Pyx_XDECREF(__pyx_r);
15094  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
15095  __Pyx_GOTREF(__pyx_t_5);
15096  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), sinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
15097  __Pyx_GOTREF(__pyx_t_8);
15098  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15099  __pyx_r = __pyx_t_8;
15100  __pyx_t_8 = 0;
15101  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15102  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15103  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15104  goto __pyx_L6_except_return;
15105  }
15106  __pyx_L5_except_error:;
15107  __Pyx_XGIVEREF(__pyx_t_1);
15108  __Pyx_XGIVEREF(__pyx_t_2);
15109  __Pyx_XGIVEREF(__pyx_t_3);
15110  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15111  goto __pyx_L1_error;
15112  __pyx_L7_try_return:;
15113  __Pyx_XGIVEREF(__pyx_t_1);
15114  __Pyx_XGIVEREF(__pyx_t_2);
15115  __Pyx_XGIVEREF(__pyx_t_3);
15116  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15117  goto __pyx_L0;
15118  __pyx_L6_except_return:;
15119  __Pyx_XGIVEREF(__pyx_t_1);
15120  __Pyx_XGIVEREF(__pyx_t_2);
15121  __Pyx_XGIVEREF(__pyx_t_3);
15122  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15123  goto __pyx_L0;
15124  }
15125 
15126  /* "PyClical.pyx":1719
15127  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15128  *
15129  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15130  * """
15131  * Hyperbolic sine of multivector.
15132  */
15133 
15134  /* function exit code */
15135  __pyx_L1_error:;
15136  __Pyx_XDECREF(__pyx_t_4);
15137  __Pyx_XDECREF(__pyx_t_5);
15138  __Pyx_XDECREF(__pyx_t_6);
15139  __Pyx_XDECREF(__pyx_t_7);
15140  __Pyx_XDECREF(__pyx_t_8);
15141  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15142  __pyx_r = 0;
15143  __pyx_L0:;
15144  __Pyx_XGIVEREF(__pyx_r);
15145  __Pyx_RefNannyFinishContext();
15146  return __pyx_r;
15147  }
15148 
15149  /* Python wrapper */
15150  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15151  static char __pyx_doc_8PyClical_62sinh[] = "\n Hyperbolic sine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/2; print sinh(x)\n {1,2}\n >>> x=clifford(\"{1,2}\") * pi/6; print sinh(x)\n 0.5{1,2}\n ";
15152  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15153  PyObject *__pyx_r = 0;
15154  __Pyx_RefNannyDeclarations
15155  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
15156  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15157 
15158  /* function exit code */
15159  __Pyx_RefNannyFinishContext();
15160  return __pyx_r;
15161  }
15162 
15163  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15164  PyObject *__pyx_r = NULL;
15165  __Pyx_RefNannyDeclarations
15166  PyObject *__pyx_t_1 = NULL;
15167  int __pyx_lineno = 0;
15168  const char *__pyx_filename = NULL;
15169  int __pyx_clineno = 0;
15170  __Pyx_RefNannySetupContext("sinh", 0);
15171  __Pyx_XDECREF(__pyx_r);
15172  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15173  __Pyx_GOTREF(__pyx_t_1);
15174  __pyx_r = __pyx_t_1;
15175  __pyx_t_1 = 0;
15176  goto __pyx_L0;
15177 
15178  /* function exit code */
15179  __pyx_L1_error:;
15180  __Pyx_XDECREF(__pyx_t_1);
15181  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15182  __pyx_r = NULL;
15183  __pyx_L0:;
15184  __Pyx_XGIVEREF(__pyx_r);
15185  __Pyx_RefNannyFinishContext();
15186  return __pyx_r;
15187  }
15188 
15189  /* "PyClical.pyx":1733
15190  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15191  *
15192  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15193  * """
15194  * Inverse hyperbolic sine of multivector with optional complexifier.
15195  */
15196 
15197  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15198  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) {
15199  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15200  PyObject *__pyx_r = NULL;
15201  __Pyx_RefNannyDeclarations
15202  int __pyx_t_1;
15203  int __pyx_t_2;
15204  PyObject *__pyx_t_3 = NULL;
15205  Clifford __pyx_t_4;
15206  PyObject *__pyx_t_5 = NULL;
15207  PyObject *__pyx_t_6 = NULL;
15208  PyObject *__pyx_t_7 = NULL;
15209  PyObject *__pyx_t_8 = NULL;
15210  PyObject *__pyx_t_9 = NULL;
15211  PyObject *__pyx_t_10 = NULL;
15212  PyObject *__pyx_t_11 = NULL;
15213  int __pyx_lineno = 0;
15214  const char *__pyx_filename = NULL;
15215  int __pyx_clineno = 0;
15216  __Pyx_RefNannySetupContext("asinh", 0);
15217  if (__pyx_optional_args) {
15218  if (__pyx_optional_args->__pyx_n > 0) {
15219  __pyx_v_i = __pyx_optional_args->i;
15220  }
15221  }
15222 
15223  /* "PyClical.pyx":1744
15224  * {1,2}
15225  * """
15226  * if not (i is None): # <<<<<<<<<<<<<<
15227  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15228  * else:
15229  */
15230  __pyx_t_1 = (__pyx_v_i != Py_None);
15231  __pyx_t_2 = (__pyx_t_1 != 0);
15232  if (__pyx_t_2) {
15233 
15234  /* "PyClical.pyx":1745
15235  * """
15236  * if not (i is None):
15237  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15238  * else:
15239  * try:
15240  */
15241  __Pyx_XDECREF(__pyx_r);
15242  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15243  __Pyx_GOTREF(__pyx_t_3);
15244  try {
15245  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15246  } catch(...) {
15247  __Pyx_CppExn2PyErr();
15248  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15249  }
15250  __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_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15251  __Pyx_GOTREF(__pyx_t_5);
15252  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15253  __pyx_r = __pyx_t_5;
15254  __pyx_t_5 = 0;
15255  goto __pyx_L0;
15256  }
15257  /*else*/ {
15258 
15259  /* "PyClical.pyx":1747
15260  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15261  * else:
15262  * try: # <<<<<<<<<<<<<<
15263  * return math.asinh(obj)
15264  * except:
15265  */
15266  {
15267  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15268  __Pyx_XGOTREF(__pyx_t_6);
15269  __Pyx_XGOTREF(__pyx_t_7);
15270  __Pyx_XGOTREF(__pyx_t_8);
15271  /*try:*/ {
15272 
15273  /* "PyClical.pyx":1748
15274  * else:
15275  * try:
15276  * return math.asinh(obj) # <<<<<<<<<<<<<<
15277  * except:
15278  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
15279  */
15280  __Pyx_XDECREF(__pyx_r);
15281  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15282  __Pyx_GOTREF(__pyx_t_3);
15283  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asinh); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15284  __Pyx_GOTREF(__pyx_t_9);
15285  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15286  __pyx_t_3 = NULL;
15287  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15288  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15289  if (likely(__pyx_t_3)) {
15290  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15291  __Pyx_INCREF(__pyx_t_3);
15292  __Pyx_INCREF(function);
15293  __Pyx_DECREF_SET(__pyx_t_9, function);
15294  }
15295  }
15296  if (!__pyx_t_3) {
15297  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15298  __Pyx_GOTREF(__pyx_t_5);
15299  } else {
15300  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15301  __Pyx_GOTREF(__pyx_t_10);
15302  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
15303  __Pyx_INCREF(__pyx_v_obj);
15304  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15305  __Pyx_GIVEREF(__pyx_v_obj);
15306  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15307  __Pyx_GOTREF(__pyx_t_5);
15308  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15309  }
15310  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15311  __pyx_r = __pyx_t_5;
15312  __pyx_t_5 = 0;
15313  goto __pyx_L8_try_return;
15314  }
15315  __pyx_L4_error:;
15316  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15317  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15318  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15319  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15320 
15321  /* "PyClical.pyx":1749
15322  * try:
15323  * return math.asinh(obj)
15324  * except: # <<<<<<<<<<<<<<
15325  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
15326  *
15327  */
15328  /*except:*/ {
15329  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15330  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15331  __Pyx_GOTREF(__pyx_t_5);
15332  __Pyx_GOTREF(__pyx_t_9);
15333  __Pyx_GOTREF(__pyx_t_10);
15334 
15335  /* "PyClical.pyx":1750
15336  * return math.asinh(obj)
15337  * except:
15338  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15339  *
15340  * cpdef inline tan(obj,i = None):
15341  */
15342  __Pyx_XDECREF(__pyx_r);
15343  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15344  __Pyx_GOTREF(__pyx_t_3);
15345  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15346  __Pyx_GOTREF(__pyx_t_11);
15347  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15348  __pyx_r = __pyx_t_11;
15349  __pyx_t_11 = 0;
15350  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15351  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15352  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15353  goto __pyx_L7_except_return;
15354  }
15355  __pyx_L6_except_error:;
15356  __Pyx_XGIVEREF(__pyx_t_6);
15357  __Pyx_XGIVEREF(__pyx_t_7);
15358  __Pyx_XGIVEREF(__pyx_t_8);
15359  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15360  goto __pyx_L1_error;
15361  __pyx_L8_try_return:;
15362  __Pyx_XGIVEREF(__pyx_t_6);
15363  __Pyx_XGIVEREF(__pyx_t_7);
15364  __Pyx_XGIVEREF(__pyx_t_8);
15365  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15366  goto __pyx_L0;
15367  __pyx_L7_except_return:;
15368  __Pyx_XGIVEREF(__pyx_t_6);
15369  __Pyx_XGIVEREF(__pyx_t_7);
15370  __Pyx_XGIVEREF(__pyx_t_8);
15371  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15372  goto __pyx_L0;
15373  }
15374  }
15375 
15376  /* "PyClical.pyx":1733
15377  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15378  *
15379  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15380  * """
15381  * Inverse hyperbolic sine of multivector with optional complexifier.
15382  */
15383 
15384  /* function exit code */
15385  __pyx_L1_error:;
15386  __Pyx_XDECREF(__pyx_t_3);
15387  __Pyx_XDECREF(__pyx_t_5);
15388  __Pyx_XDECREF(__pyx_t_9);
15389  __Pyx_XDECREF(__pyx_t_10);
15390  __Pyx_XDECREF(__pyx_t_11);
15391  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15392  __pyx_r = 0;
15393  __pyx_L0:;
15394  __Pyx_XGIVEREF(__pyx_r);
15395  __Pyx_RefNannyFinishContext();
15396  return __pyx_r;
15397  }
15398 
15399  /* Python wrapper */
15400  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15401  static char __pyx_doc_8PyClical_64asinh[] = "\n Inverse hyperbolic sine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print asinh(x,\"{1,2,3}\") * 2/pi\n {1,2}\n >>> x=clifford(\"{1,2}\"); print asinh(x) * 2/pi\n {1,2}\n >>> x=clifford(\"{1,2}\") / 2; print asinh(x) * 6/pi\n {1,2}\n ";
15402  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15403  PyObject *__pyx_v_obj = 0;
15404  PyObject *__pyx_v_i = 0;
15405  int __pyx_lineno = 0;
15406  const char *__pyx_filename = NULL;
15407  int __pyx_clineno = 0;
15408  PyObject *__pyx_r = 0;
15409  __Pyx_RefNannyDeclarations
15410  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
15411  {
15412  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15413  PyObject* values[2] = {0,0};
15414  values[1] = ((PyObject *)Py_None);
15415  if (unlikely(__pyx_kwds)) {
15416  Py_ssize_t kw_args;
15417  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15418  switch (pos_args) {
15419  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15420  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15421  case 0: break;
15422  default: goto __pyx_L5_argtuple_error;
15423  }
15424  kw_args = PyDict_Size(__pyx_kwds);
15425  switch (pos_args) {
15426  case 0:
15427  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15428  else goto __pyx_L5_argtuple_error;
15429  case 1:
15430  if (kw_args > 0) {
15431  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15432  if (value) { values[1] = value; kw_args--; }
15433  }
15434  }
15435  if (unlikely(kw_args > 0)) {
15436  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15437  }
15438  } else {
15439  switch (PyTuple_GET_SIZE(__pyx_args)) {
15440  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15441  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15442  break;
15443  default: goto __pyx_L5_argtuple_error;
15444  }
15445  }
15446  __pyx_v_obj = values[0];
15447  __pyx_v_i = values[1];
15448  }
15449  goto __pyx_L4_argument_unpacking_done;
15450  __pyx_L5_argtuple_error:;
15451  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15452  __pyx_L3_error:;
15453  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15454  __Pyx_RefNannyFinishContext();
15455  return NULL;
15456  __pyx_L4_argument_unpacking_done:;
15457  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15458 
15459  /* function exit code */
15460  __Pyx_RefNannyFinishContext();
15461  return __pyx_r;
15462  }
15463 
15464  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15465  PyObject *__pyx_r = NULL;
15466  __Pyx_RefNannyDeclarations
15467  PyObject *__pyx_t_1 = NULL;
15468  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
15469  int __pyx_lineno = 0;
15470  const char *__pyx_filename = NULL;
15471  int __pyx_clineno = 0;
15472  __Pyx_RefNannySetupContext("asinh", 0);
15473  __Pyx_XDECREF(__pyx_r);
15474  __pyx_t_2.__pyx_n = 1;
15475  __pyx_t_2.i = __pyx_v_i;
15476  __pyx_t_1 = __pyx_f_8PyClical_asinh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15477  __Pyx_GOTREF(__pyx_t_1);
15478  __pyx_r = __pyx_t_1;
15479  __pyx_t_1 = 0;
15480  goto __pyx_L0;
15481 
15482  /* function exit code */
15483  __pyx_L1_error:;
15484  __Pyx_XDECREF(__pyx_t_1);
15485  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15486  __pyx_r = NULL;
15487  __pyx_L0:;
15488  __Pyx_XGIVEREF(__pyx_r);
15489  __Pyx_RefNannyFinishContext();
15490  return __pyx_r;
15491  }
15492 
15493  /* "PyClical.pyx":1752
15494  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
15495  *
15496  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
15497  * """
15498  * Tangent of multivector with optional complexifier.
15499  */
15500 
15501  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15502  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) {
15503  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15504  PyObject *__pyx_r = NULL;
15505  __Pyx_RefNannyDeclarations
15506  int __pyx_t_1;
15507  int __pyx_t_2;
15508  PyObject *__pyx_t_3 = NULL;
15509  Clifford __pyx_t_4;
15510  PyObject *__pyx_t_5 = NULL;
15511  PyObject *__pyx_t_6 = NULL;
15512  PyObject *__pyx_t_7 = NULL;
15513  PyObject *__pyx_t_8 = NULL;
15514  PyObject *__pyx_t_9 = NULL;
15515  PyObject *__pyx_t_10 = NULL;
15516  PyObject *__pyx_t_11 = NULL;
15517  int __pyx_lineno = 0;
15518  const char *__pyx_filename = NULL;
15519  int __pyx_clineno = 0;
15520  __Pyx_RefNannySetupContext("tan", 0);
15521  if (__pyx_optional_args) {
15522  if (__pyx_optional_args->__pyx_n > 0) {
15523  __pyx_v_i = __pyx_optional_args->i;
15524  }
15525  }
15526 
15527  /* "PyClical.pyx":1761
15528  * 0.7616{1,2}
15529  * """
15530  * if not (i is None): # <<<<<<<<<<<<<<
15531  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
15532  * else:
15533  */
15534  __pyx_t_1 = (__pyx_v_i != Py_None);
15535  __pyx_t_2 = (__pyx_t_1 != 0);
15536  if (__pyx_t_2) {
15537 
15538  /* "PyClical.pyx":1762
15539  * """
15540  * if not (i is None):
15541  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15542  * else:
15543  * try:
15544  */
15545  __Pyx_XDECREF(__pyx_r);
15546  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15547  __Pyx_GOTREF(__pyx_t_3);
15548  try {
15549  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15550  } catch(...) {
15551  __Pyx_CppExn2PyErr();
15552  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15553  }
15554  __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_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15555  __Pyx_GOTREF(__pyx_t_5);
15556  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15557  __pyx_r = __pyx_t_5;
15558  __pyx_t_5 = 0;
15559  goto __pyx_L0;
15560  }
15561  /*else*/ {
15562 
15563  /* "PyClical.pyx":1764
15564  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
15565  * else:
15566  * try: # <<<<<<<<<<<<<<
15567  * return math.tan(obj)
15568  * except:
15569  */
15570  {
15571  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15572  __Pyx_XGOTREF(__pyx_t_6);
15573  __Pyx_XGOTREF(__pyx_t_7);
15574  __Pyx_XGOTREF(__pyx_t_8);
15575  /*try:*/ {
15576 
15577  /* "PyClical.pyx":1765
15578  * else:
15579  * try:
15580  * return math.tan(obj) # <<<<<<<<<<<<<<
15581  * except:
15582  * return clifford().wrap( glucat.tan(toClifford(obj)) )
15583  */
15584  __Pyx_XDECREF(__pyx_r);
15585  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15586  __Pyx_GOTREF(__pyx_t_3);
15587  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15588  __Pyx_GOTREF(__pyx_t_9);
15589  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15590  __pyx_t_3 = NULL;
15591  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15592  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15593  if (likely(__pyx_t_3)) {
15594  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15595  __Pyx_INCREF(__pyx_t_3);
15596  __Pyx_INCREF(function);
15597  __Pyx_DECREF_SET(__pyx_t_9, function);
15598  }
15599  }
15600  if (!__pyx_t_3) {
15601  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15602  __Pyx_GOTREF(__pyx_t_5);
15603  } else {
15604  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15605  __Pyx_GOTREF(__pyx_t_10);
15606  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
15607  __Pyx_INCREF(__pyx_v_obj);
15608  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15609  __Pyx_GIVEREF(__pyx_v_obj);
15610  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15611  __Pyx_GOTREF(__pyx_t_5);
15612  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15613  }
15614  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15615  __pyx_r = __pyx_t_5;
15616  __pyx_t_5 = 0;
15617  goto __pyx_L8_try_return;
15618  }
15619  __pyx_L4_error:;
15620  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15621  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15622  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15623  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15624 
15625  /* "PyClical.pyx":1766
15626  * try:
15627  * return math.tan(obj)
15628  * except: # <<<<<<<<<<<<<<
15629  * return clifford().wrap( glucat.tan(toClifford(obj)) )
15630  *
15631  */
15632  /*except:*/ {
15633  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15634  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15635  __Pyx_GOTREF(__pyx_t_5);
15636  __Pyx_GOTREF(__pyx_t_9);
15637  __Pyx_GOTREF(__pyx_t_10);
15638 
15639  /* "PyClical.pyx":1767
15640  * return math.tan(obj)
15641  * except:
15642  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
15643  *
15644  * cpdef inline atan(obj,i = None):
15645  */
15646  __Pyx_XDECREF(__pyx_r);
15647  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15648  __Pyx_GOTREF(__pyx_t_3);
15649  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15650  __Pyx_GOTREF(__pyx_t_11);
15651  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15652  __pyx_r = __pyx_t_11;
15653  __pyx_t_11 = 0;
15654  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15655  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15656  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15657  goto __pyx_L7_except_return;
15658  }
15659  __pyx_L6_except_error:;
15660  __Pyx_XGIVEREF(__pyx_t_6);
15661  __Pyx_XGIVEREF(__pyx_t_7);
15662  __Pyx_XGIVEREF(__pyx_t_8);
15663  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15664  goto __pyx_L1_error;
15665  __pyx_L8_try_return:;
15666  __Pyx_XGIVEREF(__pyx_t_6);
15667  __Pyx_XGIVEREF(__pyx_t_7);
15668  __Pyx_XGIVEREF(__pyx_t_8);
15669  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15670  goto __pyx_L0;
15671  __pyx_L7_except_return:;
15672  __Pyx_XGIVEREF(__pyx_t_6);
15673  __Pyx_XGIVEREF(__pyx_t_7);
15674  __Pyx_XGIVEREF(__pyx_t_8);
15675  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15676  goto __pyx_L0;
15677  }
15678  }
15679 
15680  /* "PyClical.pyx":1752
15681  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
15682  *
15683  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
15684  * """
15685  * Tangent of multivector with optional complexifier.
15686  */
15687 
15688  /* function exit code */
15689  __pyx_L1_error:;
15690  __Pyx_XDECREF(__pyx_t_3);
15691  __Pyx_XDECREF(__pyx_t_5);
15692  __Pyx_XDECREF(__pyx_t_9);
15693  __Pyx_XDECREF(__pyx_t_10);
15694  __Pyx_XDECREF(__pyx_t_11);
15695  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15696  __pyx_r = 0;
15697  __pyx_L0:;
15698  __Pyx_XGIVEREF(__pyx_r);
15699  __Pyx_RefNannyFinishContext();
15700  return __pyx_r;
15701  }
15702 
15703  /* Python wrapper */
15704  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15705  static char __pyx_doc_8PyClical_66tan[] = "\n Tangent of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print tan(x,\"{1,2,3}\")\n 0.7616{1,2}\n >>> x=clifford(\"{1,2}\"); print tan(x)\n 0.7616{1,2}\n ";
15706  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15707  PyObject *__pyx_v_obj = 0;
15708  PyObject *__pyx_v_i = 0;
15709  int __pyx_lineno = 0;
15710  const char *__pyx_filename = NULL;
15711  int __pyx_clineno = 0;
15712  PyObject *__pyx_r = 0;
15713  __Pyx_RefNannyDeclarations
15714  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
15715  {
15716  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15717  PyObject* values[2] = {0,0};
15718  values[1] = ((PyObject *)Py_None);
15719  if (unlikely(__pyx_kwds)) {
15720  Py_ssize_t kw_args;
15721  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15722  switch (pos_args) {
15723  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15724  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15725  case 0: break;
15726  default: goto __pyx_L5_argtuple_error;
15727  }
15728  kw_args = PyDict_Size(__pyx_kwds);
15729  switch (pos_args) {
15730  case 0:
15731  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15732  else goto __pyx_L5_argtuple_error;
15733  case 1:
15734  if (kw_args > 0) {
15735  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15736  if (value) { values[1] = value; kw_args--; }
15737  }
15738  }
15739  if (unlikely(kw_args > 0)) {
15740  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15741  }
15742  } else {
15743  switch (PyTuple_GET_SIZE(__pyx_args)) {
15744  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15745  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15746  break;
15747  default: goto __pyx_L5_argtuple_error;
15748  }
15749  }
15750  __pyx_v_obj = values[0];
15751  __pyx_v_i = values[1];
15752  }
15753  goto __pyx_L4_argument_unpacking_done;
15754  __pyx_L5_argtuple_error:;
15755  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15756  __pyx_L3_error:;
15757  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15758  __Pyx_RefNannyFinishContext();
15759  return NULL;
15760  __pyx_L4_argument_unpacking_done:;
15761  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
15762 
15763  /* function exit code */
15764  __Pyx_RefNannyFinishContext();
15765  return __pyx_r;
15766  }
15767 
15768  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15769  PyObject *__pyx_r = NULL;
15770  __Pyx_RefNannyDeclarations
15771  PyObject *__pyx_t_1 = NULL;
15772  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
15773  int __pyx_lineno = 0;
15774  const char *__pyx_filename = NULL;
15775  int __pyx_clineno = 0;
15776  __Pyx_RefNannySetupContext("tan", 0);
15777  __Pyx_XDECREF(__pyx_r);
15778  __pyx_t_2.__pyx_n = 1;
15779  __pyx_t_2.i = __pyx_v_i;
15780  __pyx_t_1 = __pyx_f_8PyClical_tan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15781  __Pyx_GOTREF(__pyx_t_1);
15782  __pyx_r = __pyx_t_1;
15783  __pyx_t_1 = 0;
15784  goto __pyx_L0;
15785 
15786  /* function exit code */
15787  __pyx_L1_error:;
15788  __Pyx_XDECREF(__pyx_t_1);
15789  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15790  __pyx_r = NULL;
15791  __pyx_L0:;
15792  __Pyx_XGIVEREF(__pyx_r);
15793  __Pyx_RefNannyFinishContext();
15794  return __pyx_r;
15795  }
15796 
15797  /* "PyClical.pyx":1769
15798  * return clifford().wrap( glucat.tan(toClifford(obj)) )
15799  *
15800  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
15801  * """
15802  * Inverse tangent of multivector with optional complexifier.
15803  */
15804 
15805  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15806  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) {
15807  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15808  PyObject *__pyx_r = NULL;
15809  __Pyx_RefNannyDeclarations
15810  int __pyx_t_1;
15811  int __pyx_t_2;
15812  PyObject *__pyx_t_3 = NULL;
15813  Clifford __pyx_t_4;
15814  PyObject *__pyx_t_5 = NULL;
15815  PyObject *__pyx_t_6 = NULL;
15816  PyObject *__pyx_t_7 = NULL;
15817  PyObject *__pyx_t_8 = NULL;
15818  PyObject *__pyx_t_9 = NULL;
15819  PyObject *__pyx_t_10 = NULL;
15820  PyObject *__pyx_t_11 = NULL;
15821  int __pyx_lineno = 0;
15822  const char *__pyx_filename = NULL;
15823  int __pyx_clineno = 0;
15824  __Pyx_RefNannySetupContext("atan", 0);
15825  if (__pyx_optional_args) {
15826  if (__pyx_optional_args->__pyx_n > 0) {
15827  __pyx_v_i = __pyx_optional_args->i;
15828  }
15829  }
15830 
15831  /* "PyClical.pyx":1778
15832  * {1}
15833  * """
15834  * if not (i is None): # <<<<<<<<<<<<<<
15835  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
15836  * else:
15837  */
15838  __pyx_t_1 = (__pyx_v_i != Py_None);
15839  __pyx_t_2 = (__pyx_t_1 != 0);
15840  if (__pyx_t_2) {
15841 
15842  /* "PyClical.pyx":1779
15843  * """
15844  * if not (i is None):
15845  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15846  * else:
15847  * try:
15848  */
15849  __Pyx_XDECREF(__pyx_r);
15850  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15851  __Pyx_GOTREF(__pyx_t_3);
15852  try {
15853  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15854  } catch(...) {
15855  __Pyx_CppExn2PyErr();
15856  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15857  }
15858  __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_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15859  __Pyx_GOTREF(__pyx_t_5);
15860  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15861  __pyx_r = __pyx_t_5;
15862  __pyx_t_5 = 0;
15863  goto __pyx_L0;
15864  }
15865  /*else*/ {
15866 
15867  /* "PyClical.pyx":1781
15868  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
15869  * else:
15870  * try: # <<<<<<<<<<<<<<
15871  * return math.atan(obj)
15872  * except:
15873  */
15874  {
15875  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15876  __Pyx_XGOTREF(__pyx_t_6);
15877  __Pyx_XGOTREF(__pyx_t_7);
15878  __Pyx_XGOTREF(__pyx_t_8);
15879  /*try:*/ {
15880 
15881  /* "PyClical.pyx":1782
15882  * else:
15883  * try:
15884  * return math.atan(obj) # <<<<<<<<<<<<<<
15885  * except:
15886  * return clifford().wrap( glucat.atan(toClifford(obj)) )
15887  */
15888  __Pyx_XDECREF(__pyx_r);
15889  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15890  __Pyx_GOTREF(__pyx_t_3);
15891  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atan); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15892  __Pyx_GOTREF(__pyx_t_9);
15893  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15894  __pyx_t_3 = NULL;
15895  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
15896  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15897  if (likely(__pyx_t_3)) {
15898  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15899  __Pyx_INCREF(__pyx_t_3);
15900  __Pyx_INCREF(function);
15901  __Pyx_DECREF_SET(__pyx_t_9, function);
15902  }
15903  }
15904  if (!__pyx_t_3) {
15905  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15906  __Pyx_GOTREF(__pyx_t_5);
15907  } else {
15908  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15909  __Pyx_GOTREF(__pyx_t_10);
15910  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
15911  __Pyx_INCREF(__pyx_v_obj);
15912  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15913  __Pyx_GIVEREF(__pyx_v_obj);
15914  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15915  __Pyx_GOTREF(__pyx_t_5);
15916  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15917  }
15918  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15919  __pyx_r = __pyx_t_5;
15920  __pyx_t_5 = 0;
15921  goto __pyx_L8_try_return;
15922  }
15923  __pyx_L4_error:;
15924  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15925  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15926  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15927  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15928 
15929  /* "PyClical.pyx":1783
15930  * try:
15931  * return math.atan(obj)
15932  * except: # <<<<<<<<<<<<<<
15933  * return clifford().wrap( glucat.atan(toClifford(obj)) )
15934  *
15935  */
15936  /*except:*/ {
15937  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
15938  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15939  __Pyx_GOTREF(__pyx_t_5);
15940  __Pyx_GOTREF(__pyx_t_9);
15941  __Pyx_GOTREF(__pyx_t_10);
15942 
15943  /* "PyClical.pyx":1784
15944  * return math.atan(obj)
15945  * except:
15946  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
15947  *
15948  * cpdef inline tanh(obj):
15949  */
15950  __Pyx_XDECREF(__pyx_r);
15951  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15952  __Pyx_GOTREF(__pyx_t_3);
15953  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
15954  __Pyx_GOTREF(__pyx_t_11);
15955  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15956  __pyx_r = __pyx_t_11;
15957  __pyx_t_11 = 0;
15958  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15959  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15960  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15961  goto __pyx_L7_except_return;
15962  }
15963  __pyx_L6_except_error:;
15964  __Pyx_XGIVEREF(__pyx_t_6);
15965  __Pyx_XGIVEREF(__pyx_t_7);
15966  __Pyx_XGIVEREF(__pyx_t_8);
15967  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15968  goto __pyx_L1_error;
15969  __pyx_L8_try_return:;
15970  __Pyx_XGIVEREF(__pyx_t_6);
15971  __Pyx_XGIVEREF(__pyx_t_7);
15972  __Pyx_XGIVEREF(__pyx_t_8);
15973  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15974  goto __pyx_L0;
15975  __pyx_L7_except_return:;
15976  __Pyx_XGIVEREF(__pyx_t_6);
15977  __Pyx_XGIVEREF(__pyx_t_7);
15978  __Pyx_XGIVEREF(__pyx_t_8);
15979  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15980  goto __pyx_L0;
15981  }
15982  }
15983 
15984  /* "PyClical.pyx":1769
15985  * return clifford().wrap( glucat.tan(toClifford(obj)) )
15986  *
15987  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
15988  * """
15989  * Inverse tangent of multivector with optional complexifier.
15990  */
15991 
15992  /* function exit code */
15993  __pyx_L1_error:;
15994  __Pyx_XDECREF(__pyx_t_3);
15995  __Pyx_XDECREF(__pyx_t_5);
15996  __Pyx_XDECREF(__pyx_t_9);
15997  __Pyx_XDECREF(__pyx_t_10);
15998  __Pyx_XDECREF(__pyx_t_11);
15999  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16000  __pyx_r = 0;
16001  __pyx_L0:;
16002  __Pyx_XGIVEREF(__pyx_r);
16003  __Pyx_RefNannyFinishContext();
16004  return __pyx_r;
16005  }
16006 
16007  /* Python wrapper */
16008  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16009  static char __pyx_doc_8PyClical_68atan[] = "\n Inverse tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1}\"); print tan(atan(x,s),s)\n {1}\n >>> x=clifford(\"{1}\"); print tan(atan(x))\n {1}\n ";
16010  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16011  PyObject *__pyx_v_obj = 0;
16012  PyObject *__pyx_v_i = 0;
16013  int __pyx_lineno = 0;
16014  const char *__pyx_filename = NULL;
16015  int __pyx_clineno = 0;
16016  PyObject *__pyx_r = 0;
16017  __Pyx_RefNannyDeclarations
16018  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
16019  {
16020  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16021  PyObject* values[2] = {0,0};
16022  values[1] = ((PyObject *)Py_None);
16023  if (unlikely(__pyx_kwds)) {
16024  Py_ssize_t kw_args;
16025  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16026  switch (pos_args) {
16027  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16028  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16029  case 0: break;
16030  default: goto __pyx_L5_argtuple_error;
16031  }
16032  kw_args = PyDict_Size(__pyx_kwds);
16033  switch (pos_args) {
16034  case 0:
16035  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16036  else goto __pyx_L5_argtuple_error;
16037  case 1:
16038  if (kw_args > 0) {
16039  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16040  if (value) { values[1] = value; kw_args--; }
16041  }
16042  }
16043  if (unlikely(kw_args > 0)) {
16044  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16045  }
16046  } else {
16047  switch (PyTuple_GET_SIZE(__pyx_args)) {
16048  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16049  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16050  break;
16051  default: goto __pyx_L5_argtuple_error;
16052  }
16053  }
16054  __pyx_v_obj = values[0];
16055  __pyx_v_i = values[1];
16056  }
16057  goto __pyx_L4_argument_unpacking_done;
16058  __pyx_L5_argtuple_error:;
16059  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16060  __pyx_L3_error:;
16061  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16062  __Pyx_RefNannyFinishContext();
16063  return NULL;
16064  __pyx_L4_argument_unpacking_done:;
16065  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16066 
16067  /* function exit code */
16068  __Pyx_RefNannyFinishContext();
16069  return __pyx_r;
16070  }
16071 
16072  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16073  PyObject *__pyx_r = NULL;
16074  __Pyx_RefNannyDeclarations
16075  PyObject *__pyx_t_1 = NULL;
16076  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16077  int __pyx_lineno = 0;
16078  const char *__pyx_filename = NULL;
16079  int __pyx_clineno = 0;
16080  __Pyx_RefNannySetupContext("atan", 0);
16081  __Pyx_XDECREF(__pyx_r);
16082  __pyx_t_2.__pyx_n = 1;
16083  __pyx_t_2.i = __pyx_v_i;
16084  __pyx_t_1 = __pyx_f_8PyClical_atan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16085  __Pyx_GOTREF(__pyx_t_1);
16086  __pyx_r = __pyx_t_1;
16087  __pyx_t_1 = 0;
16088  goto __pyx_L0;
16089 
16090  /* function exit code */
16091  __pyx_L1_error:;
16092  __Pyx_XDECREF(__pyx_t_1);
16093  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16094  __pyx_r = NULL;
16095  __pyx_L0:;
16096  __Pyx_XGIVEREF(__pyx_r);
16097  __Pyx_RefNannyFinishContext();
16098  return __pyx_r;
16099  }
16100 
16101  /* "PyClical.pyx":1786
16102  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16103  *
16104  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16105  * """
16106  * Hyperbolic tangent of multivector.
16107  */
16108 
16109  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16110  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16111  PyObject *__pyx_r = NULL;
16112  __Pyx_RefNannyDeclarations
16113  PyObject *__pyx_t_1 = NULL;
16114  PyObject *__pyx_t_2 = NULL;
16115  PyObject *__pyx_t_3 = NULL;
16116  PyObject *__pyx_t_4 = NULL;
16117  PyObject *__pyx_t_5 = NULL;
16118  PyObject *__pyx_t_6 = NULL;
16119  PyObject *__pyx_t_7 = NULL;
16120  PyObject *__pyx_t_8 = NULL;
16121  int __pyx_lineno = 0;
16122  const char *__pyx_filename = NULL;
16123  int __pyx_clineno = 0;
16124  __Pyx_RefNannySetupContext("tanh", 0);
16125 
16126  /* "PyClical.pyx":1793
16127  * {1,2}
16128  * """
16129  * try: # <<<<<<<<<<<<<<
16130  * return math.tanh(obj)
16131  * except:
16132  */
16133  {
16134  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16135  __Pyx_XGOTREF(__pyx_t_1);
16136  __Pyx_XGOTREF(__pyx_t_2);
16137  __Pyx_XGOTREF(__pyx_t_3);
16138  /*try:*/ {
16139 
16140  /* "PyClical.pyx":1794
16141  * """
16142  * try:
16143  * return math.tanh(obj) # <<<<<<<<<<<<<<
16144  * except:
16145  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16146  */
16147  __Pyx_XDECREF(__pyx_r);
16148  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16149  __Pyx_GOTREF(__pyx_t_5);
16150  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tanh); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16151  __Pyx_GOTREF(__pyx_t_6);
16152  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16153  __pyx_t_5 = NULL;
16154  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
16155  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16156  if (likely(__pyx_t_5)) {
16157  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16158  __Pyx_INCREF(__pyx_t_5);
16159  __Pyx_INCREF(function);
16160  __Pyx_DECREF_SET(__pyx_t_6, function);
16161  }
16162  }
16163  if (!__pyx_t_5) {
16164  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16165  __Pyx_GOTREF(__pyx_t_4);
16166  } else {
16167  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16168  __Pyx_GOTREF(__pyx_t_7);
16169  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
16170  __Pyx_INCREF(__pyx_v_obj);
16171  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16172  __Pyx_GIVEREF(__pyx_v_obj);
16173  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16174  __Pyx_GOTREF(__pyx_t_4);
16175  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16176  }
16177  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16178  __pyx_r = __pyx_t_4;
16179  __pyx_t_4 = 0;
16180  goto __pyx_L7_try_return;
16181  }
16182  __pyx_L3_error:;
16183  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16184  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16185  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16186  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16187 
16188  /* "PyClical.pyx":1795
16189  * try:
16190  * return math.tanh(obj)
16191  * except: # <<<<<<<<<<<<<<
16192  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16193  *
16194  */
16195  /*except:*/ {
16196  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16197  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
16198  __Pyx_GOTREF(__pyx_t_4);
16199  __Pyx_GOTREF(__pyx_t_6);
16200  __Pyx_GOTREF(__pyx_t_7);
16201 
16202  /* "PyClical.pyx":1796
16203  * return math.tanh(obj)
16204  * except:
16205  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16206  *
16207  * cpdef inline atanh(obj,i = None):
16208  */
16209  __Pyx_XDECREF(__pyx_r);
16210  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
16211  __Pyx_GOTREF(__pyx_t_5);
16212  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), tanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
16213  __Pyx_GOTREF(__pyx_t_8);
16214  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16215  __pyx_r = __pyx_t_8;
16216  __pyx_t_8 = 0;
16217  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16218  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16219  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16220  goto __pyx_L6_except_return;
16221  }
16222  __pyx_L5_except_error:;
16223  __Pyx_XGIVEREF(__pyx_t_1);
16224  __Pyx_XGIVEREF(__pyx_t_2);
16225  __Pyx_XGIVEREF(__pyx_t_3);
16226  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16227  goto __pyx_L1_error;
16228  __pyx_L7_try_return:;
16229  __Pyx_XGIVEREF(__pyx_t_1);
16230  __Pyx_XGIVEREF(__pyx_t_2);
16231  __Pyx_XGIVEREF(__pyx_t_3);
16232  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16233  goto __pyx_L0;
16234  __pyx_L6_except_return:;
16235  __Pyx_XGIVEREF(__pyx_t_1);
16236  __Pyx_XGIVEREF(__pyx_t_2);
16237  __Pyx_XGIVEREF(__pyx_t_3);
16238  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16239  goto __pyx_L0;
16240  }
16241 
16242  /* "PyClical.pyx":1786
16243  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16244  *
16245  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16246  * """
16247  * Hyperbolic tangent of multivector.
16248  */
16249 
16250  /* function exit code */
16251  __pyx_L1_error:;
16252  __Pyx_XDECREF(__pyx_t_4);
16253  __Pyx_XDECREF(__pyx_t_5);
16254  __Pyx_XDECREF(__pyx_t_6);
16255  __Pyx_XDECREF(__pyx_t_7);
16256  __Pyx_XDECREF(__pyx_t_8);
16257  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16258  __pyx_r = 0;
16259  __pyx_L0:;
16260  __Pyx_XGIVEREF(__pyx_r);
16261  __Pyx_RefNannyFinishContext();
16262  return __pyx_r;
16263  }
16264 
16265  /* Python wrapper */
16266  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16267  static char __pyx_doc_8PyClical_70tanh[] = "\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print tanh(x)\n {1,2}\n ";
16268  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16269  PyObject *__pyx_r = 0;
16270  __Pyx_RefNannyDeclarations
16271  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
16272  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
16273 
16274  /* function exit code */
16275  __Pyx_RefNannyFinishContext();
16276  return __pyx_r;
16277  }
16278 
16279  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16280  PyObject *__pyx_r = NULL;
16281  __Pyx_RefNannyDeclarations
16282  PyObject *__pyx_t_1 = NULL;
16283  int __pyx_lineno = 0;
16284  const char *__pyx_filename = NULL;
16285  int __pyx_clineno = 0;
16286  __Pyx_RefNannySetupContext("tanh", 0);
16287  __Pyx_XDECREF(__pyx_r);
16288  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16289  __Pyx_GOTREF(__pyx_t_1);
16290  __pyx_r = __pyx_t_1;
16291  __pyx_t_1 = 0;
16292  goto __pyx_L0;
16293 
16294  /* function exit code */
16295  __pyx_L1_error:;
16296  __Pyx_XDECREF(__pyx_t_1);
16297  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16298  __pyx_r = NULL;
16299  __pyx_L0:;
16300  __Pyx_XGIVEREF(__pyx_r);
16301  __Pyx_RefNannyFinishContext();
16302  return __pyx_r;
16303  }
16304 
16305  /* "PyClical.pyx":1798
16306  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16307  *
16308  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
16309  * """
16310  * Inverse hyperbolic tangent of multivector with optional complexifier.
16311  */
16312 
16313  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16314  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) {
16315  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16316  PyObject *__pyx_r = NULL;
16317  __Pyx_RefNannyDeclarations
16318  int __pyx_t_1;
16319  int __pyx_t_2;
16320  PyObject *__pyx_t_3 = NULL;
16321  Clifford __pyx_t_4;
16322  PyObject *__pyx_t_5 = NULL;
16323  PyObject *__pyx_t_6 = NULL;
16324  PyObject *__pyx_t_7 = NULL;
16325  PyObject *__pyx_t_8 = NULL;
16326  PyObject *__pyx_t_9 = NULL;
16327  PyObject *__pyx_t_10 = NULL;
16328  PyObject *__pyx_t_11 = NULL;
16329  int __pyx_lineno = 0;
16330  const char *__pyx_filename = NULL;
16331  int __pyx_clineno = 0;
16332  __Pyx_RefNannySetupContext("atanh", 0);
16333  if (__pyx_optional_args) {
16334  if (__pyx_optional_args->__pyx_n > 0) {
16335  __pyx_v_i = __pyx_optional_args->i;
16336  }
16337  }
16338 
16339  /* "PyClical.pyx":1807
16340  * {1,2}
16341  * """
16342  * if not (i is None): # <<<<<<<<<<<<<<
16343  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
16344  * else:
16345  */
16346  __pyx_t_1 = (__pyx_v_i != Py_None);
16347  __pyx_t_2 = (__pyx_t_1 != 0);
16348  if (__pyx_t_2) {
16349 
16350  /* "PyClical.pyx":1808
16351  * """
16352  * if not (i is None):
16353  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16354  * else:
16355  * try:
16356  */
16357  __Pyx_XDECREF(__pyx_r);
16358  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16359  __Pyx_GOTREF(__pyx_t_3);
16360  try {
16361  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16362  } catch(...) {
16363  __Pyx_CppExn2PyErr();
16364  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16365  }
16366  __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_filename = __pyx_f[0]; __pyx_lineno = 1808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16367  __Pyx_GOTREF(__pyx_t_5);
16368  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16369  __pyx_r = __pyx_t_5;
16370  __pyx_t_5 = 0;
16371  goto __pyx_L0;
16372  }
16373  /*else*/ {
16374 
16375  /* "PyClical.pyx":1810
16376  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
16377  * else:
16378  * try: # <<<<<<<<<<<<<<
16379  * return math.atanh(obj)
16380  * except:
16381  */
16382  {
16383  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16384  __Pyx_XGOTREF(__pyx_t_6);
16385  __Pyx_XGOTREF(__pyx_t_7);
16386  __Pyx_XGOTREF(__pyx_t_8);
16387  /*try:*/ {
16388 
16389  /* "PyClical.pyx":1811
16390  * else:
16391  * try:
16392  * return math.atanh(obj) # <<<<<<<<<<<<<<
16393  * except:
16394  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
16395  */
16396  __Pyx_XDECREF(__pyx_r);
16397  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
16398  __Pyx_GOTREF(__pyx_t_3);
16399  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atanh); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
16400  __Pyx_GOTREF(__pyx_t_9);
16401  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16402  __pyx_t_3 = NULL;
16403  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
16404  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16405  if (likely(__pyx_t_3)) {
16406  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16407  __Pyx_INCREF(__pyx_t_3);
16408  __Pyx_INCREF(function);
16409  __Pyx_DECREF_SET(__pyx_t_9, function);
16410  }
16411  }
16412  if (!__pyx_t_3) {
16413  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
16414  __Pyx_GOTREF(__pyx_t_5);
16415  } else {
16416  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
16417  __Pyx_GOTREF(__pyx_t_10);
16418  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
16419  __Pyx_INCREF(__pyx_v_obj);
16420  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16421  __Pyx_GIVEREF(__pyx_v_obj);
16422  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
16423  __Pyx_GOTREF(__pyx_t_5);
16424  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16425  }
16426  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16427  __pyx_r = __pyx_t_5;
16428  __pyx_t_5 = 0;
16429  goto __pyx_L8_try_return;
16430  }
16431  __pyx_L4_error:;
16432  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16433  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16434  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16435  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16436 
16437  /* "PyClical.pyx":1812
16438  * try:
16439  * return math.atanh(obj)
16440  * except: # <<<<<<<<<<<<<<
16441  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
16442  *
16443  */
16444  /*except:*/ {
16445  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16446  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
16447  __Pyx_GOTREF(__pyx_t_5);
16448  __Pyx_GOTREF(__pyx_t_9);
16449  __Pyx_GOTREF(__pyx_t_10);
16450 
16451  /* "PyClical.pyx":1813
16452  * return math.atanh(obj)
16453  * except:
16454  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16455  *
16456  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
16457  */
16458  __Pyx_XDECREF(__pyx_r);
16459  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
16460  __Pyx_GOTREF(__pyx_t_3);
16461  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
16462  __Pyx_GOTREF(__pyx_t_11);
16463  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16464  __pyx_r = __pyx_t_11;
16465  __pyx_t_11 = 0;
16466  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16467  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16468  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16469  goto __pyx_L7_except_return;
16470  }
16471  __pyx_L6_except_error:;
16472  __Pyx_XGIVEREF(__pyx_t_6);
16473  __Pyx_XGIVEREF(__pyx_t_7);
16474  __Pyx_XGIVEREF(__pyx_t_8);
16475  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16476  goto __pyx_L1_error;
16477  __pyx_L8_try_return:;
16478  __Pyx_XGIVEREF(__pyx_t_6);
16479  __Pyx_XGIVEREF(__pyx_t_7);
16480  __Pyx_XGIVEREF(__pyx_t_8);
16481  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16482  goto __pyx_L0;
16483  __pyx_L7_except_return:;
16484  __Pyx_XGIVEREF(__pyx_t_6);
16485  __Pyx_XGIVEREF(__pyx_t_7);
16486  __Pyx_XGIVEREF(__pyx_t_8);
16487  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16488  goto __pyx_L0;
16489  }
16490  }
16491 
16492  /* "PyClical.pyx":1798
16493  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16494  *
16495  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
16496  * """
16497  * Inverse hyperbolic tangent of multivector with optional complexifier.
16498  */
16499 
16500  /* function exit code */
16501  __pyx_L1_error:;
16502  __Pyx_XDECREF(__pyx_t_3);
16503  __Pyx_XDECREF(__pyx_t_5);
16504  __Pyx_XDECREF(__pyx_t_9);
16505  __Pyx_XDECREF(__pyx_t_10);
16506  __Pyx_XDECREF(__pyx_t_11);
16507  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16508  __pyx_r = 0;
16509  __pyx_L0:;
16510  __Pyx_XGIVEREF(__pyx_r);
16511  __Pyx_RefNannyFinishContext();
16512  return __pyx_r;
16513  }
16514 
16515  /* Python wrapper */
16516  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16517  static char __pyx_doc_8PyClical_72atanh[] = "\n Inverse hyperbolic tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1,2}\"); print tanh(atanh(x,s))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print tanh(atanh(x))\n {1,2}\n ";
16518  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16519  PyObject *__pyx_v_obj = 0;
16520  PyObject *__pyx_v_i = 0;
16521  int __pyx_lineno = 0;
16522  const char *__pyx_filename = NULL;
16523  int __pyx_clineno = 0;
16524  PyObject *__pyx_r = 0;
16525  __Pyx_RefNannyDeclarations
16526  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
16527  {
16528  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16529  PyObject* values[2] = {0,0};
16530  values[1] = ((PyObject *)Py_None);
16531  if (unlikely(__pyx_kwds)) {
16532  Py_ssize_t kw_args;
16533  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16534  switch (pos_args) {
16535  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16536  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16537  case 0: break;
16538  default: goto __pyx_L5_argtuple_error;
16539  }
16540  kw_args = PyDict_Size(__pyx_kwds);
16541  switch (pos_args) {
16542  case 0:
16543  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16544  else goto __pyx_L5_argtuple_error;
16545  case 1:
16546  if (kw_args > 0) {
16547  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16548  if (value) { values[1] = value; kw_args--; }
16549  }
16550  }
16551  if (unlikely(kw_args > 0)) {
16552  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16553  }
16554  } else {
16555  switch (PyTuple_GET_SIZE(__pyx_args)) {
16556  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16557  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16558  break;
16559  default: goto __pyx_L5_argtuple_error;
16560  }
16561  }
16562  __pyx_v_obj = values[0];
16563  __pyx_v_i = values[1];
16564  }
16565  goto __pyx_L4_argument_unpacking_done;
16566  __pyx_L5_argtuple_error:;
16567  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16568  __pyx_L3_error:;
16569  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16570  __Pyx_RefNannyFinishContext();
16571  return NULL;
16572  __pyx_L4_argument_unpacking_done:;
16573  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16574 
16575  /* function exit code */
16576  __Pyx_RefNannyFinishContext();
16577  return __pyx_r;
16578  }
16579 
16580  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16581  PyObject *__pyx_r = NULL;
16582  __Pyx_RefNannyDeclarations
16583  PyObject *__pyx_t_1 = NULL;
16584  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
16585  int __pyx_lineno = 0;
16586  const char *__pyx_filename = NULL;
16587  int __pyx_clineno = 0;
16588  __Pyx_RefNannySetupContext("atanh", 0);
16589  __Pyx_XDECREF(__pyx_r);
16590  __pyx_t_2.__pyx_n = 1;
16591  __pyx_t_2.i = __pyx_v_i;
16592  __pyx_t_1 = __pyx_f_8PyClical_atanh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16593  __Pyx_GOTREF(__pyx_t_1);
16594  __pyx_r = __pyx_t_1;
16595  __pyx_t_1 = 0;
16596  goto __pyx_L0;
16597 
16598  /* function exit code */
16599  __pyx_L1_error:;
16600  __Pyx_XDECREF(__pyx_t_1);
16601  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16602  __pyx_r = NULL;
16603  __pyx_L0:;
16604  __Pyx_XGIVEREF(__pyx_r);
16605  __Pyx_RefNannyFinishContext();
16606  return __pyx_r;
16607  }
16608 
16609  /* "PyClical.pyx":1815
16610  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
16611  *
16612  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
16613  * """
16614  * Random multivector within a frame.
16615  */
16616 
16617  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16618  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) {
16619  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
16620  PyObject *__pyx_r = NULL;
16621  __Pyx_RefNannyDeclarations
16622  PyObject *__pyx_t_1 = NULL;
16623  PyObject *__pyx_t_2 = NULL;
16624  scalar_t __pyx_t_3;
16625  PyObject *__pyx_t_4 = NULL;
16626  int __pyx_lineno = 0;
16627  const char *__pyx_filename = NULL;
16628  int __pyx_clineno = 0;
16629  __Pyx_RefNannySetupContext("random_clifford", 0);
16630  if (__pyx_optional_args) {
16631  if (__pyx_optional_args->__pyx_n > 0) {
16632  __pyx_v_fill = __pyx_optional_args->fill;
16633  }
16634  }
16635 
16636  /* "PyClical.pyx":1822
16637  * {-3,-1,2}
16638  * """
16639  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
16640  *
16641  * cpdef inline cga3(obj):
16642  */
16643  __Pyx_XDECREF(__pyx_r);
16644  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16645  __Pyx_GOTREF(__pyx_t_1);
16646  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16647  __Pyx_GOTREF(__pyx_t_2);
16648  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_fill); if (unlikely((__pyx_t_3 == (scalar_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16649  __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_filename = __pyx_f[0]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16650  __Pyx_GOTREF(__pyx_t_4);
16651  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16652  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16653  __pyx_r = __pyx_t_4;
16654  __pyx_t_4 = 0;
16655  goto __pyx_L0;
16656 
16657  /* "PyClical.pyx":1815
16658  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
16659  *
16660  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
16661  * """
16662  * Random multivector within a frame.
16663  */
16664 
16665  /* function exit code */
16666  __pyx_L1_error:;
16667  __Pyx_XDECREF(__pyx_t_1);
16668  __Pyx_XDECREF(__pyx_t_2);
16669  __Pyx_XDECREF(__pyx_t_4);
16670  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
16671  __pyx_r = 0;
16672  __pyx_L0:;
16673  __Pyx_XGIVEREF(__pyx_r);
16674  __Pyx_RefNannyFinishContext();
16675  return __pyx_r;
16676  }
16677 
16678  /* Python wrapper */
16679  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16680  static char __pyx_doc_8PyClical_74random_clifford[] = "\n Random multivector within a frame.\n\n >>> print random_clifford(index_set({-3,-1,2})).frame()\n {-3,-1,2}\n ";
16681  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16682  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
16683  PyObject *__pyx_v_fill = 0;
16684  int __pyx_lineno = 0;
16685  const char *__pyx_filename = NULL;
16686  int __pyx_clineno = 0;
16687  PyObject *__pyx_r = 0;
16688  __Pyx_RefNannyDeclarations
16689  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
16690  {
16691  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
16692  PyObject* values[2] = {0,0};
16693  values[1] = ((PyObject *)__pyx_float_1_0);
16694  if (unlikely(__pyx_kwds)) {
16695  Py_ssize_t kw_args;
16696  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16697  switch (pos_args) {
16698  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16699  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16700  case 0: break;
16701  default: goto __pyx_L5_argtuple_error;
16702  }
16703  kw_args = PyDict_Size(__pyx_kwds);
16704  switch (pos_args) {
16705  case 0:
16706  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
16707  else goto __pyx_L5_argtuple_error;
16708  case 1:
16709  if (kw_args > 0) {
16710  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
16711  if (value) { values[1] = value; kw_args--; }
16712  }
16713  }
16714  if (unlikely(kw_args > 0)) {
16715  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16716  }
16717  } else {
16718  switch (PyTuple_GET_SIZE(__pyx_args)) {
16719  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16720  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16721  break;
16722  default: goto __pyx_L5_argtuple_error;
16723  }
16724  }
16725  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
16726  __pyx_v_fill = values[1];
16727  }
16728  goto __pyx_L4_argument_unpacking_done;
16729  __pyx_L5_argtuple_error:;
16730  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16731  __pyx_L3_error:;
16732  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
16733  __Pyx_RefNannyFinishContext();
16734  return NULL;
16735  __pyx_L4_argument_unpacking_done:;
16736  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16737  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
16738 
16739  /* function exit code */
16740  goto __pyx_L0;
16741  __pyx_L1_error:;
16742  __pyx_r = NULL;
16743  __pyx_L0:;
16744  __Pyx_RefNannyFinishContext();
16745  return __pyx_r;
16746  }
16747 
16748  static PyObject *__pyx_pf_8PyClical_74random_clifford(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill) {
16749  PyObject *__pyx_r = NULL;
16750  __Pyx_RefNannyDeclarations
16751  PyObject *__pyx_t_1 = NULL;
16752  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
16753  int __pyx_lineno = 0;
16754  const char *__pyx_filename = NULL;
16755  int __pyx_clineno = 0;
16756  __Pyx_RefNannySetupContext("random_clifford", 0);
16757  __Pyx_XDECREF(__pyx_r);
16758  __pyx_t_2.__pyx_n = 1;
16759  __pyx_t_2.fill = __pyx_v_fill;
16760  __pyx_t_1 = __pyx_f_8PyClical_random_clifford(__pyx_v_ixt, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16761  __Pyx_GOTREF(__pyx_t_1);
16762  __pyx_r = __pyx_t_1;
16763  __pyx_t_1 = 0;
16764  goto __pyx_L0;
16765 
16766  /* function exit code */
16767  __pyx_L1_error:;
16768  __Pyx_XDECREF(__pyx_t_1);
16769  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
16770  __pyx_r = NULL;
16771  __pyx_L0:;
16772  __Pyx_XGIVEREF(__pyx_r);
16773  __Pyx_RefNannyFinishContext();
16774  return __pyx_r;
16775  }
16776 
16777  /* "PyClical.pyx":1824
16778  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
16779  *
16780  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
16781  * """
16782  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
16783  */
16784 
16785  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16786  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16787  PyObject *__pyx_r = NULL;
16788  __Pyx_RefNannyDeclarations
16789  PyObject *__pyx_t_1 = NULL;
16790  PyObject *__pyx_t_2 = NULL;
16791  int __pyx_lineno = 0;
16792  const char *__pyx_filename = NULL;
16793  int __pyx_clineno = 0;
16794  __Pyx_RefNannySetupContext("cga3", 0);
16795 
16796  /* "PyClical.pyx":1831
16797  * 87{-1}+4{1}+18{2}+2{3}+85{4}
16798  * """
16799  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
16800  *
16801  * cpdef inline cga3std(obj):
16802  */
16803  __Pyx_XDECREF(__pyx_r);
16804  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16805  __Pyx_GOTREF(__pyx_t_1);
16806  __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_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16807  __Pyx_GOTREF(__pyx_t_2);
16808  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16809  __pyx_r = __pyx_t_2;
16810  __pyx_t_2 = 0;
16811  goto __pyx_L0;
16812 
16813  /* "PyClical.pyx":1824
16814  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
16815  *
16816  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
16817  * """
16818  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
16819  */
16820 
16821  /* function exit code */
16822  __pyx_L1_error:;
16823  __Pyx_XDECREF(__pyx_t_1);
16824  __Pyx_XDECREF(__pyx_t_2);
16825  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16826  __pyx_r = 0;
16827  __pyx_L0:;
16828  __Pyx_XGIVEREF(__pyx_r);
16829  __Pyx_RefNannyFinishContext();
16830  return __pyx_r;
16831  }
16832 
16833  /* Python wrapper */
16834  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16835  static char __pyx_doc_8PyClical_76cga3[] = "\n Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3(x)\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n ";
16836  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16837  PyObject *__pyx_r = 0;
16838  __Pyx_RefNannyDeclarations
16839  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
16840  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
16841 
16842  /* function exit code */
16843  __Pyx_RefNannyFinishContext();
16844  return __pyx_r;
16845  }
16846 
16847  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16848  PyObject *__pyx_r = NULL;
16849  __Pyx_RefNannyDeclarations
16850  PyObject *__pyx_t_1 = NULL;
16851  int __pyx_lineno = 0;
16852  const char *__pyx_filename = NULL;
16853  int __pyx_clineno = 0;
16854  __Pyx_RefNannySetupContext("cga3", 0);
16855  __Pyx_XDECREF(__pyx_r);
16856  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16857  __Pyx_GOTREF(__pyx_t_1);
16858  __pyx_r = __pyx_t_1;
16859  __pyx_t_1 = 0;
16860  goto __pyx_L0;
16861 
16862  /* function exit code */
16863  __pyx_L1_error:;
16864  __Pyx_XDECREF(__pyx_t_1);
16865  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
16866  __pyx_r = NULL;
16867  __pyx_L0:;
16868  __Pyx_XGIVEREF(__pyx_r);
16869  __Pyx_RefNannyFinishContext();
16870  return __pyx_r;
16871  }
16872 
16873  /* "PyClical.pyx":1833
16874  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
16875  *
16876  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
16877  * """
16878  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
16879  */
16880 
16881  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16882  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16883  PyObject *__pyx_r = NULL;
16884  __Pyx_RefNannyDeclarations
16885  PyObject *__pyx_t_1 = NULL;
16886  PyObject *__pyx_t_2 = NULL;
16887  int __pyx_lineno = 0;
16888  const char *__pyx_filename = NULL;
16889  int __pyx_clineno = 0;
16890  __Pyx_RefNannySetupContext("cga3std", 0);
16891 
16892  /* "PyClical.pyx":1842
16893  * 0
16894  * """
16895  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
16896  *
16897  * cpdef inline agc3(obj):
16898  */
16899  __Pyx_XDECREF(__pyx_r);
16900  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16901  __Pyx_GOTREF(__pyx_t_1);
16902  __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_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16903  __Pyx_GOTREF(__pyx_t_2);
16904  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16905  __pyx_r = __pyx_t_2;
16906  __pyx_t_2 = 0;
16907  goto __pyx_L0;
16908 
16909  /* "PyClical.pyx":1833
16910  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
16911  *
16912  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
16913  * """
16914  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
16915  */
16916 
16917  /* function exit code */
16918  __pyx_L1_error:;
16919  __Pyx_XDECREF(__pyx_t_1);
16920  __Pyx_XDECREF(__pyx_t_2);
16921  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
16922  __pyx_r = 0;
16923  __pyx_L0:;
16924  __Pyx_XGIVEREF(__pyx_r);
16925  __Pyx_RefNannyFinishContext();
16926  return __pyx_r;
16927  }
16928 
16929  /* Python wrapper */
16930  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16931  static char __pyx_doc_8PyClical_78cga3std[] = "\n Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3std(cga3(x))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3std(cga3(x))-cga3(x)\n 0\n ";
16932  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16933  PyObject *__pyx_r = 0;
16934  __Pyx_RefNannyDeclarations
16935  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
16936  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
16937 
16938  /* function exit code */
16939  __Pyx_RefNannyFinishContext();
16940  return __pyx_r;
16941  }
16942 
16943  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16944  PyObject *__pyx_r = NULL;
16945  __Pyx_RefNannyDeclarations
16946  PyObject *__pyx_t_1 = NULL;
16947  int __pyx_lineno = 0;
16948  const char *__pyx_filename = NULL;
16949  int __pyx_clineno = 0;
16950  __Pyx_RefNannySetupContext("cga3std", 0);
16951  __Pyx_XDECREF(__pyx_r);
16952  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16953  __Pyx_GOTREF(__pyx_t_1);
16954  __pyx_r = __pyx_t_1;
16955  __pyx_t_1 = 0;
16956  goto __pyx_L0;
16957 
16958  /* function exit code */
16959  __pyx_L1_error:;
16960  __Pyx_XDECREF(__pyx_t_1);
16961  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
16962  __pyx_r = NULL;
16963  __pyx_L0:;
16964  __Pyx_XGIVEREF(__pyx_r);
16965  __Pyx_RefNannyFinishContext();
16966  return __pyx_r;
16967  }
16968 
16969  /* "PyClical.pyx":1844
16970  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
16971  *
16972  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
16973  * """
16974  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
16975  */
16976 
16977  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16978  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16979  PyObject *__pyx_r = NULL;
16980  __Pyx_RefNannyDeclarations
16981  PyObject *__pyx_t_1 = NULL;
16982  PyObject *__pyx_t_2 = NULL;
16983  int __pyx_lineno = 0;
16984  const char *__pyx_filename = NULL;
16985  int __pyx_clineno = 0;
16986  __Pyx_RefNannySetupContext("agc3", 0);
16987 
16988  /* "PyClical.pyx":1853
16989  * 0
16990  * """
16991  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
16992  *
16993  * # Some abbreviations.
16994  */
16995  __Pyx_XDECREF(__pyx_r);
16996  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16997  __Pyx_GOTREF(__pyx_t_1);
16998  __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_filename = __pyx_f[0]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16999  __Pyx_GOTREF(__pyx_t_2);
17000  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17001  __pyx_r = __pyx_t_2;
17002  __pyx_t_2 = 0;
17003  goto __pyx_L0;
17004 
17005  /* "PyClical.pyx":1844
17006  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17007  *
17008  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17009  * """
17010  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17011  */
17012 
17013  /* function exit code */
17014  __pyx_L1_error:;
17015  __Pyx_XDECREF(__pyx_t_1);
17016  __Pyx_XDECREF(__pyx_t_2);
17017  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17018  __pyx_r = 0;
17019  __pyx_L0:;
17020  __Pyx_XGIVEREF(__pyx_r);
17021  __Pyx_RefNannyFinishContext();
17022  return __pyx_r;
17023  }
17024 
17025  /* Python wrapper */
17026  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17027  static char __pyx_doc_8PyClical_80agc3[] = "\n Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print agc3(cga3(x))\n 2{1}+9{2}+{3}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print agc3(cga3(x))-x\n 0\n ";
17028  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17029  PyObject *__pyx_r = 0;
17030  __Pyx_RefNannyDeclarations
17031  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
17032  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17033 
17034  /* function exit code */
17035  __Pyx_RefNannyFinishContext();
17036  return __pyx_r;
17037  }
17038 
17039  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17040  PyObject *__pyx_r = NULL;
17041  __Pyx_RefNannyDeclarations
17042  PyObject *__pyx_t_1 = NULL;
17043  int __pyx_lineno = 0;
17044  const char *__pyx_filename = NULL;
17045  int __pyx_clineno = 0;
17046  __Pyx_RefNannySetupContext("agc3", 0);
17047  __Pyx_XDECREF(__pyx_r);
17048  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17049  __Pyx_GOTREF(__pyx_t_1);
17050  __pyx_r = __pyx_t_1;
17051  __pyx_t_1 = 0;
17052  goto __pyx_L0;
17053 
17054  /* function exit code */
17055  __pyx_L1_error:;
17056  __Pyx_XDECREF(__pyx_t_1);
17057  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17058  __pyx_r = NULL;
17059  __pyx_L0:;
17060  __Pyx_XGIVEREF(__pyx_r);
17061  __Pyx_RefNannyFinishContext();
17062  return __pyx_r;
17063  }
17064 
17065  /* "PyClical.pyx":1887
17066  * """
17067  *
17068  * def e(obj): # <<<<<<<<<<<<<<
17069  * """
17070  * Abbreviation for clifford(index_set(obj)).
17071  */
17072 
17073  /* Python wrapper */
17074  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17075  static char __pyx_doc_8PyClical_82e[] = "\n Abbreviation for clifford(index_set(obj)).\n\n >>> print e(1)\n {1}\n >>> print e(-1)\n {-1}\n >>> print e(0)\n 1\n ";
17076  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17077  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17078  PyObject *__pyx_r = 0;
17079  __Pyx_RefNannyDeclarations
17080  __Pyx_RefNannySetupContext("e (wrapper)", 0);
17081  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17082 
17083  /* function exit code */
17084  __Pyx_RefNannyFinishContext();
17085  return __pyx_r;
17086  }
17087 
17088  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17089  PyObject *__pyx_r = NULL;
17090  __Pyx_RefNannyDeclarations
17091  PyObject *__pyx_t_1 = NULL;
17092  PyObject *__pyx_t_2 = NULL;
17093  int __pyx_lineno = 0;
17094  const char *__pyx_filename = NULL;
17095  int __pyx_clineno = 0;
17096  __Pyx_RefNannySetupContext("e", 0);
17097 
17098  /* "PyClical.pyx":1898
17099  * 1
17100  * """
17101  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
17102  *
17103  * def istpq(p, q):
17104  */
17105  __Pyx_XDECREF(__pyx_r);
17106  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17107  __Pyx_GOTREF(__pyx_t_1);
17108  __Pyx_INCREF(__pyx_v_obj);
17109  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
17110  __Pyx_GIVEREF(__pyx_v_obj);
17111  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17112  __Pyx_GOTREF(__pyx_t_2);
17113  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17114  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17115  __Pyx_GOTREF(__pyx_t_1);
17116  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
17117  __Pyx_GIVEREF(__pyx_t_2);
17118  __pyx_t_2 = 0;
17119  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17120  __Pyx_GOTREF(__pyx_t_2);
17121  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17122  __pyx_r = __pyx_t_2;
17123  __pyx_t_2 = 0;
17124  goto __pyx_L0;
17125 
17126  /* "PyClical.pyx":1887
17127  * """
17128  *
17129  * def e(obj): # <<<<<<<<<<<<<<
17130  * """
17131  * Abbreviation for clifford(index_set(obj)).
17132  */
17133 
17134  /* function exit code */
17135  __pyx_L1_error:;
17136  __Pyx_XDECREF(__pyx_t_1);
17137  __Pyx_XDECREF(__pyx_t_2);
17138  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17139  __pyx_r = NULL;
17140  __pyx_L0:;
17141  __Pyx_XGIVEREF(__pyx_r);
17142  __Pyx_RefNannyFinishContext();
17143  return __pyx_r;
17144  }
17145 
17146  /* "PyClical.pyx":1900
17147  * return clifford(index_set(obj))
17148  *
17149  * def istpq(p, q): # <<<<<<<<<<<<<<
17150  * """
17151  * Abbreviation for index_set({-q,...p}).
17152  */
17153 
17154  /* Python wrapper */
17155  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17156  static char __pyx_doc_8PyClical_84istpq[] = "\n Abbreviation for index_set({-q,...p}).\n\n >>> print istpq(2,3)\n {-3,-2,-1,1,2}\n ";
17157  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17158  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17159  PyObject *__pyx_v_p = 0;
17160  PyObject *__pyx_v_q = 0;
17161  int __pyx_lineno = 0;
17162  const char *__pyx_filename = NULL;
17163  int __pyx_clineno = 0;
17164  PyObject *__pyx_r = 0;
17165  __Pyx_RefNannyDeclarations
17166  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
17167  {
17168  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17169  PyObject* values[2] = {0,0};
17170  if (unlikely(__pyx_kwds)) {
17171  Py_ssize_t kw_args;
17172  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17173  switch (pos_args) {
17174  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17175  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17176  case 0: break;
17177  default: goto __pyx_L5_argtuple_error;
17178  }
17179  kw_args = PyDict_Size(__pyx_kwds);
17180  switch (pos_args) {
17181  case 0:
17182  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17183  else goto __pyx_L5_argtuple_error;
17184  case 1:
17185  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17186  else {
17187  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
17188  }
17189  }
17190  if (unlikely(kw_args > 0)) {
17191  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
17192  }
17193  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17194  goto __pyx_L5_argtuple_error;
17195  } else {
17196  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17197  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17198  }
17199  __pyx_v_p = values[0];
17200  __pyx_v_q = values[1];
17201  }
17202  goto __pyx_L4_argument_unpacking_done;
17203  __pyx_L5_argtuple_error:;
17204  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
17205  __pyx_L3_error:;
17206  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17207  __Pyx_RefNannyFinishContext();
17208  return NULL;
17209  __pyx_L4_argument_unpacking_done:;
17210  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17211 
17212  /* function exit code */
17213  __Pyx_RefNannyFinishContext();
17214  return __pyx_r;
17215  }
17216 
17217  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17218  PyObject *__pyx_r = NULL;
17219  __Pyx_RefNannyDeclarations
17220  PyObject *__pyx_t_1 = NULL;
17221  PyObject *__pyx_t_2 = NULL;
17222  PyObject *__pyx_t_3 = NULL;
17223  int __pyx_lineno = 0;
17224  const char *__pyx_filename = NULL;
17225  int __pyx_clineno = 0;
17226  __Pyx_RefNannySetupContext("istpq", 0);
17227 
17228  /* "PyClical.pyx":1907
17229  * {-3,-2,-1,1,2}
17230  * """
17231  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
17232  *
17233  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17234  */
17235  __Pyx_XDECREF(__pyx_r);
17236  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17237  __Pyx_GOTREF(__pyx_t_1);
17238  __pyx_t_2 = PyNumber_Add(__pyx_v_p, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17239  __Pyx_GOTREF(__pyx_t_2);
17240  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17241  __Pyx_GOTREF(__pyx_t_3);
17242  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17243  __Pyx_GIVEREF(__pyx_t_1);
17244  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17245  __Pyx_GIVEREF(__pyx_t_2);
17246  __pyx_t_1 = 0;
17247  __pyx_t_2 = 0;
17248  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17249  __Pyx_GOTREF(__pyx_t_2);
17250  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17251  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17252  __Pyx_GOTREF(__pyx_t_3);
17253  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17254  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17255  __Pyx_GOTREF(__pyx_t_2);
17256  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
17257  __Pyx_GIVEREF(__pyx_t_3);
17258  __pyx_t_3 = 0;
17259  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17260  __Pyx_GOTREF(__pyx_t_3);
17261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17262  __pyx_r = __pyx_t_3;
17263  __pyx_t_3 = 0;
17264  goto __pyx_L0;
17265 
17266  /* "PyClical.pyx":1900
17267  * return clifford(index_set(obj))
17268  *
17269  * def istpq(p, q): # <<<<<<<<<<<<<<
17270  * """
17271  * Abbreviation for index_set({-q,...p}).
17272  */
17273 
17274  /* function exit code */
17275  __pyx_L1_error:;
17276  __Pyx_XDECREF(__pyx_t_1);
17277  __Pyx_XDECREF(__pyx_t_2);
17278  __Pyx_XDECREF(__pyx_t_3);
17279  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17280  __pyx_r = NULL;
17281  __pyx_L0:;
17282  __Pyx_XGIVEREF(__pyx_r);
17283  __Pyx_RefNannyFinishContext();
17284  return __pyx_r;
17285  }
17286 
17287  /* "PyClical.pyx":1913
17288  *
17289  * # Doctest interface.
17290  * def _test(): # <<<<<<<<<<<<<<
17291  * import PyClical, doctest
17292  * return doctest.testmod(PyClical)
17293  */
17294 
17295  /* Python wrapper */
17296  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
17297  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
17298  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
17299  PyObject *__pyx_r = 0;
17300  __Pyx_RefNannyDeclarations
17301  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
17302  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
17303 
17304  /* function exit code */
17305  __Pyx_RefNannyFinishContext();
17306  return __pyx_r;
17307  }
17308 
17309  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
17310  PyObject *__pyx_v_PyClical = NULL;
17311  PyObject *__pyx_v_doctest = NULL;
17312  PyObject *__pyx_r = NULL;
17313  __Pyx_RefNannyDeclarations
17314  PyObject *__pyx_t_1 = NULL;
17315  PyObject *__pyx_t_2 = NULL;
17316  PyObject *__pyx_t_3 = NULL;
17317  PyObject *__pyx_t_4 = NULL;
17318  int __pyx_lineno = 0;
17319  const char *__pyx_filename = NULL;
17320  int __pyx_clineno = 0;
17321  __Pyx_RefNannySetupContext("_test", 0);
17322 
17323  /* "PyClical.pyx":1914
17324  * # Doctest interface.
17325  * def _test():
17326  * import PyClical, doctest # <<<<<<<<<<<<<<
17327  * return doctest.testmod(PyClical)
17328  *
17329  */
17330  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17331  __Pyx_GOTREF(__pyx_t_1);
17332  __pyx_v_PyClical = __pyx_t_1;
17333  __pyx_t_1 = 0;
17334  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17335  __Pyx_GOTREF(__pyx_t_1);
17336  __pyx_v_doctest = __pyx_t_1;
17337  __pyx_t_1 = 0;
17338 
17339  /* "PyClical.pyx":1915
17340  * def _test():
17341  * import PyClical, doctest
17342  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
17343  *
17344  * if __name__ == "__main__":
17345  */
17346  __Pyx_XDECREF(__pyx_r);
17347  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s_testmod); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17348  __Pyx_GOTREF(__pyx_t_2);
17349  __pyx_t_3 = NULL;
17350  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
17351  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
17352  if (likely(__pyx_t_3)) {
17353  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17354  __Pyx_INCREF(__pyx_t_3);
17355  __Pyx_INCREF(function);
17356  __Pyx_DECREF_SET(__pyx_t_2, function);
17357  }
17358  }
17359  if (!__pyx_t_3) {
17360  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17361  __Pyx_GOTREF(__pyx_t_1);
17362  } else {
17363  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17364  __Pyx_GOTREF(__pyx_t_4);
17365  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
17366  __Pyx_INCREF(__pyx_v_PyClical);
17367  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
17368  __Pyx_GIVEREF(__pyx_v_PyClical);
17369  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17370  __Pyx_GOTREF(__pyx_t_1);
17371  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17372  }
17373  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17374  __pyx_r = __pyx_t_1;
17375  __pyx_t_1 = 0;
17376  goto __pyx_L0;
17377 
17378  /* "PyClical.pyx":1913
17379  *
17380  * # Doctest interface.
17381  * def _test(): # <<<<<<<<<<<<<<
17382  * import PyClical, doctest
17383  * return doctest.testmod(PyClical)
17384  */
17385 
17386  /* function exit code */
17387  __pyx_L1_error:;
17388  __Pyx_XDECREF(__pyx_t_1);
17389  __Pyx_XDECREF(__pyx_t_2);
17390  __Pyx_XDECREF(__pyx_t_3);
17391  __Pyx_XDECREF(__pyx_t_4);
17392  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
17393  __pyx_r = NULL;
17394  __pyx_L0:;
17395  __Pyx_XDECREF(__pyx_v_PyClical);
17396  __Pyx_XDECREF(__pyx_v_doctest);
17397  __Pyx_XGIVEREF(__pyx_r);
17398  __Pyx_RefNannyFinishContext();
17399  return __pyx_r;
17400  }
17401  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
17402 
17403  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
17404  struct __pyx_obj_8PyClical_index_set *p;
17405  PyObject *o;
17406  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
17407  o = (*t->tp_alloc)(t, 0);
17408  } else {
17409  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
17410  }
17411  if (unlikely(!o)) return 0;
17412  p = ((struct __pyx_obj_8PyClical_index_set *)o);
17413  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
17414  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) {
17415  Py_DECREF(o); o = 0;
17416  }
17417  return o;
17418  }
17419 
17420  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
17421  #if PY_VERSION_HEX >= 0x030400a1
17422  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
17423  if (PyObject_CallFinalizerFromDealloc(o)) return;
17424  }
17425  #endif
17426  {
17427  PyObject *etype, *eval, *etb;
17428  PyErr_Fetch(&etype, &eval, &etb);
17429  ++Py_REFCNT(o);
17430  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
17431  --Py_REFCNT(o);
17432  PyErr_Restore(etype, eval, etb);
17433  }
17434  (*Py_TYPE(o)->tp_free)(o);
17435  }
17436  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
17437  PyObject *r;
17438  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
17439  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
17440  Py_DECREF(x);
17441  return r;
17442  }
17443 
17444  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
17445  if (v) {
17446  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
17447  }
17448  else {
17449  PyErr_Format(PyExc_NotImplementedError,
17450  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
17451  return -1;
17452  }
17453  }
17454 
17455  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
17456  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
17457  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
17458  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
17459  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
17460  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
17461  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
17462  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
17463  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
17464  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
17465  {0, 0, 0, 0}
17466  };
17467 
17468  static PyNumberMethods __pyx_tp_as_number_index_set = {
17469  0, /*nb_add*/
17470  0, /*nb_subtract*/
17471  0, /*nb_multiply*/
17472  #if PY_MAJOR_VERSION < 3
17473  0, /*nb_divide*/
17474  #endif
17475  0, /*nb_remainder*/
17476  0, /*nb_divmod*/
17477  0, /*nb_power*/
17478  0, /*nb_negative*/
17479  0, /*nb_positive*/
17480  0, /*nb_absolute*/
17481  0, /*nb_nonzero*/
17482  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
17483  0, /*nb_lshift*/
17484  0, /*nb_rshift*/
17485  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
17486  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
17487  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
17488  #if PY_MAJOR_VERSION < 3
17489  0, /*nb_coerce*/
17490  #endif
17491  0, /*nb_int*/
17492  #if PY_MAJOR_VERSION < 3
17493  0, /*nb_long*/
17494  #else
17495  0, /*reserved*/
17496  #endif
17497  0, /*nb_float*/
17498  #if PY_MAJOR_VERSION < 3
17499  0, /*nb_oct*/
17500  #endif
17501  #if PY_MAJOR_VERSION < 3
17502  0, /*nb_hex*/
17503  #endif
17504  0, /*nb_inplace_add*/
17505  0, /*nb_inplace_subtract*/
17506  0, /*nb_inplace_multiply*/
17507  #if PY_MAJOR_VERSION < 3
17508  0, /*nb_inplace_divide*/
17509  #endif
17510  0, /*nb_inplace_remainder*/
17511  0, /*nb_inplace_power*/
17512  0, /*nb_inplace_lshift*/
17513  0, /*nb_inplace_rshift*/
17514  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
17515  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
17516  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
17517  0, /*nb_floor_divide*/
17518  0, /*nb_true_divide*/
17519  0, /*nb_inplace_floor_divide*/
17520  0, /*nb_inplace_true_divide*/
17521  0, /*nb_index*/
17522  #if PY_VERSION_HEX >= 0x03050000
17523  0, /*nb_matrix_multiply*/
17524  #endif
17525  #if PY_VERSION_HEX >= 0x03050000
17526  0, /*nb_inplace_matrix_multiply*/
17527  #endif
17528  };
17529 
17530  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
17531  0, /*sq_length*/
17532  0, /*sq_concat*/
17533  0, /*sq_repeat*/
17534  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
17535  0, /*sq_slice*/
17536  0, /*sq_ass_item*/
17537  0, /*sq_ass_slice*/
17538  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
17539  0, /*sq_inplace_concat*/
17540  0, /*sq_inplace_repeat*/
17541  };
17542 
17543  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
17544  0, /*mp_length*/
17545  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
17546  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
17547  };
17548 
17549  static PyTypeObject __pyx_type_8PyClical_index_set = {
17550  PyVarObject_HEAD_INIT(0, 0)
17551  "PyClical.index_set", /*tp_name*/
17552  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
17553  0, /*tp_itemsize*/
17554  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
17555  0, /*tp_print*/
17556  0, /*tp_getattr*/
17557  0, /*tp_setattr*/
17558  #if PY_MAJOR_VERSION < 3
17559  0, /*tp_compare*/
17560  #else
17561  0, /*reserved*/
17562  #endif
17563  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
17564  &__pyx_tp_as_number_index_set, /*tp_as_number*/
17565  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
17566  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
17567  0, /*tp_hash*/
17568  0, /*tp_call*/
17569  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
17570  0, /*tp_getattro*/
17571  0, /*tp_setattro*/
17572  0, /*tp_as_buffer*/
17573  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
17574  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
17575  0, /*tp_traverse*/
17576  0, /*tp_clear*/
17577  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
17578  0, /*tp_weaklistoffset*/
17579  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
17580  0, /*tp_iternext*/
17581  __pyx_methods_8PyClical_index_set, /*tp_methods*/
17582  0, /*tp_members*/
17583  0, /*tp_getset*/
17584  0, /*tp_base*/
17585  0, /*tp_dict*/
17586  0, /*tp_descr_get*/
17587  0, /*tp_descr_set*/
17588  0, /*tp_dictoffset*/
17589  0, /*tp_init*/
17590  0, /*tp_alloc*/
17591  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
17592  0, /*tp_free*/
17593  0, /*tp_is_gc*/
17594  0, /*tp_bases*/
17595  0, /*tp_mro*/
17596  0, /*tp_cache*/
17597  0, /*tp_subclasses*/
17598  0, /*tp_weaklist*/
17599  0, /*tp_del*/
17600  0, /*tp_version_tag*/
17601  #if PY_VERSION_HEX >= 0x030400a1
17602  0, /*tp_finalize*/
17603  #endif
17604  };
17605  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
17606 
17607  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
17608  struct __pyx_obj_8PyClical_clifford *p;
17609  PyObject *o;
17610  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
17611  o = (*t->tp_alloc)(t, 0);
17612  } else {
17613  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
17614  }
17615  if (unlikely(!o)) return 0;
17616  p = ((struct __pyx_obj_8PyClical_clifford *)o);
17617  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
17618  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) {
17619  Py_DECREF(o); o = 0;
17620  }
17621  return o;
17622  }
17623 
17624  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
17625  #if PY_VERSION_HEX >= 0x030400a1
17626  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
17627  if (PyObject_CallFinalizerFromDealloc(o)) return;
17628  }
17629  #endif
17630  {
17631  PyObject *etype, *eval, *etb;
17632  PyErr_Fetch(&etype, &eval, &etb);
17633  ++Py_REFCNT(o);
17634  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
17635  --Py_REFCNT(o);
17636  PyErr_Restore(etype, eval, etb);
17637  }
17638  (*Py_TYPE(o)->tp_free)(o);
17639  }
17640  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
17641  PyObject *r;
17642  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
17643  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
17644  Py_DECREF(x);
17645  return r;
17646  }
17647 
17648  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
17649  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
17650  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
17651  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
17652  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
17653  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
17654  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
17655  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
17656  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
17657  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
17658  {"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
17659  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
17660  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
17661  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
17662  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
17663  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
17664  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
17665  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
17666  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
17667  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
17668  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
17669  {0, 0, 0, 0}
17670  };
17671 
17672  static PyNumberMethods __pyx_tp_as_number_clifford = {
17673  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
17674  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
17675  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
17676  #if PY_MAJOR_VERSION < 3
17677  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
17678  #endif
17679  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
17680  0, /*nb_divmod*/
17681  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
17682  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
17683  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
17684  0, /*nb_absolute*/
17685  0, /*nb_nonzero*/
17686  0, /*nb_invert*/
17687  0, /*nb_lshift*/
17688  0, /*nb_rshift*/
17689  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
17690  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
17691  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
17692  #if PY_MAJOR_VERSION < 3
17693  0, /*nb_coerce*/
17694  #endif
17695  0, /*nb_int*/
17696  #if PY_MAJOR_VERSION < 3
17697  0, /*nb_long*/
17698  #else
17699  0, /*reserved*/
17700  #endif
17701  0, /*nb_float*/
17702  #if PY_MAJOR_VERSION < 3
17703  0, /*nb_oct*/
17704  #endif
17705  #if PY_MAJOR_VERSION < 3
17706  0, /*nb_hex*/
17707  #endif
17708  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
17709  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
17710  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
17711  #if PY_MAJOR_VERSION < 3
17712  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
17713  #endif
17714  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
17715  0, /*nb_inplace_power*/
17716  0, /*nb_inplace_lshift*/
17717  0, /*nb_inplace_rshift*/
17718  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
17719  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
17720  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
17721  0, /*nb_floor_divide*/
17722  0, /*nb_true_divide*/
17723  0, /*nb_inplace_floor_divide*/
17724  0, /*nb_inplace_true_divide*/
17725  0, /*nb_index*/
17726  #if PY_VERSION_HEX >= 0x03050000
17727  0, /*nb_matrix_multiply*/
17728  #endif
17729  #if PY_VERSION_HEX >= 0x03050000
17730  0, /*nb_inplace_matrix_multiply*/
17731  #endif
17732  };
17733 
17734  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
17735  0, /*sq_length*/
17736  0, /*sq_concat*/
17737  0, /*sq_repeat*/
17738  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
17739  0, /*sq_slice*/
17740  0, /*sq_ass_item*/
17741  0, /*sq_ass_slice*/
17742  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
17743  0, /*sq_inplace_concat*/
17744  0, /*sq_inplace_repeat*/
17745  };
17746 
17747  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
17748  0, /*mp_length*/
17749  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
17750  0, /*mp_ass_subscript*/
17751  };
17752 
17753  static PyTypeObject __pyx_type_8PyClical_clifford = {
17754  PyVarObject_HEAD_INIT(0, 0)
17755  "PyClical.clifford", /*tp_name*/
17756  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
17757  0, /*tp_itemsize*/
17758  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
17759  0, /*tp_print*/
17760  0, /*tp_getattr*/
17761  0, /*tp_setattr*/
17762  #if PY_MAJOR_VERSION < 3
17763  0, /*tp_compare*/
17764  #else
17765  0, /*reserved*/
17766  #endif
17767  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
17768  &__pyx_tp_as_number_clifford, /*tp_as_number*/
17769  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
17770  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
17771  0, /*tp_hash*/
17772  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
17773  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
17774  0, /*tp_getattro*/
17775  0, /*tp_setattro*/
17776  0, /*tp_as_buffer*/
17777  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
17778  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
17779  0, /*tp_traverse*/
17780  0, /*tp_clear*/
17781  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
17782  0, /*tp_weaklistoffset*/
17783  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
17784  0, /*tp_iternext*/
17785  __pyx_methods_8PyClical_clifford, /*tp_methods*/
17786  0, /*tp_members*/
17787  0, /*tp_getset*/
17788  0, /*tp_base*/
17789  0, /*tp_dict*/
17790  0, /*tp_descr_get*/
17791  0, /*tp_descr_set*/
17792  0, /*tp_dictoffset*/
17793  0, /*tp_init*/
17794  0, /*tp_alloc*/
17795  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
17796  0, /*tp_free*/
17797  0, /*tp_is_gc*/
17798  0, /*tp_bases*/
17799  0, /*tp_mro*/
17800  0, /*tp_cache*/
17801  0, /*tp_subclasses*/
17802  0, /*tp_weaklist*/
17803  0, /*tp_del*/
17804  0, /*tp_version_tag*/
17805  #if PY_VERSION_HEX >= 0x030400a1
17806  0, /*tp_finalize*/
17807  #endif
17808  };
17809 
17810  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
17811  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
17812 
17813  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
17814  PyObject *o;
17815  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__)))) {
17816  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
17817  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
17818  (void) PyObject_INIT(o, t);
17819  PyObject_GC_Track(o);
17820  } else {
17821  o = (*t->tp_alloc)(t, 0);
17822  if (unlikely(!o)) return 0;
17823  }
17824  return o;
17825  }
17826 
17827  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
17828  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
17829  PyObject_GC_UnTrack(o);
17830  Py_CLEAR(p->__pyx_v_idx);
17831  Py_CLEAR(p->__pyx_v_self);
17832  Py_CLEAR(p->__pyx_t_0);
17833  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__)))) {
17834  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
17835  } else {
17836  (*Py_TYPE(o)->tp_free)(o);
17837  }
17838  }
17839 
17840  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
17841  int e;
17842  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
17843  if (p->__pyx_v_idx) {
17844  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
17845  }
17846  if (p->__pyx_v_self) {
17847  e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
17848  }
17849  if (p->__pyx_t_0) {
17850  e = (*v)(p->__pyx_t_0, a); if (e) return e;
17851  }
17852  return 0;
17853  }
17854 
17855  static int __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
17856  PyObject* tmp;
17857  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
17858  tmp = ((PyObject*)p->__pyx_v_idx);
17859  p->__pyx_v_idx = Py_None; Py_INCREF(Py_None);
17860  Py_XDECREF(tmp);
17861  tmp = ((PyObject*)p->__pyx_v_self);
17862  p->__pyx_v_self = ((struct __pyx_obj_8PyClical_index_set *)Py_None); Py_INCREF(Py_None);
17863  Py_XDECREF(tmp);
17864  tmp = ((PyObject*)p->__pyx_t_0);
17865  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
17866  Py_XDECREF(tmp);
17867  return 0;
17868  }
17869 
17870  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
17871  PyVarObject_HEAD_INIT(0, 0)
17872  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
17873  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
17874  0, /*tp_itemsize*/
17875  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
17876  0, /*tp_print*/
17877  0, /*tp_getattr*/
17878  0, /*tp_setattr*/
17879  #if PY_MAJOR_VERSION < 3
17880  0, /*tp_compare*/
17881  #else
17882  0, /*reserved*/
17883  #endif
17884  0, /*tp_repr*/
17885  0, /*tp_as_number*/
17886  0, /*tp_as_sequence*/
17887  0, /*tp_as_mapping*/
17888  0, /*tp_hash*/
17889  0, /*tp_call*/
17890  0, /*tp_str*/
17891  0, /*tp_getattro*/
17892  0, /*tp_setattro*/
17893  0, /*tp_as_buffer*/
17894  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
17895  0, /*tp_doc*/
17896  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
17897  __pyx_tp_clear_8PyClical___pyx_scope_struct____iter__, /*tp_clear*/
17898  0, /*tp_richcompare*/
17899  0, /*tp_weaklistoffset*/
17900  0, /*tp_iter*/
17901  0, /*tp_iternext*/
17902  0, /*tp_methods*/
17903  0, /*tp_members*/
17904  0, /*tp_getset*/
17905  0, /*tp_base*/
17906  0, /*tp_dict*/
17907  0, /*tp_descr_get*/
17908  0, /*tp_descr_set*/
17909  0, /*tp_dictoffset*/
17910  0, /*tp_init*/
17911  0, /*tp_alloc*/
17912  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
17913  0, /*tp_free*/
17914  0, /*tp_is_gc*/
17915  0, /*tp_bases*/
17916  0, /*tp_mro*/
17917  0, /*tp_cache*/
17918  0, /*tp_subclasses*/
17919  0, /*tp_weaklist*/
17920  0, /*tp_del*/
17921  0, /*tp_version_tag*/
17922  #if PY_VERSION_HEX >= 0x030400a1
17923  0, /*tp_finalize*/
17924  #endif
17925  };
17926 
17927  static PyMethodDef __pyx_methods[] = {
17928  {"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
17929  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
17930  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
17931  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
17932  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
17933  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
17934  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
17935  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
17936  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
17937  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
17938  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
17939  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
17940  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
17941  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
17942  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
17943  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
17944  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
17945  {"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
17946  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
17947  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
17948  {"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
17949  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
17950  {"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
17951  {"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
17952  {"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
17953  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
17954  {"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
17955  {"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
17956  {"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
17957  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
17958  {"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
17959  {"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
17960  {"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
17961  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
17962  {"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
17963  {"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
17964  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
17965  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
17966  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
17967  {0, 0, 0, 0}
17968  };
17969 
17970  #if PY_MAJOR_VERSION >= 3
17971  static struct PyModuleDef __pyx_moduledef = {
17972  #if PY_VERSION_HEX < 0x03020000
17973  { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
17974  #else
17975  PyModuleDef_HEAD_INIT,
17976  #endif
17977  "PyClical",
17978  0, /* m_doc */
17979  -1, /* m_size */
17980  __pyx_methods /* m_methods */,
17981  NULL, /* m_reload */
17982  NULL, /* m_traverse */
17983  NULL, /* m_clear */
17984  NULL /* m_free */
17985  };
17986  #endif
17987 
17988 static __Pyx_StringTabEntry __pyx_string_tab[] = {
17989  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
17990  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
17991  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
17992  {&__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},
17993  {&__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},
17994  {&__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},
17995  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
17996  {&__pyx_kp_s_Cannot_initialize_index_set_obje, __pyx_k_Cannot_initialize_index_set_obje, sizeof(__pyx_k_Cannot_initialize_index_set_obje), 0, 0, 1, 0},
17997  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
17998  {&__pyx_kp_s_Cannot_take_vector_part_of, __pyx_k_Cannot_take_vector_part_of, sizeof(__pyx_k_Cannot_take_vector_part_of), 0, 0, 1, 0},
17999  {&__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},
18000  {&__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},
18001  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18002  {&__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},
18003  {&__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},
18004  {&__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},
18005  {&__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},
18006  {&__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},
18007  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18008  {&__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},
18009  {&__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},
18010  {&__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},
18011  {&__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},
18012  {&__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},
18013  {&__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},
18014  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18015  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18016  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18017  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18018  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18019  {&__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},
18020  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18021  {&__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},
18022  {&__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},
18023  {&__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},
18024  {&__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},
18025  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18026  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18027  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18028  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18029  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18030  {&__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},
18031  {&__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},
18032  {&__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},
18033  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18034  {&__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},
18035  {&__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},
18036  {&__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},
18037  {&__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},
18038  {&__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},
18039  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18040  {&__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},
18041  {&__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},
18042  {&__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},
18043  {&__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},
18044  {&__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},
18045  {&__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},
18046  {&__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},
18047  {&__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},
18048  {&__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},
18049  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18050  {&__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},
18051  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18052  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18053  {&__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},
18054  {&__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},
18055  {&__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},
18056  {&__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},
18057  {&__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},
18058  {&__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},
18059  {&__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},
18060  {&__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},
18061  {&__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},
18062  {&__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},
18063  {&__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},
18064  {&__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},
18065  {&__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},
18066  {&__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},
18067  {&__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},
18068  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18069  {&__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},
18070  {&__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},
18071  {&__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},
18072  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
18073  {&__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},
18074  {&__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},
18075  {&__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},
18076  {&__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},
18077  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18078  {&__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},
18079  {&__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},
18080  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18081  {&__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},
18082  {&__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},
18083  {&__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},
18084  {&__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},
18085  {&__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},
18086  {&__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},
18087  {&__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},
18088  {&__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},
18089  {&__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},
18090  {&__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},
18091  {&__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},
18092  {&__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},
18093  {&__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},
18094  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18095  {&__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},
18096  {&__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},
18097  {&__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},
18098  {&__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},
18099  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18100  {&__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},
18101  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18102  {&__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},
18103  {&__pyx_kp_s_This_comparison_operator_is_not, __pyx_k_This_comparison_operator_is_not, sizeof(__pyx_k_This_comparison_operator_is_not), 0, 0, 1, 0},
18104  {&__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},
18105  {&__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},
18106  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18107  {&__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},
18108  {&__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},
18109  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18110  {&__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},
18111  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
18112  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
18113  {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
18114  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
18115  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
18116  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18117  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18118  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
18119  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18120  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18121  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18122  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18123  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18124  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18125  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
18126  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18127  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18128  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18129  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
18130  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18131  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18132  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18133  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18134  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18135  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
18136  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18137  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18138  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18139  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18140  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18141  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18142  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18143  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18144  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18145  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18146  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18147  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18148  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18149  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18150  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18151  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18152  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18153  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18154  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18155  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18156  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18157  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18158  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18159  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18160  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18161  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18162  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18163  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18164  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18165  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18166  {&__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},
18167  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18168  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18169  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18170  {&__pyx_kp_u_clifford_max_abs_line_1183, __pyx_k_clifford_max_abs_line_1183, sizeof(__pyx_k_clifford_max_abs_line_1183), 0, 1, 0, 0},
18171  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18172  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18173  {&__pyx_kp_u_clifford_outer_pow_line_1003, __pyx_k_clifford_outer_pow_line_1003, sizeof(__pyx_k_clifford_outer_pow_line_1003), 0, 1, 0, 0},
18174  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18175  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18176  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18177  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18178  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18179  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18180  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18181  {&__pyx_kp_u_clifford_vector_part_line_1078, __pyx_k_clifford_vector_part_line_1078, sizeof(__pyx_k_clifford_vector_part_line_1078), 0, 1, 0, 0},
18182  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18183  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18184  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18185  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18186  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
18187  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18188  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
18189  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
18190  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18191  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18192  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18193  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18194  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
18195  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18196  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
18197  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18198  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
18199  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18200  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
18201  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
18202  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
18203  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
18204  {&__pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc, __pyx_k_home_abuild_rpmbuild_BUILD_gluc, sizeof(__pyx_k_home_abuild_rpmbuild_BUILD_gluc), 0, 0, 1, 0},
18205  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
18206  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18207  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18208  {&__pyx_kp_u_index_set___and___line_269, __pyx_k_index_set___and___line_269, sizeof(__pyx_k_index_set___and___line_269), 0, 1, 0, 0},
18209  {&__pyx_kp_u_index_set___getitem___line_189, __pyx_k_index_set___getitem___line_189, sizeof(__pyx_k_index_set___getitem___line_189), 0, 1, 0, 0},
18210  {&__pyx_kp_u_index_set___iand___line_280, __pyx_k_index_set___iand___line_280, sizeof(__pyx_k_index_set___iand___line_280), 0, 1, 0, 0},
18211  {&__pyx_kp_u_index_set___invert___line_238, __pyx_k_index_set___invert___line_238, sizeof(__pyx_k_index_set___invert___line_238), 0, 1, 0, 0},
18212  {&__pyx_kp_u_index_set___ior___line_302, __pyx_k_index_set___ior___line_302, sizeof(__pyx_k_index_set___ior___line_302), 0, 1, 0, 0},
18213  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18214  {&__pyx_kp_u_index_set___iter___line_227, __pyx_k_index_set___iter___line_227, sizeof(__pyx_k_index_set___iter___line_227), 0, 1, 0, 0},
18215  {&__pyx_kp_u_index_set___ixor___line_258, __pyx_k_index_set___ixor___line_258, sizeof(__pyx_k_index_set___ixor___line_258), 0, 1, 0, 0},
18216  {&__pyx_kp_u_index_set___or___line_291, __pyx_k_index_set___or___line_291, sizeof(__pyx_k_index_set___or___line_291), 0, 1, 0, 0},
18217  {&__pyx_kp_u_index_set___repr___line_382, __pyx_k_index_set___repr___line_382, sizeof(__pyx_k_index_set___repr___line_382), 0, 1, 0, 0},
18218  {&__pyx_kp_u_index_set___setitem___line_177, __pyx_k_index_set___setitem___line_177, sizeof(__pyx_k_index_set___setitem___line_177), 0, 1, 0, 0},
18219  {&__pyx_kp_u_index_set___str___line_393, __pyx_k_index_set___str___line_393, sizeof(__pyx_k_index_set___str___line_393), 0, 1, 0, 0},
18220  {&__pyx_kp_u_index_set___xor___line_247, __pyx_k_index_set___xor___line_247, sizeof(__pyx_k_index_set___xor___line_247), 0, 1, 0, 0},
18221  {&__pyx_kp_u_index_set_copy_line_64, __pyx_k_index_set_copy_line_64, sizeof(__pyx_k_index_set_copy_line_64), 0, 1, 0, 0},
18222  {&__pyx_kp_u_index_set_count_line_313, __pyx_k_index_set_count_line_313, sizeof(__pyx_k_index_set_count_line_313), 0, 1, 0, 0},
18223  {&__pyx_kp_u_index_set_count_neg_line_322, __pyx_k_index_set_count_neg_line_322, sizeof(__pyx_k_index_set_count_neg_line_322), 0, 1, 0, 0},
18224  {&__pyx_kp_u_index_set_count_pos_line_331, __pyx_k_index_set_count_pos_line_331, sizeof(__pyx_k_index_set_count_pos_line_331), 0, 1, 0, 0},
18225  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18226  {&__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},
18227  {&__pyx_kp_u_index_set_max_line_349, __pyx_k_index_set_max_line_349, sizeof(__pyx_k_index_set_max_line_349), 0, 1, 0, 0},
18228  {&__pyx_kp_u_index_set_min_line_340, __pyx_k_index_set_min_line_340, sizeof(__pyx_k_index_set_min_line_340), 0, 1, 0, 0},
18229  {&__pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_k_index_set_sign_of_mult_line_364, sizeof(__pyx_k_index_set_sign_of_mult_line_364), 0, 1, 0, 0},
18230  {&__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},
18231  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
18232  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
18233  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
18234  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
18235  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
18236  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
18237  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
18238  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
18239  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
18240  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
18241  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
18242  {&__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},
18243  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
18244  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
18245  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
18246  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
18247  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
18248  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
18249  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
18250  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
18251  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
18252  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
18253  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
18254  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
18255  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
18256  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
18257  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
18258  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
18259  {&__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},
18260  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
18261  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
18262  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
18263  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
18264  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
18265  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
18266  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
18267  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
18268  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
18269  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
18270  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
18271  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
18272  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
18273  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
18274  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
18275  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
18276  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
18277  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
18278  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
18279  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
18280  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
18281  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
18282  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
18283  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
18284  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
18285  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
18286  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
18287  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
18288  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
18289  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
18290  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
18291  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
18292  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
18293  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
18294  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
18295  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
18296  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
18297  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
18298  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
18299  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
18300  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
18301  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
18302  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
18303  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
18304  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
18305  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
18306  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
18307  {0, 0, 0, 0, 0, 0, 0}
18308 };
18309 static int __Pyx_InitCachedBuiltins(void) {
18310  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18311  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18312  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18313  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18314  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18315  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18316  #if PY_MAJOR_VERSION >= 3
18317  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18318  #else
18319  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18320  #endif
18321  return 0;
18322  __pyx_L1_error:;
18323  return -1;
18324 }
18325 
18326 static int __Pyx_InitCachedConstants(void) {
18327  __Pyx_RefNannyDeclarations
18328  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
18329 
18330  /* "PyClical.pyx":635
18331  * TypeError: Not applicable.
18332  * """
18333  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
18334  *
18335  * def __iter__(self):
18336  */
18337  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18338  __Pyx_GOTREF(__pyx_tuple__8);
18339  __Pyx_GIVEREF(__pyx_tuple__8);
18340 
18341  /* "PyClical.pyx":646
18342  * TypeError: Not applicable.
18343  * """
18344  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
18345  *
18346  * def reframe(self, ixt):
18347  */
18348  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18349  __Pyx_GOTREF(__pyx_tuple__9);
18350  __Pyx_GIVEREF(__pyx_tuple__9);
18351 
18352  /* "PyClical.pyx":404
18353  * return index_set_to_str( self.unwrap() ).c_str()
18354  *
18355  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
18356  * """
18357  * Tests for functions that Doctest cannot see.
18358  */
18359  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc, __pyx_n_s_index_set_hidden_doctests, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18360 
18361  /* "PyClical.pyx":1243
18362  * return clifford_to_str( self.unwrap() ).c_str()
18363  *
18364  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
18365  * """
18366  * Tests for functions that Doctest cannot see.
18367  */
18368  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc, __pyx_n_s_clifford_hidden_doctests, 1243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18369 
18370  /* "PyClical.pyx":1856
18371  *
18372  * # Some abbreviations.
18373  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
18374  * pi = tau / 2.0
18375  *
18376  */
18377  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18378  __Pyx_GOTREF(__pyx_tuple__12);
18379  __Pyx_GIVEREF(__pyx_tuple__12);
18380 
18381  /* "PyClical.pyx":1887
18382  * """
18383  *
18384  * def e(obj): # <<<<<<<<<<<<<<
18385  * """
18386  * Abbreviation for clifford(index_set(obj)).
18387  */
18388  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18389  __Pyx_GOTREF(__pyx_tuple__13);
18390  __Pyx_GIVEREF(__pyx_tuple__13);
18391  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc, __pyx_n_s_e, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18392 
18393  /* "PyClical.pyx":1900
18394  * return clifford(index_set(obj))
18395  *
18396  * def istpq(p, q): # <<<<<<<<<<<<<<
18397  * """
18398  * Abbreviation for index_set({-q,...p}).
18399  */
18400  __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18401  __Pyx_GOTREF(__pyx_tuple__15);
18402  __Pyx_GIVEREF(__pyx_tuple__15);
18403  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc, __pyx_n_s_istpq, 1900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18404 
18405  /* "PyClical.pyx":1909
18406  * return index_set(set(range(-q,p+1)))
18407  *
18408  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
18409  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
18410  *
18411  */
18412  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18413  __Pyx_GOTREF(__pyx_tuple__17);
18414  __Pyx_GIVEREF(__pyx_tuple__17);
18415  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18416  __Pyx_GOTREF(__pyx_tuple__18);
18417  __Pyx_GIVEREF(__pyx_tuple__18);
18418 
18419  /* "PyClical.pyx":1910
18420  *
18421  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18422  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
18423  *
18424  * # Doctest interface.
18425  */
18426  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18427  __Pyx_GOTREF(__pyx_tuple__19);
18428  __Pyx_GIVEREF(__pyx_tuple__19);
18429  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18430  __Pyx_GOTREF(__pyx_tuple__20);
18431  __Pyx_GIVEREF(__pyx_tuple__20);
18432 
18433  /* "PyClical.pyx":1913
18434  *
18435  * # Doctest interface.
18436  * def _test(): # <<<<<<<<<<<<<<
18437  * import PyClical, doctest
18438  * return doctest.testmod(PyClical)
18439  */
18440  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18441  __Pyx_GOTREF(__pyx_tuple__21);
18442  __Pyx_GIVEREF(__pyx_tuple__21);
18443  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_abuild_rpmbuild_BUILD_gluc, __pyx_n_s_test, 1913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18444  __Pyx_RefNannyFinishContext();
18445  return 0;
18446  __pyx_L1_error:;
18447  __Pyx_RefNannyFinishContext();
18448  return -1;
18449 }
18450 
18451 static int __Pyx_InitGlobals(void) {
18452  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
18453  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18454  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18455  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18456  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18457  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18458  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18459  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18460  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18461  return 0;
18462  __pyx_L1_error:;
18463  return -1;
18464 }
18465 
18466 #if PY_MAJOR_VERSION < 3
18467 PyMODINIT_FUNC initPyClical(void); /*proto*/
18468 PyMODINIT_FUNC initPyClical(void)
18469 #else
18470 PyMODINIT_FUNC PyInit_PyClical(void); /*proto*/
18471 PyMODINIT_FUNC PyInit_PyClical(void)
18472 #endif
18473 {
18474  PyObject *__pyx_t_1 = NULL;
18475  PyObject *__pyx_t_2 = NULL;
18476  PyObject *__pyx_t_3 = NULL;
18477  int __pyx_t_4;
18478  int __pyx_lineno = 0;
18479  const char *__pyx_filename = NULL;
18480  int __pyx_clineno = 0;
18481  __Pyx_RefNannyDeclarations
18482  #if CYTHON_REFNANNY
18483  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
18484  if (!__Pyx_RefNanny) {
18485  PyErr_Clear();
18486  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
18487  if (!__Pyx_RefNanny)
18488  Py_FatalError("failed to import 'refnanny' module");
18489  }
18490  #endif
18491  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_PyClical(void)", 0);
18492  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18493  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18494  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18495  #ifdef __Pyx_CyFunction_USED
18496  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18497  #endif
18498  #ifdef __Pyx_FusedFunction_USED
18499  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18500  #endif
18501  #ifdef __Pyx_Generator_USED
18502  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18503  #endif
18504  /*--- Library function declarations ---*/
18505  /*--- Threads initialization code ---*/
18506  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
18507  #ifdef WITH_THREAD /* Python build with threading support? */
18508  PyEval_InitThreads();
18509  #endif
18510  #endif
18511  /*--- Module creation code ---*/
18512  #if PY_MAJOR_VERSION < 3
18513  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
18514  #else
18515  __pyx_m = PyModule_Create(&__pyx_moduledef);
18516  #endif
18517  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18518  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18519  Py_INCREF(__pyx_d);
18520  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18521  #if CYTHON_COMPILING_IN_PYPY
18522  Py_INCREF(__pyx_b);
18523  #endif
18524  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
18525  /*--- Initialize various global constants etc. ---*/
18526  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18527  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
18528  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18529  #endif
18530  if (__pyx_module_is_main_PyClical) {
18531  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
18532  }
18533  #if PY_MAJOR_VERSION >= 3
18534  {
18535  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18536  if (!PyDict_GetItemString(modules, "PyClical")) {
18537  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18538  }
18539  }
18540  #endif
18541  /*--- Builtin init code ---*/
18542  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18543  /*--- Constants init code ---*/
18544  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18545  /*--- Global init code ---*/
18546  /*--- Variable export code ---*/
18547  /*--- Function export code ---*/
18548  /*--- Type init code ---*/
18549  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
18550  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
18551  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
18552  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
18553  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18554  __pyx_type_8PyClical_index_set.tp_print = 0;
18555  #if CYTHON_COMPILING_IN_CPYTHON
18556  {
18557  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18558  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18559  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18560  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
18561  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
18562  }
18563  }
18564  #endif
18565  #if CYTHON_COMPILING_IN_CPYTHON
18566  {
18567  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18568  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18569  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18570  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
18571  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
18572  }
18573  }
18574  #endif
18575  #if CYTHON_COMPILING_IN_CPYTHON
18576  {
18577  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18578  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18579  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18580  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
18581  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
18582  }
18583  }
18584  #endif
18585  #if CYTHON_COMPILING_IN_CPYTHON
18586  {
18587  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18588  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18589  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18590  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
18591  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
18592  }
18593  }
18594  #endif
18595  #if CYTHON_COMPILING_IN_CPYTHON
18596  {
18597  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18598  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18599  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18600  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
18601  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
18602  }
18603  }
18604  #endif
18605  #if CYTHON_COMPILING_IN_CPYTHON
18606  {
18607  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18608  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18609  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18610  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
18611  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
18612  }
18613  }
18614  #endif
18615  #if CYTHON_COMPILING_IN_CPYTHON
18616  {
18617  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18618  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18619  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18620  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
18621  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
18622  }
18623  }
18624  #endif
18625  #if CYTHON_COMPILING_IN_CPYTHON
18626  {
18627  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18628  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18629  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18630  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
18631  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
18632  }
18633  }
18634  #endif
18635  #if CYTHON_COMPILING_IN_CPYTHON
18636  {
18637  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18638  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18639  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18640  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
18641  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
18642  }
18643  }
18644  #endif
18645  #if CYTHON_COMPILING_IN_CPYTHON
18646  {
18647  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18648  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18649  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18650  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
18651  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
18652  }
18653  }
18654  #endif
18655  #if CYTHON_COMPILING_IN_CPYTHON
18656  {
18657  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18658  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18659  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18660  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
18661  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
18662  }
18663  }
18664  #endif
18665  #if CYTHON_COMPILING_IN_CPYTHON
18666  {
18667  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18668  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18669  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18670  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
18671  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
18672  }
18673  }
18674  #endif
18675  #if CYTHON_COMPILING_IN_CPYTHON
18676  {
18677  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18678  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18679  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18680  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
18681  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
18682  }
18683  }
18684  #endif
18685  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18686  if (PyObject_SetAttrString(__pyx_m, "index_set", (PyObject *)&__pyx_type_8PyClical_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18687  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
18688  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
18689  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
18690  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
18691  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
18692  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18693  __pyx_type_8PyClical_clifford.tp_print = 0;
18694  #if CYTHON_COMPILING_IN_CPYTHON
18695  {
18696  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18697  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18698  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18699  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
18700  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
18701  }
18702  }
18703  #endif
18704  #if CYTHON_COMPILING_IN_CPYTHON
18705  {
18706  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18707  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18708  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18709  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
18710  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
18711  }
18712  }
18713  #endif
18714  #if CYTHON_COMPILING_IN_CPYTHON
18715  {
18716  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18717  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18718  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18719  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
18720  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
18721  }
18722  }
18723  #endif
18724  #if CYTHON_COMPILING_IN_CPYTHON
18725  {
18726  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18727  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18728  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18729  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
18730  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
18731  }
18732  }
18733  #endif
18734  #if CYTHON_COMPILING_IN_CPYTHON
18735  {
18736  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18737  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18738  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18739  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
18740  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
18741  }
18742  }
18743  #endif
18744  #if CYTHON_COMPILING_IN_CPYTHON
18745  {
18746  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18747  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18748  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18749  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
18750  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
18751  }
18752  }
18753  #endif
18754  #if CYTHON_COMPILING_IN_CPYTHON
18755  {
18756  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18757  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18758  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18759  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
18760  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
18761  }
18762  }
18763  #endif
18764  #if CYTHON_COMPILING_IN_CPYTHON
18765  {
18766  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18767  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18768  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18769  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
18770  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
18771  }
18772  }
18773  #endif
18774  #if CYTHON_COMPILING_IN_CPYTHON
18775  {
18776  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18777  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18778  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18779  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
18780  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
18781  }
18782  }
18783  #endif
18784  #if CYTHON_COMPILING_IN_CPYTHON
18785  {
18786  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18787  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18788  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18789  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
18790  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
18791  }
18792  }
18793  #endif
18794  #if CYTHON_COMPILING_IN_CPYTHON
18795  {
18796  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18797  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18798  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18799  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
18800  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
18801  }
18802  }
18803  #endif
18804  #if CYTHON_COMPILING_IN_CPYTHON
18805  {
18806  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18807  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18808  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18809  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
18810  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
18811  }
18812  }
18813  #endif
18814  #if CYTHON_COMPILING_IN_CPYTHON
18815  {
18816  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18817  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18818  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18819  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
18820  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
18821  }
18822  }
18823  #endif
18824  #if CYTHON_COMPILING_IN_CPYTHON
18825  {
18826  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18827  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18828  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18829  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
18830  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
18831  }
18832  }
18833  #endif
18834  #if CYTHON_COMPILING_IN_CPYTHON
18835  {
18836  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18837  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18838  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18839  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
18840  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
18841  }
18842  }
18843  #endif
18844  #if CYTHON_COMPILING_IN_CPYTHON
18845  {
18846  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18847  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18848  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18849  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
18850  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
18851  }
18852  }
18853  #endif
18854  #if CYTHON_COMPILING_IN_CPYTHON
18855  {
18856  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18857  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18858  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18859  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
18860  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
18861  }
18862  }
18863  #endif
18864  #if PY_MAJOR_VERSION < 3
18865  #if CYTHON_COMPILING_IN_CPYTHON
18866  {
18867  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18868  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18869  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18870  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
18871  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
18872  }
18873  }
18874  #endif
18875  #endif
18876  #if PY_MAJOR_VERSION < 3
18877  #if CYTHON_COMPILING_IN_CPYTHON
18878  {
18879  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18880  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18881  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18882  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
18883  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
18884  }
18885  }
18886  #endif
18887  #endif
18888  #if CYTHON_COMPILING_IN_CPYTHON
18889  {
18890  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18891  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18892  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18893  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
18894  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
18895  }
18896  }
18897  #endif
18898  #if CYTHON_COMPILING_IN_CPYTHON
18899  {
18900  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18901  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18902  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18903  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
18904  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
18905  }
18906  }
18907  #endif
18908  #if CYTHON_COMPILING_IN_CPYTHON
18909  {
18910  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18911  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18912  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18913  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
18914  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
18915  }
18916  }
18917  #endif
18918  #if CYTHON_COMPILING_IN_CPYTHON
18919  {
18920  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18921  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18922  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18923  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
18924  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
18925  }
18926  }
18927  #endif
18928  #if CYTHON_COMPILING_IN_CPYTHON
18929  {
18930  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18931  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18932  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18933  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
18934  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
18935  }
18936  }
18937  #endif
18938  #if CYTHON_COMPILING_IN_CPYTHON
18939  {
18940  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18941  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
18942  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
18943  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
18944  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
18945  }
18946  }
18947  #endif
18948  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18949  if (PyObject_SetAttrString(__pyx_m, "clifford", (PyObject *)&__pyx_type_8PyClical_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18950  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
18951  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18952  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
18953  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
18954  /*--- Type import code ---*/
18955  /*--- Variable import code ---*/
18956  /*--- Function import code ---*/
18957  /*--- Execution code ---*/
18958 
18959  /* "PyClical.pyx":28
18960  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
18961  *
18962  * import math # <<<<<<<<<<<<<<
18963  * import numbers
18964  * import collections
18965  */
18966  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18967  __Pyx_GOTREF(__pyx_t_1);
18968  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18969  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18970 
18971  /* "PyClical.pyx":29
18972  *
18973  * import math
18974  * import numbers # <<<<<<<<<<<<<<
18975  * import collections
18976  *
18977  */
18978  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18979  __Pyx_GOTREF(__pyx_t_1);
18980  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18981  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18982 
18983  /* "PyClical.pyx":30
18984  * import math
18985  * import numbers
18986  * import collections # <<<<<<<<<<<<<<
18987  *
18988  * __version__ = "0.8.2"
18989  */
18990  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18991  __Pyx_GOTREF(__pyx_t_1);
18992  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18993  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18994 
18995  /* "PyClical.pyx":32
18996  * import collections
18997  *
18998  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
18999  *
19000  * from PyClical cimport *
19001  */
19002  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19003 
19004  /* "PyClical.pyx":404
19005  * return index_set_to_str( self.unwrap() ).c_str()
19006  *
19007  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19008  * """
19009  * Tests for functions that Doctest cannot see.
19010  */
19011  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_1index_set_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19012  __Pyx_GOTREF(__pyx_t_1);
19013  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19014  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19015 
19016  /* "PyClical.pyx":1243
19017  * return clifford_to_str( self.unwrap() ).c_str()
19018  *
19019  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19020  * """
19021  * Tests for functions that Doctest cannot see.
19022  */
19023  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_9clifford_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19024  __Pyx_GOTREF(__pyx_t_1);
19025  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19026  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19027 
19028  /* "PyClical.pyx":1856
19029  *
19030  * # Some abbreviations.
19031  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19032  * pi = tau / 2.0
19033  *
19034  */
19035  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford)), __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19036  __Pyx_GOTREF(__pyx_t_1);
19037  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19038  __Pyx_GOTREF(__pyx_t_2);
19039  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19040  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19041  __Pyx_GOTREF(__pyx_t_1);
19042  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19043  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19044  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19045 
19046  /* "PyClical.pyx":1857
19047  * # Some abbreviations.
19048  * tau = atan(clifford(1.0)) * 8.0
19049  * pi = tau / 2.0 # <<<<<<<<<<<<<<
19050  *
19051  * cl = clifford
19052  */
19053  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tau); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19054  __Pyx_GOTREF(__pyx_t_1);
19055  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_float_2_0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19056  __Pyx_GOTREF(__pyx_t_2);
19057  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19058  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19059  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19060 
19061  /* "PyClical.pyx":1859
19062  * pi = tau / 2.0
19063  *
19064  * cl = clifford # <<<<<<<<<<<<<<
19065  * """
19066  * Abbreviation for clifford.
19067  */
19068  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)((PyObject*)__pyx_ptype_8PyClical_clifford))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19069 
19070  /* "PyClical.pyx":1879
19071  * """
19072  *
19073  * ist = index_set # <<<<<<<<<<<<<<
19074  * """
19075  * Abbreviation for index_set.
19076  */
19077  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)((PyObject*)__pyx_ptype_8PyClical_index_set))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19078 
19079  /* "PyClical.pyx":1887
19080  * """
19081  *
19082  * def e(obj): # <<<<<<<<<<<<<<
19083  * """
19084  * Abbreviation for clifford(index_set(obj)).
19085  */
19086  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_83e, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19087  __Pyx_GOTREF(__pyx_t_2);
19088  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19089  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19090 
19091  /* "PyClical.pyx":1900
19092  * return clifford(index_set(obj))
19093  *
19094  * def istpq(p, q): # <<<<<<<<<<<<<<
19095  * """
19096  * Abbreviation for index_set({-q,...p}).
19097  */
19098  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_85istpq, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19099  __Pyx_GOTREF(__pyx_t_2);
19100  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19101  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19102 
19103  /* "PyClical.pyx":1909
19104  * return index_set(set(range(-q,p+1)))
19105  *
19106  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19107  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19108  *
19109  */
19110  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19111  __Pyx_GOTREF(__pyx_t_2);
19112  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19113  __Pyx_GOTREF(__pyx_t_1);
19114  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19115  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19116  __Pyx_GOTREF(__pyx_t_2);
19117  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19118  __Pyx_GOTREF(__pyx_t_3);
19119  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19120  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19121  __Pyx_GOTREF(__pyx_t_2);
19122  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19123  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19124  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19125  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19126 
19127  /* "PyClical.pyx":1910
19128  *
19129  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
19130  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19131  *
19132  * # Doctest interface.
19133  */
19134  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19135  __Pyx_GOTREF(__pyx_t_2);
19136  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19137  __Pyx_GOTREF(__pyx_t_3);
19138  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19139  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19140  __Pyx_GOTREF(__pyx_t_2);
19141  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19142  __Pyx_GOTREF(__pyx_t_1);
19143  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19144  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19145  __Pyx_GOTREF(__pyx_t_2);
19146  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19147  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19148  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19149  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19150 
19151  /* "PyClical.pyx":1913
19152  *
19153  * # Doctest interface.
19154  * def _test(): # <<<<<<<<<<<<<<
19155  * import PyClical, doctest
19156  * return doctest.testmod(PyClical)
19157  */
19158  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_87_test, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19159  __Pyx_GOTREF(__pyx_t_2);
19160  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19161  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19162 
19163  /* "PyClical.pyx":1917
19164  * return doctest.testmod(PyClical)
19165  *
19166  * if __name__ == "__main__": # <<<<<<<<<<<<<<
19167  * _test()
19168  */
19169  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19170  __Pyx_GOTREF(__pyx_t_2);
19171  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_main, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19172  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19173  if (__pyx_t_4) {
19174 
19175  /* "PyClical.pyx":1918
19176  *
19177  * if __name__ == "__main__":
19178  * _test() # <<<<<<<<<<<<<<
19179  */
19180  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_test); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19181  __Pyx_GOTREF(__pyx_t_1);
19182  __pyx_t_3 = NULL;
19183  if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
19184  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
19185  if (likely(__pyx_t_3)) {
19186  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
19187  __Pyx_INCREF(__pyx_t_3);
19188  __Pyx_INCREF(function);
19189  __Pyx_DECREF_SET(__pyx_t_1, function);
19190  }
19191  }
19192  if (__pyx_t_3) {
19193  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19194  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19195  } else {
19196  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19197  }
19198  __Pyx_GOTREF(__pyx_t_2);
19199  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19200  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19201  goto __pyx_L2;
19202  }
19203  __pyx_L2:;
19204 
19205  /* "PyClical.pyx":1
19206  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
19207  * # distutils: language = c++
19208  * #
19209  */
19210  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19211  __Pyx_GOTREF(__pyx_t_2);
19212  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_copy_line_64, __pyx_kp_u_Copy_this_index_set_object_s_in) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19213  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___setitem___line_177, __pyx_kp_u_Set_the_value_of_an_index_set_o) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19214  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___getitem___line_189, __pyx_kp_u_Get_the_value_of_an_index_set_o) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19215  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iter___line_227, __pyx_kp_u_Iterate_over_the_indices_of_an) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19216  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___invert___line_238, __pyx_kp_u_Set_complement_not_print_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19217  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___xor___line_247, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19218  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ixor___line_258, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19219  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___and___line_269, __pyx_kp_u_Set_intersection_and_print_inde) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19220  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iand___line_280, __pyx_kp_u_Set_intersection_and_x_index_se) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19221  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___or___line_291, __pyx_kp_u_Set_union_or_print_index_set_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19222  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ior___line_302, __pyx_kp_u_Set_union_or_x_index_set_1_x_in) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19223  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_line_313, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19224  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_neg_line_322, __pyx_kp_u_Number_of_negative_indices_incl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19225  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_pos_line_331, __pyx_kp_u_Number_of_positive_indices_incl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19226  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_min_line_340, __pyx_kp_u_Minimum_member_index_set_1_1_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19227  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_max_line_349, __pyx_kp_u_Maximum_member_index_set_1_1_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19228  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_kp_u_Sign_of_geometric_product_of_tw) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19229  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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19230  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___repr___line_382, __pyx_kp_u_The_official_string_representat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19231  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___str___line_393, __pyx_kp_u_The_informal_string_representat) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19232  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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19233  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_compare_line_490, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19234  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_min_neg_line_502, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19235  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_pos_line_511, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19236  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_copy_line_554, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19237  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iter___line_637, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19238  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reframe_line_648, __pyx_kp_u_Put_self_into_a_larger_frame_co) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19239  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___getitem___line_706, __pyx_kp_u_Subscripting_map_from_index_set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19240  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___neg___line_721, __pyx_kp_u_Unary_print_clifford_1_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19241  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pos___line_730, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19242  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___add___line_739, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19243  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iadd___line_750, __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19244  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___sub___line_759, __pyx_kp_u_Geometric_difference_print_clif) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19245  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___isub___line_770, __pyx_kp_u_Geometric_difference_x_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19246  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mul___line_779, __pyx_kp_u_Geometric_product_print_cliffor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19247  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imul___line_792, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19248  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mod___line_805, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19249  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imod___line_820, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19250  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___and___line_835, __pyx_kp_u_Inner_product_print_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19251  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iand___line_850, __pyx_kp_u_Inner_product_x_clifford_1_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19252  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___xor___line_865, __pyx_kp_u_Outer_product_print_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19253  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ixor___line_880, __pyx_kp_u_Outer_product_x_clifford_1_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19254  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___div___line_895, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19255  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___idiv___line_910, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19256  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_inv_line_925, __pyx_kp_u_Geometric_multiplicative_invers) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19257  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___or___line_938, __pyx_kp_u_Transform_left_hand_side_using) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19258  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ior___line_949, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19259  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pow___line_960, __pyx_kp_u_Power_self_to_the_m_x_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19260  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pow_line_979, __pyx_kp_u_Power_self_to_the_m_x_clifford_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19261  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_outer_pow_line_1003, __pyx_kp_u_Outer_product_power_x_clifford) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19262  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___call___line_1019, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19263  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_scalar_line_1038, __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19264  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pure_line_1049, __pyx_kp_u_Pure_part_print_clifford_1_1_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19265  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_even_line_1060, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19266  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_odd_line_1069, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19267  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_vector_part_line_1078, __pyx_kp_u_Vector_part_of_multivector_as_a) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19268  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_involute_line_1106, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19269  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reverse_line_1122, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19270  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_conj_line_1137, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19271  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_quad_line_1152, __pyx_kp_u_Quadratic_form_rev_x_x_0_print) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19272  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_norm_line_1163, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19273  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_abs_line_1174, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19274  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_max_abs_line_1183, __pyx_kp_u_Maximum_of_absolute_values_of_c) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19275  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_truncated_line_1194, __pyx_kp_u_Remove_all_terms_of_self_with_r) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19276  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_isnan_line_1205, __pyx_kp_u_Check_if_a_multivector_contains) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19277  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_frame_line_1214, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19278  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___repr___line_1225, __pyx_kp_u_The_official_string_representat_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19279  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___str___line_1234, __pyx_kp_u_The_informal_string_representat_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19280  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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19281  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_inv_line_1329, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19282  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_scalar_line_1344, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19283  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_real_line_1355, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19284  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_imag_line_1366, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19285  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pure_line_1377, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19286  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_even_line_1388, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19287  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_odd_line_1397, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19288  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_involute_line_1406, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19289  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_reverse_line_1421, __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19290  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_conj_line_1436, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19291  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_quad_line_1451, __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19292  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_norm_line_1462, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19293  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_abs_line_1473, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19294  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_abs_line_1482, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19295  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pow_line_1494, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19296  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_outer_pow_line_1518, __pyx_kp_u_Outer_product_power_of_multivec) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19297  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_complexifier_line_1527, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19298  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sqrt_line_1542, __pyx_kp_u_Square_root_of_multivector_with) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19299  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_exp_line_1565, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19300  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_log_line_1579, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19301  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cos_line_1602, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19302  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acos_line_1619, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19303  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cosh_line_1640, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19304  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acosh_line_1656, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19305  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sin_line_1679, __pyx_kp_u_Sine_of_multivector_with_option) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19306  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asin_line_1698, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19307  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sinh_line_1719, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19308  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asinh_line_1733, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19309  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tan_line_1752, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19310  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atan_line_1769, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19311  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tanh_line_1786, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19312  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atanh_line_1798, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19313  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_random_clifford_line_1815, __pyx_kp_u_Random_multivector_within_a_fra) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19314  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3_line_1824, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19315  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3std_line_1833, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19316  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_agc3_line_1844, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19317  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_e_line_1887, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19318  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_istpq_line_1900, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19319  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19320  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19321 
19322  /*--- Wrapped vars code ---*/
19323 
19324  goto __pyx_L0;
19325  __pyx_L1_error:;
19326  __Pyx_XDECREF(__pyx_t_1);
19327  __Pyx_XDECREF(__pyx_t_2);
19328  __Pyx_XDECREF(__pyx_t_3);
19329  if (__pyx_m) {
19330  if (__pyx_d) {
19331  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
19332  Py_DECREF(__pyx_d); __pyx_d = 0;
19333  }
19334  Py_DECREF(__pyx_m); __pyx_m = 0;
19335  } else if (!PyErr_Occurred()) {
19336  PyErr_SetString(PyExc_ImportError, "init PyClical");
19337  }
19338  __pyx_L0:;
19339  __Pyx_RefNannyFinishContext();
19340  #if PY_MAJOR_VERSION < 3
19341  return;
19342  #else
19343  return __pyx_m;
19344  #endif
19345 }
19346 
19347 /* Runtime support code */
19348 #if CYTHON_REFNANNY
19349 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
19350  PyObject *m = NULL, *p = NULL;
19351  void *r = NULL;
19352  m = PyImport_ImportModule((char *)modname);
19353  if (!m) goto end;
19354  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
19355  if (!p) goto end;
19356  r = PyLong_AsVoidPtr(p);
19357 end:
19358  Py_XDECREF(p);
19359  Py_XDECREF(m);
19360  return (__Pyx_RefNannyAPIStruct *)r;
19361 }
19362 #endif
19363 
19364 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
19365  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
19366  if (unlikely(!result)) {
19367  PyErr_Format(PyExc_NameError,
19368 #if PY_MAJOR_VERSION >= 3
19369  "name '%U' is not defined", name);
19370 #else
19371  "name '%.200s' is not defined", PyString_AS_STRING(name));
19372 #endif
19373  }
19374  return result;
19375 }
19376 
19377 #if CYTHON_COMPILING_IN_CPYTHON
19378 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
19379  PyObject *result;
19380  ternaryfunc call = func->ob_type->tp_call;
19381  if (unlikely(!call))
19382  return PyObject_Call(func, arg, kw);
19383  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
19384  return NULL;
19385  result = (*call)(func, arg, kw);
19386  Py_LeaveRecursiveCall();
19387  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
19388  PyErr_SetString(
19389  PyExc_SystemError,
19390  "NULL result without error in PyObject_Call");
19391  }
19392  return result;
19393 }
19394 #endif
19395 
19396 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
19397 #if CYTHON_COMPILING_IN_CPYTHON
19398  PyObject *tmp_type, *tmp_value, *tmp_tb;
19399  PyThreadState *tstate = PyThreadState_GET();
19400  tmp_type = tstate->curexc_type;
19401  tmp_value = tstate->curexc_value;
19402  tmp_tb = tstate->curexc_traceback;
19403  tstate->curexc_type = type;
19404  tstate->curexc_value = value;
19405  tstate->curexc_traceback = tb;
19406  Py_XDECREF(tmp_type);
19407  Py_XDECREF(tmp_value);
19408  Py_XDECREF(tmp_tb);
19409 #else
19410  PyErr_Restore(type, value, tb);
19411 #endif
19412 }
19413 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
19414 #if CYTHON_COMPILING_IN_CPYTHON
19415  PyThreadState *tstate = PyThreadState_GET();
19416  *type = tstate->curexc_type;
19417  *value = tstate->curexc_value;
19418  *tb = tstate->curexc_traceback;
19419  tstate->curexc_type = 0;
19420  tstate->curexc_value = 0;
19421  tstate->curexc_traceback = 0;
19422 #else
19423  PyErr_Fetch(type, value, tb);
19424 #endif
19425 }
19426 
19427 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
19428  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
19429  int full_traceback) {
19430  PyObject *old_exc, *old_val, *old_tb;
19431  PyObject *ctx;
19432  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
19433  if (full_traceback) {
19434  Py_XINCREF(old_exc);
19435  Py_XINCREF(old_val);
19436  Py_XINCREF(old_tb);
19437  __Pyx_ErrRestore(old_exc, old_val, old_tb);
19438  PyErr_PrintEx(1);
19439  }
19440  #if PY_MAJOR_VERSION < 3
19441  ctx = PyString_FromString(name);
19442  #else
19443  ctx = PyUnicode_FromString(name);
19444  #endif
19445  __Pyx_ErrRestore(old_exc, old_val, old_tb);
19446  if (!ctx) {
19447  PyErr_WriteUnraisable(Py_None);
19448  } else {
19449  PyErr_WriteUnraisable(ctx);
19450  Py_DECREF(ctx);
19451  }
19452 }
19453 
19454 #if CYTHON_COMPILING_IN_CPYTHON
19455 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
19456  PyObject *self, *result;
19457  PyCFunction cfunc;
19458  cfunc = PyCFunction_GET_FUNCTION(func);
19459  self = PyCFunction_GET_SELF(func);
19460  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
19461  return NULL;
19462  result = cfunc(self, arg);
19463  Py_LeaveRecursiveCall();
19464  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
19465  PyErr_SetString(
19466  PyExc_SystemError,
19467  "NULL result without error in PyObject_Call");
19468  }
19469  return result;
19470 }
19471 #endif
19472 
19473 #if CYTHON_COMPILING_IN_CPYTHON
19474 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
19475  PyObject *result;
19476  PyObject *args = PyTuple_New(1);
19477  if (unlikely(!args)) return NULL;
19478  Py_INCREF(arg);
19479  PyTuple_SET_ITEM(args, 0, arg);
19480  result = __Pyx_PyObject_Call(func, args, NULL);
19481  Py_DECREF(args);
19482  return result;
19483 }
19484 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
19485 #ifdef __Pyx_CyFunction_USED
19486  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
19487 #else
19488  if (likely(PyCFunction_Check(func))) {
19489 #endif
19490  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
19491  return __Pyx_PyObject_CallMethO(func, arg);
19492  }
19493  }
19494  return __Pyx__PyObject_CallOneArg(func, arg);
19495 }
19496 #else
19497 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
19498  PyObject* args = PyTuple_Pack(1, arg);
19499  return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
19500 }
19501 #endif
19502 
19503 #if CYTHON_COMPILING_IN_CPYTHON
19504 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
19505 #ifdef __Pyx_CyFunction_USED
19506  if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
19507 #else
19508  if (likely(PyCFunction_Check(func))) {
19509 #endif
19510  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
19511  return __Pyx_PyObject_CallMethO(func, NULL);
19512  }
19513  }
19514  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
19515 }
19516 #endif
19517 
19518 static void __Pyx_RaiseDoubleKeywordsError(
19519  const char* func_name,
19520  PyObject* kw_name)
19521 {
19522  PyErr_Format(PyExc_TypeError,
19523  #if PY_MAJOR_VERSION >= 3
19524  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
19525  #else
19526  "%s() got multiple values for keyword argument '%s'", func_name,
19527  PyString_AsString(kw_name));
19528  #endif
19529 }
19530 
19531 static int __Pyx_ParseOptionalKeywords(
19532  PyObject *kwds,
19533  PyObject **argnames[],
19534  PyObject *kwds2,
19535  PyObject *values[],
19536  Py_ssize_t num_pos_args,
19537  const char* function_name)
19538 {
19539  PyObject *key = 0, *value = 0;
19540  Py_ssize_t pos = 0;
19541  PyObject*** name;
19542  PyObject*** first_kw_arg = argnames + num_pos_args;
19543  while (PyDict_Next(kwds, &pos, &key, &value)) {
19544  name = first_kw_arg;
19545  while (*name && (**name != key)) name++;
19546  if (*name) {
19547  values[name-argnames] = value;
19548  continue;
19549  }
19550  name = first_kw_arg;
19551  #if PY_MAJOR_VERSION < 3
19552  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
19553  while (*name) {
19554  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
19555  && _PyString_Eq(**name, key)) {
19556  values[name-argnames] = value;
19557  break;
19558  }
19559  name++;
19560  }
19561  if (*name) continue;
19562  else {
19563  PyObject*** argname = argnames;
19564  while (argname != first_kw_arg) {
19565  if ((**argname == key) || (
19566  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
19567  && _PyString_Eq(**argname, key))) {
19568  goto arg_passed_twice;
19569  }
19570  argname++;
19571  }
19572  }
19573  } else
19574  #endif
19575  if (likely(PyUnicode_Check(key))) {
19576  while (*name) {
19577  int cmp = (**name == key) ? 0 :
19578  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
19579  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
19580  #endif
19581  PyUnicode_Compare(**name, key);
19582  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
19583  if (cmp == 0) {
19584  values[name-argnames] = value;
19585  break;
19586  }
19587  name++;
19588  }
19589  if (*name) continue;
19590  else {
19591  PyObject*** argname = argnames;
19592  while (argname != first_kw_arg) {
19593  int cmp = (**argname == key) ? 0 :
19594  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
19595  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
19596  #endif
19597  PyUnicode_Compare(**argname, key);
19598  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
19599  if (cmp == 0) goto arg_passed_twice;
19600  argname++;
19601  }
19602  }
19603  } else
19604  goto invalid_keyword_type;
19605  if (kwds2) {
19606  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
19607  } else {
19608  goto invalid_keyword;
19609  }
19610  }
19611  return 0;
19612 arg_passed_twice:
19613  __Pyx_RaiseDoubleKeywordsError(function_name, key);
19614  goto bad;
19615 invalid_keyword_type:
19616  PyErr_Format(PyExc_TypeError,
19617  "%.200s() keywords must be strings", function_name);
19618  goto bad;
19619 invalid_keyword:
19620  PyErr_Format(PyExc_TypeError,
19621  #if PY_MAJOR_VERSION < 3
19622  "%.200s() got an unexpected keyword argument '%.200s'",
19623  function_name, PyString_AsString(key));
19624  #else
19625  "%s() got an unexpected keyword argument '%U'",
19626  function_name, key);
19627  #endif
19628 bad:
19629  return -1;
19630 }
19631 
19632 static void __Pyx_RaiseArgtupleInvalid(
19633  const char* func_name,
19634  int exact,
19635  Py_ssize_t num_min,
19636  Py_ssize_t num_max,
19637  Py_ssize_t num_found)
19638 {
19639  Py_ssize_t num_expected;
19640  const char *more_or_less;
19641  if (num_found < num_min) {
19642  num_expected = num_min;
19643  more_or_less = "at least";
19644  } else {
19645  num_expected = num_max;
19646  more_or_less = "at most";
19647  }
19648  if (exact) {
19649  more_or_less = "exactly";
19650  }
19651  PyErr_Format(PyExc_TypeError,
19652  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
19653  func_name, more_or_less, num_expected,
19654  (num_expected == 1) ? "" : "s", num_found);
19655 }
19656 
19657 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
19658  PyObject *result;
19659 #if CYTHON_COMPILING_IN_CPYTHON
19660  result = PyDict_GetItem(__pyx_d, name);
19661  if (likely(result)) {
19662  Py_INCREF(result);
19663  } else {
19664 #else
19665  result = PyObject_GetItem(__pyx_d, name);
19666  if (!result) {
19667  PyErr_Clear();
19668 #endif
19669  result = __Pyx_GetBuiltinName(name);
19670  }
19671  return result;
19672 }
19673 
19674 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
19675 #if CYTHON_COMPILING_IN_CPYTHON
19676  PyThreadState *tstate = PyThreadState_GET();
19677  *type = tstate->exc_type;
19678  *value = tstate->exc_value;
19679  *tb = tstate->exc_traceback;
19680  Py_XINCREF(*type);
19681  Py_XINCREF(*value);
19682  Py_XINCREF(*tb);
19683 #else
19684  PyErr_GetExcInfo(type, value, tb);
19685 #endif
19686 }
19687 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
19688 #if CYTHON_COMPILING_IN_CPYTHON
19689  PyObject *tmp_type, *tmp_value, *tmp_tb;
19690  PyThreadState *tstate = PyThreadState_GET();
19691  tmp_type = tstate->exc_type;
19692  tmp_value = tstate->exc_value;
19693  tmp_tb = tstate->exc_traceback;
19694  tstate->exc_type = type;
19695  tstate->exc_value = value;
19696  tstate->exc_traceback = tb;
19697  Py_XDECREF(tmp_type);
19698  Py_XDECREF(tmp_value);
19699  Py_XDECREF(tmp_tb);
19700 #else
19701  PyErr_SetExcInfo(type, value, tb);
19702 #endif
19703 }
19704 
19705 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
19706  PyObject *local_type, *local_value, *local_tb;
19707 #if CYTHON_COMPILING_IN_CPYTHON
19708  PyObject *tmp_type, *tmp_value, *tmp_tb;
19709  PyThreadState *tstate = PyThreadState_GET();
19710  local_type = tstate->curexc_type;
19711  local_value = tstate->curexc_value;
19712  local_tb = tstate->curexc_traceback;
19713  tstate->curexc_type = 0;
19714  tstate->curexc_value = 0;
19715  tstate->curexc_traceback = 0;
19716 #else
19717  PyErr_Fetch(&local_type, &local_value, &local_tb);
19718 #endif
19719  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
19720 #if CYTHON_COMPILING_IN_CPYTHON
19721  if (unlikely(tstate->curexc_type))
19722 #else
19723  if (unlikely(PyErr_Occurred()))
19724 #endif
19725  goto bad;
19726  #if PY_MAJOR_VERSION >= 3
19727  if (local_tb) {
19728  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
19729  goto bad;
19730  }
19731  #endif
19732  Py_XINCREF(local_tb);
19733  Py_XINCREF(local_type);
19734  Py_XINCREF(local_value);
19735  *type = local_type;
19736  *value = local_value;
19737  *tb = local_tb;
19738 #if CYTHON_COMPILING_IN_CPYTHON
19739  tmp_type = tstate->exc_type;
19740  tmp_value = tstate->exc_value;
19741  tmp_tb = tstate->exc_traceback;
19742  tstate->exc_type = local_type;
19743  tstate->exc_value = local_value;
19744  tstate->exc_traceback = local_tb;
19745  Py_XDECREF(tmp_type);
19746  Py_XDECREF(tmp_value);
19747  Py_XDECREF(tmp_tb);
19748 #else
19749  PyErr_SetExcInfo(local_type, local_value, local_tb);
19750 #endif
19751  return 0;
19752 bad:
19753  *type = 0;
19754  *value = 0;
19755  *tb = 0;
19756  Py_XDECREF(local_type);
19757  Py_XDECREF(local_value);
19758  Py_XDECREF(local_tb);
19759  return -1;
19760 }
19761 
19762 #if PY_MAJOR_VERSION < 3
19763 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
19764  CYTHON_UNUSED PyObject *cause) {
19765  Py_XINCREF(type);
19766  if (!value || value == Py_None)
19767  value = NULL;
19768  else
19769  Py_INCREF(value);
19770  if (!tb || tb == Py_None)
19771  tb = NULL;
19772  else {
19773  Py_INCREF(tb);
19774  if (!PyTraceBack_Check(tb)) {
19775  PyErr_SetString(PyExc_TypeError,
19776  "raise: arg 3 must be a traceback or None");
19777  goto raise_error;
19778  }
19779  }
19780  if (PyType_Check(type)) {
19781 #if CYTHON_COMPILING_IN_PYPY
19782  if (!value) {
19783  Py_INCREF(Py_None);
19784  value = Py_None;
19785  }
19786 #endif
19787  PyErr_NormalizeException(&type, &value, &tb);
19788  } else {
19789  if (value) {
19790  PyErr_SetString(PyExc_TypeError,
19791  "instance exception may not have a separate value");
19792  goto raise_error;
19793  }
19794  value = type;
19795  type = (PyObject*) Py_TYPE(type);
19796  Py_INCREF(type);
19797  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
19798  PyErr_SetString(PyExc_TypeError,
19799  "raise: exception class must be a subclass of BaseException");
19800  goto raise_error;
19801  }
19802  }
19803  __Pyx_ErrRestore(type, value, tb);
19804  return;
19805 raise_error:
19806  Py_XDECREF(value);
19807  Py_XDECREF(type);
19808  Py_XDECREF(tb);
19809  return;
19810 }
19811 #else
19812 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
19813  PyObject* owned_instance = NULL;
19814  if (tb == Py_None) {
19815  tb = 0;
19816  } else if (tb && !PyTraceBack_Check(tb)) {
19817  PyErr_SetString(PyExc_TypeError,
19818  "raise: arg 3 must be a traceback or None");
19819  goto bad;
19820  }
19821  if (value == Py_None)
19822  value = 0;
19823  if (PyExceptionInstance_Check(type)) {
19824  if (value) {
19825  PyErr_SetString(PyExc_TypeError,
19826  "instance exception may not have a separate value");
19827  goto bad;
19828  }
19829  value = type;
19830  type = (PyObject*) Py_TYPE(value);
19831  } else if (PyExceptionClass_Check(type)) {
19832  PyObject *instance_class = NULL;
19833  if (value && PyExceptionInstance_Check(value)) {
19834  instance_class = (PyObject*) Py_TYPE(value);
19835  if (instance_class != type) {
19836  if (PyObject_IsSubclass(instance_class, type)) {
19837  type = instance_class;
19838  } else {
19839  instance_class = NULL;
19840  }
19841  }
19842  }
19843  if (!instance_class) {
19844  PyObject *args;
19845  if (!value)
19846  args = PyTuple_New(0);
19847  else if (PyTuple_Check(value)) {
19848  Py_INCREF(value);
19849  args = value;
19850  } else
19851  args = PyTuple_Pack(1, value);
19852  if (!args)
19853  goto bad;
19854  owned_instance = PyObject_Call(type, args, NULL);
19855  Py_DECREF(args);
19856  if (!owned_instance)
19857  goto bad;
19858  value = owned_instance;
19859  if (!PyExceptionInstance_Check(value)) {
19860  PyErr_Format(PyExc_TypeError,
19861  "calling %R should have returned an instance of "
19862  "BaseException, not %R",
19863  type, Py_TYPE(value));
19864  goto bad;
19865  }
19866  }
19867  } else {
19868  PyErr_SetString(PyExc_TypeError,
19869  "raise: exception class must be a subclass of BaseException");
19870  goto bad;
19871  }
19872 #if PY_VERSION_HEX >= 0x03030000
19873  if (cause) {
19874 #else
19875  if (cause && cause != Py_None) {
19876 #endif
19877  PyObject *fixed_cause;
19878  if (cause == Py_None) {
19879  fixed_cause = NULL;
19880  } else if (PyExceptionClass_Check(cause)) {
19881  fixed_cause = PyObject_CallObject(cause, NULL);
19882  if (fixed_cause == NULL)
19883  goto bad;
19884  } else if (PyExceptionInstance_Check(cause)) {
19885  fixed_cause = cause;
19886  Py_INCREF(fixed_cause);
19887  } else {
19888  PyErr_SetString(PyExc_TypeError,
19889  "exception causes must derive from "
19890  "BaseException");
19891  goto bad;
19892  }
19893  PyException_SetCause(value, fixed_cause);
19894  }
19895  PyErr_SetObject(type, value);
19896  if (tb) {
19897  PyThreadState *tstate = PyThreadState_GET();
19898  PyObject* tmp_tb = tstate->curexc_traceback;
19899  if (tb != tmp_tb) {
19900  Py_INCREF(tb);
19901  tstate->curexc_traceback = tb;
19902  Py_XDECREF(tmp_tb);
19903  }
19904  }
19905 bad:
19906  Py_XDECREF(owned_instance);
19907  return;
19908 }
19909 #endif
19910 
19911 static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
19912  int r;
19913  if (!j) return -1;
19914  r = PyObject_SetItem(o, j, v);
19915  Py_DECREF(j);
19916  return r;
19917 }
19918 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
19919  int is_list, int wraparound, int boundscheck) {
19920 #if CYTHON_COMPILING_IN_CPYTHON
19921  if (is_list || PyList_CheckExact(o)) {
19922  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
19923  if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
19924  PyObject* old = PyList_GET_ITEM(o, n);
19925  Py_INCREF(v);
19926  PyList_SET_ITEM(o, n, v);
19927  Py_DECREF(old);
19928  return 1;
19929  }
19930  } else {
19931  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
19932  if (likely(m && m->sq_ass_item)) {
19933  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
19934  Py_ssize_t l = m->sq_length(o);
19935  if (likely(l >= 0)) {
19936  i += l;
19937  } else {
19938  if (PyErr_ExceptionMatches(PyExc_OverflowError))
19939  PyErr_Clear();
19940  else
19941  return -1;
19942  }
19943  }
19944  return m->sq_ass_item(o, i, v);
19945  }
19946  }
19947 #else
19948 #if CYTHON_COMPILING_IN_PYPY
19949  if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
19950 #else
19951  if (is_list || PySequence_Check(o)) {
19952 #endif
19953  return PySequence_SetItem(o, i, v);
19954  }
19955 #endif
19956  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
19957 }
19958 
19959 static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
19960  PyErr_Format(PyExc_TypeError,
19961  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
19962  name, type->tp_name, Py_TYPE(obj)->tp_name);
19963 }
19964 static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
19965  const char *name, int exact)
19966 {
19967  if (unlikely(!type)) {
19968  PyErr_SetString(PyExc_SystemError, "Missing type object");
19969  return 0;
19970  }
19971  if (none_allowed && obj == Py_None) return 1;
19972  else if (exact) {
19973  if (likely(Py_TYPE(obj) == type)) return 1;
19974  #if PY_MAJOR_VERSION == 2
19975  else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
19976  #endif
19977  }
19978  else {
19979  if (likely(PyObject_TypeCheck(obj, type))) return 1;
19980  }
19981  __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
19982  return 0;
19983 }
19984 
19985 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
19986 #if PY_VERSION_HEX >= 0x02070000
19987  PyObject *ob = PyCapsule_New(vtable, 0, 0);
19988 #else
19989  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
19990 #endif
19991  if (!ob)
19992  goto bad;
19993  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
19994  goto bad;
19995  Py_DECREF(ob);
19996  return 0;
19997 bad:
19998  Py_XDECREF(ob);
19999  return -1;
20000 }
20001 
20002 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
20003 #if CYTHON_COMPILING_IN_PYPY
20004  return PyObject_RichCompareBool(s1, s2, equals);
20005 #else
20006  if (s1 == s2) {
20007  return (equals == Py_EQ);
20008  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
20009  const char *ps1, *ps2;
20010  Py_ssize_t length = PyBytes_GET_SIZE(s1);
20011  if (length != PyBytes_GET_SIZE(s2))
20012  return (equals == Py_NE);
20013  ps1 = PyBytes_AS_STRING(s1);
20014  ps2 = PyBytes_AS_STRING(s2);
20015  if (ps1[0] != ps2[0]) {
20016  return (equals == Py_NE);
20017  } else if (length == 1) {
20018  return (equals == Py_EQ);
20019  } else {
20020  int result = memcmp(ps1, ps2, (size_t)length);
20021  return (equals == Py_EQ) ? (result == 0) : (result != 0);
20022  }
20023  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
20024  return (equals == Py_NE);
20025  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
20026  return (equals == Py_NE);
20027  } else {
20028  int result;
20029  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
20030  if (!py_result)
20031  return -1;
20032  result = __Pyx_PyObject_IsTrue(py_result);
20033  Py_DECREF(py_result);
20034  return result;
20035  }
20036 #endif
20037 }
20038 
20039 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
20040 #if CYTHON_COMPILING_IN_PYPY
20041  return PyObject_RichCompareBool(s1, s2, equals);
20042 #else
20043 #if PY_MAJOR_VERSION < 3
20044  PyObject* owned_ref = NULL;
20045 #endif
20046  int s1_is_unicode, s2_is_unicode;
20047  if (s1 == s2) {
20048  goto return_eq;
20049  }
20050  s1_is_unicode = PyUnicode_CheckExact(s1);
20051  s2_is_unicode = PyUnicode_CheckExact(s2);
20052 #if PY_MAJOR_VERSION < 3
20053  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
20054  owned_ref = PyUnicode_FromObject(s2);
20055  if (unlikely(!owned_ref))
20056  return -1;
20057  s2 = owned_ref;
20058  s2_is_unicode = 1;
20059  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
20060  owned_ref = PyUnicode_FromObject(s1);
20061  if (unlikely(!owned_ref))
20062  return -1;
20063  s1 = owned_ref;
20064  s1_is_unicode = 1;
20065  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
20066  return __Pyx_PyBytes_Equals(s1, s2, equals);
20067  }
20068 #endif
20069  if (s1_is_unicode & s2_is_unicode) {
20070  Py_ssize_t length;
20071  int kind;
20072  void *data1, *data2;
20073  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
20074  return -1;
20075  length = __Pyx_PyUnicode_GET_LENGTH(s1);
20076  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
20077  goto return_ne;
20078  }
20079  kind = __Pyx_PyUnicode_KIND(s1);
20080  if (kind != __Pyx_PyUnicode_KIND(s2)) {
20081  goto return_ne;
20082  }
20083  data1 = __Pyx_PyUnicode_DATA(s1);
20084  data2 = __Pyx_PyUnicode_DATA(s2);
20085  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
20086  goto return_ne;
20087  } else if (length == 1) {
20088  goto return_eq;
20089  } else {
20090  int result = memcmp(data1, data2, (size_t)(length * kind));
20091  #if PY_MAJOR_VERSION < 3
20092  Py_XDECREF(owned_ref);
20093  #endif
20094  return (equals == Py_EQ) ? (result == 0) : (result != 0);
20095  }
20096  } else if ((s1 == Py_None) & s2_is_unicode) {
20097  goto return_ne;
20098  } else if ((s2 == Py_None) & s1_is_unicode) {
20099  goto return_ne;
20100  } else {
20101  int result;
20102  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
20103  if (!py_result)
20104  return -1;
20105  result = __Pyx_PyObject_IsTrue(py_result);
20106  Py_DECREF(py_result);
20107  return result;
20108  }
20109 return_eq:
20110  #if PY_MAJOR_VERSION < 3
20111  Py_XDECREF(owned_ref);
20112  #endif
20113  return (equals == Py_EQ);
20114 return_ne:
20115  #if PY_MAJOR_VERSION < 3
20116  Py_XDECREF(owned_ref);
20117  #endif
20118  return (equals == Py_NE);
20119 #endif
20120 }
20121 
20122 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
20123  int start = 0, mid = 0, end = count - 1;
20124  if (end >= 0 && code_line > entries[end].code_line) {
20125  return count;
20126  }
20127  while (start < end) {
20128  mid = (start + end) / 2;
20129  if (code_line < entries[mid].code_line) {
20130  end = mid;
20131  } else if (code_line > entries[mid].code_line) {
20132  start = mid + 1;
20133  } else {
20134  return mid;
20135  }
20136  }
20137  if (code_line <= entries[mid].code_line) {
20138  return mid;
20139  } else {
20140  return mid + 1;
20141  }
20142 }
20143 static PyCodeObject *__pyx_find_code_object(int code_line) {
20144  PyCodeObject* code_object;
20145  int pos;
20146  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
20147  return NULL;
20148  }
20149  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
20150  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
20151  return NULL;
20152  }
20153  code_object = __pyx_code_cache.entries[pos].code_object;
20154  Py_INCREF(code_object);
20155  return code_object;
20156 }
20157 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
20158  int pos, i;
20159  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
20160  if (unlikely(!code_line)) {
20161  return;
20162  }
20163  if (unlikely(!entries)) {
20164  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
20165  if (likely(entries)) {
20166  __pyx_code_cache.entries = entries;
20167  __pyx_code_cache.max_count = 64;
20168  __pyx_code_cache.count = 1;
20169  entries[0].code_line = code_line;
20170  entries[0].code_object = code_object;
20171  Py_INCREF(code_object);
20172  }
20173  return;
20174  }
20175  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
20176  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
20177  PyCodeObject* tmp = entries[pos].code_object;
20178  entries[pos].code_object = code_object;
20179  Py_DECREF(tmp);
20180  return;
20181  }
20182  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
20183  int new_max = __pyx_code_cache.max_count + 64;
20184  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
20185  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
20186  if (unlikely(!entries)) {
20187  return;
20188  }
20189  __pyx_code_cache.entries = entries;
20190  __pyx_code_cache.max_count = new_max;
20191  }
20192  for (i=__pyx_code_cache.count; i>pos; i--) {
20193  entries[i] = entries[i-1];
20194  }
20195  entries[pos].code_line = code_line;
20196  entries[pos].code_object = code_object;
20197  __pyx_code_cache.count++;
20198  Py_INCREF(code_object);
20199 }
20200 
20201 #include "compile.h"
20202 #include "frameobject.h"
20203 #include "traceback.h"
20204 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
20205  const char *funcname, int c_line,
20206  int py_line, const char *filename) {
20207  PyCodeObject *py_code = 0;
20208  PyObject *py_srcfile = 0;
20209  PyObject *py_funcname = 0;
20210  #if PY_MAJOR_VERSION < 3
20211  py_srcfile = PyString_FromString(filename);
20212  #else
20213  py_srcfile = PyUnicode_FromString(filename);
20214  #endif
20215  if (!py_srcfile) goto bad;
20216  if (c_line) {
20217  #if PY_MAJOR_VERSION < 3
20218  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20219  #else
20220  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
20221  #endif
20222  }
20223  else {
20224  #if PY_MAJOR_VERSION < 3
20225  py_funcname = PyString_FromString(funcname);
20226  #else
20227  py_funcname = PyUnicode_FromString(funcname);
20228  #endif
20229  }
20230  if (!py_funcname) goto bad;
20231  py_code = __Pyx_PyCode_New(
20232  0,
20233  0,
20234  0,
20235  0,
20236  0,
20237  __pyx_empty_bytes, /*PyObject *code,*/
20238  __pyx_empty_tuple, /*PyObject *consts,*/
20239  __pyx_empty_tuple, /*PyObject *names,*/
20240  __pyx_empty_tuple, /*PyObject *varnames,*/
20241  __pyx_empty_tuple, /*PyObject *freevars,*/
20242  __pyx_empty_tuple, /*PyObject *cellvars,*/
20243  py_srcfile, /*PyObject *filename,*/
20244  py_funcname, /*PyObject *name,*/
20245  py_line,
20246  __pyx_empty_bytes /*PyObject *lnotab*/
20247  );
20248  Py_DECREF(py_srcfile);
20249  Py_DECREF(py_funcname);
20250  return py_code;
20251 bad:
20252  Py_XDECREF(py_srcfile);
20253  Py_XDECREF(py_funcname);
20254  return NULL;
20255 }
20256 static void __Pyx_AddTraceback(const char *funcname, int c_line,
20257  int py_line, const char *filename) {
20258  PyCodeObject *py_code = 0;
20259  PyFrameObject *py_frame = 0;
20260  py_code = __pyx_find_code_object(c_line ? c_line : py_line);
20261  if (!py_code) {
20262  py_code = __Pyx_CreateCodeObjectForTraceback(
20263  funcname, c_line, py_line, filename);
20264  if (!py_code) goto bad;
20265  __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
20266  }
20267  py_frame = PyFrame_New(
20268  PyThreadState_GET(), /*PyThreadState *tstate,*/
20269  py_code, /*PyCodeObject *code,*/
20270  __pyx_d, /*PyObject *globals,*/
20271  0 /*PyObject *locals*/
20272  );
20273  if (!py_frame) goto bad;
20274  py_frame->f_lineno = py_line;
20275  PyTraceBack_Here(py_frame);
20276 bad:
20277  Py_XDECREF(py_code);
20278  Py_XDECREF(py_frame);
20279 }
20280 
20281 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
20282  PyObject *empty_list = 0;
20283  PyObject *module = 0;
20284  PyObject *global_dict = 0;
20285  PyObject *empty_dict = 0;
20286  PyObject *list;
20287  #if PY_VERSION_HEX < 0x03030000
20288  PyObject *py_import;
20289  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
20290  if (!py_import)
20291  goto bad;
20292  #endif
20293  if (from_list)
20294  list = from_list;
20295  else {
20296  empty_list = PyList_New(0);
20297  if (!empty_list)
20298  goto bad;
20299  list = empty_list;
20300  }
20301  global_dict = PyModule_GetDict(__pyx_m);
20302  if (!global_dict)
20303  goto bad;
20304  empty_dict = PyDict_New();
20305  if (!empty_dict)
20306  goto bad;
20307  {
20308  #if PY_MAJOR_VERSION >= 3
20309  if (level == -1) {
20310  if (strchr(__Pyx_MODULE_NAME, '.')) {
20311  #if PY_VERSION_HEX < 0x03030000
20312  PyObject *py_level = PyInt_FromLong(1);
20313  if (!py_level)
20314  goto bad;
20315  module = PyObject_CallFunctionObjArgs(py_import,
20316  name, global_dict, empty_dict, list, py_level, NULL);
20317  Py_DECREF(py_level);
20318  #else
20319  module = PyImport_ImportModuleLevelObject(
20320  name, global_dict, empty_dict, list, 1);
20321  #endif
20322  if (!module) {
20323  if (!PyErr_ExceptionMatches(PyExc_ImportError))
20324  goto bad;
20325  PyErr_Clear();
20326  }
20327  }
20328  level = 0;
20329  }
20330  #endif
20331  if (!module) {
20332  #if PY_VERSION_HEX < 0x03030000
20333  PyObject *py_level = PyInt_FromLong(level);
20334  if (!py_level)
20335  goto bad;
20336  module = PyObject_CallFunctionObjArgs(py_import,
20337  name, global_dict, empty_dict, list, py_level, NULL);
20338  Py_DECREF(py_level);
20339  #else
20340  module = PyImport_ImportModuleLevelObject(
20341  name, global_dict, empty_dict, list, level);
20342  #endif
20343  }
20344  }
20345 bad:
20346  #if PY_VERSION_HEX < 0x03030000
20347  Py_XDECREF(py_import);
20348  #endif
20349  Py_XDECREF(empty_list);
20350  Py_XDECREF(empty_dict);
20351  return module;
20352 }
20353 
20354 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value) \
20355  { \
20356  func_type value = func_value; \
20357  if (sizeof(target_type) < sizeof(func_type)) { \
20358  if (unlikely(value != (func_type) (target_type) value)) { \
20359  func_type zero = 0; \
20360  if (is_unsigned && unlikely(value < zero)) \
20361  goto raise_neg_overflow; \
20362  else \
20363  goto raise_overflow; \
20364  } \
20365  } \
20366  return (target_type) value; \
20367  }
20368 
20369 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20370  #if CYTHON_USE_PYLONG_INTERNALS
20371  #include "longintrepr.h"
20372  #endif
20373 #endif
20374 
20375 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
20376  const int neg_one = (int) -1, const_zero = 0;
20377  const int is_unsigned = neg_one > const_zero;
20378 #if PY_MAJOR_VERSION < 3
20379  if (likely(PyInt_Check(x))) {
20380  if (sizeof(int) < sizeof(long)) {
20381  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
20382  } else {
20383  long val = PyInt_AS_LONG(x);
20384  if (is_unsigned && unlikely(val < 0)) {
20385  goto raise_neg_overflow;
20386  }
20387  return (int) val;
20388  }
20389  } else
20390 #endif
20391  if (likely(PyLong_Check(x))) {
20392  if (is_unsigned) {
20393 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20394  #if CYTHON_USE_PYLONG_INTERNALS
20395  switch (Py_SIZE(x)) {
20396  case 0: return 0;
20397  case 1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]);
20398  }
20399  #endif
20400 #endif
20401  if (unlikely(Py_SIZE(x) < 0)) {
20402  goto raise_neg_overflow;
20403  }
20404  if (sizeof(int) <= sizeof(unsigned long)) {
20405  __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x))
20406  } else if (sizeof(int) <= sizeof(unsigned long long)) {
20407  __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x))
20408  }
20409  } else {
20410 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20411  #if CYTHON_USE_PYLONG_INTERNALS
20412  switch (Py_SIZE(x)) {
20413  case 0: return 0;
20414  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +(((PyLongObject*)x)->ob_digit[0]));
20415  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
20416  }
20417  #endif
20418 #endif
20419  if (sizeof(int) <= sizeof(long)) {
20420  __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x))
20421  } else if (sizeof(int) <= sizeof(long long)) {
20422  __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x))
20423  }
20424  }
20425  {
20426 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
20427  PyErr_SetString(PyExc_RuntimeError,
20428  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
20429 #else
20430  int val;
20431  PyObject *v = __Pyx_PyNumber_Int(x);
20432  #if PY_MAJOR_VERSION < 3
20433  if (likely(v) && !PyLong_Check(v)) {
20434  PyObject *tmp = v;
20435  v = PyNumber_Long(tmp);
20436  Py_DECREF(tmp);
20437  }
20438  #endif
20439  if (likely(v)) {
20440  int one = 1; int is_little = (int)*(unsigned char *)&one;
20441  unsigned char *bytes = (unsigned char *)&val;
20442  int ret = _PyLong_AsByteArray((PyLongObject *)v,
20443  bytes, sizeof(val),
20444  is_little, !is_unsigned);
20445  Py_DECREF(v);
20446  if (likely(!ret))
20447  return val;
20448  }
20449 #endif
20450  return (int) -1;
20451  }
20452  } else {
20453  int val;
20454  PyObject *tmp = __Pyx_PyNumber_Int(x);
20455  if (!tmp) return (int) -1;
20456  val = __Pyx_PyInt_As_int(tmp);
20457  Py_DECREF(tmp);
20458  return val;
20459  }
20460 raise_overflow:
20461  PyErr_SetString(PyExc_OverflowError,
20462  "value too large to convert to int");
20463  return (int) -1;
20464 raise_neg_overflow:
20465  PyErr_SetString(PyExc_OverflowError,
20466  "can't convert negative value to int");
20467  return (int) -1;
20468 }
20469 
20470 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
20471  const int neg_one = (int) -1, const_zero = 0;
20472  const int is_unsigned = neg_one > const_zero;
20473  if (is_unsigned) {
20474  if (sizeof(int) < sizeof(long)) {
20475  return PyInt_FromLong((long) value);
20476  } else if (sizeof(int) <= sizeof(unsigned long)) {
20477  return PyLong_FromUnsignedLong((unsigned long) value);
20478  } else if (sizeof(int) <= sizeof(unsigned long long)) {
20479  return PyLong_FromUnsignedLongLong((unsigned long long) value);
20480  }
20481  } else {
20482  if (sizeof(int) <= sizeof(long)) {
20483  return PyInt_FromLong((long) value);
20484  } else if (sizeof(int) <= sizeof(long long)) {
20485  return PyLong_FromLongLong((long long) value);
20486  }
20487  }
20488  {
20489  int one = 1; int little = (int)*(unsigned char *)&one;
20490  unsigned char *bytes = (unsigned char *)&value;
20491  return _PyLong_FromByteArray(bytes, sizeof(int),
20492  little, !is_unsigned);
20493  }
20494 }
20495 
20496 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
20497  const long neg_one = (long) -1, const_zero = 0;
20498  const int is_unsigned = neg_one > const_zero;
20499  if (is_unsigned) {
20500  if (sizeof(long) < sizeof(long)) {
20501  return PyInt_FromLong((long) value);
20502  } else if (sizeof(long) <= sizeof(unsigned long)) {
20503  return PyLong_FromUnsignedLong((unsigned long) value);
20504  } else if (sizeof(long) <= sizeof(unsigned long long)) {
20505  return PyLong_FromUnsignedLongLong((unsigned long long) value);
20506  }
20507  } else {
20508  if (sizeof(long) <= sizeof(long)) {
20509  return PyInt_FromLong((long) value);
20510  } else if (sizeof(long) <= sizeof(long long)) {
20511  return PyLong_FromLongLong((long long) value);
20512  }
20513  }
20514  {
20515  int one = 1; int little = (int)*(unsigned char *)&one;
20516  unsigned char *bytes = (unsigned char *)&value;
20517  return _PyLong_FromByteArray(bytes, sizeof(long),
20518  little, !is_unsigned);
20519  }
20520 }
20521 
20522 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
20523  const long neg_one = (long) -1, const_zero = 0;
20524  const int is_unsigned = neg_one > const_zero;
20525 #if PY_MAJOR_VERSION < 3
20526  if (likely(PyInt_Check(x))) {
20527  if (sizeof(long) < sizeof(long)) {
20528  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
20529  } else {
20530  long val = PyInt_AS_LONG(x);
20531  if (is_unsigned && unlikely(val < 0)) {
20532  goto raise_neg_overflow;
20533  }
20534  return (long) val;
20535  }
20536  } else
20537 #endif
20538  if (likely(PyLong_Check(x))) {
20539  if (is_unsigned) {
20540 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20541  #if CYTHON_USE_PYLONG_INTERNALS
20542  switch (Py_SIZE(x)) {
20543  case 0: return 0;
20544  case 1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]);
20545  }
20546  #endif
20547 #endif
20548  if (unlikely(Py_SIZE(x) < 0)) {
20549  goto raise_neg_overflow;
20550  }
20551  if (sizeof(long) <= sizeof(unsigned long)) {
20552  __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x))
20553  } else if (sizeof(long) <= sizeof(unsigned long long)) {
20554  __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x))
20555  }
20556  } else {
20557 #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
20558  #if CYTHON_USE_PYLONG_INTERNALS
20559  switch (Py_SIZE(x)) {
20560  case 0: return 0;
20561  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +(((PyLongObject*)x)->ob_digit[0]));
20562  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
20563  }
20564  #endif
20565 #endif
20566  if (sizeof(long) <= sizeof(long)) {
20567  __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x))
20568  } else if (sizeof(long) <= sizeof(long long)) {
20569  __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x))
20570  }
20571  }
20572  {
20573 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
20574  PyErr_SetString(PyExc_RuntimeError,
20575  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
20576 #else
20577  long val;
20578  PyObject *v = __Pyx_PyNumber_Int(x);
20579  #if PY_MAJOR_VERSION < 3
20580  if (likely(v) && !PyLong_Check(v)) {
20581  PyObject *tmp = v;
20582  v = PyNumber_Long(tmp);
20583  Py_DECREF(tmp);
20584  }
20585  #endif
20586  if (likely(v)) {
20587  int one = 1; int is_little = (int)*(unsigned char *)&one;
20588  unsigned char *bytes = (unsigned char *)&val;
20589  int ret = _PyLong_AsByteArray((PyLongObject *)v,
20590  bytes, sizeof(val),
20591  is_little, !is_unsigned);
20592  Py_DECREF(v);
20593  if (likely(!ret))
20594  return val;
20595  }
20596 #endif
20597  return (long) -1;
20598  }
20599  } else {
20600  long val;
20601  PyObject *tmp = __Pyx_PyNumber_Int(x);
20602  if (!tmp) return (long) -1;
20603  val = __Pyx_PyInt_As_long(tmp);
20604  Py_DECREF(tmp);
20605  return val;
20606  }
20607 raise_overflow:
20608  PyErr_SetString(PyExc_OverflowError,
20609  "value too large to convert to long");
20610  return (long) -1;
20611 raise_neg_overflow:
20612  PyErr_SetString(PyExc_OverflowError,
20613  "can't convert negative value to long");
20614  return (long) -1;
20615 }
20616 
20617 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
20618  PyObject* fake_module;
20619  PyTypeObject* cached_type = NULL;
20620  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
20621  if (!fake_module) return NULL;
20622  Py_INCREF(fake_module);
20623  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
20624  if (cached_type) {
20625  if (!PyType_Check((PyObject*)cached_type)) {
20626  PyErr_Format(PyExc_TypeError,
20627  "Shared Cython type %.200s is not a type object",
20628  type->tp_name);
20629  goto bad;
20630  }
20631  if (cached_type->tp_basicsize != type->tp_basicsize) {
20632  PyErr_Format(PyExc_TypeError,
20633  "Shared Cython type %.200s has the wrong size, try recompiling",
20634  type->tp_name);
20635  goto bad;
20636  }
20637  } else {
20638  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
20639  PyErr_Clear();
20640  if (PyType_Ready(type) < 0) goto bad;
20641  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
20642  goto bad;
20643  Py_INCREF(type);
20644  cached_type = type;
20645  }
20646 done:
20647  Py_DECREF(fake_module);
20648  return cached_type;
20649 bad:
20650  Py_XDECREF(cached_type);
20651  cached_type = NULL;
20652  goto done;
20653 }
20654 
20655 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
20656  PyObject *tmp_type, *tmp_value, *tmp_tb;
20657 #if CYTHON_COMPILING_IN_CPYTHON
20658  PyThreadState *tstate = PyThreadState_GET();
20659  tmp_type = tstate->exc_type;
20660  tmp_value = tstate->exc_value;
20661  tmp_tb = tstate->exc_traceback;
20662  tstate->exc_type = *type;
20663  tstate->exc_value = *value;
20664  tstate->exc_traceback = *tb;
20665 #else
20666  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
20667  PyErr_SetExcInfo(*type, *value, *tb);
20668 #endif
20669  *type = tmp_type;
20670  *value = tmp_value;
20671  *tb = tmp_tb;
20672 }
20673 
20674 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
20675  PyObject *method, *result = NULL;
20676  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
20677  if (unlikely(!method)) goto bad;
20678 #if CYTHON_COMPILING_IN_CPYTHON
20679  if (likely(PyMethod_Check(method))) {
20680  PyObject *self = PyMethod_GET_SELF(method);
20681  if (likely(self)) {
20682  PyObject *args;
20683  PyObject *function = PyMethod_GET_FUNCTION(method);
20684  args = PyTuple_New(2);
20685  if (unlikely(!args)) goto bad;
20686  Py_INCREF(self);
20687  PyTuple_SET_ITEM(args, 0, self);
20688  Py_INCREF(arg);
20689  PyTuple_SET_ITEM(args, 1, arg);
20690  Py_INCREF(function);
20691  Py_DECREF(method); method = NULL;
20692  result = __Pyx_PyObject_Call(function, args, NULL);
20693  Py_DECREF(args);
20694  Py_DECREF(function);
20695  return result;
20696  }
20697  }
20698 #endif
20699  result = __Pyx_PyObject_CallOneArg(method, arg);
20700 bad:
20701  Py_XDECREF(method);
20702  return result;
20703 }
20704 
20705 static PyObject *__Pyx_Generator_Next(PyObject *self);
20706 static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
20707 static PyObject *__Pyx_Generator_Close(PyObject *self);
20708 static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
20709 static PyTypeObject *__pyx_GeneratorType = 0;
20710 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
20711 #define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
20712 #if 1 || PY_VERSION_HEX < 0x030300B0
20713 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
20714  PyObject *et, *ev, *tb;
20715  PyObject *value = NULL;
20716  __Pyx_ErrFetch(&et, &ev, &tb);
20717  if (!et) {
20718  Py_XDECREF(tb);
20719  Py_XDECREF(ev);
20720  Py_INCREF(Py_None);
20721  *pvalue = Py_None;
20722  return 0;
20723  }
20724  if (unlikely(et != PyExc_StopIteration) &&
20725  unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
20726  __Pyx_ErrRestore(et, ev, tb);
20727  return -1;
20728  }
20729  if (likely(et == PyExc_StopIteration)) {
20730  if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
20731  if (!ev) {
20732  Py_INCREF(Py_None);
20733  ev = Py_None;
20734  }
20735  Py_XDECREF(tb);
20736  Py_DECREF(et);
20737  *pvalue = ev;
20738  return 0;
20739  }
20740  }
20741  PyErr_NormalizeException(&et, &ev, &tb);
20742  if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
20743  __Pyx_ErrRestore(et, ev, tb);
20744  return -1;
20745  }
20746  Py_XDECREF(tb);
20747  Py_DECREF(et);
20748 #if PY_VERSION_HEX >= 0x030300A0
20749  value = ((PyStopIterationObject *)ev)->value;
20750  Py_INCREF(value);
20751  Py_DECREF(ev);
20752 #else
20753  {
20754  PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args);
20755  Py_DECREF(ev);
20756  if (likely(args)) {
20757  value = PyObject_GetItem(args, 0);
20758  Py_DECREF(args);
20759  }
20760  if (unlikely(!value)) {
20761  __Pyx_ErrRestore(NULL, NULL, NULL);
20762  Py_INCREF(Py_None);
20763  value = Py_None;
20764  }
20765  }
20766 #endif
20767  *pvalue = value;
20768  return 0;
20769 }
20770 #endif
20771 static CYTHON_INLINE
20772 void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
20773  PyObject *exc_type = self->exc_type;
20774  PyObject *exc_value = self->exc_value;
20775  PyObject *exc_traceback = self->exc_traceback;
20776  self->exc_type = NULL;
20777  self->exc_value = NULL;
20778  self->exc_traceback = NULL;
20779  Py_XDECREF(exc_type);
20780  Py_XDECREF(exc_value);
20781  Py_XDECREF(exc_traceback);
20782 }
20783 static CYTHON_INLINE
20784 int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
20785  if (unlikely(gen->is_running)) {
20786  PyErr_SetString(PyExc_ValueError,
20787  "generator already executing");
20788  return 1;
20789  }
20790  return 0;
20791 }
20792 static CYTHON_INLINE
20793 PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
20794  PyObject *retval;
20795  assert(!self->is_running);
20796  if (unlikely(self->resume_label == 0)) {
20797  if (unlikely(value && value != Py_None)) {
20798  PyErr_SetString(PyExc_TypeError,
20799  "can't send non-None value to a "
20800  "just-started generator");
20801  return NULL;
20802  }
20803  }
20804  if (unlikely(self->resume_label == -1)) {
20805  PyErr_SetNone(PyExc_StopIteration);
20806  return NULL;
20807  }
20808  if (value) {
20809 #if CYTHON_COMPILING_IN_PYPY
20810 #else
20811  if (self->exc_traceback) {
20812  PyThreadState *tstate = PyThreadState_GET();
20813  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
20814  PyFrameObject *f = tb->tb_frame;
20815  Py_XINCREF(tstate->frame);
20816  assert(f->f_back == NULL);
20817  f->f_back = tstate->frame;
20818  }
20819 #endif
20820  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
20821  &self->exc_traceback);
20822  } else {
20823  __Pyx_Generator_ExceptionClear(self);
20824  }
20825  self->is_running = 1;
20826  retval = self->body((PyObject *) self, value);
20827  self->is_running = 0;
20828  if (retval) {
20829  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
20830  &self->exc_traceback);
20831 #if CYTHON_COMPILING_IN_PYPY
20832 #else
20833  if (self->exc_traceback) {
20834  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
20835  PyFrameObject *f = tb->tb_frame;
20836  Py_CLEAR(f->f_back);
20837  }
20838 #endif
20839  } else {
20840  __Pyx_Generator_ExceptionClear(self);
20841  }
20842  return retval;
20843 }
20844 static CYTHON_INLINE
20845 PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
20846  PyObject *ret;
20847  PyObject *val = NULL;
20848  __Pyx_Generator_Undelegate(gen);
20849  __Pyx_PyGen_FetchStopIterationValue(&val);
20850  ret = __Pyx_Generator_SendEx(gen, val);
20851  Py_XDECREF(val);
20852  return ret;
20853 }
20854 static PyObject *__Pyx_Generator_Next(PyObject *self) {
20855  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
20856  PyObject *yf = gen->yieldfrom;
20857  if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20858  return NULL;
20859  if (yf) {
20860  PyObject *ret;
20861  gen->is_running = 1;
20862  ret = Py_TYPE(yf)->tp_iternext(yf);
20863  gen->is_running = 0;
20864  if (likely(ret)) {
20865  return ret;
20866  }
20867  return __Pyx_Generator_FinishDelegation(gen);
20868  }
20869  return __Pyx_Generator_SendEx(gen, Py_None);
20870 }
20871 static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
20872  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
20873  PyObject *yf = gen->yieldfrom;
20874  if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20875  return NULL;
20876  if (yf) {
20877  PyObject *ret;
20878  gen->is_running = 1;
20879  if (__Pyx_Generator_CheckExact(yf)) {
20880  ret = __Pyx_Generator_Send(yf, value);
20881  } else {
20882  if (value == Py_None)
20883  ret = PyIter_Next(yf);
20884  else
20885  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
20886  }
20887  gen->is_running = 0;
20888  if (likely(ret)) {
20889  return ret;
20890  }
20891  return __Pyx_Generator_FinishDelegation(gen);
20892  }
20893  return __Pyx_Generator_SendEx(gen, value);
20894 }
20895 static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
20896  PyObject *retval = NULL;
20897  int err = 0;
20898  if (__Pyx_Generator_CheckExact(yf)) {
20899  retval = __Pyx_Generator_Close(yf);
20900  if (!retval)
20901  return -1;
20902  } else {
20903  PyObject *meth;
20904  gen->is_running = 1;
20905  meth = PyObject_GetAttr(yf, __pyx_n_s_close);
20906  if (unlikely(!meth)) {
20907  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
20908  PyErr_WriteUnraisable(yf);
20909  }
20910  PyErr_Clear();
20911  } else {
20912  retval = PyObject_CallFunction(meth, NULL);
20913  Py_DECREF(meth);
20914  if (!retval)
20915  err = -1;
20916  }
20917  gen->is_running = 0;
20918  }
20919  Py_XDECREF(retval);
20920  return err;
20921 }
20922 static PyObject *__Pyx_Generator_Close(PyObject *self) {
20923  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
20924  PyObject *retval, *raised_exception;
20925  PyObject *yf = gen->yieldfrom;
20926  int err = 0;
20927  if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20928  return NULL;
20929  if (yf) {
20930  Py_INCREF(yf);
20931  err = __Pyx_Generator_CloseIter(gen, yf);
20932  __Pyx_Generator_Undelegate(gen);
20933  Py_DECREF(yf);
20934  }
20935  if (err == 0)
20936  PyErr_SetNone(PyExc_GeneratorExit);
20937  retval = __Pyx_Generator_SendEx(gen, NULL);
20938  if (retval) {
20939  Py_DECREF(retval);
20940  PyErr_SetString(PyExc_RuntimeError,
20941  "generator ignored GeneratorExit");
20942  return NULL;
20943  }
20944  raised_exception = PyErr_Occurred();
20945  if (!raised_exception
20946  || raised_exception == PyExc_StopIteration
20947  || raised_exception == PyExc_GeneratorExit
20948  || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
20949  || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
20950  {
20951  if (raised_exception) PyErr_Clear();
20952  Py_INCREF(Py_None);
20953  return Py_None;
20954  }
20955  return NULL;
20956 }
20957 static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
20958  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
20959  PyObject *typ;
20960  PyObject *tb = NULL;
20961  PyObject *val = NULL;
20962  PyObject *yf = gen->yieldfrom;
20963  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
20964  return NULL;
20965  if (unlikely(__Pyx_Generator_CheckRunning(gen)))
20966  return NULL;
20967  if (yf) {
20968  PyObject *ret;
20969  Py_INCREF(yf);
20970  if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
20971  int err = __Pyx_Generator_CloseIter(gen, yf);
20972  Py_DECREF(yf);
20973  __Pyx_Generator_Undelegate(gen);
20974  if (err < 0)
20975  return __Pyx_Generator_SendEx(gen, NULL);
20976  goto throw_here;
20977  }
20978  gen->is_running = 1;
20979  if (__Pyx_Generator_CheckExact(yf)) {
20980  ret = __Pyx_Generator_Throw(yf, args);
20981  } else {
20982  PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw);
20983  if (unlikely(!meth)) {
20984  Py_DECREF(yf);
20985  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
20986  gen->is_running = 0;
20987  return NULL;
20988  }
20989  PyErr_Clear();
20990  __Pyx_Generator_Undelegate(gen);
20991  gen->is_running = 0;
20992  goto throw_here;
20993  }
20994  ret = PyObject_CallObject(meth, args);
20995  Py_DECREF(meth);
20996  }
20997  gen->is_running = 0;
20998  Py_DECREF(yf);
20999  if (!ret) {
21000  ret = __Pyx_Generator_FinishDelegation(gen);
21001  }
21002  return ret;
21003  }
21004 throw_here:
21005  __Pyx_Raise(typ, val, tb, NULL);
21006  return __Pyx_Generator_SendEx(gen, NULL);
21007 }
21008 static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
21009  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
21010  Py_VISIT(gen->closure);
21011  Py_VISIT(gen->classobj);
21012  Py_VISIT(gen->yieldfrom);
21013  Py_VISIT(gen->exc_type);
21014  Py_VISIT(gen->exc_value);
21015  Py_VISIT(gen->exc_traceback);
21016  return 0;
21017 }
21018 static int __Pyx_Generator_clear(PyObject *self) {
21019  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
21020  Py_CLEAR(gen->closure);
21021  Py_CLEAR(gen->classobj);
21022  Py_CLEAR(gen->yieldfrom);
21023  Py_CLEAR(gen->exc_type);
21024  Py_CLEAR(gen->exc_value);
21025  Py_CLEAR(gen->exc_traceback);
21026  Py_CLEAR(gen->gi_name);
21027  Py_CLEAR(gen->gi_qualname);
21028  return 0;
21029 }
21030 static void __Pyx_Generator_dealloc(PyObject *self) {
21031  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
21032  PyObject_GC_UnTrack(gen);
21033  if (gen->gi_weakreflist != NULL)
21034  PyObject_ClearWeakRefs(self);
21035  if (gen->resume_label > 0) {
21036  PyObject_GC_Track(self);
21037 #if PY_VERSION_HEX >= 0x030400a1
21038  if (PyObject_CallFinalizerFromDealloc(self))
21039 #else
21040  Py_TYPE(gen)->tp_del(self);
21041  if (self->ob_refcnt > 0)
21042 #endif
21043  {
21044  return;
21045  }
21046  PyObject_GC_UnTrack(self);
21047  }
21048  __Pyx_Generator_clear(self);
21049  PyObject_GC_Del(gen);
21050 }
21051 static void __Pyx_Generator_del(PyObject *self) {
21052  PyObject *res;
21053  PyObject *error_type, *error_value, *error_traceback;
21054  __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
21055  if (gen->resume_label <= 0)
21056  return ;
21057 #if PY_VERSION_HEX < 0x030400a1
21058  assert(self->ob_refcnt == 0);
21059  self->ob_refcnt = 1;
21060 #endif
21061  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
21062  res = __Pyx_Generator_Close(self);
21063  if (res == NULL)
21064  PyErr_WriteUnraisable(self);
21065  else
21066  Py_DECREF(res);
21067  __Pyx_ErrRestore(error_type, error_value, error_traceback);
21068 #if PY_VERSION_HEX < 0x030400a1
21069  assert(self->ob_refcnt > 0);
21070  if (--self->ob_refcnt == 0) {
21071  return;
21072  }
21073  {
21074  Py_ssize_t refcnt = self->ob_refcnt;
21075  _Py_NewReference(self);
21076  self->ob_refcnt = refcnt;
21077  }
21078 #if CYTHON_COMPILING_IN_CPYTHON
21079  assert(PyType_IS_GC(self->ob_type) &&
21080  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
21081  _Py_DEC_REFTOTAL;
21082 #endif
21083 #ifdef COUNT_ALLOCS
21084  --Py_TYPE(self)->tp_frees;
21085  --Py_TYPE(self)->tp_allocs;
21086 #endif
21087 #endif
21088 }
21089 static PyObject *
21090 __Pyx_Generator_get_name(__pyx_GeneratorObject *self)
21091 {
21092  Py_INCREF(self->gi_name);
21093  return self->gi_name;
21094 }
21095 static int
21096 __Pyx_Generator_set_name(__pyx_GeneratorObject *self, PyObject *value)
21097 {
21098  PyObject *tmp;
21099 #if PY_MAJOR_VERSION >= 3
21100  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
21101 #else
21102  if (unlikely(value == NULL || !PyString_Check(value))) {
21103 #endif
21104  PyErr_SetString(PyExc_TypeError,
21105  "__name__ must be set to a string object");
21106  return -1;
21107  }
21108  tmp = self->gi_name;
21109  Py_INCREF(value);
21110  self->gi_name = value;
21111  Py_XDECREF(tmp);
21112  return 0;
21113 }
21114 static PyObject *
21115 __Pyx_Generator_get_qualname(__pyx_GeneratorObject *self)
21116 {
21117  Py_INCREF(self->gi_qualname);
21118  return self->gi_qualname;
21119 }
21120 static int
21121 __Pyx_Generator_set_qualname(__pyx_GeneratorObject *self, PyObject *value)
21122 {
21123  PyObject *tmp;
21124 #if PY_MAJOR_VERSION >= 3
21125  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
21126 #else
21127  if (unlikely(value == NULL || !PyString_Check(value))) {
21128 #endif
21129  PyErr_SetString(PyExc_TypeError,
21130  "__qualname__ must be set to a string object");
21131  return -1;
21132  }
21133  tmp = self->gi_qualname;
21134  Py_INCREF(value);
21135  self->gi_qualname = value;
21136  Py_XDECREF(tmp);
21137  return 0;
21138 }
21139 static PyGetSetDef __pyx_Generator_getsets[] = {
21140  {(char *) "__name__", (getter)__Pyx_Generator_get_name, (setter)__Pyx_Generator_set_name,
21141  (char*) PyDoc_STR("name of the generator"), 0},
21142  {(char *) "__qualname__", (getter)__Pyx_Generator_get_qualname, (setter)__Pyx_Generator_set_qualname,
21143  (char*) PyDoc_STR("qualified name of the generator"), 0},
21144  {0, 0, 0, 0, 0}
21145 };
21146 static PyMemberDef __pyx_Generator_memberlist[] = {
21147  {(char *) "gi_running", T_BOOL, offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL},
21148  {0, 0, 0, 0, 0}
21149 };
21150 static PyMethodDef __pyx_Generator_methods[] = {
21151  {"send", (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
21152  {"throw", (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
21153  {"close", (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
21154  {0, 0, 0, 0}
21155 };
21156 static PyTypeObject __pyx_GeneratorType_type = {
21157  PyVarObject_HEAD_INIT(0, 0)
21158  "generator",
21159  sizeof(__pyx_GeneratorObject),
21160  0,
21161  (destructor) __Pyx_Generator_dealloc,
21162  0,
21163  0,
21164  0,
21165 #if PY_MAJOR_VERSION < 3
21166  0,
21167 #else
21168  0,
21169 #endif
21170  0,
21171  0,
21172  0,
21173  0,
21174  0,
21175  0,
21176  0,
21177  0,
21178  0,
21179  0,
21180  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
21181  0,
21182  (traverseproc) __Pyx_Generator_traverse,
21183  0,
21184  0,
21185  offsetof(__pyx_GeneratorObject, gi_weakreflist),
21186  0,
21187  (iternextfunc) __Pyx_Generator_Next,
21188  __pyx_Generator_methods,
21189  __pyx_Generator_memberlist,
21190  __pyx_Generator_getsets,
21191  0,
21192  0,
21193  0,
21194  0,
21195  0,
21196  0,
21197  0,
21198  0,
21199  0,
21200  0,
21201  0,
21202  0,
21203  0,
21204  0,
21205  0,
21206 #if PY_VERSION_HEX >= 0x030400a1
21207  0,
21208 #else
21209  __Pyx_Generator_del,
21210 #endif
21211  0,
21212 #if PY_VERSION_HEX >= 0x030400a1
21213  __Pyx_Generator_del,
21214 #endif
21215 };
21216 static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
21217  PyObject *closure, PyObject *name, PyObject *qualname) {
21218  __pyx_GeneratorObject *gen =
21219  PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
21220  if (gen == NULL)
21221  return NULL;
21222  gen->body = body;
21223  gen->closure = closure;
21224  Py_XINCREF(closure);
21225  gen->is_running = 0;
21226  gen->resume_label = 0;
21227  gen->classobj = NULL;
21228  gen->yieldfrom = NULL;
21229  gen->exc_type = NULL;
21230  gen->exc_value = NULL;
21231  gen->exc_traceback = NULL;
21232  gen->gi_weakreflist = NULL;
21233  Py_XINCREF(qualname);
21234  gen->gi_qualname = qualname;
21235  Py_XINCREF(name);
21236  gen->gi_name = name;
21237  PyObject_GC_Track(gen);
21238  return gen;
21239 }
21240 static int __pyx_Generator_init(void) {
21241  __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
21242  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
21243  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
21244  if (__pyx_GeneratorType == NULL) {
21245  return -1;
21246  }
21247  return 0;
21248 }
21249 
21250 static int __Pyx_check_binary_version(void) {
21251  char ctversion[4], rtversion[4];
21252  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
21253  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
21254  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
21255  char message[200];
21256  PyOS_snprintf(message, sizeof(message),
21257  "compiletime version %s of module '%.100s' "
21258  "does not match runtime version %s",
21259  ctversion, __Pyx_MODULE_NAME, rtversion);
21260  return PyErr_WarnEx(NULL, message, 1);
21261  }
21262  return 0;
21263 }
21264 
21265 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
21266  while (t->p) {
21267  #if PY_MAJOR_VERSION < 3
21268  if (t->is_unicode) {
21269  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
21270  } else if (t->intern) {
21271  *t->p = PyString_InternFromString(t->s);
21272  } else {
21273  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
21274  }
21275  #else
21276  if (t->is_unicode | t->is_str) {
21277  if (t->intern) {
21278  *t->p = PyUnicode_InternFromString(t->s);
21279  } else if (t->encoding) {
21280  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
21281  } else {
21282  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
21283  }
21284  } else {
21285  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
21286  }
21287  #endif
21288  if (!*t->p)
21289  return -1;
21290  ++t;
21291  }
21292  return 0;
21293 }
21294 
21295 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
21296  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
21297 }
21298 static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
21299  Py_ssize_t ignore;
21300  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
21301 }
21302 static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
21303 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
21304  if (
21305 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
21306  __Pyx_sys_getdefaultencoding_not_ascii &&
21307 #endif
21308  PyUnicode_Check(o)) {
21309 #if PY_VERSION_HEX < 0x03030000
21310  char* defenc_c;
21311  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
21312  if (!defenc) return NULL;
21313  defenc_c = PyBytes_AS_STRING(defenc);
21314 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
21315  {
21316  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
21317  char* c;
21318  for (c = defenc_c; c < end; c++) {
21319  if ((unsigned char) (*c) >= 128) {
21320  PyUnicode_AsASCIIString(o);
21321  return NULL;
21322  }
21323  }
21324  }
21325 #endif
21326  *length = PyBytes_GET_SIZE(defenc);
21327  return defenc_c;
21328 #else
21329  if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
21330 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
21331  if (PyUnicode_IS_ASCII(o)) {
21332  *length = PyUnicode_GET_LENGTH(o);
21333  return PyUnicode_AsUTF8(o);
21334  } else {
21335  PyUnicode_AsASCIIString(o);
21336  return NULL;
21337  }
21338 #else
21339  return PyUnicode_AsUTF8AndSize(o, length);
21340 #endif
21341 #endif
21342  } else
21343 #endif
21344 #if !CYTHON_COMPILING_IN_PYPY
21345  if (PyByteArray_Check(o)) {
21346  *length = PyByteArray_GET_SIZE(o);
21347  return PyByteArray_AS_STRING(o);
21348  } else
21349 #endif
21350  {
21351  char* result;
21352  int r = PyBytes_AsStringAndSize(o, &result, length);
21353  if (unlikely(r < 0)) {
21354  return NULL;
21355  } else {
21356  return result;
21357  }
21358  }
21359 }
21360 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
21361  int is_true = x == Py_True;
21362  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
21363  else return PyObject_IsTrue(x);
21364 }
21365 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
21366  PyNumberMethods *m;
21367  const char *name = NULL;
21368  PyObject *res = NULL;
21369 #if PY_MAJOR_VERSION < 3
21370  if (PyInt_Check(x) || PyLong_Check(x))
21371 #else
21372  if (PyLong_Check(x))
21373 #endif
21374  return Py_INCREF(x), x;
21375  m = Py_TYPE(x)->tp_as_number;
21376 #if PY_MAJOR_VERSION < 3
21377  if (m && m->nb_int) {
21378  name = "int";
21379  res = PyNumber_Int(x);
21380  }
21381  else if (m && m->nb_long) {
21382  name = "long";
21383  res = PyNumber_Long(x);
21384  }
21385 #else
21386  if (m && m->nb_int) {
21387  name = "int";
21388  res = PyNumber_Long(x);
21389  }
21390 #endif
21391  if (res) {
21392 #if PY_MAJOR_VERSION < 3
21393  if (!PyInt_Check(res) && !PyLong_Check(res)) {
21394 #else
21395  if (!PyLong_Check(res)) {
21396 #endif
21397  PyErr_Format(PyExc_TypeError,
21398  "__%.4s__ returned non-%.4s (type %.200s)",
21399  name, name, Py_TYPE(res)->tp_name);
21400  Py_DECREF(res);
21401  return NULL;
21402  }
21403  }
21404  else if (!PyErr_Occurred()) {
21405  PyErr_SetString(PyExc_TypeError,
21406  "an integer is required");
21407  }
21408  return res;
21409 }
21410 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
21411  Py_ssize_t ival;
21412  PyObject *x;
21413 #if PY_MAJOR_VERSION < 3
21414  if (likely(PyInt_CheckExact(b)))
21415  return PyInt_AS_LONG(b);
21416 #endif
21417  if (likely(PyLong_CheckExact(b))) {
21418  #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
21419  #if CYTHON_USE_PYLONG_INTERNALS
21420  switch (Py_SIZE(b)) {
21421  case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
21422  case 0: return 0;
21423  case 1: return ((PyLongObject*)b)->ob_digit[0];
21424  }
21425  #endif
21426  #endif
21427  return PyLong_AsSsize_t(b);
21428  }
21429  x = PyNumber_Index(b);
21430  if (!x) return -1;
21431  ival = PyInt_AsSsize_t(x);
21432  Py_DECREF(x);
21433  return ival;
21434 }
21435 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
21436  return PyInt_FromSize_t(ival);
21437 }
21438 
21439 
21440 #endif /* Py_PYTHON_H */
int compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b)
"lexicographic compare" eg. {3,4,5} is less than {3,7,8}
const Multivector< Scalar_T, LO, HI > sqrt(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Square root of multivector with specified complexifier.
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
Definition: PyClical.h:98
const Multivector< Scalar_T, LO, HI > acosh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic cosine of multivector with specified complexifier.
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
Definition: PyClical.h:69
const Multivector< Scalar_T, LO, HI > sinh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic sine of multivector.
index_set< lo_ndx, hi_ndx > IndexSet
Definition: PyClical.h:157
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
const Multivector< Scalar_T, LO, HI > log(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Natural logarithm of multivector with specified complexifier.
String clifford_to_repr(const Multivector_T &mv)
The “official” string representation of Multivector_T mv.
Definition: PyClical.h:87
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
Definition: PyClical.h:115
const Multivector< Scalar_T, LO, HI > sin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Sine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > atanh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic tangent of multivector with specified complexifier.
const framed_multi< Scalar_T, LO, HI > exp(const framed_multi< Scalar_T, LO, HI > &val)
Exponential of multivector.
const Multivector< Scalar_T, LO, HI > cos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Cosine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > tanh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic tangent of multivector.
index_t min_neg(const index_set< LO, HI > &ist)
Minimum negative index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse sine of multivector with specified complexifier.
matrix_multi< scalar_t > Clifford
Definition: PyClical.h:160
const Multivector< Scalar_T, LO, HI > complexifier(const Multivector< Scalar_T, LO, HI > &val)
Square root of -1 which commutes with all members of the frame of the given multivector.
PyObject * PyFloat_FromDouble(Scalar_T v)
Definition: PyClical.h:59
const Multivector< Scalar_T, LO, HI > atan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse tangent of multivector with specified complexifier.
double scalar_t
Definition: PyClical.h:159
const Multivector< Scalar_T, LO, HI > tan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Tangent of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > acos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse cosine of multivector with specified complexifier.
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
Definition: PyClical.h:78
index_t max_pos(const index_set< LO, HI > &ist)
Maximum positive index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asinh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic sine of multivector with specified complexifier.
Scalar_T max_abs(const Multivector< Scalar_T, LO, HI > &val)
Maximum of absolute values of components of multivector: multivector infinity norm.
const Multivector< Scalar_T, LO, HI > cosh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic cosine of multivector.
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10.52)].
Definition: PyClical.h:126
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].
Definition: PyClical.h:138