In the help of arith1.log(n, base=2), the parameter n is required to be positive. But, it works for a non-positive n and returns 0 always. It will be misleading, so I propose to return an error for such a case.