Hi, I'm very interested in this topics as I want to make a FFT with PIC. However, it is a bit unclear for me how to make add/subtract using LNS. Would you please give additional information regarding this topic (you mentioned lookup table. What is to look for and with what argument?) Regards, Imre +-----------------------------------------------------------------------+ | The information transmitted is intended only for the person or entity | | to which it is addressed and may contain confidential and/or | | privileged material. Any review, retransmission, dissemination or | | other use of, or taking of any action in reliance upon, this | | information by persons or entities other than the intended recipient | | is prohibited. If you received this in error, please contact the | | sender and delete the material from any computer. | +-----------------------------------------------------------------------+ On Thu, 14 Feb 2002, Ed Chester wrote: > if you want to solve non-linear equations in a uC using real math and not > FloPo, my suggestion would be to consider a logarithmic number > system (LNS). either consider all your data in a fixed point binary LNS > (choose radix point to suit your application, 8b and 16b implementations > are practical: possibly an 8b as {sign,3-int,4-frac}), or implement > conversions. > > why would you want to do this? to get multiply and divide in a single ADD > instruction, and to get square-root and square in a single-bit right- or > left-shift, negation as a single bit NOT on the sign, and reciprocation as > (n-1)bit NOT on the word. this also means you can often get > reciprocal-roots, negated quotients, etc., in a single instruction in a > single cycle. > > all these operations are useful in solving systems, and are usually all > very expensive operations in a uC (wait and see how long a reciprocal > square-root will take...) > > sounds too good to be true? the catch is addition and subtraction, for > which you need a lookup table at 8b, and (depending on memory and word > format) possibly a small linear interpolation at 16b. > > unsure how applicable this is without more details of your application, > but i think i've given you enough information to evaluate the LNS as a > solution. its also useful for anything with a preponderance of > multiplicative operations (filters et cetera...) > > further points of joy - greater dynamic range than floating point, higher > average resolution, constant resolution over full dynamic range, better > round-off noise characteristics c.f. FloPo due to 'representation exact' > results for mul,div,sqr,sqrt, etc. and no microcoded iteration for any > operation. > > ok, that is my axe well and truely ground, :) > > ed c > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu