05-31-2007 11:18 AM
06-01-2007 03:26 AM
You could try something along these lines:
#include <math.h> // For the pow() function
double start; // eg 10
double end; // eg 1000
double points; // eg 15
double select; // the sample point to calculate, eg from 0 to 14
double value; // will receive the logarithmic value of the range, at the selected point
value = start * pow (end / start, select / (points - 1));
Depending on the rest of the application you might want to add some basic error checking.
JR