Here's the algorithm for SqRoot. Make 6 larger if you need better results.
Have fun!
float SqRoot(float x){
float guess = 1.0;
// interate
for( int i=0; i<6; ++i ){
guess = ( guess + x/guess ) / 2
}
return guess;
}
Russ Webb
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html
- Math Functions/OS 3.5 Thomas Ward
- Re: Math Functions/OS 3.5 Russell Y. Webb
- Re: Math Functions/OS 3.5 Thomas Ward
- Re: Math Functions/OS 3.5 Steve Sabram
- Re: Math Functions/OS 3.5 Thomas Ward
- Re: Math Functions/OS 3.5 Ron Nicholson
