Truncated match.
PICList
Thread
'base 10 log (with square root)'
1996\05\29@201644
by
Edwin Park
I would now have to ask how are you taking the square root. I haven't
put much thought to this, but I would think that a square root is as
hard to do as a base 10 log
______________________________ Reply Separator _________________________________
Subject: base 10 log
Author: pic microcontroller discussion list <spam_OUTPICLISTTakeThisOuTMITVMA.MIT.EDU>
Sender:
pic microco at INTERNETGATEWAY
Date: 5/29/96 4:00 PM
eryone's help. I found a pretty easy way to find the log10.
I'll just going to scale the numbers to between 0 and 1/2 (the spec has
changed since my first post). Then use 3.33*(sqrt(sqrt(x))3 That should
be just enough accuracy, considering that I am only dealing with four
decimal places.
Stuart Allman
Studio Sound Design
.....studioKILLspam@spam@halcyon.com
1996\05\29@210016
by
Stuart Allman
> I would now have to ask how are you taking the square root. I haven't
> put much thought to this, but I would think that a square root is as
> hard to do as a base 10 log
In calculus I learn something called Newton's method where I can just make
an educated guess (say 0.5) and follow his method until the answer converges
at the square root, say after 5 iterations. I guess I should just get a
good DSP book one of these days so I don't have to remember all this
mathematical messy stuff.
:)
Stuart Allman
Studio Sound Design
studioKILLspamhalcyon.com
1996\05\29@212523
by
fastfwd

Stuart Allman <.....PICLISTKILLspam.....MITVMA.MIT.EDU> wrote:
> In calculus I learn something called Newton's method where I can
> just make an educated guess (say 0.5) and follow his method until
> the answer converges at the square root, say after 5 iterations.
Stuart:
The NewtonRaphson Method is horribly inefficient... Its one benefit
is that it's simple enough that you can use it to perform squareroot
calculations in your head. A (really bad) implementation is in one
of Microchip's math appnotes.
By the way, 5 iterations isn't enough for a 16bit number; if you
treat the number as an integer in the range [065535] and use a
starting approximation of 2 (as Microchip's appnote does), you need
11 iterations. I once calculated the best  that is, the
quickestconverging  starting approximation; for 16bit numbers, I
think it was 181.
I have in front of me a 16bit squareroot routine that takes only
126 cycles to execute on a PIC16C5x. It's pretty amazing; when I
received it, I offered its author a job. Unfortunately, he lives in
Germany, so he wasn't interested...
Anyway, he hasn't given me permission to publish it, so I can't post
the routine here. However, the knowledge that such a solution exists
should be enough to prod someone into trying to duplicate it.
Andy
Andrew Warren  EraseMEfastfwdspam_OUTTakeThisOuTix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499
More... (looser matching)
 Last day of these posts
 In 1996
, 1997 only
 Today
 New search...