GCC beautifully pre-computes the results of standard math functions at compile time when the input is a constant.
Anyone know how to do the same with Microsoft C? I've tried everything and so far no joy.
Code example:
#include <stdio.h>
#include <math.h>
#define FFT_SIZE_LOG2 10
#define CALC_FFT_SIZE(x) (int)pow(2., (double)x)
int main (void)
{
printf ("FFT size = %d\n", CALC_FFT_SIZE(FFT_SIZE_LOG2));
return(0);
}