-
Notifications
You must be signed in to change notification settings - Fork 231
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 FLINT ball arithmetic for special functions #3286
Conversation
684756a
to
43a25d3
Compare
I'm going to backport FLINT 3 for the PPA so we don't need to build it for all the Ubuntu GitHub builds. Hopefully, this fixes the weird "element not invertible" errors we're getting again (see also #2973 (comment)). |
That may be useful for some people, though alternatively once #3288 is working we don't need to use 22.04 for github builds. |
The "element not invertible" errors are still happening with the PPA FLINT 3 package... |
The problem here was that ubuntu's flint was too old, and putting the newer version was incompatible with factory, right? Did you try putting newer flint together with a newer factory (and possibly normaliz) on PPA? Those are the only libraries that we use and depend on flint. |
Yes, that was the problem. I haven't tried backporting the others to Ubuntu 22.04 since I figured it would be easier to just wait for #3288. |
I don't know when that might happen -- I don't have a macos and I don't think Mike or anyone else has looked at it. |
I suppose I could cherry-pick the Ubuntu-only changes from that PR for this one. Would that be ok? |
You could do that, but I'm confused, why is M2 working on Ubuntu 22.04 not important? |
It's definitely important! I was specifically thinking about not having to spend the time building FLINT 3 during the GitHub builds. Otherwise, in Ubuntu 22.04, we can either build FLINT 3 (cmake) or build against FLINT 2 + Arb (autotools). |
But that's not why this PR is failing, right? The cmake-ubuntu builds compile flint, but they still fail, and the autotools-ubuntu build also failed last time. |
The autotools-ubuntu build failed last time because it was still using the FLINT 3 PPA package that caused the weird I just pushed a new version requiring Factory 4.4.0 (the first version with FLINT 3 support) in the cmake build, so hopefully that will fix those builds. |
a6c4bfe
to
f77e615
Compare
752e011
to
a0a014a
Compare
.github/workflows/test_build.yml
Outdated
@@ -85,7 +85,7 @@ jobs: | |||
sudo apt-get install -y -q --no-install-recommends libboost-stacktrace-dev \ | |||
libncurses-dev libncurses5-dev libreadline-dev libeigen3-dev liblapack-dev libxml2-dev \ | |||
libgc-dev libgdbm-dev libglpk-dev libgmp3-dev libgtest-dev libmpfr-dev libmpfi-dev libntl-dev gfan \ | |||
libgivaro-dev libboost-regex-dev fflas-ffpack libflint-dev libmps-dev libfrobby-dev \ | |||
libgivaro-dev libboost-regex-dev fflas-ffpack libflint-dev libflint-arb-dev libmps-dev libfrobby-dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just resign to using the ppa package for flint and factory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly laziness. :)
I deleted the FLINT package from the PPA because of the BeginningMacaulay2
example bug. It would likely be fixed by packaging factory for the PPA, but I haven't done that. I figure that we'll likely be switching to Ubuntu 24.04 soon enough that I'm not sure if it's worth the effort.
Once #3288 is merged, could you rebase this just to confirm that the actions don't build flint? Then I think we can merge this. |
Sure thing! |
We require FLINT 3 (and thus Factory 4.4.0) in the cmake build.
Uses flint's ball arithmetic functions
This allows us to use RRi and CC arguments
Without the parentheses, we were trying to call things like numeric(min, 53, 53).
I've rebased this onto |
We add support for FLINT's real and complex ball types to the interpreter. (Prior to FLINT 3, they were available in the Arb library, so we'll need to link against it in older systems.) Eventually, it would be great if these were available at top level, maybe even as coefficients of polynomials. But for right now, we just use them to bolster our support of special functions.
For example, many of our special functions now only take real arguments. But with FLINT, we can support complex and real interval arguments, as well. For example:
Before
After
We also move several special functions that were previously handled by Boost Math over to FLINT. There are two (
inverseRegularizedBeta
andinverseRegularizedGamma
-- both useful for computing quantiles of important probability distributions) that don't appear to be available in FLINT, however, so we aren't able to get rid of Boost Math entirely.This is a draft for now until I get the cmake build working and update the tests and documentation.