Opened 4 years ago

Closed 4 years ago

#26625 closed enhancement (fixed)

Update maxima to 5.42.2

Reported by: Antonio Rojas Owned by:
Priority: major Milestone: sage-8.8
Component: packages: standard Keywords: upgrade, maxima
Cc: Jeroen Demeyer, François Bissey, Timo Kaufmann, Julian Rüth, Samuel Lelièvre Merged in:
Authors: Antonio Rojas Reviewers: François Bissey
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: 2530dbf (Commits, GitHub, GitLab) Commit: 2530dbf2cee43963ae055e3bce354b72ec1b1ce8
Dependencies: #12731 Stopgaps:

Status badges

Description (last modified by Antonio Rojas)

Also change the command line argument from -r (run in interactive mode) to --batch-string (run in batch mode), which is what we want here. The only reason it worked before was a bug in maxima that made -r behave like batch mode [1]. This is fixed in 5.42, so using -r now makes the maxima interface hang waiting for input.

--batch-string also echoes the input, so we need to remove one more line before processing the output.

Tarball: ​https://vorboss.dl.sourceforge.net/project/maxima/Maxima-source/5.42.2-source/maxima-5.42.2.tar.gz

[1] ​https://sourceforge.net/p/maxima/mailman/message/36177637/

Change History (27)

comment:1 Changed 4 years ago by Antonio Rojas

Branch: u/arojas/update_maxima_to_5_42_1

comment:2 Changed 4 years ago by git

Commit: b1dc567be39ef5d67b5b6e588937d803adcff84c

Branch pushed to git repo; I updated commit sha1. New commits:

b1dc567Update maxima to 5.42.1

comment:3 Changed 4 years ago by Antonio Rojas

Authors: Antonio Rojas
Cc: Jeroen Demeyer François Bissey Timo Kaufmann Julian Rüth added
Component: PLEASE CHANGEpackages: standard
Type: PLEASE CHANGEenhancement
Last edited 4 years ago by Antonio Rojas (previous) (diff)

comment:4 Changed 4 years ago by Antonio Rojas

Description: modified (diff)

comment:5 Changed 4 years ago by git

Commit: b1dc567be39ef5d67b5b6e588937d803adcff84cbda23206074f6a332005c28e6dd6bed03e61fd84

Branch pushed to git repo; I updated commit sha1. New commits:

bda2320Update one doctest for maxima 5.42

comment:6 Changed 4 years ago by Antonio Rojas

Status: newneeds_review

comment:7 Changed 4 years ago by François Bissey

No progress concerning the patch set. That's a bit annoying.

comment:8 Changed 4 years ago by François Bissey

I am getting

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 728, in sage.symbolic.integration.integral.integrate
Failed example:
    integrate(f, x, 0, 2*pi)  # long time (4s on sage.math, 2012)
Expected:
    integrate(abs(sin(x)), x, 0, 2*pi)
Got:
    0
**********************************************************************

comment:9 Changed 4 years ago by François Bissey

Which is wrong of course.

comment:10 Changed 4 years ago by François Bissey

And now that I look at the code in that area I see this is #10914 coming back.

    We will not get an evaluated answer here, which is better than
    the previous (wrong) answer of zero. See :trac:`10914`::
        sage: f = abs(sin(x))
        sage: integrate(f, x, 0, 2*pi)  # long time (4s on sage.math, 2012)
        integrate(abs(sin(x)), x, 0, 2*pi)

comment:11 in reply to:  10 Changed 4 years ago by Antonio Rojas

Replying to fbissey:

And now that I look at the code in that area I see this is #10914 coming back.

    We will not get an evaluated answer here, which is better than
    the previous (wrong) answer of zero. See :trac:`10914`::
        sage: f = abs(sin(x))
        sage: integrate(f, x, 0, 2*pi)  # long time (4s on sage.math, 2012)
        integrate(abs(sin(x)), x, 0, 2*pi)

Weird, since maxima does give the right answer now

comment:12 Changed 4 years ago by Antonio Rojas

Status: needs_reviewneeds_work

comment:13 Changed 4 years ago by François Bissey

Since I was looking from the sage-on-gentoo perspective there is always the possibility that the maxima maintainer re-introduced a bug (doubtful but possible).

comment:14 Changed 4 years ago by Antonio Rojas

FWIW this is the commit that breaks it

https://sourceforge.net/p/maxima/code/ci/801a0bb782fd09b9907a599541e1bff622ea453d

I can't decrypt what it means though, or why it breaks this test in sage but not in maxima itself.

comment:15 Changed 4 years ago by Samuel Lelièvre

Regarding integrals of abs(sin(x)) and related, see

To explore anything to do with Maxima, it's important to remember that Sage starts Maxima by setting some defaults including domain : complex and loading some packages including abs_integrate, leading to differences with running Maxima on its own.

See lines 171 to 173 in src/sage/interfaces/maxima_lib.py

init_code = ['besselexpand : true', 'display2d : false',
            'domain : complex', 'keepfloat : true',
            'load(to_poly_solve)', 'load(simplify_sum)',
            'load(abs_integrate)', 'load(diag)']

Bugs in Maxima can be discussed on the maxima-discuss mailing list, always recalling these specifics of running Maxima in Sage.

comment:16 Changed 4 years ago by Antonio Rojas

Ah indeed, after 'load(abs_integrate)' I can reproduce the issue in maxima

(%i2) load(abs_integrate);
(%o2) /usr/share/maxima/5.42.1/share/contrib/integration/abs_integrate.mac
(%i3) integrate(abs(sin(x)),x,0,2*%pi);
(%o3)                                  0

comment:17 Changed 4 years ago by Antonio Rojas

Report Upstream: N/AReported upstream. No feedback yet.

comment:18 Changed 4 years ago by Samuel Lelièvre

comment:19 Changed 4 years ago by git

Commit: bda23206074f6a332005c28e6dd6bed03e61fd842530dbf2cee43963ae055e3bce354b72ec1b1ce8

Branch pushed to git repo; I updated commit sha1. New commits:

ff20568Merge branch 'develop' of git://git.sagemath.org/sage into t/26625/update_maxima_to_5_42_1
2530dbfUpdate maxima to 5.42.2

comment:20 Changed 4 years ago by Antonio Rojas

Description: modified (diff)
Summary: Update maxima to 5.42.1Update maxima to 5.42.2

comment:21 in reply to:  18 Changed 4 years ago by Karl-Dieter Crisman

Replying to slelievre:

For reference, Maxima bugs dealing with abs(sin(x)) or abs(cos(x)):

Also for reference, see #12731 and/or the wiki part about abs_integrate problems.

comment:22 Changed 4 years ago by Antonio Rojas

Dependencies: #12731

Adding #12731 as a dependency, since it seems unlikely this will get any attention upstream.

comment:23 Changed 4 years ago by François Bissey

Status: needs_workneeds_review

I am putting this as "need_review" since #12731 is getting attention. I am ready to move this ticket to a positive review once #12731 is merged.

comment:24 Changed 4 years ago by Samuel Lelièvre

Cc: Samuel Lelièvre added
Keywords: upgrade maxima added

comment:25 Changed 4 years ago by François Bissey

Reviewers: François Bissey
Status: needs_reviewpositive_review

#12731 is closed so this can go in.

comment:26 Changed 4 years ago by Frédéric Chapoton

Milestone: sage-8.5sage-8.8

comment:27 Changed 4 years ago by Volker Braun

Branch: u/arojas/update_maxima_to_5_42_12530dbf2cee43963ae055e3bce354b72ec1b1ce8
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.