#include #include #define max(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a > _b ? _a : _b; }) #define min(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a < _b ? _a : _b; }) /* void main() { int step; for (step = 0; step <= 48; step++) { int stepval = floor(16.0 * pow(11.0 / 10.0, (double)step)); printf("step:%d, stepval:%d\n",step,stepval); } }*/ void main() { int step; for (step = -8; step <= 80; step++) { int stepval = min(floor(16.0 * pow(11.0 / 10.0, (double)step)), 32767); if ((step >= -5) && (step <= -4)) stepval++; // manual correction so the beginning of the table doesn't end up as "7,8,9,9,10,12,13,14,..." printf("step:%d, stepval:%d\n",step,stepval); } }