#4102: make bessel_J symbolic
----------------------------------+-----------------------------------------
       Reporter:  jwmerrill       |         Owner:  burcin             
           Type:  enhancement     |        Status:  needs_review       
       Priority:  major           |     Milestone:  sage-5.7           
      Component:  calculus        |    Resolution:                     
       Keywords:                  |   Work issues:                     
Report Upstream:  N/A             |     Reviewers:  Karl-Dieter Crisman
        Authors:  Benjamin Jones  |     Merged in:                     
   Dependencies:                  |      Stopgaps:                     
----------------------------------+-----------------------------------------
Changes (by kcrisman):

  * status:  new => needs_review
  * reviewer:  => Karl-Dieter Crisman


Comment:

 Here's the only failures I got with 5.7.beta3.
 {{{
 sage -t  "devel/sage-main/sage/calculus/desolvers.py"
 **********************************************************************
 File "/Users/.../sage-5.7.beta3/devel/sage-
 main/sage/calculus/desolvers.py", line 252:
     sage: desolve(x^2*diff(y,x,x)+x*diff(y,x)+(x^2-4)*y==0,y)
 Expected:
     k1*bessel_j(2, x) + k2*bessel_y(2, x)
 Got:
     k1*bessel_J(2, x) + k2*bessel_Y(2, x)
 **********************************************************************
 1 items had failures:
    1 of  62 in __main__.example_1
 ***Test Failed*** 1 failures.
          [10.1 s]
 }}}
 Hmm, should we keep the lowercase versions around, or was that actually an
 error that we never parsed those?
 {{{
 sage -t  "devel/sage-main/sage/calculus/wester.py"
 **********************************************************************
 File "/Users/.../sage-5.7.beta3/devel/sage-main/sage/calculus/wester.py",
 line 39:
     sage: bessel_J (2, 1+I)
 Expected:
     0.0415798869439621 + 0.247397641513306*I
 Got:
     bessel_J(2, I + 1)
 **********************************************************************
 1 items had failures:
    1 of 200 in __main__.example_0
 ***Test Failed*** 1 failures.
          [4.4 s]
 }}}
 Easy enough to fix - we could even add the `n()` version there.
 {{{
 sage -t  "devel/sage-main/sage/functions/special.py"
 **********************************************************************
 File "/Users/.../sage-5.7.beta3/devel/sage-
 main/sage/functions/special.py", line 521:
     sage: n(bessel_J(3,10,"maxima"))
 Exception raised:
     Traceback (most recent call last):
     sage: n(bessel_J(3,10,"maxima"))
       File "function.pyx", line 354, in
 sage.symbolic.function.Function.__call__ (sage/symbolic/function.cpp:3976)
     TypeError: Symbolic function bessel_J takes exactly 2 arguments (3
 given)
 **********************************************************************
 File "/Users/.../sage-5.7.beta3/devel/sage-
 main/sage/functions/special.py", line 536:
     sage: n(bessel_J(3,10,"maxima"))
 Exception raised:
         n(bessel_J(Integer(3),Integer(10),"maxima"))###line 536:
     sage: n(bessel_J(3,10,"maxima"))
       File "function.pyx", line 354, in
 sage.symbolic.function.Function.__call__ (sage/symbolic/function.cpp:3976)
     TypeError: Symbolic function bessel_J takes exactly 2 arguments (3
 given)
 **********************************************************************
 2 items had failures:
    1 of   5 in __main__.example_8
    1 of   5 in __main__.example_9
 ***Test Failed*** 2 failures.
          [3.8 s]
 }}}
 Hmm, here is where that potential deprecation I mentioned might come in.
 {{{
 sage -t  "devel/sage-main/sage/symbolic/random_tests.py"
 **********************************************************************
 File "/Users/.../sage-5.7.beta3/devel/sage-
 main/sage/symbolic/random_tests.py", line 236:
     sage: print "ignore this";  random_expr(50, nvars=3,
 coeff_generator=CDF.random_element) # random
 Exception raised:
 <snip>
       File "misc.pyx", line 209, in
 sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1488)
     AttributeError:
 'sage.rings.complex_interval.ComplexIntervalFieldElement' object has no
 attribute 'arcsin'
 **********************************************************************
 }}}
 I haven't got a clue, but apparently the usual craziness with random
 expression has reached new heights with these extra functions.   I suggest
 we just try a different seed or something.  Not every random expression
 will be meaningful, for instance.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4102#comment:23>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to