Originally posted by: crazygal
That's what it's for. I carry it out to the 20th place. I found it equal to .10101010... just by taking 2/3 and subtracting various powers of 2 from it randomly but I can't use that method to find other fractions all the time.
Actually you
can do it that way, more or less:
frac_unclaimed = frac
while (frac_unclaimedr > minimum_error)
{
if this power of 2 > frac_unclaimed
{
use this power of 2 and reduce frac_unclaimed
}
}
(ed) this works for any base, not just 2. I had to write import-export filters for SPSS once which uses base-36
