In phi, return log(factor) instead of factor

Signed-off-by: Matthew Webb <mawebb@math.byu.edu>