What is the output provided by fricas (outside Sage) ? (perhaps it's a short expression as a root sum?)
Simplifying an expression given as a string of length 47K is not an easy task. On Fri, 23 Jun 2023, 08:21 'Nasser M. Abbasi' via sage-devel, < sage-devel@googlegroups.com> wrote: > Here is the code to reproduce it. Using Fricas 1.3.8 on Linux via sagemath > > var('x a') > expr=integrate(x/(a^5+x^5),x, algorithm="fricas"); > len(str(expr)) > 47199 > expr.full_simplify() > > TypeError: ECL says: Memory limit reached. Please jump to an outer > pointer, quit program and enlarge the > memory limits before executing the program again. > > --Nasser > > > On Friday, June 23, 2023 at 2:15:18 AM UTC-5 Nasser M. Abbasi wrote: > >> I obtained a large expression from CAS system (Fricas) calling it from >> sagemath. >> >> When I did expr.full_simplify() sagemath 10.0 on Linux gave this error >> >> TypeError: ECL says: Memory limit reached. Please jump to an outer >> pointer, quit program and enlarge the >> memory limits before executing the program again. >> >> Is this to be expected for very large expression? >> >> Here is full error >> >> age: expr.full_simplify() >> >> --------------------------------------------------------------------------- >> RuntimeError Traceback (most recent call >> last) >> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:748, in >> InterfaceElement.__init__(self, parent, value, is_name, name) >> 747 try: >> --> 748 self._name = parent._create(value, name=name) >> 749 except (TypeError, RuntimeError, ValueError) as x: >> >> File ~/TMP/sage-10.0/src/sage/interfaces/maxima_lib.py:618, in >> MaximaLib._create(self, value, name) >> 617 else: >> --> 618 self.set(name, value) >> 619 except RuntimeError as error: >> >> File ~/TMP/sage-10.0/src/sage/interfaces/maxima_lib.py:526, in >> MaximaLib.set(self, var, value) >> 525 cmd = '%s : %s$'%(var, value.rstrip(';')) >> --> 526 self.eval(cmd) >> >> File ~/TMP/sage-10.0/src/sage/interfaces/maxima_lib.py:472, in >> MaximaLib._eval_line(self, line, locals, reformat, **kwds) >> 471 if statement: >> --> 472 maxima_eval("#$%s$" % statement) >> 473 if not reformat: >> >> File ~/TMP/sage-10.0/src/sage/libs/ecl.pyx:830, in >> sage.libs.ecl.EclObject.__call__() >> 829 lispargs = EclObject(list(args)) >> --> 830 return >> ecl_wrap(ecl_safe_apply(self.obj,(<EclObject>lispargs).obj)) >> 831 >> >> File ~/TMP/sage-10.0/src/sage/libs/ecl.pyx:353, in >> sage.libs.ecl.ecl_safe_apply() >> 352 else: >> --> 353 raise RuntimeError("ECL says: {}".format(message)) >> 354 else: >> >> RuntimeError: ECL says: Memory limit reached. Please jump to an outer >> pointer, quit program and enlarge the >> memory limits before executing the program again. >> >> During handling of the above exception, another exception occurred: >> >> TypeError Traceback (most recent call >> last) >> Cell In [7], line 1 >> ----> 1 expr.full_simplify() >> >> File ~/TMP/sage-10.0/src/sage/symbolic/expression.pyx:10749, in >> sage.symbolic.expression.Expression.simplify_full() >> 10747 x = self >> 10748 x = x.simplify_factorial() >> > 10749 x = x.simplify_rectform() >> 10750 x = x.simplify_trig() >> 10751 x = x.simplify_rational() >> >> File ~/TMP/sage-10.0/src/sage/symbolic/expression.pyx:10899, in >> sage.symbolic.expression.Expression.simplify_rectform() >> 10897 >> 10898 """ >> > 10899 simplified_expr = self.rectform() >> 10900 >> 10901 if complexity_measure is None: >> >> File ~/TMP/sage-10.0/src/sage/symbolic/expression.pyx:10549, in >> sage.symbolic.expression.Expression.rectform() >> 10547 0.0 >> 10548 """ >> > 10549 return self.maxima_methods().rectform() >> 10550 >> 10551 def unhold(self, exclude=None): >> >> File ~/TMP/sage-10.0/src/sage/symbolic/maxima_wrapper.py:31, in >> MaximaFunctionElementWrapper.__call__(self, *args, **kwds) >> 18 def __call__(self, *args, **kwds): >> 19 """ >> 20 Return a Sage expression instead of a Maxima pexpect >> interface element. >> 21 >> (...) >> 29 Symbolic Ring >> 30 """ >> ---> 31 return super().__call__(*args, **kwds).sage() >> >> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:696, in >> InterfaceFunctionElement.__call__(self, *args, **kwds) >> 695 def __call__(self, *args, **kwds): >> --> 696 return self._obj.parent().function_call(self._name, >> [self._obj] + list(args), kwds) >> >> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:616, in >> Interface.function_call(self, function, args, kwds) >> 612 self._check_valid_function_name(function) >> 613 s = self._function_call_string(function, >> 614 [s.name() for s in args], >> 615 ['%s=%s'%(key,value.name()) for >> key, value in kwds.items()]) >> --> 616 return self.new(s) >> >> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:385, in >> Interface.new(self, code) >> 384 def new(self, code): >> --> 385 return self(code) >> >> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:298, in >> Interface.__call__(self, x, name) >> 295 pass >> 297 if isinstance(x, str): >> --> 298 return cls(self, x, name=name) >> 299 try: >> 300 # Special methods do not and should not have an option to >> 301 # set the name directly, as the identifier assigned by the >> 302 # interface should stay consistent. An identifier with a >> 303 # user-assigned name might change its value, so we return a >> 304 # new element. >> 305 result = self._coerce_from_special_method(x) >> >> File ~/TMP/sage-10.0/src/sage/interfaces/interface.py:750, in >> InterfaceElement.__init__(self, parent, value, is_name, name) >> 748 self._name = parent._create(value, name=name) >> 749 except (TypeError, RuntimeError, ValueError) as x: >> --> 750 raise TypeError(x) >> >> TypeError: ECL says: Memory limit reached. Please jump to an outer >> pointer, quit program and enlarge the >> memory limits before executing the program again. >> sage: >> >> Since expression is large, I will put a link to full code used if you >> think it is needed. >> >> I am running this on Linux Virtual box with 43 GB of RAM. >> >> --Nasser >> >> > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/7f96330e-fe0a-4858-8363-911122c1afb1n%40googlegroups.com > <https://groups.google.com/d/msgid/sage-devel/7f96330e-fe0a-4858-8363-911122c1afb1n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq2F-tYKzaFMHTTH7dMueoZNbQRv4b9JTOGEq24r4X39Pg%40mail.gmail.com.