code:
///////////////////////////////////////////////////////////////
//  Copyright 2012 John Maddock. Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_

#ifndef BOOST_MP_INT_FUNC_HPP
#define BOOST_MP_INT_FUNC_HPP

#include <boost/multiprecision/number.hpp>

namespace boost{ namespace multiprecision{

namespace default_ops
{

template <class Backend>
inline void eval_qr(const Backend& x, const Backend& y, Backend& q, Backend& r)
{
   eval_divide(q, x, y);
   eval_modulus(r, x, y);
}

template <class Backend, class Integer>
inline Integer eval_integer_modulus(const Backend& x, Integer val)
{
   BOOST_MP_USING_ABS
   using default_ops::eval_modulus;
   using default_ops::eval_convert_to;
   typedef typename boost::multiprecision::detail::canonical<Integer, Backend>::type int_type;
   Backend t;
   eval_modulus(t, x, static_cast<int_type>(val));
   Integer result;
   eval_convert_to(&result, t);
   return abs(result);
}

#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4127)
#endif

template <class B>
inline void eval_gcd(B& result, const B& a, const B& b)
{
   using default_ops::eval_lsb;
   using default_ops::eval_is_zero;
   using default_ops::eval_get_sign;

   int shift;

   B u(a), v(b);

   int s = eval_get_sign(u);

   /* GCD(0,x) := x */
   if(s < 0)
   {
      u.negate();
   }
   else if(s == 0)
   {
      result = v;
      return;
   }
   s = eval_get_sign(v);
   if(s < 0)
   {
      v.negate();
   }
   else if(s == 0)
   {
      result = u;
      return;
   }

   /* Let shift := lg K, where K is the greatest power of 2
   dividing both u and v. */

   unsigned us = eval_lsb(u);
   unsigned vs = eval_lsb(v);
   shift = (std::min)(us, vs);
   eval_right_shift(u, us);
   eval_right_shift(v, vs);

   do
   {
      /* Now u and v are both odd, so diff(u, v) is even.
      Let u = min(u, v), v = diff(u, v)/2. */
      s = u.compare(v);
      if(s > 0)
         u.swap(v);
      if(s == 0)
         break;
      eval_subtract(v, u);
      vs = eval_lsb(v);
      eval_right_shift(v, vs);
   }
   while(true);

   result = u;
   eval_left_shift(result, shift);
}

#ifdef BOOST_MSVC
#pragma warning(pop)
#endif

template <class B>
inline void eval_lcm(B& result, const B& a, const B& b)
{
   typedef typename mpl::front<typename B::unsigned_types>::type ui_type;
   B t;
   eval_gcd(t, a, b);

   if(eval_is_zero(t))
   {
      result = static_cast<ui_type>(0);
   }
   else
   {
      eval_divide(result, a, t);
      eval_multiply(result, b);
   }
   if(eval_get_sign(result) < 0)
      result.negate();
}

}

template <class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type
   divide_qr(const number<Backend, ExpressionTemplates>& x, const number<Backend, ExpressionTemplates>& y,
   number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r)
{
   using default_ops::eval_qr;
   eval_qr(x.backend(), y.backend(), q.backend(), r.backend());
}

template <class Backend, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type
   divide_qr(const number<Backend, ExpressionTemplates>& x, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& y,
   number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r)
{
   divide_qr(x, number<Backend, ExpressionTemplates>(y), q, r);
}

template <class tag, class A1, class A2, class A3, class A4, class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type
   divide_qr(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, const number<Backend, ExpressionTemplates>& y,
   number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r)
{
   divide_qr(number<Backend, ExpressionTemplates>(x), y, q, r);
}

template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b, class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer>::type
   divide_qr(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& y,
   number<Backend, ExpressionTemplates>& q, number<Backend, ExpressionTemplates>& r)
{
   divide_qr(number<Backend, ExpressionTemplates>(x), number<Backend, ExpressionTemplates>(y), q, r);
}

template <class Backend, expression_template_option ExpressionTemplates, class Integer>
inline typename enable_if<mpl::and_<is_integral<Integer>, mpl::bool_<number_category<Backend>::value == number_kind_integer> >, Integer>::type
   integer_modulus(const number<Backend, ExpressionTemplates>& x, Integer val)
{
   using default_ops::eval_integer_modulus;
   return eval_integer_modulus(x.backend(), val);
}

template <class tag, class A1, class A2, class A3, class A4, class Integer>
inline typename enable_if<mpl::and_<is_integral<Integer>, mpl::bool_<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer> >, Integer>::type
   integer_modulus(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, Integer val)
{
   typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type result_type;
   return integer_modulus(result_type(x), val);
}

template <class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, unsigned>::type
   lsb(const number<Backend, ExpressionTemplates>& x)
{
   using default_ops::eval_lsb;
   return eval_lsb(x.backend());
}

template <class tag, class A1, class A2, class A3, class A4>
inline typename enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer, unsigned>::type
   lsb(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x)
{
   typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
   number_type n(x);
   using default_ops::eval_lsb;
   return eval_lsb(n.backend());
}

template <class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, unsigned>::type
   msb(const number<Backend, ExpressionTemplates>& x)
{
   using default_ops::eval_msb;
   return eval_msb(x.backend());
}

template <class tag, class A1, class A2, class A3, class A4>
inline typename enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer, unsigned>::type
   msb(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x)
{
   typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
   number_type n(x);
   using default_ops::eval_msb;
   return eval_msb(n.backend());
}

template <class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, bool>::type
   bit_test(const number<Backend, ExpressionTemplates>& x, unsigned index)
{
   using default_ops::eval_bit_test;
   return eval_bit_test(x.backend(), index);
}

template <class tag, class A1, class A2, class A3, class A4>
inline typename enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_integer, bool>::type
   bit_test(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& x, unsigned index)
{
   typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
   number_type n(x);
   using default_ops::eval_bit_test;
   return eval_bit_test(n.backend(), index);
}

template <class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, number<Backend, ExpressionTemplates>&>::type
   bit_set(number<Backend, ExpressionTemplates>& x, unsigned index)
{
   using default_ops::eval_bit_set;
   eval_bit_set(x.backend(), index);
   return x;
}

template <class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, number<Backend, ExpressionTemplates>&>::type
   bit_unset(number<Backend, ExpressionTemplates>& x, unsigned index)
{
   using default_ops::eval_bit_unset;
   eval_bit_unset(x.backend(), index);
   return x;
}

template <class Backend, expression_template_option ExpressionTemplates>
inline typename enable_if_c<number_category<Backend>::value == number_kind_integer, number<Backend, ExpressionTemplates>&>::type
   bit_flip(number<Backend, ExpressionTemplates>& x, unsigned index)
{
   using default_ops::eval_bit_flip;
   eval_bit_flip(x.backend(), index);
   return x;
}

namespace default_ops{

//
// Within powm, we need a type with twice as many digits as the argument type, define
// a traits class to obtain that type:
//
template <class Backend>
struct double_precision_type
{
   typedef Backend type;
};

//
// If the exponent is a signed integer type, then we need to
// check the value is positive:
//
template <class Backend>
inline void check_sign_of_backend(const Backend& v, const mpl::true_)
{
   if(eval_get_sign(v) < 0)
   {
      BOOST_THROW_EXCEPTION(std::runtime_error("powm requires a positive exponent."));
   }
}
template <class Backend>
inline void check_sign_of_backend(const Backend&, const mpl::false_){}
//
// Calculate (a^p)%c:
//
template <class Backend>
void eval_powm(Backend& result, const Backend& a, const Backend& p, const Backend& c)
{
   using default_ops::eval_bit_test;
   using default_ops::eval_get_sign;
   using default_ops::eval_multiply;
   using default_ops::eval_modulus;
   using default_ops::eval_right_shift;

   typedef typename double_precision_type<Backend>::type double_type;
   typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type;

   check_sign_of_backend(p, mpl::bool_<std::numeric_limits<number<Backend> >::is_signed>());

   double_type x, y(a), b(p), t;
   x = ui_type(1u);

   while(eval_get_sign(b) > 0)
   {
      if(eval_bit_test(b, 0))
      {
         eval_multiply(t, x, y);
         eval_modulus(x, t, c);
      }
      eval_multiply(t, y, y);
      eval_modulus(y, t, c);
      eval_right_shift(b, ui_type(1));
   }
   Backend x2(x);
   eval_modulus(result, x2, c);
}

template <class Backend, class Integer>
void eval_powm(Backend& result, const Backend& a, const Backend& p, Integer c)
{
   typedef typename double_precision_type<Backend>::type double_type;
   typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type;
   typedef typename boost::multiprecision::detail::canonical<Integer, double_type>::type i1_type;
   typedef typename boost::multiprecision::detail::canonical<Integer, Backend>::type i2_type;

   using default_ops::eval_bit_test;
   using default_ops::eval_get_sign;
   using default_ops::eval_multiply;
   using default_ops::eval_modulus;
   using default_ops::eval_right_shift;

   check_sign_of_backend(p, mpl::bool_<std::numeric_limits<number<Backend> >::is_signed>());

   if(eval_get_sign(p) < 0)
   {
      BOOST_THROW_EXCEPTION(std::runtime_error("powm requires a positive exponent."));
   }

   double_type x, y(a), b(p), t;
   x = ui_type(1u);

   while(eval_get_sign(b) > 0)
   {
      if(eval_bit_test(b, 0))
      {
         eval_multiply(t, x, y);
         eval_modulus(x, t, static_cast<i1_type>(c));
      }
      eval_multiply(t, y, y);
      eval_modulus(y, t, static_cast<i1_type>(c));
      eval_right_shift(b, ui_type(1));
   }
   Backend x2(x);
   eval_modulus(result, x2, static_cast<i2_type>(c));
}

template <class Backend, class Integer>
typename enable_if<is_unsigned<Integer> >::type eval_powm(Backend& result, const Backend& a, Integer b, const Backend& c)
{
   typedef typename double_precision_type<Backend>::type double_type;
   typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type;

   using default_ops::eval_bit_test;
   using default_ops::eval_get_sign;
   using default_ops::eval_multiply;
   using default_ops::eval_modulus;
   using default_ops::eval_right_shift;

   double_type x, y(a), t;
   x = ui_type(1u);

   while(b > 0)
   {
      if(b & 1)
      {
         eval_multiply(t, x, y);
         eval_modulus(x, t, c);
      }
      eval_multiply(t, y, y);
      eval_modulus(y, t, c);
      b >>= 1;
   }
   Backend x2(x);
   eval_modulus(result, x2, c);
}

template <class Backend, class Integer>
typename enable_if<is_signed<Integer> >::type eval_powm(Backend& result, const Backend& a, Integer b, const Backend& c)
{
   if(b < 0)
   {
      BOOST_THROW_EXCEPTION(std::runtime_error("powm requires a positive exponent."));
   }
   eval_powm(result, a, static_cast<typename make_unsigned<Integer>::type>(b), c);
}

template <class Backend, class Integer1, class Integer2>
typename enable_if<is_unsigned<Integer1> >::type eval_powm(Backend& result, const Backend& a, Integer1 b, Integer2 c)
{
   typedef typename double_precision_type<Backend>::type double_type;
   typedef typename boost::multiprecision::detail::canonical<unsigned char, double_type>::type ui_type;
   typedef typename boost::multiprecision::detail::canonical<Integer1, double_type>::type i1_type;
   typedef typename boost::multiprecision::detail::canonical<Integer2, Backend>::type i2_type;

   using default_ops::eval_bit_test;
   using default_ops::eval_get_sign;
   using default_ops::eval_multiply;
   using default_ops::eval_modulus;
   using default_ops::eval_right_shift;

   double_type x, y(a), t;
   x = ui_type(1u);

   while(b > 0)
   {
      if(b & 1)
      {
         eval_multiply(t, x, y);
         eval_modulus(x, t, static_cast<i1_type>(c));
      }
      eval_multiply(t, y, y);
      eval_modulus(y, t, static_cast<i1_type>(c));
      b >>= 1;
   }
   Backend x2(x);
   eval_modulus(result, x2, static_cast<i2_type>(c));
}

template <class Backend, class Integer1, class Integer2>
typename enable_if<is_signed<Integer1> >::type eval_powm(Backend& result, const Backend& a, Integer1 b, Integer2 c)
{
   if(b < 0)
   {
      BOOST_THROW_EXCEPTION(std::runtime_error("powm requires a positive exponent."));
   }
   eval_powm(result, a, static_cast<typename make_unsigned<Integer1>::type>(b), c);
}

struct powm_func
{
   template <class T, class U, class V>
   void operator()(T& result, const T& b, const U& p, const V& m)const
   {
      eval_powm(result, b, p, m);
   }
};

}

template <class T, class U, class V>
inline typename enable_if<
   mpl::and_<
      mpl::bool_<number_category<T>::value == number_kind_integer>,
      mpl::or_<
         is_number<T>,
         is_number_expression<T>
      >,
      mpl::or_<
         is_number<U>,
         is_number_expression<U>,
         is_integral<U>
      >,
      mpl::or_<
         is_number<V>,
         is_number_expression<V>,
         is_integral<V>
      >
   >,
   typename mpl::if_<
      is_no_et_number<T>,
      T,
      typename mpl::if_<
         is_no_et_number<U>,
         U,
         typename mpl::if_<
            is_no_et_number<V>,
            V,
            detail::expression<detail::function, default_ops::powm_func, T, U, V> >::type
         >::type
      >::type
   >::type
   powm(const T& b, const U& p, const V& mod)
{
   return detail::expression<detail::function, default_ops::powm_func, T, U, V>(
      default_ops::powm_func(), b, p, mod);
}

}} //namespaces

