#include <catacomb/mpmont.h>
#include <catacomb/mpbarrett.h>
#include <catacomb/mpreduce.h>
+#include <catacomb/mp-fibonacci.h>
#include <catacomb/pgen.h>
#include <catacomb/pfilt.h>
return mp_pywrap(x);
}
+static PyObject *meth__MP_fibonacci(PyObject *me, PyObject *arg)
+{
+ long i;
+ mp *x;
+ if (!PyArg_ParseTuple(arg, "Ol:fibonacci", &me, &i)) return (0);
+ x = mp_fibonacci(i);
+ return mp_pywrap(x);
+}
+
#define LOADOP(pre, py, name) \
static PyObject *meth__##py##_##name(PyObject *me, PyObject *arg) \
{ \
or `R_' for other radix R.")
METH (_MP_factorial, "\
factorial(I) -> I!: compute factorial")
+ METH (_MP_fibonacci, "\
+fibonacci(I) -> F(I): compute Fibonacci number")
METH (_MP_loadl, "\
loadl(STR) -> X: read little-endian bytes")
METH (_MP_loadb, "\