[ANN] ArbNumerics

ArbNumerics.jl is ready for use. This package offers performant arbitrary precision floats (ArbFloat), and real or complex extents ArbReal, ArbComplex. These two enclosure types always include the mathematically correct result.

All common arithmetic and elementary functions are supported. Special functions are available. Some matrix operations are supported. Math functions work with each type.

The docs cover this and more.

17 Likes

Cool!

Here’s a field experiment

julia> minimize!(himmelblau!, [ArbFloat(1.5), ArbFloat(1.5)], (BFGS(Direct()), BackTracking()), B0, options)
(ArbFloat{128}[3.0, 2.0], 0, ArbFloat{128}[0, 0], 18)

(that second to last vector is the gradient, yay, it’s 0)

6 Likes

Classic Julia synergy, never grows old!

2 Likes

Yeah. It doesn’t show from the example above, but as always I really did just wrap the first two arguments in ArbFloat. I chose the direct approximation there, because this means that there’s a cholesky factorization in there and some other linear algebra, and I didn’t have to change a line. Much appreciation towards Julia!

3 Likes

Does this mean that things like Float{64} could live in Base? That could be a huge improvement in terms of factorizing.

How does this compare with Nemo’s arb types?

Both packages use Fredrik Johansson’s Arb C Library. Nemo is a wonderful work, and I have benefited greatly from their experience and expertise. So, please, use and enjoy. The two packages run the same library code for arithmetic and for calculating elementary and other functions.

These packages have different orientations and purposes. Nemo is built for advanced algebraic processing, and supports using integration and polynomials with Arb types directly. I do not (although PRs are welcome). Both support matrix ops, Nemo’s is deeper – that is a very one-way street (thank you Bill, Fredrik, Tommy).

ArbNumerics emphasizes coherence with Julia, provides many special functions, has deeply integrated precision-based processing, and is not trying to be Nemo.

3 Likes