#endif


code:
//  (C) Copyright John Maddock 2007.
//  Use, modification and distribution are subject to the
//  Boost Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
//  This file is machine generated, do not edit by hand

// Polynomial evaluation using second order Horners rule
#ifndef BOOST_MATH_TOOLS_RAT_EVAL_8_HPP
#define BOOST_MATH_TOOLS_RAT_EVAL_8_HPP

namespace boost{ namespace math{ namespace tools{ namespace detail{

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*) BOOST_MATH_NOEXCEPT(V)
{
   return static_cast<V>(0);
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*) BOOST_MATH_NOEXCEPT(V)
{
   return static_cast<V>(a[0]) / static_cast<V>(b[0]);
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*) BOOST_MATH_NOEXCEPT(V)
{
   return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*) BOOST_MATH_NOEXCEPT(V)
{
   return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*) BOOST_MATH_NOEXCEPT(V)
{
   return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*) BOOST_MATH_NOEXCEPT(V)
{
   if(x <= 1)
   {
      V x2 = x * x;
      V t[4];
      t[0] = a[4] * x2 + a[2];
      t[1] = a[3] * x2 + a[1];
      t[2] = b[4] * x2 + b[2];
      t[3] = b[3] * x2 + b[1];
      t[0] *= x2;
      t[2] *= x2;
      t[0] += static_cast<V>(a[0]);
      t[2] += static_cast<V>(b[0]);
      t[1] *= x;
      t[3] *= x;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
   else
   {
      V z = 1 / x;
      V z2 = 1 / (x * x);
      V t[4];
      t[0] = a[0] * z2 + a[2];
      t[1] = a[1] * z2 + a[3];
      t[2] = b[0] * z2 + b[2];
      t[3] = b[1] * z2 + b[3];
      t[0] *= z2;
      t[2] *= z2;
      t[0] += static_cast<V>(a[4]);
      t[2] += static_cast<V>(b[4]);
      t[1] *= z;
      t[3] *= z;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*) BOOST_MATH_NOEXCEPT(V)
{
   if(x <= 1)
   {
      V x2 = x * x;
      V t[4];
      t[0] = a[5] * x2 + a[3];
      t[1] = a[4] * x2 + a[2];
      t[2] = b[5] * x2 + b[3];
      t[3] = b[4] * x2 + b[2];
      t[0] *= x2;
      t[1] *= x2;
      t[2] *= x2;
      t[3] *= x2;
      t[0] += static_cast<V>(a[1]);
      t[1] += static_cast<V>(a[0]);
      t[2] += static_cast<V>(b[1]);
      t[3] += static_cast<V>(b[0]);
      t[0] *= x;
      t[2] *= x;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
   else
   {
      V z = 1 / x;
      V z2 = 1 / (x * x);
      V t[4];
      t[0] = a[0] * z2 + a[2];
      t[1] = a[1] * z2 + a[3];
      t[2] = b[0] * z2 + b[2];
      t[3] = b[1] * z2 + b[3];
      t[0] *= z2;
      t[1] *= z2;
      t[2] *= z2;
      t[3] *= z2;
      t[0] += static_cast<V>(a[4]);
      t[1] += static_cast<V>(a[5]);
      t[2] += static_cast<V>(b[4]);
      t[3] += static_cast<V>(b[5]);
      t[0] *= z;
      t[2] *= z;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*) BOOST_MATH_NOEXCEPT(V)
{
   if(x <= 1)
   {
      V x2 = x * x;
      V t[4];
      t[0] = a[6] * x2 + a[4];
      t[1] = a[5] * x2 + a[3];
      t[2] = b[6] * x2 + b[4];
      t[3] = b[5] * x2 + b[3];
      t[0] *= x2;
      t[1] *= x2;
      t[2] *= x2;
      t[3] *= x2;
      t[0] += static_cast<V>(a[2]);
      t[1] += static_cast<V>(a[1]);
      t[2] += static_cast<V>(b[2]);
      t[3] += static_cast<V>(b[1]);
      t[0] *= x2;
      t[2] *= x2;
      t[0] += static_cast<V>(a[0]);
      t[2] += static_cast<V>(b[0]);
      t[1] *= x;
      t[3] *= x;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
   else
   {
      V z = 1 / x;
      V z2 = 1 / (x * x);
      V t[4];
      t[0] = a[0] * z2 + a[2];
      t[1] = a[1] * z2 + a[3];
      t[2] = b[0] * z2 + b[2];
      t[3] = b[1] * z2 + b[3];
      t[0] *= z2;
      t[1] *= z2;
      t[2] *= z2;
      t[3] *= z2;
      t[0] += static_cast<V>(a[4]);
      t[1] += static_cast<V>(a[5]);
      t[2] += static_cast<V>(b[4]);
      t[3] += static_cast<V>(b[5]);
      t[0] *= z2;
      t[2] *= z2;
      t[0] += static_cast<V>(a[6]);
      t[2] += static_cast<V>(b[6]);
      t[1] *= z;
      t[3] *= z;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
}

template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*) BOOST_MATH_NOEXCEPT(V)
{
   if(x <= 1)
   {
      V x2 = x * x;
      V t[4];
      t[0] = a[7] * x2 + a[5];
      t[1] = a[6] * x2 + a[4];
      t[2] = b[7] * x2 + b[5];
      t[3] = b[6] * x2 + b[4];
      t[0] *= x2;
      t[1] *= x2;
      t[2] *= x2;
      t[3] *= x2;
      t[0] += static_cast<V>(a[3]);
      t[1] += static_cast<V>(a[2]);
      t[2] += static_cast<V>(b[3]);
      t[3] += static_cast<V>(b[2]);
      t[0] *= x2;
      t[1] *= x2;
      t[2] *= x2;
      t[3] *= x2;
      t[0] += static_cast<V>(a[1]);
      t[1] += static_cast<V>(a[0]);
      t[2] += static_cast<V>(b[1]);
      t[3] += static_cast<V>(b[0]);
      t[0] *= x;
      t[2] *= x;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
   else
   {
      V z = 1 / x;
      V z2 = 1 / (x * x);
      V t[4];
      t[0] = a[0] * z2 + a[2];
      t[1] = a[1] * z2 + a[3];
      t[2] = b[0] * z2 + b[2];
      t[3] = b[1] * z2 + b[3];
      t[0] *= z2;
      t[1] *= z2;
      t[2] *= z2;
      t[3] *= z2;
      t[0] += static_cast<V>(a[4]);
      t[1] += static_cast<V>(a[5]);
      t[2] += static_cast<V>(b[4]);
      t[3] += static_cast<V>(b[5]);
      t[0] *= z2;
      t[1] *= z2;
      t[2] *= z2;
      t[3] *= z2;
      t[0] += static_cast<V>(a[6]);
      t[1] += static_cast<V>(a[7]);
      t[2] += static_cast<V>(b[6]);
      t[3] += static_cast<V>(b[7]);
      t[0] *= z;
      t[2] *= z;
      return (t[0] + t[1]) / (t[2] + t[3]);
   }
}

}}}} // namespaces

#endif // include guard

license: mit


code:
//
//  Copyright (c) 2000-2002
//  Joerg Walter, Mathias Koch
//
//  Distributed under the Boost Software License, Version 1.0. (See
//  accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//
//  The authors gratefully acknowledge the support of
//  GeNeSys mbH & Co. KG in producing this work.
//

#ifndef _BOOST_UBLAS_DUFF_
#define _BOOST_UBLAS_DUFF_

#define DD_SWITCH(n, d, r, expr) \
    { \
        unsigned r = ((n) + (d) - 1) / (d); \
        switch ((n) % (d))  { \
        case 0: do { expr;
#define DD_CASE_I(i, expr) \
        case (i): expr;
#define DD_WHILE(r) \
            } while (-- (r) > 0); \
        } \
    }

#define DD_1T(n, d, r, expr) \
    DD_WHILE(r)
#define DD_2T(n, d, r, expr) \
    DD_CASE_I(1, expr) \
    DD_1T(n, d, r, expr)
#define DD_3T(n, d, r, expr) \
    DD_CASE_I(2, expr) \
    DD_2T(n, d, r, expr)
#define DD_4T(n, d, r, expr) \
    DD_CASE_I(3, expr) \
    DD_3T(n, d, r, expr)
#define DD_5T(n, d, r, expr) \
    DD_CASE_I(4, expr) \
    DD_4T(n, d, r, expr)
#define DD_6T(n, d, r, expr) \
    DD_CASE_I(5, expr) \
    DD_5T(n, d, r, expr)
#define DD_7T(n, d, r, expr) \
    DD_CASE_I(6, expr) \
    DD_6T(n, d, r, expr)
#define DD_8T(n, d, r, expr) \
    DD_CASE_I(7, expr) \
    DD_7T(n, d, r, expr)

#define DD(n, d, r, expr) \
    DD_SWITCH(n, d, r, expr) \
    DD_##d##T(n, d, r, expr)

#endif


code:
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).

//------------------------------------------------------------------------------

#ifndef BOOST_FT_PARAMETER_TYPES_HPP_INCLUDED
#define BOOST_FT_PARAMETER_TYPES_HPP_INCLUDED

#include <boost/blank.hpp>
#include <boost/mpl/if.hpp>

#include <boost/mpl/aux_/lambda_support.hpp>

#include <boost/mpl/pop_front.hpp>

#include <boost/function_types/is_callable_builtin.hpp>
#include <boost/function_types/components.hpp>

namespace boost
{
  namespace function_types
  {
    using mpl::placeholders::_;

    template< typename T, typename ClassTypeTransform = add_reference<_> >
    struct parameter_types;

    namespace detail
    {
      template<typename T, typename ClassTypeTransform>
      struct parameter_types_impl
        : mpl::pop_front
          < typename function_types::components<T,ClassTypeTransform>::types
          >::type
      { };
    }

    template<typename T, typename ClassTypeTransform> struct parameter_types
      : mpl::if_
        < function_types::is_callable_builtin<T>
        , detail::parameter_types_impl<T,ClassTypeTransform>, boost::blank
        >::type
    {
      BOOST_MPL_AUX_LAMBDA_SUPPORT(2,parameter_types,(T,ClassTypeTransform))
    };
  }
}

#endif


code:
//  Copyright Neil Groves 2009. Use, modification and
//  distribution is subject to the Boost Software License, Version
//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORITHM_SWAP_RANGES_HPP_INCLUDED
#define BOOST_RANGE_ALGORITHM_SWAP_RANGES_HPP_INCLUDED

#include <boost/assert.hpp>
#include <boost/concept_check.hpp>
#include <boost/iterator/iterator_categories.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/range/iterator.hpp>
#include <algorithm>

namespace boost
{
    namespace range_detail
    {
        template<class Iterator1, class Iterator2>
        void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
                              Iterator2 it2, Iterator2 last2,
                              single_pass_traversal_tag,
                              single_pass_traversal_tag)
        {
            ignore_unused_variable_warning(last2);
            for (; it1 != last1; ++it1, ++it2)
            {
                BOOST_ASSERT( it2 != last2 );
                std::iter_swap(it1, it2);
            }
        }

        template<class Iterator1, class Iterator2>
        void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
                              Iterator2 it2, Iterator2 last2,
                              random_access_traversal_tag,
                              random_access_traversal_tag)
        {
            ignore_unused_variable_warning(last2);
            BOOST_ASSERT( last2 - it2 >= last1 - it1 );
            std::swap_ranges(it1, last1, it2);
        }

        template<class Iterator1, class Iterator2>
        void swap_ranges_impl(Iterator1 first1, Iterator1 last1,
                              Iterator2 first2, Iterator2 last2)
        {
            swap_ranges_impl(first1, last1, first2, last2,
                BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator1>::type(),
                BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator2>::type());
        }
    } // namespace range_detail

