reconstruction the log function