funfit: precomputing log