M2
M2 copied to clipboard
Use FLINT ball arithmetic for special functions
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
i1 : zeta(1/2 + ii * 14.134725141734695)
stdio:1:1:(3): error: expected a real number
After
i1 : zeta(1/2 + ii * 14.134725141734695)
o1 = -1.04800845464933e-16+6.5803236815108e-16*ii
o1 : CC (of precision 53)
We also move several special functions that were previously handled by Boost Math over to FLINT. There are two (inverseRegularizedBeta and inverseRegularizedGamma -- 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.