sage: def foo(f):
    for i in range(6000):
        a = sage.calculus.calculus.symbolic_expression_from_string(f)
        a=a.full_simplify()
    return true
....:

sage: foo("x*2+y^3+4")

------------------------------------------------------------------/
begin error-----------------------------------------------

ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1340, 0))

---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call
last)

/home/sage/public_html/cgi-bin/<ipython console> in <module>()
/home/sage/public_html/cgi-bin/<ipython console> in foo(f)
/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/
expression.s
o in sage.symbolic.expression.Expression.simplify_full
(sage/symbolic/expression.cpp:24479)()
/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/symbolic/
expression.s
o in sage.symbolic.expression.Expression.simplify_trig
(sage/symbolic/expression.cpp:24677)()
/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/structure/
parent.so
in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6820)
()
/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/structure/
coerce_maps
.so in sage.structure.coerce_maps.NamedConvertMap._call_
(sage/structure/coerce_maps.c:4221)()
/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/interfaces/
maxima.pyc
in _symbolic_(self, R)
   1841             sqrt(2)
   1842         """
-> 1843         return R(self._sage_())
   1844
   1845     def __complex__(self):

/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/interfaces/
maxima.pyc
in _sage_(self)
   1822         import sage.calculus.calculus as calculus
   1823         return

calculus.symbolic_expression_from_maxima_string(self.name(),
-> 1824                 maxima=self.parent())
   1825
   1826     def _symbolic_(self, R):

/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/calculus/
calculus.pyc
in symbolic_expression_from_maxima_string(x, equals_sub, maxima)
   1580     if len(x) == 0:
   1581         raise RuntimeError, "invalid symbolic expression --
''"
-> 1582     maxima.set('_tmp_',x)
   1583
   1584     # This is inefficient since it so rarely is needed:

/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/interfaces/
maxima.pyc
in set(self, var, value)
   1198             self._batch(cmd, batchload=True)
   1199         else:
-> 1200             self._eval_line(cmd)
   1201             #self._sendline(cmd)
   1202             #self._expect_expr()

/home/sage/sage-4.7/local/lib/python2.6/site-packages/sage/interfaces/
maxima.pyc
in _eval_line(self, line, allow_use_file, wait_for_prompt, reformat,
error_check)
    757         if not wait_for_prompt:
    758             return
--> 759         assert line_echo.strip() == line.strip()
    760
    761         # This broke in maxima-5.22.1 as discussed in
http://trac.sagemath.org/sage_trac/ticket/10187

AssertionError:
-------------------------------------------------------------------/
end error------------------------------------------------

It does this error without the 'changing string to sage expression'
line and just inputting a sage expression as well. I have sage running
on a linux server and ran it in the terminal. I found this testing the
runtime of full_simplify() and to do that I made a simple loop doing
repeated operations of full_simplify() on the same function 5000 or
6000 times (see above). This happens in terminal and in the notebook.
Any ideas for this bug or why it occurs? I have received errors, when
being called repeatedly 5000-6000 times, in simplify_log,
simplify_trig, and simplify_factorial. I plan on testing it more and i
expect to get it from all of the simplify_x functions. The errors seem
to come from maxima as far as I can tell.

This is another one when I tested a similar loop of full_simplify() in
sage running on VMWare on a windows XP machine:

-------------------------------------------------------/begin
error--------------------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_13.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding:
utf-8 -*-\\n"

+

_support_.preparse_worksheet_cell(base64.b64decode("Zm9vKDIqeCt5XjMrNCk="),globa

ls())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmpW90MG4/___code___.py", line 3, in <module>
    exec compile(u'foo(_sage_const_2 *x+y**_sage_const_3
+_sage_const_4 )
  File "", line 1, in <module>

  File "/tmp/tmp8maI1s/___code___.py", line 5, in foo
    q = f.simplify_full()
  File "expression.pyx", line 6386, in

sage.symbolic.expression.Expression.simplify_full

(sage/symbolic/expression.cpp:23587)
  File "expression.pyx", line 6637, in

sage.symbolic.expression.Expression.simplify_radical

(sage/symbolic/expression.cpp:24358)
  File

"/home/sage/sage/local/lib/python2.6/site-packages/sage/interfaces/
expect.py",

line 1048, in eval
    raise TypeError, 'error evaluating "%s":\n%s'%(code,s)
TypeError: error evaluating "domain: complex$":
Error executing code in Maxima
CODE:
        domain: complex$
Maxima ERROR:
         quit;
^Cdomain: complex$

Maxima encountered a Lisp error:

Console interrupt

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i191754)

-----------------------------------------------------------------------------------------------------/
end error------------------
When i received this error the loop was:
def foo(f):
    for i in range(5000):
        q = f.simplify_full()
    return true

And I called it with:
foo(2*x+y^3+4)

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to