by a power of two, which is efficiently done in digital computer hardware using a bit shift. The expression then becomes where and is used to determine the direction of the rotation: if the angle is positive, then is +1, otherwise it is −1. All factors can be ignored in the iterative process and then applied all at once afterwards with a scaling factor which is calculated in advance and stored in a table or as a single constant, if the number of iterations is fixed. This correction could also be made in advance, by scaling and hence saving a multiplication. Additionally, it can be noted that to allow further reduction of the algorithm's complexity. Some applications may avoid correcting for altogether, resulting in a processing gain : After a sufficient number of iterations, the vector's angle will be close to the wanted angle . For most ordinary purposes, 40 iterations (n = 40) is sufficient to obtain the correct result to the 10th decimal place. The only task left is to determine whether the rotation should be clockwise or counterclockwise at each iteration (choosing the value of ). This is done by keeping track of how much the angle was rotated at each iteration and subtracting that from the wanted angle; then in order to get closer to the wanted angle , if is positive, the rotation is clockwise, otherwise it is negative and the rotation is counterclockwise: The values of must also be precomputed and stored. But for small angles, in fixed-point representation, reducing table size. As can be seen in the illustration above, the sine of the angle is the y coordinate of the final vector while the x coordinate is the cosine value. Vectoring mode The rotation-mode algorithm described above can rotate any vector (not only a unit vector aligned along the x axis) by an angle between −90° and +90°. Decisions on the direction of the rotation depend on being positive or negative. The vectoring-mode of operation requires a slight modification of the algorithm. It starts with a vector the x coordinate of which is positive and the y coordinate is arbitrary. Successive rotations have the goal of rotating the vector to the x axis (and therefore reducing the y coordinate to zero). At each step, the value of y determines the direction of the rotation. The final value of contains the total angle of