Skip to content

Commit

Permalink
Trac #16908: Upgrade Maxima to 5.34.1
Browse files Browse the repository at this point in the history
Tarball:
​http://pub.math.leidenuniv.nl/~bruinpj/sage/maxima-5.34.1.tar.bz2

This appears to fix #14965.

URL: http://trac.sagemath.org/16908
Reported by: pbruin
Ticket author(s): Peter Bruin
Reviewer(s): Jeroen Demeyer
  • Loading branch information
Release Manager authored and vbraun committed Sep 12, 2014
2 parents 157d1b4 + e216b6f commit 5deda28
Show file tree
Hide file tree
Showing 25 changed files with 61 additions and 166 deletions.
12 changes: 3 additions & 9 deletions build/pkgs/maxima/SPKG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,14 @@ The following patches are applied:
executable program. Introduced in Trac #16178 (Build maxima fasl
without asdf).

* infodir.patch: Correct the path to the Info directory.

* limit-replace-logs.patch: Fix for Maxima bug #2621 (gamma limit
error). Introduced in Trac #15033 (Wrong limit value of expression
involving gamma function).
* infodir.patch: Correct the path to the Info directory. Introduced
in Trac #11348 (maxima test fails when install tree is moved).

* matrixexp.patch: Fix matrixexp(matrix([%i*%pi])), which broke after
Maxima 5.29.1. Introduced in Trac #13973.

* maxima_bug_2526.patch: Fix for Maxima bug #2526 (abs_integrate
fails on integrate(sqrt(x + sqrt(x)), x)). Introduced in Trac
#13364 (Upgrade Maxima to 5.29.1).

* maxima.system.patch: Set c::*compile-in-constants* to t.
Introduced in Trac #11966 (OS X 10.7 Lion: Maxima fails to build).

* undoing_true_false_printing_patch.patch: Revert an upstream change
causing '?' to be printed around some words. Introduced in Trac
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/maxima/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=maxima-VERSION.tar.bz2
sha1=8c1a10d0cfb10bb10448fd18b021d73e25fc744a
md5=55140d4f9f7f212fb1cf8479b895862e
cksum=1303222960
sha1=f7bc8466016a9bcb23027ec4e1a28bdc48bdc7df
md5=dd6c256cf1eb5a0ea3e8804874e33772
cksum=2007386721
2 changes: 1 addition & 1 deletion build/pkgs/maxima/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.33.0.p1
5.34.1.p0
54 changes: 0 additions & 54 deletions build/pkgs/maxima/patches/limit-replace-logs.patch

This file was deleted.

