The C preprocessor is too basic to do this sort of thing. Functions like
logarithms come from the math library the the preprocessor can't make
use of libraries at compile time.
This is a PERL script I use to generate sine tables to load onto a
Mega48. It shouldn't be hard to adapt it to generate a log table too:
Ok, I'll have to see what it takes to do this in windows.
Keep in mind there are algorithmic ways too do logs even without
floating point support, they're going to be more compact than a table,
but slower. If speed is your #1 concern then a table is best. Don't
forget to use the appropriate function to read the data out of flash,
you can't just index the array (unfortunately).
I'm very pressed for time in this operation.
I may need 512 entries in my log table, but I need SPEED.
I have several oodles of codespace.