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 the faster libgiac interface for "giac" integration #38686

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

orlitzky
Copy link
Contributor

While working on #38668, I noticed that all of our examples that use giac for integration do so with algorithm='giac'. This uses the pexpect interface that is much slower (and simply sloppier) than the library interface that would be used with algorithm='libgiac'.

To fix this, I could just change those examples to algorithm='libgiac', but since the libgiac interface is better in every way, that seems kind of rude to me. Most users aren't going to know what lib-anything is, and if they just want to use giac, they're going to try algorithm='giac'. So instead this PR makes algorithm='giac' do the right thing, and use the better interface. I've left the algorithm='libgiac' alone for now to avoid breaking any code.

Afterwards I have removed the pexpect giac integrator entirely, because there's no reason to use it, and no other code in sagelib uses it.

…egration

The library interface to libgiac is much more efficient than the
pexpect one, but the name algorithm="giac" is more attractive
(especially to newcomers) than algorithm="libgiac". We should just
Do The Right Thing and use libgiac when "giac" is requested.
The pexpect integrator is unused now that the "giac" integrator uses
libgiac. We also add a few "# needs sage.libs.giac" tags to the tests
that use the libgiac integrator, because they obviously will fail when
libgiac is not there.
One example in this file integrates with algorithm='giac', which can
fail if sage.libs.giac is not available to perform the integration.
One example in this file integrates with algorithm='giac', which can
fail if sage.libs.giac is not available to perform the integration.
…tegration

A few examples in this file integrate with algorithm='giac', which can
fail if sage.libs.giac is not available to perform the integration.
Copy link

Documentation preview for this PR (built with commit 093c840; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@orlitzky
Copy link
Contributor Author

AFAICS the CI failure is an unrelated timeout:

2024-09-20T15:19:09.1450225Z ----------------------------------------------------------------------
2024-09-20T15:19:09.1451853Z sage -t --long --random-seed=286735480429121101562228604801325644303 src/sage/data_structures/bounded_integer_sequences.pyx  # Timed out
2024-09-20T15:19:09.1453353Z ----------------------------------------------------------------------

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

Successfully merging this pull request may close these issues.

1 participant