Re: Fixed point Vs Floating point





John Larkin wrote:

On Wed, 18 Jun 2008 08:01:02 -0700 (PDT), MooseFET
<kensmith@xxxxxxxxx> wrote:



Write a bit of code:

Fill a table with all ones

loop:

save a copy of the table
randomly increment or decrement one element
best fit a sine to the new table
if the fit is better keep the new table
if NOT bored yet goto loop


That's just an inefficient successive approximation to the
already-known sine curve, which it will eventually exactly match. The
better way is to FFT every random iteration and see if it improves the
fundamental and minimizes harmonics.


The systematic approach to this problem is the noise shaping and the dithering. You can generate the table in the way so the junk will be either evenly spread around the spectrum or concentrated in the particular frequency band, whatever is required.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
.



Relevant Pages

  • Re: FORSTY - The Fortran Styler :-)
    ... so common to twist code to force it to fit the construct. ... inside and before the loop. ... or named character constants for formats. ...
    (comp.lang.fortran)
  • Re: Question re Live Rail fatalities
    ... fit through the Loop. ... The Mk3 design sticks further out at cantrail ... the Loop tunnel, even for that stock. ... One wonders if a varant of LU Bombardier S stock might fit? ...
    (uk.railway)
  • Re: Question re Live Rail fatalities
    ... fit through the Loop. ... The Mk3 design sticks further out at cantrail ... the Loop tunnel, even for that stock. ... One wonders if a varant of LU Bombardier S stock might fit? ...
    (uk.railway)
  • Re: cordexch and x2fx
    ... > I was using cordexch to create a d-optimal DOE and x2fx to create ... > model to fit the coeffs too. ... > I now realize I don't need the loop to create facmod since the ...
    (comp.soft-sys.matlab)