1
$\begingroup$

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.