1. Calculate offline the results of your function for ANY possible input.
2. Store the results in a ROM where the input to the function in actually the address.
3. Code this ROM in Verilog just as you would any other ROM.
Not register - ROM (Read Only Memory).
Your application will drive the address to this ROM (with represent all possible function arguments)
And get the answer from the data-out port that correspond to that particular address.
The LUT trades memory for computation time / complexity.