Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/05/07 05:01
Modified:
  10/05/07 05:31

Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#145441 - Correct precision
Responding to: ???'s previous message
Aha, sorry,
The actual precision was a little better than the last post.
I mistakenly posted the precision before I added the rounding to the last log10 calculation.

The correct precision is,

(-1.88293/256, +0.12735/256) = about (-0.007, +0.0005)

When 20 log(x) is applied for dB calculation, the precision is,

(-0.15, +0.01) dB


The algorithm is easily extended to 24bit or 32bit input number.
Even in these cases, the same 8bit decimal table will provide similar precision, because of the nature of the algorithm.

Tsuneo

PS.
Please add this line at the entry of subroutine log10 in the implementation.
    if ( x == 0 )    return 0;        // avoid infinite loop


List of 30 messages in thread
TopicAuthorDate
1) Log computation, 2) LCD requirement            01/01/70 00:00      
   Yes            01/01/70 00:00      
      Why would you doubt it?            01/01/70 00:00      
      Yes            01/01/70 00:00      
         Doesn't have to be floating point            01/01/70 00:00      
            's the one            01/01/70 00:00      
               the good old Intel FP51 package            01/01/70 00:00      
         Should be in high level language, thanks..            01/01/70 00:00      
            you can steal it...            01/01/70 00:00      
               need floating-point log? - YES            01/01/70 00:00      
                  Fixed point ?            01/01/70 00:00      
                     RE: Fixed point ?            01/01/70 00:00      
                        And what is the input voltage range?            01/01/70 00:00      
                           RE: Aside: dB equivalent of voltage            01/01/70 00:00      
                              my point is...            01/01/70 00:00      
                                 Who remembers log tables?            01/01/70 00:00      
                              Already answered            01/01/70 00:00      
                        So use cB instead!            01/01/70 00:00      
                        Aside: dB equivalent of voltage            01/01/70 00:00      
   How to find log in assembly?            01/01/70 00:00      
      Hint            01/01/70 00:00      
      Math            01/01/70 00:00      
   Log calculation in ASM            01/01/70 00:00      
      Implementation and precision            01/01/70 00:00      
         Correct precision            01/01/70 00:00      
            Brilliant work            01/01/70 00:00      
               Absolutely!            01/01/70 00:00      
   Fixed-point log2, without lookup table.            01/01/70 00:00      
      To Mr Franck            01/01/70 00:00      
         Source for the algorithm.            01/01/70 00:00      

Back to Subject List