#15334: Evaluation of Jacobi elliptic functions for non-real arguments depends 
on
previously computed values
-------------------------+-------------------------------------------------
   Reporter:             |            Owner:
  davidamadore           |           Status:  new
       Type:  defect     |        Milestone:  sage-5.13
   Priority:  major      |         Keywords:  special function elliptic
  Component:  numerical  |  integral jacobi
  Merged in:             |          Authors:
  Reviewers:             |  Report Upstream:  N/A
Work issues:             |           Branch:
     Commit:             |     Dependencies:
   Stopgaps:             |
-------------------------+-------------------------------------------------
 The following example shows that numerically evaluating sn(I,1/2) first
 fails ("cannot evaluate symbolic expression numerically") and then
 succeeds once the value sc(1,1/2) has been computed:

 {{{
 sage: N(jacobi("sn", I, 1/2))
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-1-e0000742d9d6> in <module>()
 ----> 1 N(jacobi("sn", I, Integer(1)/Integer(2)))

 /usr/src/local/sage-5.12/local/lib/python2.7/site-
 packages/sage/misc/functional.pyc in numerical_approx(x, prec, digits)
    1395             prec = int((digits+1) * LOG_TEN_TWO_PLUS_EPSILON) + 1
    1396     try:
 -> 1397         return x._numerical_approx(prec)
    1398     except AttributeError:
    1399         from sage.rings.complex_double import
 is_ComplexDoubleElement

 /usr/src/local/sage-5.12/local/lib/python2.7/site-
 packages/sage/symbolic/expression.so in
 sage.symbolic.expression.Expression._numerical_approx
 (sage/symbolic/expression.cpp:22615)()

 TypeError: cannot evaluate symbolic expression numerically
 sage: N(jacobi("sc", 1, 1/2))
 1.34737147138542
 sage: N(jacobi("sn", I, 1/2))
 1.34737147138542*I
 }}}

 (in fact, evaluating sc with any arguments whatsoever seems to make the sn
 function work afterward).

--
Ticket URL: <http://trac.sagemath.org/ticket/15334>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to