Opened 13 months ago

Closed 6 months ago

#26625 closed enhancement (fixed)

Update maxima to 5.42.2

Reported by: arojas Owned by:
Priority: major Milestone: sage-8.8
Component: packages: standard Keywords: upgrade, maxima
Cc: jdemeyer, fbissey, gh-timokau, saraedum, slelievre Merged in:
Authors: Antonio Rojas Reviewers: François Bissey
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: 2530dbf (Commits) Commit: 2530dbf2cee43963ae055e3bce354b72ec1b1ce8
Dependencies: #12731 Stopgaps:

Description (last modified by arojas)

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 13 months ago by arojas

  • Branch set to u/arojas/update_maxima_to_5_42_1

comment:2 Changed 13 months ago by git

  • Commit set to b1dc567be39ef5d67b5b6e588937d803adcff84c

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

b1dc567Update maxima to 5.42.1

comment:3 Changed 13 months ago by arojas

  • Authors set to Antonio Rojas
  • Cc jdemeyer fbissey gh-timokau saraedum added
  • Component changed from PLEASE CHANGE to packages: standard
  • Type changed from PLEASE CHANGE to enhancement
Last edited 13 months ago by arojas (previous) (diff)

comment:4 Changed 13 months ago by arojas

  • Description modified (diff)

comment:5 Changed 13 months ago by git

  • Commit changed from b1dc567be39ef5d67b5b6e588937d803adcff84c to bda23206074f6a332005c28e6dd6bed03e61fd84

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

bda2320Update one doctest for maxima 5.42

comment:6 Changed 13 months ago by arojas

  • Status changed from new to needs_review

comment:7 Changed 13 months ago by fbissey

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

comment:8 Changed 13 months ago by fbissey

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 13 months ago by fbissey

Which is wrong of course.

comment:10 follow-up: Changed 13 months ago by 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)

comment:11 in reply to: ↑ 10 Changed 13 months ago by arojas

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 13 months ago by arojas

  • Status changed from needs_review to needs_work

comment:13 Changed 13 months ago by fbissey

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 13 months ago by arojas

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 11 months ago by slelievre

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 11 months ago by arojas

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 11 months ago by arojas

  • Report Upstream changed from N/A to Reported upstream. No feedback yet.

comment:18 follow-up: Changed 11 months ago by slelievre

comment:19 Changed 10 months ago by git

  • Commit changed from bda23206074f6a332005c28e6dd6bed03e61fd84 to 2530dbf2cee43963ae055e3bce354b72ec1b1ce8

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 10 months ago by arojas

  • Description modified (diff)
  • Summary changed from Update maxima to 5.42.1 to Update maxima to 5.42.2

comment:21 in reply to: ↑ 18 Changed 10 months ago by kcrisman

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 8 months ago by arojas

  • Dependencies set to #12731

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

comment:23 Changed 7 months ago by fbissey

  • Status changed from needs_work to needs_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 7 months ago by slelievre

  • Cc slelievre added
  • Keywords upgrade maxima added

comment:25 Changed 7 months ago by fbissey

  • Reviewers set to François Bissey
  • Status changed from needs_review to positive_review

#12731 is closed so this can go in.

comment:26 Changed 7 months ago by chapoton

  • Milestone changed from sage-8.5 to sage-8.8

comment:27 Changed 6 months ago by vbraun

  • Branch changed from u/arojas/update_maxima_to_5_42_1 to 2530dbf2cee43963ae055e3bce354b72ec1b1ce8
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.