Hi all,

I am giving a shot at getting maxima-5.43.0 working for sage-on-gentoo
and it looks good overall but there are couple of things that needs attention.
I believe that is the first time in a long while we had maxima tests
running in Gentoo.
Two of the patches that sage uses are breaking maxima's test suite.
Namely:
matrixexp.patch introduced for
https://trac.sagemath.org/ticket/13973#comment:19
The behavior the patch is fixing is still happening.

undoing_true_false_printing_patch.patch:
introduced in https://trac.sagemath.org/ticket/13364
More on that later.

Upgrading with or without those patches raise a few of doctests
failures
sage -t --long /usr/lib64/python2.7/site-packages/sage/symbolic/integration/integral.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/symbolic/integration/integral.py", line 827, in sage.symbolic.integration.integral.integrate
Failed example:
    a = integral(log(cot(x) - 1), x, 0, pi/4); a  # long time (about 6 s)
Expected:
-1/4*pi*log(2) - 1/2*I*dilog(I + 1) + 1/2*I*dilog(-I + 1) + 1/2*I*dilog(1/2*I + 1/2) - 1/2*I*dilog(-1/2*I + 1/2)
Got:
1/4*pi*(I*pi + log(2)) - 1/2*pi*log(2) - 1/2*I*dilog(I + 1) + 1/2*I*dilog(-I + 1) + 1/2*I*dilog(1/2*I + 1/2) - 1/2*I*dilog(-1/2*I + 1/2)
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/symbolic/integration/integral.py", line 829, in sage.symbolic.integration.integral.integrate
Failed example:
    abs(N(a - pi*log(2)/8)) < 1e-15  # long time
Expected:
    True
Got:
    False
**********************************************************************
sage -t --long /usr/lib64/python2.7/site-packages/sage/interfaces/maxima_abstract.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/maxima_abstract.py", line 284, in sage.interfaces.maxima_abstract.MaximaAbstract.completions
Failed example:
    sorted(maxima.completions('gc', verbose=False))
Expected:
    ['gcd', 'gcdex', 'gcfactor', 'gctime']
Got:
    ['gcd', 'gcd\\-impl', 'gcdex', 'gcfactor', 'gcfactor\\-impl', 'gctime']
**********************************************************************


The second one in integral.py probably needs a bit of attention.

If one includes all the current patches from sage, no other doctests fails. But when removing the two patches mentioned above to get maxima
to pass its test suite I get the following failures in sage

sage -t --long /usr/lib64/python2.7/site-packages/sage/calculus/calculus.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/calculus/calculus.py", line 142, in sage.calculus.calculus
Failed example:
    e^M
Exception raised:
    Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.calculus.calculus[32]>", line 1, in <module>
        e**M
File "sage/symbolic/constants_c.pyx", line 172, in sage.symbolic.constants_c.E.__pow__ (/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/symbolic/constants_c.cpp:2626)
        return right.exp()
File "sage/matrix/matrix_symbolic_dense.pyx", line 383, in sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense.exp (/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/matrix/matrix_symbolic_dense.c:3918)
        z = maxima('matrixexp(%s), keepfloat: false' % m.name())
File "/usr/lib64/python2.7/site-packages/sage/interfaces/interface.py", line 288, in __call__
        return cls(self, x, name=name)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/interface.py", line 710, in __init__
        raise TypeError(x)
    TypeError: ECL says: Error executing code in Maxima:
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/calculus/calculus.py", line 1200, in sage.calculus.calculus.limit
Failed example:
    limit(x^a,x=0)
Expected:
    Traceback (most recent call last):
    ...
    ValueError: Computation failed since Maxima requested additional
    constraints; using the 'assume' command before evaluation *may* help
    (example of legal syntax is 'assume(a>0)', see `assume?` for
     more details)
    Is a an even number?
Got:
    <BLANKLINE>
    Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute
        exec(compiled, globs)
File "<doctest sage.calculus.calculus.limit[15]>", line 1, in <module>
        limit(x**a,x=Integer(0))
File "/usr/lib64/python2.7/site-packages/sage/calculus/calculus.py", line 1368, in limit
        l = maxima.sr_limit(ex, v, a)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 990, in sr_limit
        self._missing_assumption(s)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 1035, in _missing_assumption
        raise ValueError(outstr)
ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(a>0)', see `assume?` for more details)
    Is a an even\ number?
**********************************************************************
sage -t --long /usr/lib64/python2.7/site-packages/sage/matrix/matrix_symbolic_dense.pyx
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/matrix/matrix_symbolic_dense.pyx", line 332, in sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense.exp
Failed example:
    m.exp()
Exception raised:
    Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute
        exec(compiled, globs)
File "<doctest sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense.exp[6]>", line 1, in <module>
        m.exp()
File "sage/matrix/matrix_symbolic_dense.pyx", line 383, in sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense.exp (/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/matrix/matrix_symbolic_dense.c:3918)
        z = maxima('matrixexp(%s), keepfloat: false' % m.name())
File "sage/misc/lazy_import.pyx", line 354, in sage.misc.lazy_import.LazyImport.__call__ (/dev/shm/portage/sci-mathematics/sage-9999/work/sage-9999/src-python2_7/build/cythonized/sage/misc/lazy_import.c:3696)
        return self.get_object()(*args, **kwds)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/interface.py", line 288, in __call__
        return cls(self, x, name=name)
File "/usr/lib64/python2.7/site-packages/sage/interfaces/interface.py", line 710, in __init__
        raise TypeError(x)
    TypeError: ECL says: Error executing code in Maxima:
**********************************************************************

matrixexp.patch fixes the "Error executing code in Maxima" failure
while the other patch deals with "even\ " instead of "even " in calculus.py. Which is slightly different form "?" appearing in random
place as in the original issue.

I think undoing_true_false_printing_patch.patch should be dropped in
favor of changing the doctest a bit.

But matrixexp.patch seems to be still needed and it leaves us in a place
where we cannot have sage and maxima both running their testsuites
successfully.

Thoughts?

Francois

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d035c99c-5d89-0392-ade1-60c4dea9803f%40gmail.com.

Reply via email to