Ad
  • Custom User Avatar

    It is not correct to use the absolute error with the tolerance 1e-12 when results could vary from very small (0) to very large (1e+200) values. In general, the problem is not well-defined because it is impossible to compute limits numerically without any additional knowledge about the tested functions.

    For example, the reference solution assumes that if r = f(x) is finite then r should be returned. It does not hold in general. Consider the function f(x) = 1 for x != 0 and f(0) = 0. The correct value which makes this function continuous at x = 0 is r = 1, not r = 0.