Integrand with unknown singularities. int_{-1}^{1} exp(-x^2) dx The integrand tends to infinity when the imaginary part of x tends to infinity. Hence, a rational quadrature rule with all poles at infinity (i.e., a classical polynomial quadrature rule) will work perfectly well for this example. But let us assume for a moment that the exact location of the singularities are unknown. One usually relies then on the singularities of a [n/m] Pade approximant, where n and m denote the degree of the numerator and denominator polynomial respectively. For the poles we use the zeros of the Maclaurin polynomial of degree 20 of exp(x^2): 1+x^2+(1/2)*x^4+(1/6)*x^6+(1/24)*x^8+(1/120)*x^10+(1/720)*x^12+ +(1/5040)*x^14+(1/40320)*x^16+(1/362880)*x^18+(1/3628800)*x^20 (which corresponds to using the singularities of the [1/20] Pade approximant of exp(-x^2)). The maximal number of iterations is 11.000 Computed value: 1.4936482656248531e+00 Estimated relative error : 3.8651400473026821e-15 Exact relative error : 5.9463693035425850e-16