Skip to main content
Log in

Standardization and testing of implementations of mathematical functions in floating point numbers

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. IEEE 754-1985: IEEE Standard for Binary Floating-Point Arithmetic, New York: IEEE, 1985.

  2. IEC 60559:1989. Binary Floating-Point Arithmetic for Microprocessor Systems, Geneve: ISO, 1989.

  3. ISO-IEC 10967-1:1994. Information Technology—Language Independent Arithmetic—Part 1: Integer and Floating Point Arithmetic, Geneve: ISO, 1994.

  4. ISO-IEC 10967-2:2002. Information Technology—Language Independent Arithmetic—Part 2: Elementary Numerical Functions, Geneve: ISO, 2002.

  5. 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.

  6. http://www.inria.fr/recherche/equipes/arenaire.en.html.

  7. 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.

  8. 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.

    Article  MATH  MathSciNet  Google Scholar 

  9. IEEE 854-1987: IEEE Standard for Radix-Independent Floating-Point Arithmetic, New York: IEEE, 1987.

  10. Goldberg, D., What Every Computer Scientist Should Know about Floating-Point Arithmetic, ACM Comput. Surveys, 1991, vol.23, no. 1, pp. 5–48.

    Article  Google Scholar 

  11. Sterbenz, P., Floating-Point, Englewood Cliffs: Prentice-Hall, 1974.

    Google Scholar 

  12. 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.

  13. http://www.fas.org/spp/starwars/gao/im92026.htm.

  14. http://www.ima.umn.edu/~arnold/disasters/ariane5rep.html.

  15. ISO-IEC 9899:1999. Programming Languages—C, Geneve: ISO, 1999.

  16. IEEE 1003.1-2004.: Information Technology—Portable Operating System Interface (POSIX), New York: IEEE, 2004.

  17. http://www.opengroup.org/onlinepubs/009695399/functions/sin.html.

  18. Lefevre, V., Muller, J.-M., and Tisserand, A., Toward Correctly Rounded Transcendentals, IEEE Trans. Comput., 1998, vol. 47, no. 11, pp. 1235–1243.

    Article  Google Scholar 

  19. Lefevre, V., Muller, J.-M., and Tisserand, A., The Table Maker’s Dilemma, INRIA Research Report, 1998, no. 98-12.

  20. 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.

  21. Lang, S., Algebra, Reading: Addison-Wesley, 1965. Translated under the title Algebra, Moscow: Mir, 1968.

    MATH  Google Scholar 

  22. 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.

    Google Scholar 

  23. Muller, J.-M., Elementary Functions: Algorithms and Implementation, Boston: Birkhauser, 2006, 2nd ed.

    MATH  Google Scholar 

  24. http://www.math.utah.edu/~beebe/software/ieee/.

  25. http://www.redhat.com/drepper/libm/.

  26. Kahan, W., What Can You Learn about Floating-Point Arithmetic in One Hour? http://http.cs.berkeley.edu/:_wkahan/ ieee754status, 1996.

  27. Schryer, N.L., A Test of Computer’s Floating-Point Arithmetic Unit, Computer Science Technical Report, AT&T Bell Labs, 1981.

  28. 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.

    Article  MATH  Google Scholar 

  29. 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.

    Article  MATH  Google Scholar 

  30. http://www.cant.ua.ac.be/ieeecc754.html.

  31. Karpinski, R. PARANOIA: A Floating-Point Benchmark, Byte Magazine, 1985, vol. 10, no. 2, pp. 223–235.

    Google Scholar 

  32. http://www.netlib.org/paranoia/.

  33. 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.

  34. 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.

  35. http://www.math.utah.edu/pub/elefunt/.

  36. http://www.netlib.org/fp/ucbtest.tgz.

  37. 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.

    Google Scholar 

  38. 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.

    Article  Google Scholar 

  39. http://www.loria.fr/zimmerma/mpcheck/.

  40. http://www.maplesoft.com/.

  41. http://www.wolfram.com/products/mathematica/index. html.

  42. http://www.mathworks.com/products/matlab/.

  43. 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.

    Article  MATH  Google Scholar 

  44. IBM Accurate Portable MathLib, http://rpmfind.net/linux/rpm2html/search.php?query=lib-ultim.so.2.

  45. http://www.mpfr.org/.

  46. http://www.sun.com/download/products. xml?id=41797765.

  47. http://www.ens-lyon.fr/LIP/Arenaire/Ware/SCSLib/.

  48. http://lipforge.ens-lyon.fr/projects/crlibm/.

  49. de Dinechin, F., Ershov, A., and Gast, N., Towards the Post-Ultimate libm, in Proc. 17th Symp. on Computer Arithmetic, IEEE Computer Society, 2005.

  50. Defour, D., de Dinechin, F., and Muller, J.-M., Correctly Rounded Exponential Function in Double Precision Arithmetic, INRIA Research Report, RR-2001-26, 2001.

  51. de Dinechin, F., Lauter, C., and Muller, J.-M., Fast and Correctly Rounded Logarithms in Double Precision, INRIA Research Report, RR-2005-37, 2005.

  52. 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.

  53. 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.

    Google Scholar 

  54. 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.

  55. 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.

    Article  MATH  MathSciNet  Google Scholar 

  56. MPFI Library, http://perdo.ens-lyon.fr/nathalie.revol/ mpfi_toc.html.

  57. Kahan, W., Minimizing q * mn, available at http://http.cs.berkley.edu/~wkahan/testpi/nearpi.c.

  58. Kuliamin, V.V., Formal Approaches to Testing Mathematical Functions, in Trudy ISP RAN, 2006, vol. 10.

  59. http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/ i386/fpu/e_expl.c?cvsroot=glibc.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Original Russian Text © V.V. Kuliamin, 2007, published in Programmirovanie, 2007, Vol. 33, No. 3.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S036176880703005X

Keywords

Navigation