@moduledef.function("log", value="float", base="float")
    def method_log(self, space, value, base=math.e):
        try:
            res = 0.0
            if base == math.e:
                res = math.log(value)
            else:
                res = math.log(value) / math.log(base)
        except __HOLE__:
            if value == 0.0:
                res = float(-rfloat.INFINITY)
            else:
                raise space.error(space.getclassfor(W_DomainError), 'Numerical argument is out of domain - "log"')

        return space.newfloat(res)
dataset/ETHPy150Open topazproject/topaz/topaz/modules/math.py/Math.method_log