Skip to main content
Log in

A Proof of GMP Square Root

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

We present a formal proof (at the implementation level) of an efficient algorithm proposed by P. Zimmermann in 1999 to compute square roots of arbitrarily large integers. This program, which is part of the GNU Multiple Precision Arithmetic Library, is completely proven within the COQ system. Proofs are developed using the CORRECTNESS tool to deal with imperative features of the program. The formalization is rather large (more than 13,000 lines) and requires some advanced techniques for proof management and reuse.

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

  • Bondyfalat, D.: Certification d'un algorithme de division pour les grands entiers, Unpublished, 2002.

  • Coq development team, INRIA and LRI: The Coq Proof Assistant ReferenceManual, 2002. Available from http://coq.inria.fr/doc/main.html.

  • Daumas, M., Rideau, L. and Théry, L.: A generic library for floating-point numbers and its application to exact computing, in Theorem Proving in Higher Order Logics: 14th International Conference, LNCS 2152, Springer-Verlag, September 2001.

  • Filliâtre, J.-C.: Preuve de programmes impératifs en théorie des types, Ph.D. thesis, Université Paris-Sud, July 1999.

  • Filliâtre, J.-C.: Verification of non-functional programs using interpretations in type theory, J. Funct. Programming (2001). English translation of (Filliâtre, 1999). To appear.

  • Granlund, T.: The GNU Multiple Precision Arithmetic Library, 2002. Edition 4.0.1.

  • Harrison, J.: A machine-checked theory of floating point arithmetic, in Theorem Proving in Higher Order Logics: 12th International Conference, LNCS 1690, Springer-Verlag, September 1999.

  • Jacobi, C.: Formal verification of a theory of IEEE rounding, in R. J. Boulton and P. B. Jackson (eds), TPHOLs 2001: Supplemental Proceedings, 2001. Informatics Research Report EDI-INFRR-0046, Univ. Edinburgh, UK.

    Google Scholar 

  • Miner, P. S.: Defining the IEEE-854 floating-point standard in PVS, NASA Technical Memorandum 110167, NASA Langley Research Center, Hampton, Virginia, June 1995.

    Google Scholar 

  • Paulin-Mohring, C.: Inductive definitions in the system Coq – rules and properties, in M. Bezem and J.-F. Groote (eds), Proceedings of the Conference Typed Lambda Calculi and Applications, Lecture Notes in Comput. Sci. 664, 1993. LIP Research Report 92-49.

  • Russinoff, D. M.: A mechanically checked proof of IEEE compliance of AMD K5 floating point square-root microcode, Formal Methods in System Design 14(1) (January 1999), 75–125.

    Google Scholar 

  • Zimmermann, P.: Karatsuba square root, Technical Report 3805, INRIA, November 1999.

  • Zuras, D.: More on squaring and multiplying large integers, IEEE Trans. on Computers 43(8) (1994), 899–908.

    Google Scholar 

Download references

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Bertot, Y., Magaud, N. & Zimmermann, P. A Proof of GMP Square Root. Journal of Automated Reasoning 29, 225–252 (2002). https://doi.org/10.1023/A:1021987403425

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1021987403425

Navigation