1 #ifndef GINAC_UPOLY_INTERPOLATE_PADIC_TCC
2 #define GINAC_UPOLY_INTERPOLATE_PADIC_TCC
3 #include "ring_traits.h"
7 static inline cln::cl_I smod(const cln::cl_I& x, const cln::cl_I y)
9 cln::cl_I r = mod(x, y);
10 const cln::cl_I y_2 = y >> 1;
21 template<typename T> static void
22 interpolate(T& g, const typename T::value_type& gamma,
23 const typename T::value_type& modulus,
24 const std::size_t degree_hint = 1)
26 typedef typename T::value_type ring_t;
28 g.reserve(degree_hint);
31 const ring_t gi = smod(e, modulus);
33 e = exquo(e - gi, modulus);
39 #endif // GINAC_UPOLY_INTERPOLATE_PADIC_TCC