The Euler-Maclaurin formula is essentially like this: Suppose that $f$ is continuously differentiable in an interval $[a,b]$ with $a < b$ integers. Then $$ \sum_{a < n \leq b} f(n) = \int_{a}^b f(x) dx + \int_a^b\{x\} f'(x)dx, $$ where $\{x\} = x - \lfloor x \rfloor$ is the fractional part of $x$.
Question: Are there variants of this formula which work for piecewise continous functions? Say when you have a function $f$ which is smooth on $[a,b]$ except on a finite number of points there. There are many interesting such functions for which it would be nice to translate their sums into integrals. Here is one: $f(x) = \{e^x\}$, i.e., the fractional part of $e^x$. Thanks.