Electronic Proceedings in Theoretical Computer Science (Jun 2014)

Formal Verification of Medina's Sequence of Polynomials for Approximating Arctangent

  • Ruben Gamboa,
  • John Cowles

DOI
https://doi.org/10.4204/EPTCS.152.9
Journal volume & issue
Vol. 152, no. Proc. ACL2 2014
pp. 101 – 110

Abstract

Read online

The verification of many algorithms for calculating transcendental functions is based on polynomial approximations to these functions, often Taylor series approximations. However, computing and verifying approximations to the arctangent function are very challenging problems, in large part because the Taylor series converges very slowly to arctangent–a 57th-degree polynomial is needed to get three decimal places for arctan(0.95). Medina proposed a series of polynomials that approximate arctangent with far faster convergence–a 7th-degree polynomial is all that is needed to get three decimal places for arctan(0.95). We present in this paper a proof in ACL2(r) of the correctness and convergence rate of this sequence of polynomials. The proof is particularly beautiful, in that it uses many results from real analysis. Some of these necessary results were proven in prior work, but some were proven as part of this effort.