Logarithmic endpoint asymptotic of the complete elliptic integral (source code)

= Logarithmic endpoint asymptotic of the complete elliptic integral
{title2=$K(m)=L+(1-m)(L-1)/4+O((1-m)^2L),\quad L=\log[4/\sqrt{1-m}]$}

Here $m$ is the parameter, equal to the squared modulus. Near $m=1$ the endpoint integrand is locally $(1-m+s^2)^{-1/2}$. Matching its integral to the outer secant integral gives $L$. The next correction is of order $(1-m)\log(1/(1-m))$. Keeping the parameter/modulus convention explicit prevents a factor-of-two error in the complementary small quantity.