calebh
Jun19-09, 06:05 PM
I am attempting to make an initial approximation for the inverse algorithm (1/x)
n = NUMBER TO INVERSE
a = APPROXIMATION
a = a*(2-(n*a))
'a' gets closer to the actual result each time the algorithm is preformed
The problem is finding the initial approximation. An exponential equation seems to fit the best
a = .5^n
The equation gets more accurate as n increases
http://www09.wolframalpha.com/input/?i=%281%2Fx%29-%28.5^x%29
I chose .5, because in binary, dividing by two is as simple as shifting to the right.
Is there any other way to make a close approximation that is better than .5^n?
n = NUMBER TO INVERSE
a = APPROXIMATION
a = a*(2-(n*a))
'a' gets closer to the actual result each time the algorithm is preformed
The problem is finding the initial approximation. An exponential equation seems to fit the best
a = .5^n
The equation gets more accurate as n increases
http://www09.wolframalpha.com/input/?i=%281%2Fx%29-%28.5^x%29
I chose .5, because in binary, dividing by two is as simple as shifting to the right.
Is there any other way to make a close approximation that is better than .5^n?