yv's Formula f_p(x) = 27.5 * 2 ^ (x / 12) Python f_p = lambda x: 27.5 * 2 ** (x / 12) C #include <math.h> double f_p(unsigned char x) { return 27.5 * pow(2, x / 12.0); }