Generated by Cython 0.9.6.13 on Tue Apr 8 11:42:27 2008

Raw output: _Users_was__sage_sage_notebook_worksheets_admin_66_code_sage159_spyx_0.c

 1: 
 2: include "interrupt.pxi"  # ctrl-c interrupt block support
 3: include "stdsage.pxi"  # ctrl-c interrupt block support
 4: 
 5: include "cdefs.pxi"
 6: def is2pow(n):
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_1;

static PyObject *__pyx_pf_70_Users_was__sage_sage_notebook_worksheets_admin_66_code_sage159_spyx_0_is2pow(PyObject *__pyx_self, PyObject *__pyx_v_n); /*proto*/
static char __pyx_doc_70_Users_was__sage_sage_notebook_worksheets_admin_66_code_sage159_spyx_0_is2pow[] = "File: _Users_was__sage_sage_notebook_worksheets_admin_66_code_sage159_spyx_0.pyx (starting at line 6)";
static PyObject *__pyx_pf_70_Users_was__sage_sage_notebook_worksheets_admin_66_code_sage159_spyx_0_is2pow(PyObject *__pyx_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  Py_INCREF(__pyx_v_n);
  return;
  __Pyx_AddTraceback("_Users_was__sage_sage_notebook_worksheets_admin_66_code_sage159_spyx_0");
}
 7:     while n != 0 coerceand n%2 == 0:
  while (1) {
    __pyx_1 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_NE); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
    if (__pyx_2) {
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_3 = __pyx_v_n;
      Py_INCREF(__pyx_3);
      __pyx_4 = PyNumber_Remainder(__pyx_3, __pyx_int_2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_1 = PyObject_RichCompare(__pyx_4, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }
    __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_1); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    if (!__pyx_2) break;
 8:         n = n >> 1
    __pyx_3 = __pyx_v_n;
    Py_INCREF(__pyx_3);
    __pyx_4 = PyNumber_Rshift(__pyx_3, __pyx_int_1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_n);
    __pyx_v_n = __pyx_4;
    __pyx_4 = 0;
  }
 9:     return n == 1
  __pyx_1 = PyObject_RichCompare(__pyx_v_n, __pyx_int_1, Py_EQ); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("_Users_was__sage_sage_notebook_worksheets_admin_66_code_sage159_spyx_0.is2pow");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_n);
  return __pyx_r;
}