Getting values of EllipticK with arguments that are very near 1

I need to evaluate EllipticK[m] very close to 1. However, when I get too close to 1 the function defaults to the exact solution for 1 , which is ComplexInfinity. I can enter a comparable number in Wolfram|Alpha and get both the exact and the numerical approximation, but nothing I have tried gets me that approximate number in Mathematica:

Wolfram|Alpha:

EllipticK[0.9999999999999999999999999999999999999999999999]
54.3458...

Mathematica:

EllipticK[0.9999999999999999999999999999999999999999999999]
ComplexInfinity
EllipticK[0.9999999999999999999999999999999999999999999999]//N
ComplexInfinity

I've tried various other combinations of precision manipulation as well, so far nothing has worked. Does anyone know how to override the exact answer?

Edit

I discovered half the solution immediately after posting. When I put a 0 at the end of the string of 9s, it will evaluate the decimal approximation. However, I don't know how to implement this for the purpose of, say, plotting the EllipticK.

• Try EllipticK[0.9999999999999999999999999999999999999950] – Somos Apr 16 at 23:43
• Somos means EllipticK[0.9999999999999999999999999999999999999950]. The editing is wonky with the backticks, and I don't remember how to escape them. – march Apr 17 at 0:05
• @march Use double back-ticks: EllipticK[0.99999999999999999999999999999999999999`50] – Michael E2 Apr 17 at 1:12

Your choice to evaluate EllipticK[m] for values of m near the logarithmic singularity at $$1$$ is doomed from the start. The numerically proper way to go about this is to use the relationship of the complete elliptic integral of the first kind with the arithmetic-geometric mean, so that you are evaluating an argument near $$0$$: