Informatics / TAMS / Applets / 3Dnow! division and sqrt iteration demonstration
Description
The applet on this page demonstrates the simple iterations used by AMD's 3Dnow! instruction set for the reciprocal (1/x) and reciprocal sqrt (1/sqrt(x)) operations. Division of y/x can then be realized in two steps with an additional multiplication via (1/x)*y. Similar, to calculate sqrt(x) you would use (1/sqrt(x))*x;

Result Iteration formula
1/b: x' = x * (2 - b*x)
1/sqrt(b): x' = 0.5 * x * (3 - b*x²)

Usage
First, enter the operand for the 1/x and 1/sqrt(x) operations into the topmost text field. Next, enter a suitable start value of x into the "initial x" text field. Finally, press the start button and the applet will calculate the successive values for the 1/x iteration on the left, and the 1/sqrt(x) iteration on the right.

Use the exact values for 1/x and 1/sqrt(x) displayed in the bottom textfields to compare the iterated values with the exact values, or to find a suitable start value for the iteration. For example, try the x value 3.14159265 and the initial values 0.02, 0.2, 0.3 and compare how fast the iteration converges.

Note that the iterations converge only in a small region near the correct result value. In the AMD K6 and Athlon processors, special lookup-tables and logic provide an initial value of sufficient precision (about 14 bits).

3Dnow! iteration applet
 

Sorry, but your browser seems to ignore Java-applets.
Enable Java in your browser preferences,
and reload this page to start the Yield Demonstration applet.

04.05.2001 Impressum
http://tams-www.informatik.uni-hamburg.de/applets/yield/index.html