The Community for Technology Leaders
Green Image
We introduce an algorithm for multiplying a floating-point number $x$ by a constant $C$ that is not exactly representable in floating-point arithmetic. Our algorithm uses a multiplication and a fused multiply and add instruction. Such instructions are available in some modern processors such as the IBM Power PC and the Intel/HP Itanium. We give three methods for checking whether, for a given value of $C$ and a given floating-point format, our algorithm returns a correctly rounded result for any $x$. When it does not, some of our methods return all the values $x$ for which the algorithm fails. We generalize our study to the case where a wider internal format is used for the intermediate calculations, which gives a fourth method. Our programs and some additional information (such as the case where an arbitrary nonbinary even radix is used), as well as examples of runs of our programs can be downloaded from \\url{}
computer arithmetic, floating-point arithmetic

N. Brisebarre and J. Muller, "Correctly Rounded Multiplication by Arbitrary Precision Constants," in IEEE Transactions on Computers, vol. 57, no. , pp. 165-174, 2007.
91 ms
(Ver 3.3 (11022016))