    namespace range
    {

/// \brief template function swap_ranges
///
/// range-based version of the swap_ranges std algorithm
///
/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
template< class SinglePassRange1, class SinglePassRange2 >
inline SinglePassRange2&
swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2)
{
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>));
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>));

    boost::range_detail::swap_ranges_impl(
        boost::begin(range1), boost::end(range1),
        boost::begin(range2), boost::end(range2));

    return range2;
}

/// \overload
template< class SinglePassRange1, class SinglePassRange2 >
inline SinglePassRange2&
swap_ranges(const SinglePassRange1& range1, SinglePassRange2& range2)
{
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange1>));
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>));

    boost::range_detail::swap_ranges_impl(
        boost::begin(range1), boost::end(range1),
        boost::begin(range2), boost::end(range2));

    return range2;
}

/// \overload
template< class SinglePassRange1, class SinglePassRange2 >
inline const SinglePassRange2&
swap_ranges(SinglePassRange1& range1, const SinglePassRange2& range2)
{
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>));
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange2>));

    boost::range_detail::swap_ranges_impl(
        boost::begin(range1), boost::end(range1),
        boost::begin(range2), boost::end(range2));

    return range2;
}

/// \overload
template< class SinglePassRange1, class SinglePassRange2 >
inline const SinglePassRange2&
swap_ranges(const SinglePassRange1& range1, const SinglePassRange2& range2)
{
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange1>));
    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange2>));

    boost::range_detail::swap_ranges_impl(
        boost::begin(range1), boost::end(range1),
        boost::begin(range2), boost::end(range2));

    return range2;
}

    } // namespace range
    using range::swap_ranges;
} // namespace boost

#endif // include guard


code:
/*=============================================================================
    Copyright (c) 2001-2011 Joel de Guzman
    Copyright (c) 2005 Eric Niebler

    Distributed under the Boost Software License, Version 1.0. (See accompanying
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_VALUE_OF_IMPL_07172005_0838)
#define FUSION_VALUE_OF_IMPL_07172005_0838

namespace boost { namespace fusion
{
    struct cons_iterator_tag;

    namespace extension
    {
        template <typename Tag>
        struct value_of_impl;

        template <>
        struct value_of_impl<cons_iterator_tag>
        {
            template <typename Iterator>
            struct apply
            {
                typedef typename Iterator::cons_type cons_type;
                typedef typename cons_type::car_type type;
            };
        };
    }

}}

#endif


code:
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

// Preprocessed version of "boost/mpl/list/list40.hpp" header
// -- DO NOT modify by hand!

namespace boost { namespace mpl {

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30
    >
struct list31
    : l_item<
          long_<31>
        , T0
        , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 >
        >
{
    typedef list31 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31
    >
struct list32
    : l_item<
          long_<32>
        , T0
        , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 >
        >
{
    typedef list32 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32
    >
struct list33
    : l_item<
          long_<33>
        , T0
        , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 >
        >
{
    typedef list33 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32, typename T33
    >
struct list34
    : l_item<
          long_<34>
        , T0
        , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 >
        >
{
    typedef list34 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32, typename T33, typename T34
    >
struct list35
    : l_item<
          long_<35>
        , T0
        , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 >
        >
{
    typedef list35 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32, typename T33, typename T34
    , typename T35
    >
struct list36
    : l_item<
          long_<36>
        , T0
        , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 >
        >
{
    typedef list36 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32, typename T33, typename T34
    , typename T35, typename T36
    >
struct list37
    : l_item<
          long_<37>
        , T0
        , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 >
        >
{
    typedef list37 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32, typename T33, typename T34
    , typename T35, typename T36, typename T37
    >
struct list38
    : l_item<
          long_<38>
        , T0
        , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 >
        >
{
    typedef list38 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32, typename T33, typename T34
    , typename T35, typename T36, typename T37, typename T38
    >
struct list39
    : l_item<
          long_<39>
        , T0
        , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 >
        >
{
    typedef list39 type;
};

template<
      typename T0, typename T1, typename T2, typename T3, typename T4
    , typename T5, typename T6, typename T7, typename T8, typename T9
    , typename T10, typename T11, typename T12, typename T13, typename T14
    , typename T15, typename T16, typename T17, typename T18, typename T19
    , typename T20, typename T21, typename T22, typename T23, typename T24
    , typename T25, typename T26, typename T27, typename T28, typename T29
    , typename T30, typename T31, typename T32, typename T33, typename T34
    , typename T35, typename T36, typename T37, typename T38, typename T39
    >
struct list40
    : l_item<
          long_<40>
        , T0
        , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 >
        >
{
    typedef list40 type;
};

}}


code:
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2014-2014.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef BOOST_CONTAINER_DETAIL_ALGORITHM_HPP
#define BOOST_CONTAINER_DETAIL_ALGORITHM_HPP

#ifndef BOOST_CONFIG_HPP
#  include <boost/config.hpp>
#endif

#if defined(BOOST_HAS_PRAGMA_ONCE)
#  pragma once
#endif

#include <boost/intrusive/detail/algorithm.hpp>

namespace boost {
namespace container {

using boost::intrusive::algo_equal;
using boost::intrusive::algo_lexicographical_compare;

}  //namespace container {
}  //namespace boost {

#endif   //#ifndef BOOST_CONTAINER_DETAIL_ALGORITHM_HPP


code:
/*=============================================================================
    Copyright (c) 2001-2011 Joel de Guzman

    Distributed under the Boost Software License, Version 1.0. (See accompanying
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_VECTOR_07072005_1244)
#define FUSION_VECTOR_07072005_1244

#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/void.hpp>
#include <boost/fusion/support/detail/enabler.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/container/vector/vector_fwd.hpp>
#include <boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/core/enable_if.hpp>

#define FUSION_HASH #

#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)

#define BOOST_FUSION_VECTOR_COPY_INIT()                                       \
    ctor_helper(rhs, is_base_of<vector, Sequence>())                          \

#define BOOST_FUSION_VECTOR_CTOR_HELPER()                                     \
    BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                  \
    static vector_n const&                                                    \
    ctor_helper(vector const& rhs, mpl::true_)                                \
    {                                                                         \
        return rhs.vec;                                                       \
    }                                                                         \
                                                                              \
    template <typename T>                                                     \
    BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                  \
    static T const&                                                           \
    ctor_helper(T const& rhs, mpl::false_)                                    \
    {                                                                         \
        return rhs;                                                           \
    }

#else

#define BOOST_FUSION_VECTOR_COPY_INIT()                                       \
    rhs                                                                       \

#define BOOST_FUSION_VECTOR_CTOR_HELPER()

#endif

#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR ".hpp")
#endif

/*=============================================================================
    Copyright (c) 2001-2011 Joel de Guzman

    Distributed under the Boost Software License, Version 1.0. (See accompanying
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

    This is an auto-generated file. Do not edit!
==============================================================================*/

#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif

namespace boost { namespace fusion
{
    struct void_;
    struct fusion_sequence_tag;

