Sign in

username:

password:



Not a member?

Search audiodsp



Search tips

Subscribe to audiodsp



audiodsp by Keywords

AAC | ADPCM | Convolution | DAFx | FFT | IIR | Mixer | MP3 | MPEG | MPEG-4

Sponsor

NEW! TMS320C6474: 3x the performance. 1/3 the cost. Three 1 GHz cores on 1 chip.

Discussion Groups

Discussion Groups | Audio Signal Processing | 1/sqrt(x) fixed point

Technical discussions related to Audio Signal Processing (digital effects, acoustics, noise reduction, musical signal processing, etc).

  

Post a new Thread

1/sqrt(x) fixed point - b_pa...@yahoo.com - Sep 27 14:11:00 2005



HI ,
 YOu can just follow the Newton Raphson implementation . Just use a small look up and you will
be able to do it in 3 iterations.
The equation is x(n+1) = x(n)(3-a*x(n)^2)*0.5
where x(n) is your initial value and a is your value that you want to determine the inverse
sqrt.
Implement it in flaoting point and convert it fixed pint by scaling it suitably and take care
of overflows/saturation in the fixed multiplication.
it should give u an error of +/- 1/2 or 1 LSB error .
that should be fine.
Bob
	


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

Re: 1/sqrt(x) fixed point - Al Clark - Sep 28 9:46:00 2005

There is another Newton-Raphson method that does not require the inverse. I 
don't remember the details but I have used it. It works with fixed point 
implementations. I think there is a comp.dsp trick on this at dspguru . As 
I recall, the trick as published, has a little mistake (maybe a wrong 
sign?). Its been many years since I looked at this since almost all of our 
work is SHARC where the Newton-Raphson method is supported by a special 
instruction and is very easy to implement.

I would explore this approach, but remember, everything I just told you 
comes from memory.
	Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com
	At 01:11 PM 9/27/2005, b_paulraj@b_pa... wrote:
>HI ,
>  YOu can just follow the Newton Raphson implementation . Just use a small 
> look up and you will be able to do it in 3 iterations.
>The equation is x(n+1) = x(n)(3-a*x(n)^2)*0.5
>where x(n) is your initial value and a is your value that you want to 
>determine the inverse sqrt.
>Implement it in flaoting point and convert it fixed pint by scaling it 
>suitably and take care of overflows/saturation in the fixed multiplication.
>it should give u an error of +/- 1/2 or 1 LSB error .
>that should be fine.
>Bob
>
>
>
>
>
	


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

Re: 1/sqrt(x) fixed point - paulraj bob - Sep 29 17:30:00 2005

Thanx Clark.
 The method is (1/sqrt(x))*x = sqrt(x).
But is there a suitable method for determining the
seed for NR method in 1/sqrt(x) to have 2/3
iterationsfor 16 bit fixed point numbers. I have used
look up tables.
regards
Bob

--- Al Clark <aclark@acla...> wrote:

> There is another Newton-Raphson method that does not
> require the inverse. I 
> don't remember the details but I have used it. It
> works with fixed point 
> implementations. I think there is a comp.dsp trick
> on this at dspguru . As 
> I recall, the trick as published, has a little
> mistake (maybe a wrong 
> sign?). Its been many years since I looked at this
> since almost all of our 
> work is SHARC where the Newton-Raphson method is
> supported by a special 
> instruction and is very easy to implement.
> 
> I would explore this approach, but remember,
> everything I just told you 
> comes from memory.
> 
> 
> Al Clark
> Danville Signal Processing, Inc.
>
--------------------------------------------------------------------
> Purveyors of Fine DSP Hardware and other Cool Stuff
> Available at http://www.danvillesignal.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> At 01:11 PM 9/27/2005, b_paulraj@b_pa... wrote:
> >HI ,
> >  YOu can just follow the Newton Raphson
> implementation . Just use a small 
> > look up and you will be able to do it in 3
> iterations.
> >The equation is x(n+1) = x(n)(3-a*x(n)^2)*0.5
> >where x(n) is your initial value and a is your
> value that you want to 
> >determine the inverse sqrt.
> >Implement it in flaoting point and convert it fixed
> pint by scaling it 
> >suitably and take care of overflows/saturation in
> the fixed multiplication.
> >it should give u an error of +/- 1/2 or 1 LSB error
> .
> >that should be fine.
> >Bob
> >
> >
> >
> >
> >
> 
> 
> 
> 
>
	


(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )