Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use libgiac instead of giac for integration #31873

Closed
mwageringel opened this issue May 28, 2021 · 19 comments
Closed

use libgiac instead of giac for integration #31873

mwageringel opened this issue May 28, 2021 · 19 comments

Comments

@mwageringel
Copy link

Now that giacpy_sage has been included into Sage by #29171, we can use it for integration instead of the Pexpect interface. This ticket adds a libgiac_integrator which replaces the giac_integrator in the default integrator (which uses Maxima, Giac, and Sympy).

This will resolve issues like #28913 or this ask-sage question where the Pexpect output cannot be parsed by Sage because Giac prints warning messages to the output.

The libgiac_integrator behaves slightly different than the Pexpect-based integrator, in that warning messages issued by Giac are not stripped away anymore.

sage: integrate(abs(cos(x)), x, 0, 2*pi)
Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):
Check [abs(cos(x))]
Discontinuities at zeroes of cos(x) were not checked
4

These messages are generally useful in interactive use. For doctests, the current branch adjusts most of the tests so that they do not depend on the presence of these messages.

Due to the problem at #31655, the first doctest in a file that uses libgiac results in some additional messages, but again the tests are written so that this does not matter. If that ticket is resolved, the second commit could be mostly reverted, but this is not strictly necessary. With the default integrator, these Giac loading messages will appear on the first integral that Maxima cannot solve.

Part of meta-ticket #16688.

CC: @slel

Component: interfaces

Keywords: giac, integration

Author: Markus Wageringel

Branch/Commit: bb15f0f

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/31873

@mwageringel mwageringel added this to the sage-9.4 milestone May 28, 2021
@mwageringel
Copy link
Author

Changed keywords from none to giac

@mwageringel
Copy link
Author

Author: Markus Wageringel

@mwageringel
Copy link
Author

New commits:

900ec8831873: replace giac by libgiac for integration
e02391531873: ignore Giac loading messages in doctests, see #31655

@mwageringel
Copy link
Author

Commit: e023915

@mwageringel
Copy link
Author

Branch: u/gh-mwageringel/31873

@mwageringel
Copy link
Author

Changed keywords from giac to giac, integration

@mwageringel

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2021

Changed commit from e023915 to a47a360

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 18, 2021

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

a47a36031873: fix pyflakes warnings

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2021

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

b591d2aMerge tag '9.4.beta3' into #31873

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 25, 2021

Changed commit from a47a360 to b591d2a

@mkoeppe
Copy link
Member

mkoeppe commented Jul 17, 2021

Reviewer: Matthias Koeppe

@mkoeppe
Copy link
Member

mkoeppe commented Jul 17, 2021

comment:5

LGTM

@mwageringel
Copy link
Author

comment:6

Thanks.

@vbraun
Copy link
Member

vbraun commented Jul 23, 2021

comment:7

test failures

sage -t --long --warn-long 45.1 --random-seed=0 src/sage/symbolic/integration/integral.py  # 2 doctests failed
sage -t --long --warn-long 45.1 --random-seed=0 src/doc/en/prep/Calculus.rst  # 1 doctest failed

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 26, 2021

Changed commit from b591d2a to bb15f0f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 26, 2021

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

4481d50Merge tag '9.4.beta6' into #31873
bb15f0f31873: fix doctests

@mwageringel
Copy link
Author

comment:9

I have fixed the doctests. Now this passes ptestlong again. Also, this does not conflict with #32275.

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 9, 2021
@vbraun
Copy link
Member

vbraun commented Aug 29, 2021

Changed branch from u/gh-mwageringel/31873 to bb15f0f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants