avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Re: Tables


From: David VanHorn
Subject: Re: [avr-gcc-list] Re: Tables
Date: Wed, 4 Mar 2009 14:52:23 -0500


 
Before you get that far, what do you want the logs for?  And what base (if it matters)?  And what speed and accuracy?  If you need low speed and high accuracy, just use the standard C log function.  If you need high speed and low accuracy and low code space, a find-first-one function will give you a start.  And if you decide that a table is the best answer, consider first normalizing your numbers (unless you are using floating point, in which case they are already normalized), and consider using a non-linear table.
Speed is primary, I need to get the conversion absolutely as fast as possible.
Accuracy is secondary.
 
Once I have the logs, the rest of the calculation would be fixed point.
My output will be a 16 bit binary value, the sum of N log values.
 
My question comes down to wether it is possible to get the preprocessor to define the values in some form like I described previously.
If not, I'll generate them externally.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]