Modified the Euler-MacLaurin algorithm. Prior to the commit, the algorithm would break in cases where the expression was equivalent to 0. Now, the algorithm will continue to work until the intended error. Fixes several issues, including issue #8054. Also gets close to solving issue #8321.