The article deals with problems of testing implementations of mathematical functions working with floating-point numbers. It considers current standards’ requirements to such implementations and demonstrates that those requirements are not sufficient for correct operation of modern systems using sophisticated mathematical modeling. Correct rounding requirement is suggested to guarantee preservation of all important properties of implemented functions and to support high level of interoperability between different mathematical libraries and modeling software using them. Test construction method is proposed for conformance test development for current standards supplemented with correct rounding requirement. The idea of the method is to use three different sources of test data: floating-point numbers satisfying specific patterns, boundaries of intervals of uniform function behavior, and points where correct rounding requires much higher precision than in average. Some practical results obtained by using the method proposed are also presented.


Test Suite Test Point Double Precision Test Data Generation Mathematical Library 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    IEEE 754-1985. IEEE Standard for Binary Floating-Point Arithmetic. IEEE, NY (1985)Google Scholar
  2. 2.
    Kuliamin, V.: Standardization and Testing of Implementations of Mathematical Functions in Floating Point Numbers. Programming and Computer Software 33(3), 154–173 (2007)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
  4. 4.
  5. 5.
    IEC 60559. Binary Floating-Point Arithmetic for Microprocessor Systems. Geneve, ISO (1989)Google Scholar
  6. 6.
    IEEE 854-1987. IEEE Standard for Radix-Independent Floating-Point Arithmetic. IEEE, NY (1987)Google Scholar
  7. 7.
    ISO/IEC 9899. Programming Languages - C. Geneve: ISO (1999)Google Scholar
  8. 8.
    IEEE 1003.1-2004. Information Technology - Portable Operating System Interface (POSIX). IEEE, NY (2004)Google Scholar
  9. 9.
    ISO/IEC 10967-1. Information Technology - Language Independent Arithmetic - Part 1: Integer and Floating Point Arithmetic. Geneve, ISO (1994)Google Scholar
  10. 10.
    ISO/IEC 10967-2. Information Technology - Language Independent Arithmetic - Part 2: Elementary Numerical Functions. Geneve, ISO (2002)Google Scholar
  11. 11.
    ISO/IEC 10967-3. Information Technology - Language Independent Arithmetic - Part 3: Complex Integer and Floating Arithmetic and Complex Elementary Numerical Functions. Draft. Geneve, ISO (2002)Google Scholar
  12. 12.
    Goldberg, D.: What Every Computer Scientist Should Know about Floating-Point Arithmetic. ACM Computing Surveys 23(1), 5–48 (1991)CrossRefGoogle Scholar
  13. 13.
    Defour, D., Hanrot, G., Lefevre, V., Muller, J.-M., Revol, N., Zimmermann, P.: Proposal for a standardization of mathematical function implementation in floating-point arithmetic. Numerical Algorithms 37(1-4), 367–375 (2004)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Ng, K.C.: Arguments Reduction for Huge Arguments: Good to the Last Bit (1992),
  15. 15.
    Kahan, W.: Minimizing q*m − n, Unpublished (1983),
  16. 16.
  17. 17.
    de Dinechin, F., Ershov, A., Gast, N.: Towards the post-ultimate libm. In: Proc. of 17th Symposium on Computer Arithmetic, IEEE Computer Society Press, Los Alamitos (2005)Google Scholar
  18. 18.
  19. 19.
    Lefèvre, V., Muller, J.-M., Tisserand, A.: The Table Maker’s Dilemma. INRIA Research Report 98-12 (1998)Google Scholar
  20. 20.
    Lefèvre, V., Muller, J.-M.: Worst Cases for Correct Rounding of the Elementary Functions in Double Precision. In: Proc. of 15th IEEE Symposium on Computer Arithmetic, Vail, Colorado, USA, June  (2001)Google Scholar
  21. 21.
  22. 22.
    Edelman, A.: The Mathematics of the Pentium Division Bug. SIAM Review 39(1), 54–67 (1997)MathSciNetCrossRefMATHGoogle Scholar
  23. 23.
    Ziv, A., Aharoni, M., Asaf, S.: Solving Range Constraints for Binary Floating-Point Instructions. In: Proc. of 16-th IEEE Symposium on Computer Arithmetic (ARITH-16 2003), pp. 158–163 (2003)Google Scholar
  24. 24.
    Parks, M.: Number-Theoretic Test Generation for Directed Rounding. IEEE Trans. on Computers 49(7), 651–658 (2000)MathSciNetCrossRefGoogle Scholar
  25. 25.
  26. 26.
    Kahan, W.: A Test for Correctly Rounded SQRT. Computer Science Dept, Berkeley (1994),
  27. 27.
    Lefèvre, V.: An algorithm that computes a lower bound on the distance between a segment and \({\mathbb Z}^2\). In: Developments in Reliable Computing, pp. 203–212. Kluwer, Dordrecht, Netherlands (1999)CrossRefGoogle Scholar
  28. 28.
    Stehlé, D., Lefèvre, V., Zimmermann, P.: Worst cases and lattice reduction. In: Proc. of the 16th Symposium on Computer Arithmetic (ARITH’16), pp. 142–147. IEEE Computer Society Press, Los Alamitos (2003)Google Scholar
  29. 29.
    Hanrot, G., Lefèvre, V., Stehlé, D., Zimmermann, P.: Worst Cases of a Periodic Function for Large Arguments. INRIA Research Report 6106 (2007)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2008

Authors and Affiliations

  • Victor Kuliamin
    • 1
  1. 1.Institute for System Programming Russian Academy of SciencesMoscowRussia

Personalised recommendations