    template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
    struct vector
        : sequence_base<vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> >
    {
    private:

        typedef typename detail::vector_n_chooser<
            BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
        vector_n;

        template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
        friend struct vector;

    public:

        typedef typename vector_n::types types;
        typedef typename vector_n::fusion_tag fusion_tag;
        typedef typename vector_n::tag tag;
        typedef typename vector_n::size size;
        typedef typename vector_n::category category;
        typedef typename vector_n::is_view is_view;

        BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector()
            : vec() {}

        template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
        BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
            : vec(rhs.vec) {}

        BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector(vector const& rhs)
            : vec(rhs.vec) {}

        template <typename Sequence>
        BOOST_FUSION_GPU_ENABLED
        vector(Sequence const& rhs,
            typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
            : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}

        //  Expand a couple of forwarding constructors for arguments
        //  of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
        //
        //  vector(
        //      typename detail::call_param<T0>::type arg0
        //    , typename detail::call_param<T1>::type arg1)
        //    : vec(arg0, arg1) {}
        #include <boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp>

        template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector&
        operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
        {
            vec = rhs.vec;
            return *this;
        }

        template <typename T>
        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector&
        operator=(T const& rhs)
        {
            vec = rhs;
            return *this;
        }

        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector&
        operator=(vector const& rhs)
        {
            vec = rhs.vec;
            return *this;
        }

#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
    (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector(vector&& rhs)
            : vec(std::forward<vector_n>(rhs.vec)) {}

        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector&
        operator=(vector&& rhs)
        {
            vec = std::forward<vector_n>(rhs.vec);
            return *this;
        }

        template <typename T>
        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        vector&
        operator=(T&& rhs)
        {
            vec = BOOST_FUSION_FWD_ELEM(T, rhs);
            return *this;
        }
#endif
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
FUSION_HASH endif
#endif

        template <int N>
        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        typename add_reference<
            typename mpl::at_c<types, N>::type
        >::type
        at_impl(mpl::int_<N> index)
        {
            return vec.at_impl(index);
        }

        template <int N>
        BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        typename add_reference<
            typename add_const<
                typename mpl::at_c<types, N>::type
            >::type
        >::type
        at_impl(mpl::int_<N> index) const
        {
            return vec.at_impl(index);
        }

        template <typename I>
        BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        typename add_reference<
            typename mpl::at<types, I>::type
        >::type
        at_impl(I /*index*/)
        {
            return vec.at_impl(mpl::int_<I::value>());
        }

        template<typename I>
        BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
        typename add_reference<
            typename add_const<
                typename mpl::at<types, I>::type
            >::type
        >::type
        at_impl(I /*index*/) const
        {
            return vec.at_impl(mpl::int_<I::value>());
        }

    private:

        BOOST_FUSION_VECTOR_CTOR_HELPER()
        vector_n vec;
    };
}}

#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif

#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES

#undef FUSION_HASH
#endif


code:
// Copyright Jim Bosch 2010-2012.
// Copyright Stefan Seefeld 2016.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef boost_python_numpy_hpp_
#define boost_python_numpy_hpp_

#include <boost/python/numpy/dtype.hpp>
#include <boost/python/numpy/ndarray.hpp>
#include <boost/python/numpy/scalars.hpp>
#include <boost/python/numpy/matrix.hpp>
#include <boost/python/numpy/ufunc.hpp>
#include <boost/python/numpy/invoke_matching.hpp>

namespace boost { namespace python { namespace numpy {

/**
 *  @brief Initialize the Numpy C-API
 *
 *  This must be called before using anything in boost.numpy;
 *  It should probably be the first line inside BOOST_PYTHON_MODULE.
 *
 *  @internal This just calls the Numpy C-API functions "import_array()"
 *            and "import_ufunc()", and then calls
 *            dtype::register_scalar_converters().
 */
void initialize(bool register_scalar_converters=true);

}}} // namespace boost::python::numpy

#endif


code:
# - Extract information from a git-svn working copy
# The module defines the following variables:
#
# If the command line client executable is found two macros are defined:
# GitSubversion_WC_INFO(<dir> <var-prefix>)
# GitSubversion_WC_INFO extracts information of a subversion working copy at
# a given location. This macro defines the following variables:
#  <var-prefix>_WC_URL - url of the repository (at <dir>)
#  <var-prefix>_WC_ROOT - root url of the repository
#  <var-prefix>_WC_REVISION - current revision
#  <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit
#  <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit
#  <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit
#  <var-prefix>_WC_INFO - output of command `svn info <dir>'
# Example usage:
#  find_package(Subversion)
#  if(SUBVERSION_FOUND)
#    GitSubversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
#    message("Current revision is ${Project_WC_REVISION}")
#  endif()

find_package (Git)

if(GIT_FOUND)
  # the git-svn commands should be executed with the C locale, otherwise
  # the message (which are parsed) may be translated, Alex
  set(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
  set(ENV{LC_ALL} C)

  # execute_process(COMMAND ${Subversion_SVN_EXECUTABLE} --version
  #   OUTPUT_VARIABLE Subversion_VERSION_SVN
  #   OUTPUT_STRIP_TRAILING_WHITESPACE)

  # restore the previous LC_ALL
  set(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})

  # string(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
  #   "\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}")

  macro(GitSubversion_WC_INFO dir prefix)
    # the subversion commands should be executed with the C locale, otherwise
    # the message (which are parsed) may be translated, Alex
    set(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
    set(ENV{LC_ALL} C)

    execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${dir}/.git svn info
      OUTPUT_VARIABLE ${prefix}_WC_INFO
      ERROR_VARIABLE Git_git_svn_info_error
      RESULT_VARIABLE Git_git_svn_info_result
      OUTPUT_STRIP_TRAILING_WHITESPACE)

    if(NOT ${Git_git_svn_info_result} EQUAL 0)
      message(SEND_ERROR "Command \"${GIT_EXECUTABLE} --git-dir=${dir}/.git svn info\" failed with output:\n${Git_git_svn_info_error}")
    else()

      string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
        "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}")
      string(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
        "\\2" ${prefix}_WC_ROOT "${${prefix}_WC_INFO}")
      string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
        "\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}")
      string(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"
        "\\2" ${prefix}_WC_LAST_CHANGED_AUTHOR "${${prefix}_WC_INFO}")
      string(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*"
        "\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}")
      string(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
        "\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}")
    endif()

    # restore the previous LC_ALL
    set(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})

  endmacro()

endif()


code:
#ifndef BOOST_THREAD_PTHREAD_TIMESPEC_HPP
#define BOOST_THREAD_PTHREAD_TIMESPEC_HPP
//  (C) Copyright 2007-8 Anthony Williams
//  (C) Copyright 2012 Vicente J. Botet Escriba
//
//  Distributed under the Boost Software License, Version 1.0. (See
//  accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)

#include <boost/thread/detail/config.hpp>
#include <boost/thread/thread_time.hpp>
#if defined BOOST_THREAD_USES_DATETIME
#include <boost/date_time/posix_time/conversion.hpp>
#endif
#include <pthread.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#ifdef BOOST_THREAD_USES_CHRONO
#include <boost/chrono/duration.hpp>
#endif

#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
#     define BOOST_THREAD_TIMESPEC_MAC_API
#include <sys/time.h> //for gettimeofday and timeval
#else
#include <time.h>  // for clock_gettime
#endif

#include <boost/config/abi_prefix.hpp>

namespace boost
{
  namespace detail
  {
#if defined BOOST_THREAD_USES_DATETIME
    inline struct timespec to_timespec(boost::system_time const& abs_time)
    {
      struct timespec timeout = { 0,0};
      boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);

      timeout.tv_sec=time_since_epoch.total_seconds();
      timeout.tv_nsec=(long)(time_since_epoch.fractional_seconds()*(1000000000l/time_since_epoch.ticks_per_second()));
      return timeout;
    }
#endif
#if defined BOOST_THREAD_USES_CHRONO
    inline timespec to_timespec(chrono::nanoseconds const& ns)
    {
      struct timespec ts;
      ts.tv_sec = static_cast<long>(chrono::duration_cast<chrono::seconds>(ns).count());
      ts.tv_nsec = static_cast<long>((ns - chrono::duration_cast<chrono::seconds>(ns)).count());
      return ts;
    }

#endif

    inline timespec to_timespec(boost::intmax_t const& ns)
    {
      boost::intmax_t s = ns / 1000000000l;
      struct timespec ts;
      ts.tv_sec = static_cast<long> (s);
      ts.tv_nsec = static_cast<long> (ns - s * 1000000000l);
      return ts;
    }
    inline boost::intmax_t to_nanoseconds_int_max(timespec const& ts)
    {
      return static_cast<boost::intmax_t>(ts.tv_sec) * 1000000000l + ts.tv_nsec;
    }
    inline bool timespec_ge_zero(timespec const& ts)
    {
      return (ts.tv_sec >= 0) || (ts.tv_nsec >= 0);
    }
    inline timespec timespec_now()
    {
      timespec ts;

#if defined(BOOST_THREAD_TIMESPEC_MAC_API)
      timeval tv;
      ::gettimeofday(&tv, 0);
      ts.tv_sec = tv.tv_sec;
      ts.tv_nsec = tv.tv_usec * 1000;
#else
      if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
      {
        BOOST_ASSERT(0 && "Boost::Thread - Internal Error");
      }
#endif
      return ts;
    }
    inline timespec timespec_zero()
    {
      timespec ts;
      ts.tv_sec = 0;
      ts.tv_nsec = 0;
      return ts;
    }
    inline timespec timespec_plus(timespec const& lhs, timespec const& rhs)
    {
      return to_timespec(to_nanoseconds_int_max(lhs) + to_nanoseconds_int_max(rhs));
    }
    inline timespec timespec_minus(timespec const& lhs, timespec const& rhs)
    {
      return to_timespec(to_nanoseconds_int_max(lhs) - to_nanoseconds_int_max(rhs));
    }
    inline bool timespec_gt(timespec const& lhs, timespec const& rhs)
    {
      return to_nanoseconds_int_max(lhs) > to_nanoseconds_int_max(rhs);
    }
    inline bool timespec_ge(timespec const& lhs, timespec const& rhs)
    {
      return to_nanoseconds_int_max(lhs) >= to_nanoseconds_int_max(rhs);
    }

  }
}

#include <boost/config/abi_suffix.hpp>

#endif


code:
// qra13_64_64_irr_e.c
// Encoding/Decoding tables for Q-ary RA code (13,64) over GF(64)
// Code Name: qra13_64_64_irr_e
// (13,64) RA Code over GF(64) RF=[3x4 4x4 6x1 3x2 5x1 7x1]/18

// (c) 2016 - Nico Palermo - IV3NWV - Microtelecom Srl, Italy

