Natural Logarithms and Exponent





5.00/5 (1 vote)
You should be delighted by the CORDIC approach to elementary functions computation.http://drdobbs.com/184404244[^]log10(x){ z = 0; for ( i=1; i= 1) x = x - x*2^(-i); z = z - log10(1-2^(-i)); else x = x + x*2^(-i); ...
You should be delighted by the CORDIC approach to elementary functions computation.
log10(x){
z = 0;
for ( i=1; i=<B; i++ ){
if (x > 1)
x = x - x*2^(-i);
z = z - log10(1-2^(-i));
else
x = x + x*2^(-i);
z = z - log10(1+2^(-i));
}
return(z)
}
(In this listing, B is the desired number of bits of resolution in the result.)