Error Estimation and Floating-Point Effects in Numerical Integration: A Comparative Study - Naima Shamsi, (AlQalam Journal of Medical and Applied Sciences, 2025)
This study investigates how truncation (discretization) error and floating-point round-off jointly influence the practical accuracy of three classical composite quadrature rules: the composite rectangle rule, the composite trapezoidal rule, and the composite Simpson rule. After summarizing the standard theoretical error orders for sufficiently smooth integrands, the methods are implemented in MATLAB using explicit IEEE-754 single-precision (32-bit) and double-precision (64-bit) arithmetic to isolate precision effects. Numerical experiments are performed on benchmark test integrals with known analytical values for four representative integrands, namely sin(x), cos(x),e^x and log(x), and absolute errors are reported for each method. Across the tested cases, double precision substantially suppresses round-off effects and enables markedly smaller errors, with several results approaching machine-level magnitudes. Simpson’s rule generally provides the highest accuracy in double precision, attaining absolute errors on the order of 10⁻¹³–10⁻¹⁶ for multiple test functions, while single precision typically yields errors in the 10⁻⁸–10⁻⁶ range depending on the integrand and method. The exponential function exhibits larger errors in single precision, consistent with its rapid growth and increased sensitivity to accumulated rounding during composite summation. Overall, the results demonstrate that achieving reliable high-accuracy numerical integration requires not only an appropriate quadrature order but also sufficient arithmetic precision, and that empirical evaluation across multiple test functions remains essential when floating-point effects are non-negligible.