// This file is part of the qracodes project, a Forward Error Control
// encoding/decoding package based on Q-ary RA (Repeat and Accumulate) LDPC codes.
//
//    qracodes is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//    qracodes is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with qracodes source distribution.
//    If not, see <http://www.gnu.org/licenses/>.

#include "qra13_64_64_irr_e.h"

#define qra_K       13 // number of information symbols
#define qra_N       64 // codeword length in symbols
#define qra_m        6 // bits/symbol
#define qra_M       64 // Symbol alphabet cardinality
#define qra_a		 1 // grouping factor
#define qra_NC      51 // number of check symbols (N-K)

// Defines used by the message passing decoder --------

#define qra_V       64 // number of variables in the code graph (N)
#define qra_C      116 // number of factors in the code graph (N +(N-K)+1)
#define qra_NMSG   218 // number of msgs in the code graph
#define qra_MAXVDEG    8   // maximum variable degree
#define qra_MAXCDEG    3   // maximum factor degree
#define qra_R     0.20313f // code rate (K/N)
#define CODE_NAME "qra_13_64_64_irr_e"

// table of the systematic symbols indexes in the accumulator chain
static const int qra_acc_input_idx[qra_NC+1] = {
 12,   4,   3,   9,   0,  11,   6,   8,  12,   1,
  2,   7,   4,  11,   3,   5,   9,   8,  12,   7,
  2,   4,  10,   3,   5,  11,  12,   8,   9,   6,
  7,   2,   5,   4,  12,   8,  11,   1,   6,   7,
  0,  10,  12,   8,  11,   5,   6,   1,   0,  10,
 12,   8
};

// table of the systematic symbols weight logarithms over GF(M)
static const  int qra_acc_input_wlog[qra_NC+1] = {
  0,  27,   0,   0,   0,  31,  28,  61,  31,   0,
  0,  52,  22,   7,  19,  47,  44,  62,  32,  50,
 52,  42,  48,  56,  40,  50,  51,  37,  37,   0,
  5,  14,   0,   0,  18,   2,   0,  45,  21,   0,
 62,   8,  11,  60,  36,  32,  17,   9,   5,   0,
 53,   0
};

// table of the logarithms of the elements of GF(M) (log(0) never used)
static const int qra_log[qra_M] = {
 -1,   0,   1,   6,   2,  12,   7,  26,   3,  32,
 13,  35,   8,  48,  27,  18,   4,  24,  33,  16,
 14,  52,  36,  54,   9,  45,  49,  38,  28,  41,
 19,  56,   5,  62,  25,  11,  34,  31,  17,  47,
 15,  23,  53,  51,  37,  44,  55,  40,  10,  61,
 46,  30,  50,  22,  39,  43,  29,  60,  42,  21,
 20,  59,  57,  58
};

// table of GF(M) elements given their logarithm
static const  int qra_exp[qra_M-1] = {
  1,   2,   4,   8,  16,  32,   3,   6,  12,  24,
 48,  35,   5,  10,  20,  40,  19,  38,  15,  30,
 60,  59,  53,  41,  17,  34,   7,  14,  28,  56,
 51,  37,   9,  18,  36,  11,  22,  44,  27,  54,
 47,  29,  58,  55,  45,  25,  50,  39,  13,  26,
 52,  43,  21,  42,  23,  46,  31,  62,  63,  61,
 57,  49,  33
};

// table of the messages weight logarithms over GF(M)
static const  int qra_msgw[qra_NMSG] = {
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,  27,   0,   0,   0,  31,
 28,  61,  31,   0,   0,  52,  22,   7,  19,  47,
 44,  62,  32,  50,  52,  42,  48,  56,  40,  50,
 51,  37,  37,   0,   5,  14,   0,   0,  18,   2,
  0,  45,  21,   0,  62,   8,  11,  60,  36,  32,
 17,   9,   5,   0,  53,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   0,   0,   0,   0
};

// table of the degrees of the variable nodes
static const  int qra_vdeg[qra_V] = {
  4,   4,   4,   4,   5,   5,   5,   5,   7,   4,
  4,   6,   8,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3
};

// table of the degrees of the factor nodes
static const  int qra_cdeg[qra_C] = {
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,
  1,   1,   1,   1,   2,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,
  3,   3,   3,   3,   3,   2
};

// table (uncompressed) of the v->c message indexes (-1=unused entry)
static const int qra_v2cmidx[qra_V*qra_MAXVDEG] = {
  0,  68, 104, 112,  -1,  -1,  -1,  -1,
  1,  73, 101, 111,  -1,  -1,  -1,  -1,
  2,  74,  84,  95,  -1,  -1,  -1,  -1,
  3,  66,  78,  87,  -1,  -1,  -1,  -1,
  4,  65,  76,  85,  97,  -1,  -1,  -1,
  5,  79,  88,  96, 109,  -1,  -1,  -1,
  6,  70,  93, 102, 110,  -1,  -1,  -1,
  7,  75,  83,  94, 103,  -1,  -1,  -1,
  8,  71,  81,  91,  99, 107, 115,  -1,
  9,  67,  80,  92,  -1,  -1,  -1,  -1,
 10,  86, 105, 113,  -1,  -1,  -1,  -1,
 11,  69,  77,  89, 100, 108,  -1,  -1,
 12,  64,  72,  82,  90,  98, 106, 114,
 13, 116, 117,  -1,  -1,  -1,  -1,  -1,
 14, 118, 119,  -1,  -1,  -1,  -1,  -1,
 15, 120, 121,  -1,  -1,  -1,  -1,  -1,
 16, 122, 123,  -1,  -1,  -1,  -1,  -1,
 17, 124, 125,  -1,  -1,  -1,  -1,  -1,
 18, 126, 127,  -1,  -1,  -1,  -1,  -1,
 19, 128, 129,  -1,  -1,  -1,  -1,  -1,
 20, 130, 131,  -1,  -1,  -1,  -1,  -1,
 21, 132, 133,  -1,  -1,  -1,  -1,  -1,
 22, 134, 135,  -1,  -1,  -1,  -1,  -1,
 23, 136, 137,  -1,  -1,  -1,  -1,  -1,
 24, 138, 139,  -1,  -1,  -1,  -1,  -1,
 25, 140, 141,  -1,  -1,  -1,  -1,  -1,
 26, 142, 143,  -1,  -1,  -1,  -1,  -1,
 27, 144, 145,  -1,  -1,  -1,  -1,  -1,
 28, 146, 147,  -1,  -1,  -1,  -1,  -1,
 29, 148, 149,  -1,  -1,  -1,  -1,  -1,
 30, 150, 151,  -1,  -1,  -1,  -1,  -1,
 31, 152, 153,  -1,  -1,  -1,  -1,  -1,
 32, 154, 155,  -1,  -1,  -1,  -1,  -1,
 33, 156, 157,  -1,  -1,  -1,  -1,  -1,
 34, 158, 159,  -1,  -1,  -1,  -1,  -1,
 35, 160, 161,  -1,  -1,  -1,  -1,  -1,
 36, 162, 163,  -1,  -1,  -1,  -1,  -1,
 37, 164, 165,  -1,  -1,  -1,  -1,  -1,
 38, 166, 167,  -1,  -1,  -1,  -1,  -1,
 39, 168, 169,  -1,  -1,  -1,  -1,  -1,
 40, 170, 171,  -1,  -1,  -1,  -1,  -1,
 41, 172, 173,  -1,  -1,  -1,  -1,  -1,
 42, 174, 175,  -1,  -1,  -1,  -1,  -1,
 43, 176, 177,  -1,  -1,  -1,  -1,  -1,
 44, 178, 179,  -1,  -1,  -1,  -1,  -1,
 45, 180, 181,  -1,  -1,  -1,  -1,  -1,
 46, 182, 183,  -1,  -1,  -1,  -1,  -1,
 47, 184, 185,  -1,  -1,  -1,  -1,  -1,
 48, 186, 187,  -1,  -1,  -1,  -1,  -1,
 49, 188, 189,  -1,  -1,  -1,  -1,  -1,
 50, 190, 191,  -1,  -1,  -1,  -1,  -1,
 51, 192, 193,  -1,  -1,  -1,  -1,  -1,
 52, 194, 195,  -1,  -1,  -1,  -1,  -1,
 53, 196, 197,  -1,  -1,  -1,  -1,  -1,
 54, 198, 199,  -1,  -1,  -1,  -1,  -1,
 55, 200, 201,  -1,  -1,  -1,  -1,  -1,
 56, 202, 203,  -1,  -1,  -1,  -1,  -1,
 57, 204, 205,  -1,  -1,  -1,  -1,  -1,
 58, 206, 207,  -1,  -1,  -1,  -1,  -1,
 59, 208, 209,  -1,  -1,  -1,  -1,  -1,
 60, 210, 211,  -1,  -1,  -1,  -1,  -1,
 61, 212, 213,  -1,  -1,  -1,  -1,  -1,
 62, 214, 215,  -1,  -1,  -1,  -1,  -1,
 63, 216, 217,  -1,  -1,  -1,  -1,  -1
};

// table (uncompressed) of the c->v message indexes (-1=unused entry)
static const int qra_c2vmidx[qra_C*qra_MAXCDEG] = {
  0,  -1,  -1,   1,  -1,  -1,   2,  -1,  -1,   3,  -1,  -1,
  4,  -1,  -1,   5,  -1,  -1,   6,  -1,  -1,   7,  -1,  -1,
  8,  -1,  -1,   9,  -1,  -1,  10,  -1,  -1,  11,  -1,  -1,
 12,  -1,  -1,  13,  -1,  -1,  14,  -1,  -1,  15,  -1,  -1,
 16,  -1,  -1,  17,  -1,  -1,  18,  -1,  -1,  19,  -1,  -1,
 20,  -1,  -1,  21,  -1,  -1,  22,  -1,  -1,  23,  -1,  -1,
 24,  -1,  -1,  25,  -1,  -1,  26,  -1,  -1,  27,  -1,  -1,
 28,  -1,  -1,  29,  -1,  -1,  30,  -1,  -1,  31,  -1,  -1,
 32,  -1,  -1,  33,  -1,  -1,  34,  -1,  -1,  35,  -1,  -1,
 36,  -1,  -1,  37,  -1,  -1,  38,  -1,  -1,  39,  -1,  -1,
 40,  -1,  -1,  41,  -1,  -1,  42,  -1,  -1,  43,  -1,  -1,
 44,  -1,  -1,  45,  -1,  -1,  46,  -1,  -1,  47,  -1,  -1,
 48,  -1,  -1,  49,  -1,  -1,  50,  -1,  -1,  51,  -1,  -1,
 52,  -1,  -1,  53,  -1,  -1,  54,  -1,  -1,  55,  -1,  -1,
 56,  -1,  -1,  57,  -1,  -1,  58,  -1,  -1,  59,  -1,  -1,
 60,  -1,  -1,  61,  -1,  -1,  62,  -1,  -1,  63,  -1,  -1,
 64, 116,  -1,  65, 117, 118,  66, 119, 120,  67, 121, 122,
 68, 123, 124,  69, 125, 126,  70, 127, 128,  71, 129, 130,
 72, 131, 132,  73, 133, 134,  74, 135, 136,  75, 137, 138,
 76, 139, 140,  77, 141, 142,  78, 143, 144,  79, 145, 146,
 80, 147, 148,  81, 149, 150,  82, 151, 152,  83, 153, 154,
 84, 155, 156,  85, 157, 158,  86, 159, 160,  87, 161, 162,
 88, 163, 164,  89, 165, 166,  90, 167, 168,  91, 169, 170,
 92, 171, 172,  93, 173, 174,  94, 175, 176,  95, 177, 178,
 96, 179, 180,  97, 181, 182,  98, 183, 184,  99, 185, 186,
100, 187, 188, 101, 189, 190, 102, 191, 192, 103, 193, 194,
104, 195, 196, 105, 197, 198, 106, 199, 200, 107, 201, 202,
108, 203, 204, 109, 205, 206, 110, 207, 208, 111, 209, 210,
112, 211, 212, 113, 213, 214, 114, 215, 216, 115, 217,  -1
};

