def wrapsafe(f):
    def g(*args):
        try:
            return f(*args)
        except (ArithmeticError, __HOLE__):
            return 0
    return g
dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/calculus/extrapolation.py/wrapsafe