Subscribe

Issue No.02 - February (2008 vol.57)

pp: 165-174

DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/TC.2007.70813

ABSTRACT

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{http://perso.ens-lyon.fr/jean-michel.muller/MultConstant.html}

INDEX TERMS

computer arithmetic, floating-point arithmetic

CITATION

Nicolas Brisebarre, Jean-Michel Muller, "Correctly Rounded Multiplication by Arbitrary Precision Constants",

*IEEE Transactions on Computers*, vol.57, no. 2, pp. 165-174, February 2008, doi:10.1109/TC.2007.70813REFERENCES

- [1] M. Abramowitz and I.A. Stegun,
Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables, Applied Math. Series 55, US Nat'l Bureau of Standards, 1964.- [4] B.P. Flannery, W.H. Press, S.A. Teukolsky, and W.T. Vetterling,
Numerical Recipes in C, second ed. Cambridge Univ. Press, 1992.- [6] G.H. Hardy and E.M. Wright,
An Introduction to the Theory of Numbers. Oxford Univ. Press, 1979.- [7] J. Harrison, “A Machine-Checked Theory of Floating-Point Arithmetic,”
Proc. 12th Int'l Conf. Theorem Proving in Higher Order Logics, Y. Bertot, G. Dowek, A. Hirschowitz, C. Paulin, and L.Théry, eds., pp. 113-130, Sept. 1999.- [8] W. Kahan, “A Logarithm Too Clever by Half,” http://http.cs.berkeley.edu/ wkahanLOG10HAF.TXT , 2004.
- [9] A.Y. Khinchin,
Continued Fractions. Dover, 1997.- [10] V. Lefèvre, “An Algorithm that Computes a Lower Bound on the Distance between a Segment and $Z^{2}$ ,”
Developments in Reliable Computing, pp. 203-212, Kluwer Academic, 1999.- [11] R.-C. Li, S. Boldo, and M. Daumas, “Theorems on Efficient Argument Reductions,”
Proc. 16th IEEE Symp. Computer Arithmetic, 2003.- [12] P. Markstein,
IA-64 and Elementary Functions: Speed and Precision, Hewlett-Packard Professional Books. Prentice Hall, 2000.- [13] P.W. Markstein, “Computation of Elementary Functions on the IBM Risc System/6000 Processor,”
IBM J. Research and Development, vol. 34, no. 1, pp. 111-119, Jan. 1990.- [14] J.-M. Muller, “On the Definition of ${\rm ulp}(x)$ ,” Technical Report 2005-09, LIP Laboratory, ENS Lyon, ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/ RR2005RR2005-09.pdf, 2005.
- [15] M.A. Overton,
Numerical Computing with IEEE Floating-Point Arithmetic. SIAM, 2001.- [16] O. Perron,
Die Lehre von den Kettenbrüchen, 3. verb. und erweiterte Aufl., pp. 1954-1957. Teubner, - [17] H.M. Stark,
An Introduction to Number Theory. MIT Press, 1981. |