// permutation matrix to compute Prob(x*alfa^logw)
static const int qra_pmat[qra_M*qra_M] = {
  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,
 16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,  30,  31,
 32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,
 48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,
  0,  33,   1,  32,   2,  35,   3,  34,   4,  37,   5,  36,   6,  39,   7,  38,
  8,  41,   9,  40,  10,  43,  11,  42,  12,  45,  13,  44,  14,  47,  15,  46,
 16,  49,  17,  48,  18,  51,  19,  50,  20,  53,  21,  52,  22,  55,  23,  54,
 24,  57,  25,  56,  26,  59,  27,  58,  28,  61,  29,  60,  30,  63,  31,  62,
  0,  49,  33,  16,   1,  48,  32,  17,   2,  51,  35,  18,   3,  50,  34,  19,
  4,  53,  37,  20,   5,  52,  36,  21,   6,  55,  39,  22,   7,  54,  38,  23,
  8,  57,  41,  24,   9,  56,  40,  25,  10,  59,  43,  26,  11,  58,  42,  27,
 12,  61,  45,  28,  13,  60,  44,  29,  14,  63,  47,  30,  15,  62,  46,  31,
  0,  57,  49,   8,  33,  24,  16,  41,   1,  56,  48,   9,  32,  25,  17,  40,
  2,  59,  51,  10,  35,  26,  18,  43,   3,  58,  50,  11,  34,  27,  19,  42,
  4,  61,  53,  12,  37,  28,  20,  45,   5,  60,  52,  13,  36,  29,  21,  44,
  6,  63,  55,  14,  39,  30,  22,  47,   7,  62,  54,  15,  38,  31,  23,  46,
  0,  61,  57,   4,  49,  12,   8,  53,  33,  28,  24,  37,  16,  45,  41,  20,
  1,  60,  56,   5,  48,  13,   9,  52,  32,  29,  25,  36,  17,  44,  40,  21,
  2,  63,  59,   6,  51,  14,  10,  55,  35,  30,  26,  39,  18,  47,  43,  22,
  3,  62,  58,   7,  50,  15,  11,  54,  34,  31,  27,  38,  19,  46,  42,  23,
  0,  63,  61,   2,  57,   6,   4,  59,  49,  14,  12,  51,   8,  55,  53,  10,
 33,  30,  28,  35,  24,  39,  37,  26,  16,  47,  45,  18,  41,  22,  20,  43,
  1,  62,  60,   3,  56,   7,   5,  58,  48,  15,  13,  50,   9,  54,  52,  11,
 32,  31,  29,  34,  25,  38,  36,  27,  17,  46,  44,  19,  40,  23,  21,  42,
  0,  62,  63,   1,  61,   3,   2,  60,  57,   7,   6,  56,   4,  58,  59,   5,
 49,  15,  14,  48,  12,  50,  51,  13,   8,  54,  55,   9,  53,  11,  10,  52,
 33,  31,  30,  32,  28,  34,  35,  29,  24,  38,  39,  25,  37,  27,  26,  36,
 16,  46,  47,  17,  45,  19,  18,  44,  41,  23,  22,  40,  20,  42,  43,  21,
  0,  31,  62,  33,  63,  32,   1,  30,  61,  34,   3,  28,   2,  29,  60,  35,
 57,  38,   7,  24,   6,  25,  56,  39,   4,  27,  58,  37,  59,  36,   5,  26,
 49,  46,  15,  16,  14,  17,  48,  47,  12,  19,  50,  45,  51,  44,  13,  18,
  8,  23,  54,  41,  55,  40,   9,  22,  53,  42,  11,  20,  10,  21,  52,  43,
  0,  46,  31,  49,  62,  16,  33,  15,  63,  17,  32,  14,   1,  47,  30,  48,
 61,  19,  34,  12,   3,  45,  28,  50,   2,  44,  29,  51,  60,  18,  35,  13,
 57,  23,  38,   8,   7,  41,  24,  54,   6,  40,  25,  55,  56,  22,  39,   9,
  4,  42,  27,  53,  58,  20,  37,  11,  59,  21,  36,  10,   5,  43,  26,  52,
  0,  23,  46,  57,  31,   8,  49,  38,  62,  41,  16,   7,  33,  54,  15,  24,
 63,  40,  17,   6,  32,  55,  14,  25,   1,  22,  47,  56,  30,   9,  48,  39,
 61,  42,  19,   4,  34,  53,  12,  27,   3,  20,  45,  58,  28,  11,  50,  37,
  2,  21,  44,  59,  29,  10,  51,  36,  60,  43,  18,   5,  35,  52,  13,  26,
  0,  42,  23,  61,  46,   4,  57,  19,  31,  53,   8,  34,  49,  27,  38,  12,
 62,  20,  41,   3,  16,  58,   7,  45,  33,  11,  54,  28,  15,  37,  24,  50,
 63,  21,  40,   2,  17,  59,   6,  44,  32,  10,  55,  29,  14,  36,  25,  51,
  1,  43,  22,  60,  47,   5,  56,  18,  30,  52,   9,  35,  48,  26,  39,  13,
  0,  21,  42,  63,  23,   2,  61,  40,  46,  59,   4,  17,  57,  44,  19,   6,
 31,  10,  53,  32,   8,  29,  34,  55,  49,  36,  27,  14,  38,  51,  12,  25,
 62,  43,  20,   1,  41,  60,   3,  22,  16,   5,  58,  47,   7,  18,  45,  56,
 33,  52,  11,  30,  54,  35,  28,   9,  15,  26,  37,  48,  24,  13,  50,  39,
  0,  43,  21,  62,  42,   1,  63,  20,  23,  60,   2,  41,  61,  22,  40,   3,
 46,   5,  59,  16,   4,  47,  17,  58,  57,  18,  44,   7,  19,  56,   6,  45,
 31,  52,  10,  33,  53,  30,  32,  11,   8,  35,  29,  54,  34,   9,  55,  28,
 49,  26,  36,  15,  27,  48,  14,  37,  38,  13,  51,  24,  12,  39,  25,  50,
  0,  52,  43,  31,  21,  33,  62,  10,  42,  30,   1,  53,  63,  11,  20,  32,
 23,  35,  60,   8,   2,  54,  41,  29,  61,   9,  22,  34,  40,  28,   3,  55,
 46,  26,   5,  49,  59,  15,  16,  36,   4,  48,  47,  27,  17,  37,  58,  14,
 57,  13,  18,  38,  44,  24,   7,  51,  19,  39,  56,  12,   6,  50,  45,  25,
  0,  26,  52,  46,  43,  49,  31,   5,  21,  15,  33,  59,  62,  36,  10,  16,
 42,  48,  30,   4,   1,  27,  53,  47,  63,  37,  11,  17,  20,  14,  32,  58,
 23,  13,  35,  57,  60,  38,   8,  18,   2,  24,  54,  44,  41,  51,  29,   7,
 61,  39,   9,  19,  22,  12,  34,  56,  40,  50,  28,   6,   3,  25,  55,  45,
  0,  13,  26,  23,  52,  57,  46,  35,  43,  38,  49,  60,  31,  18,   5,   8,
 21,  24,  15,   2,  33,  44,  59,  54,  62,  51,  36,  41,  10,   7,  16,  29,
 42,  39,  48,  61,  30,  19,   4,   9,   1,  12,  27,  22,  53,  56,  47,  34,
 63,  50,  37,  40,  11,   6,  17,  28,  20,  25,  14,   3,  32,  45,  58,  55,
  0,  39,  13,  42,  26,  61,  23,  48,  52,  19,  57,  30,  46,   9,  35,   4,
 43,  12,  38,   1,  49,  22,  60,  27,  31,  56,  18,  53,   5,  34,   8,  47,
 21,  50,  24,  63,  15,  40,   2,  37,  33,   6,  44,  11,  59,  28,  54,  17,
 62,  25,  51,  20,  36,   3,  41,  14,  10,  45,   7,  32,  16,  55,  29,  58,
  0,  50,  39,  21,  13,  63,  42,  24,  26,  40,  61,  15,  23,  37,  48,   2,
 52,   6,  19,  33,  57,  11,  30,  44,  46,  28,   9,  59,  35,  17,   4,  54,
 43,  25,  12,  62,  38,  20,   1,  51,  49,   3,  22,  36,  60,  14,  27,  41,
 31,  45,  56,  10,  18,  32,  53,   7,   5,  55,  34,  16,   8,  58,  47,  29,
  0,  25,  50,  43,  39,  62,  21,  12,  13,  20,  63,  38,  42,  51,  24,   1,
 26,   3,  40,  49,  61,  36,  15,  22,  23,  14,  37,  60,  48,  41,   2,  27,
 52,  45,   6,  31,  19,  10,  33,  56,  57,  32,  11,  18,  30,   7,  44,  53,
 46,  55,  28,   5,   9,  16,  59,  34,  35,  58,  17,   8,   4,  29,  54,  47,
  0,  45,  25,  52,  50,  31,  43,   6,  39,  10,  62,  19,  21,  56,  12,  33,
 13,  32,  20,  57,  63,  18,  38,  11,  42,   7,  51,  30,  24,  53,   1,  44,
 26,  55,   3,  46,  40,   5,  49,  28,  61,  16,  36,   9,  15,  34,  22,  59,
 23,  58,  14,  35,  37,   8,  60,  17,  48,  29,  41,   4,   2,  47,  27,  54,
  0,  55,  45,  26,  25,  46,  52,   3,  50,   5,  31,  40,  43,  28,   6,  49,
 39,  16,  10,  61,  62,   9,  19,  36,  21,  34,  56,  15,  12,  59,  33,  22,
 13,  58,  32,  23,  20,  35,  57,  14,  63,   8,  18,  37,  38,  17,  11,  60,
 42,  29,   7,  48,  51,   4,  30,  41,  24,  47,  53,   2,   1,  54,  44,  27,
  0,  58,  55,  13,  45,  23,  26,  32,  25,  35,  46,  20,  52,  14,   3,  57,
 50,   8,   5,  63,  31,  37,  40,  18,  43,  17,  28,  38,   6,  60,  49,  11,
 39,  29,  16,  42,  10,  48,  61,   7,  62,   4,   9,  51,  19,  41,  36,  30,
 21,  47,  34,  24,  56,   2,  15,  53,  12,  54,  59,   1,  33,  27,  22,  44,
  0,  29,  58,  39,  55,  42,  13,  16,  45,  48,  23,  10,  26,   7,  32,  61,
 25,   4,  35,  62,  46,  51,  20,   9,  52,  41,  14,  19,   3,  30,  57,  36,
 50,  47,   8,  21,   5,  24,  63,  34,  31,   2,  37,  56,  40,  53,  18,  15,
 43,  54,  17,  12,  28,   1,  38,  59,   6,  27,  60,  33,  49,  44,  11,  22,
  0,  47,  29,  50,  58,  21,  39,   8,  55,  24,  42,   5,  13,  34,  16,  63,
 45,   2,  48,  31,  23,  56,  10,  37,  26,  53,   7,  40,  32,  15,  61,  18,
 25,  54,   4,  43,  35,  12,  62,  17,  46,   1,  51,  28,  20,  59,   9,  38,
 52,  27,  41,   6,  14,  33,  19,  60,   3,  44,  30,  49,  57,  22,  36,  11,
  0,  54,  47,  25,  29,  43,  50,   4,  58,  12,  21,  35,  39,  17,   8,  62,
 55,   1,  24,  46,  42,  28,   5,  51,  13,  59,  34,  20,  16,  38,  63,   9,
 45,  27,   2,  52,  48,   6,  31,  41,  23,  33,  56,  14,  10,  60,  37,  19,
 26,  44,  53,   3,   7,  49,  40,  30,  32,  22,  15,  57,  61,  11,  18,  36,
  0,  27,  54,  45,  47,  52,  25,   2,  29,   6,  43,  48,  50,  41,   4,  31,
 58,  33,  12,  23,  21,  14,  35,  56,  39,  60,  17,  10,   8,  19,  62,  37,
 55,  44,   1,  26,  24,   3,  46,  53,  42,  49,  28,   7,   5,  30,  51,  40,
 13,  22,  59,  32,  34,  57,  20,  15,  16,  11,  38,  61,  63,  36,   9,  18,
  0,  44,  27,  55,  54,  26,  45,   1,  47,   3,  52,  24,  25,  53,   2,  46,
 29,  49,   6,  42,  43,   7,  48,  28,  50,  30,  41,   5,   4,  40,  31,  51,
 58,  22,  33,  13,  12,  32,  23,  59,  21,  57,  14,  34,  35,  15,  56,  20,
 39,  11,  60,  16,  17,  61,  10,  38,   8,  36,  19,  63,  62,  18,  37,   9,
  0,  22,  44,  58,  27,  13,  55,  33,  54,  32,  26,  12,  45,  59,   1,  23,
 47,  57,   3,  21,  52,  34,  24,  14,  25,  15,  53,  35,   2,  20,  46,  56,
 29,  11,  49,  39,   6,  16,  42,  60,  43,  61,   7,  17,  48,  38,  28,  10,
 50,  36,  30,   8,  41,  63,   5,  19,   4,  18,  40,  62,  31,   9,  51,  37,
  0,  11,  22,  29,  44,  39,  58,  49,  27,  16,  13,   6,  55,  60,  33,  42,
 54,  61,  32,  43,  26,  17,  12,   7,  45,  38,  59,  48,   1,  10,  23,  28,
 47,  36,  57,  50,   3,   8,  21,  30,  52,  63,  34,  41,  24,  19,  14,   5,
 25,  18,  15,   4,  53,  62,  35,  40,   2,   9,  20,  31,  46,  37,  56,  51,
  0,  36,  11,  47,  22,  50,  29,  57,  44,   8,  39,   3,  58,  30,  49,  21,
 27,  63,  16,  52,  13,  41,   6,  34,  55,  19,  60,  24,  33,   5,  42,  14,
 54,  18,  61,  25,  32,   4,  43,  15,  26,  62,  17,  53,  12,  40,   7,  35,
 45,   9,  38,   2,  59,  31,  48,  20,   1,  37,  10,  46,  23,  51,  28,  56,
  0,  18,  36,  54,  11,  25,  47,  61,  22,   4,  50,  32,  29,  15,  57,  43,
 44,  62,   8,  26,  39,  53,   3,  17,  58,  40,  30,  12,  49,  35,  21,   7,
 27,   9,  63,  45,  16,   2,  52,  38,  13,  31,  41,  59,   6,  20,  34,  48,
 55,  37,  19,   1,  60,  46,  24,  10,  33,  51,   5,  23,  42,  56,  14,  28,
  0,   9,  18,  27,  36,  45,  54,  63,  11,   2,  25,  16,  47,  38,  61,  52,
 22,  31,   4,  13,  50,  59,  32,  41,  29,  20,  15,   6,  57,  48,  43,  34,
 44,  37,  62,  55,   8,   1,  26,  19,  39,  46,  53,  60,   3,  10,  17,  24,
 58,  51,  40,  33,  30,  23,  12,   5,  49,  56,  35,  42,  21,  28,   7,  14,
  0,  37,   9,  44,  18,  55,  27,  62,  36,   1,  45,   8,  54,  19,  63,  26,
 11,  46,   2,  39,  25,  60,  16,  53,  47,  10,  38,   3,  61,  24,  52,  17,
 22,  51,  31,  58,   4,  33,  13,  40,  50,  23,  59,  30,  32,   5,  41,  12,
 29,  56,  20,  49,  15,  42,   6,  35,  57,  28,  48,  21,  43,  14,  34,   7,
  0,  51,  37,  22,   9,  58,  44,  31,  18,  33,  55,   4,  27,  40,  62,  13,
 36,  23,   1,  50,  45,  30,   8,  59,  54,   5,  19,  32,  63,  12,  26,  41,
 11,  56,  46,  29,   2,  49,  39,  20,  25,  42,  60,  15,  16,  35,  53,   6,
 47,  28,  10,  57,  38,  21,   3,  48,  61,  14,  24,  43,  52,   7,  17,  34,
  0,  56,  51,  11,  37,  29,  22,  46,   9,  49,  58,   2,  44,  20,  31,  39,
 18,  42,  33,  25,  55,  15,   4,  60,  27,  35,  40,  16,  62,   6,  13,  53,
 36,  28,  23,  47,   1,  57,  50,  10,  45,  21,  30,  38,   8,  48,  59,   3,
 54,  14,   5,  61,  19,  43,  32,  24,  63,   7,  12,  52,  26,  34,  41,  17,
  0,  28,  56,  36,  51,  47,  11,  23,  37,  57,  29,   1,  22,  10,  46,  50,
  9,  21,  49,  45,  58,  38,   2,  30,  44,  48,  20,   8,  31,   3,  39,  59,
 18,  14,  42,  54,  33,  61,  25,   5,  55,  43,  15,  19,   4,  24,  60,  32,
 27,   7,  35,  63,  40,  52,  16,  12,  62,  34,   6,  26,  13,  17,  53,  41,
  0,  14,  28,  18,  56,  54,  36,  42,  51,  61,  47,  33,  11,   5,  23,  25,
 37,  43,  57,  55,  29,  19,   1,  15,  22,  24,  10,   4,  46,  32,  50,  60,
  9,   7,  21,  27,  49,  63,  45,  35,  58,  52,  38,  40,   2,  12,  30,  16,
 44,  34,  48,  62,  20,  26,   8,   6,  31,  17,   3,  13,  39,  41,  59,  53,
  0,   7,  14,   9,  28,  27,  18,  21,  56,  63,  54,  49,  36,  35,  42,  45,
 51,  52,  61,  58,  47,  40,  33,  38,  11,  12,   5,   2,  23,  16,  25,  30,
 37,  34,  43,  44,  57,  62,  55,  48,  29,  26,  19,  20,   1,   6,  15,   8,
 22,  17,  24,  31,  10,  13,   4,   3,  46,  41,  32,  39,  50,  53,  60,  59,
  0,  34,   7,  37,  14,  44,   9,  43,  28,  62,  27,  57,  18,  48,  21,  55,
 56,  26,  63,  29,  54,  20,  49,  19,  36,   6,  35,   1,  42,   8,  45,  15,
 51,  17,  52,  22,  61,  31,  58,  24,  47,  13,  40,  10,  33,   3,  38,   4,
 11,  41,  12,  46,   5,  39,   2,  32,  23,  53,  16,  50,  25,  59,  30,  60,
  0,  17,  34,  51,   7,  22,  37,  52,  14,  31,  44,  61,   9,  24,  43,  58,
 28,  13,  62,  47,  27,  10,  57,  40,  18,   3,  48,  33,  21,   4,  55,  38,
 56,  41,  26,  11,  63,  46,  29,  12,  54,  39,  20,   5,  49,  32,  19,   2,
 36,  53,   6,  23,  35,  50,   1,  16,  42,  59,   8,  25,  45,  60,  15,  30,
  0,  41,  17,  56,  34,  11,  51,  26,   7,  46,  22,  63,  37,  12,  52,  29,
 14,  39,  31,  54,  44,   5,  61,  20,   9,  32,  24,  49,  43,   2,  58,  19,
 28,  53,  13,  36,  62,  23,  47,   6,  27,  50,  10,  35,  57,  16,  40,   1,
 18,  59,   3,  42,  48,  25,  33,   8,  21,  60,   4,  45,  55,  30,  38,  15,
  0,  53,  41,  28,  17,  36,  56,  13,  34,  23,  11,  62,  51,   6,  26,  47,
  7,  50,  46,  27,  22,  35,  63,  10,  37,  16,  12,  57,  52,   1,  29,  40,
 14,  59,  39,  18,  31,  42,  54,   3,  44,  25,   5,  48,  61,   8,  20,  33,
  9,  60,  32,  21,  24,  45,  49,   4,  43,  30,   2,  55,  58,  15,  19,  38,
  0,  59,  53,  14,  41,  18,  28,  39,  17,  42,  36,  31,  56,   3,  13,  54,
 34,  25,  23,  44,  11,  48,  62,   5,  51,   8,   6,  61,  26,  33,  47,  20,
  7,  60,  50,   9,  46,  21,  27,  32,  22,  45,  35,  24,  63,   4,  10,  49,
 37,  30,  16,  43,  12,  55,  57,   2,  52,  15,   1,  58,  29,  38,  40,  19,
  0,  60,  59,   7,  53,   9,  14,  50,  41,  21,  18,  46,  28,  32,  39,  27,
 17,  45,  42,  22,  36,  24,  31,  35,  56,   4,   3,  63,  13,  49,  54,  10,
 34,  30,  25,  37,  23,  43,  44,  16,  11,  55,  48,  12,  62,   2,   5,  57,
 51,  15,   8,  52,   6,  58,  61,   1,  26,  38,  33,  29,  47,  19,  20,  40,
  0,  30,  60,  34,  59,  37,   7,  25,  53,  43,   9,  23,  14,  16,  50,  44,
 41,  55,  21,  11,  18,  12,  46,  48,  28,   2,  32,  62,  39,  57,  27,   5,
 17,  15,  45,  51,  42,  52,  22,   8,  36,  58,  24,   6,  31,   1,  35,  61,
 56,  38,   4,  26,   3,  29,  63,  33,  13,  19,  49,  47,  54,  40,  10,  20,
  0,  15,  30,  17,  60,  51,  34,  45,  59,  52,  37,  42,   7,   8,  25,  22,
 53,  58,  43,  36,   9,   6,  23,  24,  14,   1,  16,  31,  50,  61,  44,  35,
 41,  38,  55,  56,  21,  26,  11,   4,  18,  29,  12,   3,  46,  33,  48,  63,
 28,  19,   2,  13,  32,  47,  62,  49,  39,  40,  57,  54,  27,  20,   5,  10,
  0,  38,  15,  41,  30,  56,  17,  55,  60,  26,  51,  21,  34,   4,  45,  11,
 59,  29,  52,  18,  37,   3,  42,  12,   7,  33,   8,  46,  25,  63,  22,  48,
 53,  19,  58,  28,  43,  13,  36,   2,   9,  47,   6,  32,  23,  49,  24,  62,
 14,  40,   1,  39,  16,  54,  31,  57,  50,  20,  61,  27,  44,  10,  35,   5,
  0,  19,  38,  53,  15,  28,  41,  58,  30,  13,  56,  43,  17,   2,  55,  36,
 60,  47,  26,   9,  51,  32,  21,   6,  34,  49,   4,  23,  45,  62,  11,  24,
 59,  40,  29,  14,  52,  39,  18,   1,  37,  54,   3,  16,  42,  57,  12,  31,
  7,  20,  33,  50,   8,  27,  46,  61,  25,  10,  63,  44,  22,   5,  48,  35,
  0,  40,  19,  59,  38,  14,  53,  29,  15,  39,  28,  52,  41,   1,  58,  18,
 30,  54,  13,  37,  56,  16,  43,   3,  17,  57,   2,  42,  55,  31,  36,  12,
 60,  20,  47,   7,  26,  50,   9,  33,  51,  27,  32,   8,  21,  61,   6,  46,
 34,  10,  49,  25,   4,  44,  23,  63,  45,   5,  62,  22,  11,  35,  24,  48,
  0,  20,  40,  60,  19,   7,  59,  47,  38,  50,  14,  26,  53,  33,  29,   9,
 15,  27,  39,  51,  28,   8,  52,  32,  41,  61,   1,  21,  58,  46,  18,   6,
 30,  10,  54,  34,  13,  25,  37,  49,  56,  44,  16,   4,  43,  63,   3,  23,
 17,   5,  57,  45,   2,  22,  42,  62,  55,  35,  31,  11,  36,  48,  12,  24,
  0,  10,  20,  30,  40,  34,  60,  54,  19,  25,   7,  13,  59,  49,  47,  37,
 38,  44,  50,  56,  14,   4,  26,  16,  53,  63,  33,  43,  29,  23,   9,   3,
 15,   5,  27,  17,  39,  45,  51,  57,  28,  22,   8,   2,  52,  62,  32,  42,
 41,  35,  61,  55,   1,  11,  21,  31,  58,  48,  46,  36,  18,  24,   6,  12,
  0,   5,  10,  15,  20,  17,  30,  27,  40,  45,  34,  39,  60,  57,  54,  51,
 19,  22,  25,  28,   7,   2,  13,   8,  59,  62,  49,  52,  47,  42,  37,  32,
 38,  35,  44,  41,  50,  55,  56,  61,  14,  11,   4,   1,  26,  31,  16,  21,
 53,  48,  63,  58,  33,  36,  43,  46,  29,  24,  23,  18,   9,  12,   3,   6,
  0,  35,   5,  38,  10,  41,  15,  44,  20,  55,  17,  50,  30,  61,  27,  56,
 40,  11,  45,  14,  34,   1,  39,   4,  60,  31,  57,  26,  54,  21,  51,  16,
 19,  48,  22,  53,  25,  58,  28,  63,   7,  36,   2,  33,  13,  46,   8,  43,
 59,  24,  62,  29,  49,  18,  52,  23,  47,  12,  42,   9,  37,   6,  32,   3,
  0,  48,  35,  19,   5,  53,  38,  22,  10,  58,  41,  25,  15,  63,  44,  28,
 20,  36,  55,   7,  17,  33,  50,   2,  30,  46,  61,  13,  27,  43,  56,   8,
 40,  24,  11,  59,  45,  29,  14,  62,  34,  18,   1,  49,  39,  23,   4,  52,
 60,  12,  31,  47,  57,   9,  26,  42,  54,   6,  21,  37,  51,   3,  16,  32,
  0,  24,  48,  40,  35,  59,  19,  11,   5,  29,  53,  45,  38,  62,  22,  14,
 10,  18,  58,  34,  41,  49,  25,   1,  15,  23,  63,  39,  44,  52,  28,   4,
 20,  12,  36,  60,  55,  47,   7,  31,  17,   9,  33,  57,  50,  42,   2,  26,
 30,   6,  46,  54,  61,  37,  13,  21,  27,   3,  43,  51,  56,  32,   8,  16,
  0,  12,  24,  20,  48,  60,  40,  36,  35,  47,  59,  55,  19,  31,  11,   7,
  5,   9,  29,  17,  53,  57,  45,  33,  38,  42,  62,  50,  22,  26,  14,   2,
 10,   6,  18,  30,  58,  54,  34,  46,  41,  37,  49,  61,  25,  21,   1,  13,
 15,   3,  23,  27,  63,  51,  39,  43,  44,  32,  52,  56,  28,  16,   4,   8,
  0,   6,  12,  10,  24,  30,  20,  18,  48,  54,  60,  58,  40,  46,  36,  34,
 35,  37,  47,  41,  59,  61,  55,  49,  19,  21,  31,  25,  11,  13,   7,   1,
  5,   3,   9,  15,  29,  27,  17,  23,  53,  51,  57,  63,  45,  43,  33,  39,
 38,  32,  42,  44,  62,  56,  50,  52,  22,  16,  26,  28,  14,   8,   2,   4,
  0,   3,   6,   5,  12,  15,  10,   9,  24,  27,  30,  29,  20,  23,  18,  17,
 48,  51,  54,  53,  60,  63,  58,  57,  40,  43,  46,  45,  36,  39,  34,  33,
 35,  32,  37,  38,  47,  44,  41,  42,  59,  56,  61,  62,  55,  52,  49,  50,
 19,  16,  21,  22,  31,  28,  25,  26,  11,   8,  13,  14,   7,   4,   1,   2,
  0,  32,   3,  35,   6,  38,   5,  37,  12,  44,  15,  47,  10,  42,   9,  41,
 24,  56,  27,  59,  30,  62,  29,  61,  20,  52,  23,  55,  18,  50,  17,  49,
 48,  16,  51,  19,  54,  22,  53,  21,  60,  28,  63,  31,  58,  26,  57,  25,
 40,   8,  43,  11,  46,  14,  45,  13,  36,   4,  39,   7,  34,   2,  33,   1,
  0,  16,  32,  48,   3,  19,  35,  51,   6,  22,  38,  54,   5,  21,  37,  53,
 12,  28,  44,  60,  15,  31,  47,  63,  10,  26,  42,  58,   9,  25,  41,  57,
 24,   8,  56,  40,  27,  11,  59,  43,  30,  14,  62,  46,  29,  13,  61,  45,
 20,   4,  52,  36,  23,   7,  55,  39,  18,   2,  50,  34,  17,   1,  49,  33,
  0,   8,  16,  24,  32,  40,  48,  56,   3,  11,  19,  27,  35,  43,  51,  59,
  6,  14,  22,  30,  38,  46,  54,  62,   5,  13,  21,  29,  37,  45,  53,  61,
 12,   4,  28,  20,  44,  36,  60,  52,  15,   7,  31,  23,  47,  39,  63,  55,
 10,   2,  26,  18,  42,  34,  58,  50,   9,   1,  25,  17,  41,  33,  57,  49,
  0,   4,   8,  12,  16,  20,  24,  28,  32,  36,  40,  44,  48,  52,  56,  60,
  3,   7,  11,  15,  19,  23,  27,  31,  35,  39,  43,  47,  51,  55,  59,  63,
  6,   2,  14,  10,  22,  18,  30,  26,  38,  34,  46,  42,  54,  50,  62,  58,
  5,   1,  13,   9,  21,  17,  29,  25,  37,  33,  45,  41,  53,  49,  61,  57,
  0,   2,   4,   6,   8,  10,  12,  14,  16,  18,  20,  22,  24,  26,  28,  30,
 32,  34,  36,  38,  40,  42,  44,  46,  48,  50,  52,  54,  56,  58,  60,  62,
  3,   1,   7,   5,  11,   9,  15,  13,  19,  17,  23,  21,  27,  25,  31,  29,
 35,  33,  39,  37,  43,  41,  47,  45,  51,  49,  55,  53,  59,  57,  63,  61
};

const qracode qra_13_64_64_irr_e = {
		qra_K,
		qra_N,
		qra_m,
		qra_M,
		qra_a,
		qra_NC,
		qra_V,
		qra_C,
		qra_NMSG,
		qra_MAXVDEG,
		qra_MAXCDEG,
		QRATYPE_CRCPUNCTURED,
		qra_R,
		CODE_NAME,
		qra_acc_input_idx,
		qra_acc_input_wlog,
		qra_log,
		qra_exp,
		qra_msgw,
		qra_vdeg,
		qra_cdeg,
		qra_v2cmidx,
		qra_c2vmidx,
		qra_pmat
};

#undef qra_K
#undef qra_N
#undef qra_m
#undef qra_M
#undef qra_a
#undef qra_NC
#undef qra_V
#undef qra_C
#undef qra_NMSG
#undef qra_MAXVDEG
#undef qra_MAXCDEG
#undef qra_R
#undef CODE_NAME