Revert "remove log.is_zero routine"

This reverts commit de47eb297f822edea3b70b8d8cf094072833b806.