Linear to exponential voltage

I would not do the computation in your code on the fly since exp() and floating point math is computationally expensive

Side discussion....
When I was designing my lighting controller I had this debate with the person who taught me C. I consider him to be something of a software expert, I am not. I wanted to use a table as you suggest, he said calculate on the fly, so that's what I did. The function I use is partly derived mathematically and partly derived by seeing how linearly the light level appeared to change (as judged by my eyes) with respect to the control input and modifying the function accordingly.