Patent ID: 8819095

Claim:
A method of determining an algorithm for calculating two or more products of an integer value x and approximations of two or more irrational values using a processor, the method comprising: receiving, by the processor, the integer value x; determining, by the processor, a set of dyadic fractions a 1 /2 b . . . a m /2 b approximating the two or more irrational values; determining, by the processor, a sequence of intermediate values w 1 . . . w t to calculate the two or more products by: setting w 1 equal to the integer value x; and determining w 2 . . . w t in accordance with (a) at least one of w 1 . . . w t−1 , and (b) one of a plus operation, a minus operation, and a right-shift operation; determining, by the processor, indices l 1 . . . l m ≦t of intermediate values among the sequence of intermediate values w 1 . . . w t that correspond to the two or more products, such that: w l1 ≈x*a 1 /2 b . . . w lm ≈x*a m /2 b ; and determining, by the processor, the algorithm by determining the sequence of intermediate values w 1 . . . w t and determining the indices l 1 . . . l m ≦t of the intermediate values among the sequence of intermediate values w 1 . . . w t to minimize an error metric.