Codes for log function mapping