A generalized discrepancy and quadrature error bound | Synapse