Numerical issues with jacobi_sn



Just a note that jacobi_sn has some numerical issues for complex
arguments.  I'm not sure why.

For example, with fpprec = 25,

jacobi_sn(1b0+%i*1b0, .7b0) ->
 3.522523469224944528936666b-1 %i + 1.134045971912365284394387b0

This uses the new implementation using AGM.  The old version using
Landen's descending transformation produces:

 3.522523469224944776209612b-1 %i + 1.134045971912365274954094b0

Mathematica says it is

(0.352252346922494477620961149 I + 1.134045971912365274954094081)


The descending transformation is much closer to Mathematica's result.  I
don't know why AGM is less accurate.  When the argument is real, there
doesn't appear to be any problems and both AGM and Landen's
transformation produce good results.

We can't go back to using Landen's transformation because it has
problems with Jacobi cn (and dn) for large values of the argument.

Ray