  The Euler-Maclaurin formula which relates a discrete sum with an integral, is
generalised to the setting of Riemann-Stieltjes sums and integrals on
stochastic processes whose paths are a.s. rectifiable, that is continuous and
bounded variation. For this purpose, new variants of the signature are
introduced, such as the flip and the sawtooth signature. The counterparts of
the Bernoulli numbers that arise in the classical Euler-Maclaurin formula are
obtained by choosing the appropriate integration constants in the repeated
integration by parts to ``minimise the error'' of every truncation level.
