Generated by Cython 0.9.6.13 on Fri Apr 11 09:10:59 2008
Raw output: _Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_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: from sage.rings.integer cimport Integer
7: def last_digits9(Integer n, Integer e, unsigned int d):
static PyObject *__pyx_pf_71_Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_spyx_0_last_digits9(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_71_Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_spyx_0_last_digits9[] = "File: _Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_spyx_0.pyx (starting at line 7)\n\n Return the last d digits of n^e.\n "; static PyObject *__pyx_pf_71_Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_spyx_0_last_digits9(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_4sage_5rings_7integer_Integer *__pyx_v_n = 0; struct __pyx_obj_4sage_5rings_7integer_Integer *__pyx_v_e = 0; unsigned int __pyx_v_d; PyObject *__pyx_r; static char *__pyx_argnames[] = {"n","e","d",0}; if (likely(!__pyx_kwds) && likely(PyTuple_GET_SIZE(__pyx_args) == 3)) { __pyx_v_n = ((struct __pyx_obj_4sage_5rings_7integer_Integer *)PyTuple_GET_ITEM(__pyx_args, 0)); __pyx_v_e = ((struct __pyx_obj_4sage_5rings_7integer_Integer *)PyTuple_GET_ITEM(__pyx_args, 1)); __pyx_v_d = PyInt_AsUnsignedLongMask(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_d == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L2;} } else { if (unlikely(!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOI", __pyx_argnames, &__pyx_v_n, &__pyx_v_e, &__pyx_v_d))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L2;} } goto __pyx_L3; __pyx_L2:; __Pyx_AddTraceback("_Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_spyx_0.last_digits9"); return NULL; __pyx_L3:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_4sage_5rings_7integer_Integer, 1, "n"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_e), __pyx_ptype_4sage_5rings_7integer_Integer, 1, "e"))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;} return; __Pyx_AddTraceback("_Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_spyx_0"); }
8: """
9: Return the last d digits of n^e.
10: """
11:
12: return n
Py_INCREF(((PyObject *)__pyx_v_n)); __pyx_r = ((PyObject *)__pyx_v_n); goto __pyx_L0; __pyx_r = Py_None; Py_INCREF(Py_None); goto __pyx_L0; __pyx_L1:; __Pyx_AddTraceback("_Users_was__sage_sage_notebook_worksheets_admin_135_code_sage125_spyx_0.last_digits9"); __pyx_r = NULL; __pyx_L0:; return __pyx_r; }