Abstract
Requirements definition and test suites development for implementations of mathematical functions in floating point arithmetic in the framework of the IEEE 754 standard are considered. A method based on this standard is proposed for defining requirements for such functions. This method can be used for the standardization of implementations of such functions; this kind of standardization extends IEEE 754. A method for designing test suites for the verification of those requirements is presented. The proposed methods are based on specific properties of the representation of floating point numbers and on some features of the functions under examination.
Similar content being viewed by others
References
IEEE 754-1985: IEEE Standard for Binary Floating-Point Arithmetic, New York: IEEE, 1985.
IEC 60559:1989. Binary Floating-Point Arithmetic for Microprocessor Systems, Geneve: ISO, 1989.
ISO-IEC 10967-1:1994. Information Technology—Language Independent Arithmetic—Part 1: Integer and Floating Point Arithmetic, Geneve: ISO, 1994.
ISO-IEC 10967-2:2002. Information Technology—Language Independent Arithmetic—Part 2: Elementary Numerical Functions, Geneve: ISO, 2002.
ISO-IEC 10967-3:2002. Information Technology—Language Independent Arithmetic—Part 3: Complex Integer and Floating Point Arithmetic and Complex Elementary Numerical Functions, Draft, Geneve: ISO, 2002.
Hanrot, G., Lefevre, V., Muller, J.-M., Revol, N, and Zimmermann, P., Some Notes for a Proposal for Elementary Function Implementation in Floating-Point Arithmetic, in Proc. of Workshop IEEE 754R and Arithmetic Standardization, ARITH-15, 2001.
Defour, D., Hanrot, G., Lefevre, V., Muller, J.-M., Revol, N., and Zimmermann, P., Proposal for a Standardization of Mathematical Function Implementation in Floating-Point Arithmetic, Numerical Algorithms, 2004, vol. 37, nos. 1–4, pp. 367–375.
IEEE 854-1987: IEEE Standard for Radix-Independent Floating-Point Arithmetic, New York: IEEE, 1987.
Goldberg, D., What Every Computer Scientist Should Know about Floating-Point Arithmetic, ACM Comput. Surveys, 1991, vol.23, no. 1, pp. 5–48.
Sterbenz, P., Floating-Point, Englewood Cliffs: Prentice-Hall, 1974.
Camlet, J. and Lefevre, V., Toward the Integration of Numerical Computations into the OMSCS Framework, in Proc. 7th Int. Workshop on Computer Algebra in Scientific Computing (CASC 2004), St. Petersburg, 2004, pp. 71–79.
ISO-IEC 9899:1999. Programming Languages—C, Geneve: ISO, 1999.
IEEE 1003.1-2004.: Information Technology—Portable Operating System Interface (POSIX), New York: IEEE, 2004.
http://www.opengroup.org/onlinepubs/009695399/functions/sin.html.
Lefevre, V., Muller, J.-M., and Tisserand, A., Toward Correctly Rounded Transcendentals, IEEE Trans. Comput., 1998, vol. 47, no. 11, pp. 1235–1243.
Lefevre, V., Muller, J.-M., and Tisserand, A., The Table Maker’s Dilemma, INRIA Research Report, 1998, no. 98-12.
Lefevre, V. and Muller, J.-M., Worst Cases for Correct Rounding of the Elementary Functions in Double Precision, in Proc. 15th Symp. on Computer Arithmetic, Vail (Colorado), 2001.
Lang, S., Algebra, Reading: Addison-Wesley, 1965. Translated under the title Algebra, Moscow: Mir, 1968.
Abramowitz, M. and Stegun, I.A., Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, New York: Dover, 1965. Translated under the title Spravochnik po spetsiak’nym funktsiyam s formulami, grafikami i matemeticheskimi tablitsami, Moscow: Nauka, 1979.
Muller, J.-M., Elementary Functions: Algorithms and Implementation, Boston: Birkhauser, 2006, 2nd ed.
Kahan, W., What Can You Learn about Floating-Point Arithmetic in One Hour? http://http.cs.berkeley.edu/:_wkahan/ ieee754status, 1996.
Schryer, N.L., A Test of Computer’s Floating-Point Arithmetic Unit, Computer Science Technical Report, AT&T Bell Labs, 1981.
Verdonk, B., Cuyt, A., and Verschaeren, D.A., A Precision-and Range-Independent Tool for Testing Floating-Point Arithmetic I: Basic Operations, Square Roots and Remainder, ACM TOMS, 2001, vol. 27, no. 1, pp. 92–118.
Verdonk, B., Cuyt, A., and Verschaeren, D.A., A Precision-and Range-Independent Tool for Testing Floating-Point Arithmetic II: Conversions, ACM TOMS, 2001, vol. 27, no. 1, pp. 119–140.
Karpinski, R. PARANOIA: A Floating-Point Benchmark, Byte Magazine, 1985, vol. 10, no. 2, pp. 223–235.
Ziv, A., Aharoni, M., and Asaf, S., Solving Range Constraints for Binary Floating-Point Instructions, in Proc. 16th Symp. on Computer Arithmetic (ARITH-16’03), 2003, pp. 158–163.
Aharoni, M., Asaf, S., Fournier, L., Koifman, A., and Nagel, R., FPgen—A Test Generation Framework for Datapath Floating-Point Verification, in Proc. IEEE Int. High Level Design Validation and Test Workshop (HLDVT’03), 2003, pp. 17–22.
Liu, Z.A., Berkley Elementary Function Test Suite, M.S. thesis, Berkley: Computer Science Division, Department of Electrical Engineering and Computer Science, Univ. of California at Berkley, 1987.
Stehele, D., Lefevre, V., and Zimmermann, P., Searching Worst Cases of a One-Variable Function Using Lattice Reduction, IEEE Trans. Comput., 2005, vol. 54, no. 3, pp. 340–346.
Ziv, A., Fast Evaluation of Elementary Mathematical Functions with Correctly Rounded Last Bit, ACM Trans. Math. Software, 1991, vol. 17, no. 3, pp. 410–423.
IBM Accurate Portable MathLib, http://rpmfind.net/linux/rpm2html/search.php?query=lib-ultim.so.2.
de Dinechin, F., Ershov, A., and Gast, N., Towards the Post-Ultimate libm, in Proc. 17th Symp. on Computer Arithmetic, IEEE Computer Society, 2005.
Defour, D., de Dinechin, F., and Muller, J.-M., Correctly Rounded Exponential Function in Double Precision Arithmetic, INRIA Research Report, RR-2001-26, 2001.
de Dinechin, F., Lauter, C., and Muller, J.-M., Fast and Correctly Rounded Logarithms in Double Precision, INRIA Research Report, RR-2005-37, 2005.
Chevillard, S. and Revol, N., Computation of the Error Functions erf and erfc in Arbitrary Precision with Correct Rounding, in Proc. 17th IMACS Conf. on Scientific Computation, Applied Mathematics, and Simulation, Paris, 2005.
Kramer, W., Multiple-Precision Computations with Result Verification, in Scientific Computing with Automatic Result Verification, Adams, E. and Kulisch, U., Eds., Boston: Academic, 1993, pp. 325–356.
Schulte, M.J. and Swartzlander, E.E., Software and Hardware Techniques for Accurate, Self-Validating Arithmetic, in Applications of Interval Computations, 1996, pp. 381–404.
Revol, N. and Rouillier, F., Motivations for an Arbitrary Precision Interval Arithmetic and the MPFI Library, Reliable Comput., 2005, vol. 11, no. 4, pp. 275–290.
MPFI Library, http://perdo.ens-lyon.fr/nathalie.revol/ mpfi_toc.html.
Kahan, W., Minimizing q * m − n, available at http://http.cs.berkley.edu/~wkahan/testpi/nearpi.c.
Kuliamin, V.V., Formal Approaches to Testing Mathematical Functions, in Trudy ISP RAN, 2006, vol. 10.
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ i386/fpu/e_expl.c?cvsroot=glibc.
Author information
Authors and Affiliations
Additional information
Original Russian Text © V.V. Kuliamin, 2007, published in Programmirovanie, 2007, Vol. 33, No. 3.
Rights and permissions
About this article
Cite this article
Kuliamin, V.V. Standardization and testing of implementations of mathematical functions in floating point numbers. Program Comput Soft 33, 154–173 (2007). https://doi.org/10.1134/S036176880703005X
Received:
Issue Date:
DOI: https://doi.org/10.1134/S036176880703005X