namespace quadrature {
// typedefs
typedef long double Real;
typedef std::vector<Real> Value;
// structs
struct Panel;
// global variables
std::array<Real, 8> nodes = { .991455371120812639206854697526329L, .949107912342758524526189684047851L, .864864423359769072789712788640926L, .741531185599394439863864773280788L, .586087235467691130294144838258730L, .405845151377397166906606412076961L, .207784955007898467600689403773245L, 0.L};
std::array<Real, 8> kronrod = { .022935322010529224963732008058970L, .063092092629978553290700663189204L, .104790010322250183839876322541518L, .140653259715525918745189590510238L, .169004726639267902826583426598550L, .190350578064785409913256402421014L, .204432940075298892414161999234649L, .209482141084727828012999174891714L};
std::array<Real, 4> gauss = { .129484966168869693270611432679082L, .279705391489276667901467771423780L, .381830050505118944950369775488975L, .417959183673469387755102040816327L};
// global functions
void accumulate(const Value& value, Real wk, Real wg, Value& k, Value& g, Value& absolute);
Panel finish(Real left, Real right, const Value& k, const Value& g, const Value& absolute);
template <class Function>
Panel panel(Real left, Real right, const Function& function, std::size_t& evaluations);
} // namespace quadrature