#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:  Karl-Dieter Crisman
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/rws/bugs_in_conversion_of_variable_names_from_maxima_to_sage|  
518de3e62533cd209997107f903192f1a31d118c
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by kcrisman):

 * reviewer:   => Karl-Dieter Crisman


Comment:

 Well, it's an improvement, though still not perfect:
 {{{
 # Before
 sage: sefms('%inf')
 Inf
 sage: sefms('%minf')
 -Infinity
 # After
 sage: sefms('%inf')
 +Infinity
 sage: sefms('%minf')
 -Infinity
 }}}
 Neither of these are infinity in Maxima, of course.  And indeed here is
 what the [http://maxima.sourceforge.net/docs/manual/en/maxima_6.html#SEC32
 Maxima manual] says about identifiers:
 {{{
 (%i1) %an_ordinary_identifier42;
 (%o1)               %an_ordinary_identifier42
 }}}
 "A numeral may be the first character of an identifier if it is preceded
 by a backslash. "  But I don't know that we need to translate all
 identifiers in Maxima to Sage here... I guess I'm torn about that.
 {{{
 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)
 }}}
 Of course, thinking about it, that string is a Sage string, not a Maxima
 string, so `%time R = random_expr(50,nvars=2); sefms(repr(R._maxima_()))`
 is probably more accurate, but that is also wildly variant on the
 expression.

 Okay, as far as I can tell this will not break anything (let's really
 hope!) and fixes the actual problem without slowing down what is already a
 very slow process (even for `random_expr(5,nvars=2)` it's 2-3 milliseconds
 either way).  Step in right direction, and again most people should not be
 affected in the slightest.  If passes tests, let's get it in.

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