Finished writing the vectorized, ...log-ified version.