I usually precompute the values in Excel and store them in an array, I do this because the numbers aren't going to change and doing the math over and over just burns CPU.
Here's an example that turns the 255 steps of an Arduino pin PWM into 64 steps that look smoother:
#define NUM_DELTAS 64
byte deltaTable[NUM_DELTAS] = {
0,1,2,2,3,4,4,5,6,7,8,9,10,11,12,13,14,16,17,18,20,21,23,25,27,29,31,33,35,37,40,42,45,48,51,54,58,61,65,69,73,77,82,86,91,97,102,108,
114,121,127,134,142,150,158,167,176,186,196,206,217,229,242,255};
If you want to do the math on the Arduino I think something like this would work
word ComputePWMValue(word step) {
return(int(RANGE * pow(2, (step-DOMAIN)/2)));
}