#6882: bugs in conversion of variable names from Maxima to Sage
-------------------------------------+-------------------------------------
       Reporter:  was                |        Owner:  rws
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  calculus           |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Ralf Stephan       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/rws/bugs_in_conversion_of_variable_names_from_maxima_to_sage|  
518de3e62533cd209997107f903192f1a31d118c
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by rws):

 Replying to [comment:34 kcrisman]:
 > How does this do with `timeit` for long expressions one gets in 'real
 life'?  (See sage/symbolic/random_tests.py.)
 It's within the measurement error:
 {{{
 sage: from sage.calculus.calculus import
 symbolic_expression_from_maxima_string as sefms
 sage: var('v1,v2,v3')
 (v1, v2, v3)
 sage: ex=-1/3*(pi + 1)*(3*(euler_gamma - e)*(pi - 3*v1 - v1/arcsech(1) +
 e^(-1)/pi) - 6*v3^2*arcsinh(-v1 + e)/v2 - v2 - 3*log_gamma(v1*v3)/v2 -
 3*e^(-254) + 3)*(-catalan/v3)^(twinprime*pi - 1/2*v1 -
 1/2*v2)*inverse_jacobi_cs(1, v3)/jacobi_sc(1/arccos(-1/(v1*csc(v3))),
 v3/v1 + e) - 1/4*(2*v3^2*(e + 1) +
 ((e*log_integral(arcsech(exp_integral_e1(v2^mertens - 1) - 4)) + 15*v1 +
 jacobi_dn(v2, pi))*v1*e^(-1) + golden_ratio*pi^v1*(1/v3^12 +
 jacobi_ds(-10, csc(v3^2)))^(v2 - 1/2/v2)*sinh(v2*e)/((v1 + v2 + v3 +
 1)*v2))/(v1^2*inverse_jacobi_nc(v1, -e)) - 2*bessel_Y(v3, v2))/v2 +
 v3/inverse_jacobi_sc(1, v2) - (v1 + 1)/((v2 + v3)*(2*(v1 + e)*(v3 - 1)/(pi
 + v1) + (-v3*sech(v1*v3)/v2)^(-e/v1))) + inverse_jacobi_cn(pi + v1*v3, pi
 - v3) + jacobi_sn(e, arctanh(-(-log_integral(2) +
 log_integral(jacobi_ds(-1, v3)))^v2*e)^(1/7*(18*v2 - v3)*(14*v2 +
 e)/(v3*arctan(1/v2)*kronecker_delta(v1, v3))))
 sage: timeit('sefms(str(ex))')
 5 loops, best of 3: 2.19/2.14/2.15 s per loop (without #6882)
 5 loops, best of 3: 2.13/2.11/2.12 s per loop (with #6882)
 }}}
 Obviously the whole routine takes so long that the loop doesn't signify.
 That may be worth an optimization ticket alone.
 > Also note that usually we end up having to special-case things with `%`
 anyway - e.g., `%ilt` (inverse Laplace transform) gets handled somewhere
 else, I'd have to look up where.
 Just put it in `symtable`, give it a special value, and ask for that value
 within the new loop. Having it all in the loop is more efficient than find
 every time.

--
Ticket URL: <http://trac.sagemath.org/ticket/6882#comment:35>
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/d/optout.

Reply via email to