Precise and fast computation of complete elliptic integrals by piecewise minimax rational function approximation

Piecewise minimax rational function approximations with the single and double precision accuracies are developed for (i) K ( m ) and E ( m ) , the complete elliptic integral of the first and second kind, respectively, and (ii) B ( m ) ? ( E ( m ) - ( 1 - m ) K ( m ) ) / m and D ( m ) ? ( K ( m ) - E ( m ) ) / m , two associate complete elliptic integrals of the second kind. The maximum relative error is one and 5 machine epsilons in the single and double precision computations, respectively. The new approximations run faster than the exponential function. When compared with the previous methods (Fukushima, 2009; Fukushima, 2011), which have been the fastest among the existing double precision procedures, the new method requires around a half of the memory and runs 1.7-2.2 times faster.