6 changes: 3 additions & 3 deletions build/pkgs/maxima/patches/matrixexp.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
--- a/share/linearalgebra/matrixexp.lisp 2013-10-07 04:37:12.000000000 +0100
+++ b/share/linearalgebra/matrixexp.lisp 2014-05-16 02:16:09.112011893 +0100
--- a/share/linearalgebra/matrixexp.lisp
+++ b/share/linearalgebra/matrixexp.lisp
@@ -138,8 +138,8 @@
(print `(ratvars = ,$ratvars gcd = '$gcd algebraic = ,$algebraic))
(print `(ratfac = ,$ratfac))
(merror "Unable to find the spectrum")))
-
- (setq res ($fullratsimp (ncpower (sub (mult z ($ident n)) mat) -1) z))
+
+ (setq res ($fullratsimp ($invert (sub (mult z ($ident n)) mat) '$crering) z))
+ (setq res ($fullratsimp ($invert_by_lu (sub (mult z ($ident n)) mat) '$crering) z))
(setq m (length sp))
(dotimes (i m)
(setq zi (nth i sp))
39 changes: 0 additions & 39 deletions build/pkgs/maxima/patches/maxima_bug_2526.patch

This file was deleted.

4 changes: 2 additions & 2 deletions src/doc/de/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Lösung: Berechnen Sie die Laplace-Transformierte der ersten Gleichung

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*(-?%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(-%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

Das ist schwierig zu lesen, es besagt jedoch, dass

Expand All @@ -228,7 +228,7 @@ Laplace-Transformierte der zweiten Gleichung:

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
-?%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s
-%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s

Dies besagt

Expand Down
2 changes: 1 addition & 1 deletion src/doc/en/constructions/calculus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ The Maclaurin and power series of
sage: [bernoulli(2*i) for i in range(1,7)]
[1/6, -1/30, 1/42, -1/30, 5/66, -691/2730]
sage: maxima(f).powerseries(x,0) # TODO: write this without maxima
'sum((-1)^i2*2^(2*i2-1)*bern(2*i2)*_SAGE_VAR_x^(2*i2)/(i2*factorial(2*i2)),i2,1,inf)
'sum((-1)^i3*2^(2*i3-1)*bern(2*i3)*_SAGE_VAR_x^(2*i3)/(i3*factorial(2*i3)),i3,1,inf)

.. index::
pair: calculus; integration
Expand Down
4 changes: 2 additions & 2 deletions src/doc/en/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ the notation :math:`x=x_{1}`, :math:`y=x_{2}`):

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*(-?%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(-%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

This is hard to read, but it says that

Expand All @@ -221,7 +221,7 @@ Laplace transform of the second equation:

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
-?%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s
-%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s

This says

Expand Down
4 changes: 2 additions & 2 deletions src/doc/fr/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Solution : Considérons la transformée de Laplace de la première équation

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*(-?%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(-%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

La réponse n'est pas très lisible, mais elle signifie que

Expand All @@ -198,7 +198,7 @@ la seconde équation :

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
-?%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s
-%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s

Ceci signifie

Expand Down
4 changes: 2 additions & 2 deletions src/doc/ru/tutorial/tour_algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Sage может использоваться для решения диффер

sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)")
sage: lde1 = de1.laplace("t","s"); lde1
2*(-?%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)
2*(-%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s)-2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s)

Данный результат тяжело читаем, однако должен быть понят как

Expand All @@ -212,7 +212,7 @@ Sage может использоваться для решения диффер

sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)")
sage: lde2 = de2.laplace("t","s"); lde2
-?%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s
-%at('diff(y(t),t,1),t=0)+s^2*'laplace(y(t),t,s)+2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s)-y(0)*s

Результат:

Expand Down
2 changes: 1 addition & 1 deletion src/sage/calculus/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def nintegral(ex, x, a, b,
Now numerically integrating, we see why the answer is wrong::
sage: f.nintegrate(x,0,1)
(-480.00000000000006, 5.329070518200754e-12, 21, 0)
(-480.0000000000001, 5.329070518200754e-12, 21, 0)
It is just because every floating point evaluation of return -480.0
in floating point.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/calculus/desolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,15 +1174,15 @@ def desolve_rk4(de, dvar, ics=None, ivar=None, end_points=None, step=0.1, output
sage: x,y=var('x y')
sage: desolve_rk4(x*y*(2-y),y,ics=[0,1],end_points=1,step=0.5)
[[0, 1], [0.5, 1.12419127424558], [1.0, 1.4615901622888245]]
[[0, 1], [0.5, 1.12419127424558], [1.0, 1.461590162288825]]
Variant 1 for input - we can pass ODE in the form used by
desolve function In this example we integrate bakwards, since
``end_points < ics[0]``::
sage: y=function('y',x)
sage: desolve_rk4(diff(y,x)+y*(y-1) == x-2,y,ics=[1,1],step=0.5, end_points=0)
[[0.0, 8.904257108962112], [0.5, 1.9093279453615346], [1, 1]]
[[0.0, 8.904257108962112], [0.5, 1.909327945361535], [1, 1]]
Here we show how to plot simple pictures. For more advanced
aplications use list_plot instead. To see the resulting picture
Expand Down
2 changes: 1 addition & 1 deletion src/sage/calculus/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
sage: integrate(exp(1-x^2),x)
1/2*sqrt(pi)*erf(x)*e
sage: integrate(sin(x^2),x)
1/8*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x))
1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) - (I - 1)*sqrt(2)*erf(sqrt(-I)*x) + (I + 1)*sqrt(2)*erf((-1)^(1/4)*x))
sage: integrate((1-x^2)^n,x)
integrate((-x^2 + 1)^n, x)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/functions/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def __init__(self):
sage: a = floor(5.4 + x); a
floor(x + 5.40000000000000)
sage: a.simplify()
floor(x + 0.40000000000000036) + 5
floor(x + 0.4000000000000004) + 5
sage: a(x=2)
7
Expand Down
10 changes: 5 additions & 5 deletions src/sage/functions/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _init():
sage: from sage.functions.special import airy_ai
sage: airy_ai(1.0)
0.13529241631288141
0.1352924163128814
sage: sage.functions.special._done
True
"""
Expand All @@ -256,7 +256,7 @@ def meval(x):
sage: from sage.functions.special import airy_ai
sage: airy_bi(1.0)
1.2074235949528713
1.207423594952871
"""
return maxima(x).sage()

Expand Down Expand Up @@ -303,11 +303,11 @@ def _maxima_init_evaled_(self, *args):
TESTS:
Check if complex numbers in the arguments are converted to maxima
correctly :trac:`7557`::
correctly (see :trac:`7557`)::
sage: t = f(1.2+2*I*elliptic_kc(1-.5),.5)
sage: t._maxima_init_(maxima)
'0.88771548861927...*%i'
sage: t._maxima_init_(maxima) # abs tol 1e-13
'0.88771548861928029 - 1.7301614091485560e-15*%i'
sage: t.n() # abs tol 1e-13
0.887715488619280 - 1.79195288804672e-15*I
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/maxima.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
::
sage: maxima("laplace(diff(x(t),t,2),t,s)")
-?%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s
-%at('diff(x(t),t,1),t=0)+s^2*'laplace(x(t),t,s)-x(0)*s
It is difficult to read some of these without the 2d
representation::
Expand Down
26 changes: 12 additions & 14 deletions src/sage/interfaces/maxima_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,9 @@ def _command_runner(self, command, s, redirect=True):
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
res = p.stdout.read()
# ecl-10.2 : 3 lines
# ecl-10.4 : 5 lines
# ecl-11.1 : 4 lines fancy a tango?
# We now get 4 lines of commented verbosity
# We now get 16 lines of commented verbosity
# every time Maxima starts, so we need to get rid of them
for _ in range(4):
for _ in range(16):
res = res[res.find('\n')+1:]
return AsciiArtString(res)
else:
Expand Down Expand Up @@ -244,11 +241,12 @@ def demo(self, s):
EXAMPLES::
sage: maxima.demo('array') # not tested
batching /opt/sage/local/share/maxima/5.16.3/demo/array.dem
sage: maxima.demo('cf') # not tested
read and interpret file: .../local/share/maxima/5.34.1/demo/cf.dem
At the _ prompt, type ';' followed by enter to get next demo
subscrmap : true _
At the '_' prompt, type ';' and <enter> to get next demonstration.
frac1:cf([1,2,3,4])
...
"""
# Should this be implemented without launching a new Maxima session
# i.e. using eval_line ?
Expand Down Expand Up @@ -368,8 +366,8 @@ def console(self):
EXAMPLES::
sage: maxima.console() # not tested (since we can't)
Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp CLISP 2.41 (2006-10-13)
Maxima 5.34.1 http://maxima.sourceforge.net
Using Lisp ECL 12.12.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
Expand Down Expand Up @@ -420,7 +418,7 @@ def version(self):
EXAMPLES::
sage: maxima.version()
'5.33.0'
'5.34.1'
"""
return maxima_version()

Expand Down Expand Up @@ -2349,7 +2347,7 @@ def maxima_version():
sage: from sage.interfaces.maxima_abstract import maxima_version
sage: maxima_version()
'5.33.0'
'5.34.1'
"""
return os.popen('maxima --version').read().split()[-1]

Expand All @@ -2361,7 +2359,7 @@ def maxima_console():
sage: from sage.interfaces.maxima_abstract import maxima_console
sage: maxima_console() # not tested
Maxima 5.29.1 http://maxima.sourceforge.net
Maxima 5.34.1 http://maxima.sourceforge.net
...
"""
os.system('maxima')

0 comments on commit 5deda28

Please sign in to comment.